Bug 1807186

Summary: python-feedparser fails with Python 3.9: base64.decodestring() was removed
Product: [Fedora] Fedora Reporter: Miro Hrončok <mhroncok>
Component: python-feedparserAssignee: Haïkel Guémar <karlthered>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: awilliam, cstratak, karlthered, lewk, louiz, mcepl, mhroncok, python-sig, quantum.analyst, tir.karthi
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-05-15 16:19:30 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1785415, 1818600, 1836330    

Description Miro Hrončok 2020-02-25 18:48:10 UTC
asv fails to build with Python 3.9.0a3.

______________________ ERROR collecting test/test_feed.py ______________________
test/test_feed.py:19: in <module>
    import feedparser
/usr/lib/python3.9/site-packages/feedparser.py:93: in <module>
    _base64decode = getattr(base64, 'decodebytes', base64.decodestring)
E   AttributeError: module 'base64' has no attribute 'decodestring'


See https://docs.python.org/3.9/whatsnew/3.9.html#removed

"base64.encodestring() and base64.decodestring(), aliases deprecated since Python 3.1, have been removed: use base64.encodebytes() and base64.decodebytes() instead."


For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.9/fedora-rawhide-x86_64/01252370-asv/

For all our attempts to build asv with Python 3.9, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.9/package/asv/

Testing and mass rebuild of packages is happening in copr. You can follow these instructions to test locally in mock if your package builds with Python 3.9:
https://copr.fedorainfracloud.org/coprs/g/python/python3.9/

Let us know here if you have any questions.

Python 3.9 will be included in Fedora 33. To make that update smoother, we're building Fedora packages with early pre-releases of Python 3.9.
A build failure prevents us from testing all dependent packages (transitive [Build]Requires), so if this package is required a lot, it's important for us to get it fixed soon.
We'd appreciate help from the people who know this package best, but if you don't want to work on this now, let us know so we can try to work around it on our side.

Comment 1 Karthikeyan Singaravelan 2020-02-26 16:39:34 UTC
This seems to be an issue with feedparser itself. I have created a PR https://github.com/kurtmckee/feedparser/pull/206.

Comment 2 Miro Hrončok 2020-03-04 10:38:32 UTC
asv now also fails to build in rawhide with:

>       raise exception_class(message, screen, stacktrace)
E       selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: crashed.
E         (unknown error: DevToolsActivePort file doesn't exist)
E         (The process started from chrome location /usr/lib64/chromium-browser/chromium-browser is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
E         (Driver info: chromedriver=80.0.3987.122 (cf72c4c4f7db75bc3da689cd76513962d31c7b52-refs/branch-heads/3987@{#943}),platform=Linux 5.4.8-200.fc31.x86_64 x86_64)

Comment 4 Elliott Sales de Andrade 2020-03-05 10:56:33 UTC
Also, I just noticed the traceback. This is a bug in feedparser, not asv.

Comment 5 Miro Hrončok 2020-05-15 16:06:35 UTC
Haïkel, could you please backport the fix? It's blocking other packages.

If you are not available to look at this now, would you mind if I push the fix as a provenpackager?

Thanks.

Comment 6 Adam Williamson 2020-05-15 16:19:19 UTC
I just went ahead and backported the fix for this, it seems clearly correct and safe. https://koji.fedoraproject.org/koji/taskinfo?taskID=44538036 is building.