Bug 1808508

Summary: python-reportlab fails to build with Python 3.9: base64.decodestring() was removed
Product: [Fedora] Fedora Reporter: Miro Hrončok <mhroncok>
Component: python-reportlabAssignee: Antonio T. (sagitter) <anto.trande>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: anto.trande, bdpepple, cstratak, i, icon, mhroncok, mplch, peter, williamjmorenor
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-03-08 08:57:41 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    

Description Miro Hrončok 2020-02-28 17:05:38 UTC
python-reportlab fails to build with Python 3.9.0a4.

+ /usr/bin/python3 docs/genAll.py
Traceback (most recent call last):
  File "/builddir/build/BUILD/reportlab-3.5.34/docs/genAll.py", line 46, in <module>
    _genAll(verbose)
  File "/builddir/build/BUILD/reportlab-3.5.34/docs/genAll.py", line 4, in _genAll
    from reportlab.lib.testutils import setOutDir
  File "/builddir/build/BUILDROOT/python-reportlab-3.5.34-3.fc33.x86_64/usr/lib64/python3.9/site-packages/reportlab/lib/testutils.py", line 21, in <module>
    from reportlab.lib.utils import isCompactDistro, __rl_loader__, rl_isdir, asUnicode
  File "/builddir/build/BUILDROOT/python-reportlab-3.5.34-3.fc33.x86_64/usr/lib64/python3.9/site-packages/reportlab/lib/utils.py", line 10, in <module>
    from base64 import decodestring as base64_decodestring, encodestring as base64_encodestring
ImportError: cannot import name 'decodestring' from 'base64' (/usr/lib64/python3.9/base64.py)


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/01257097-python-reportlab/

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

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 Antonio T. (sagitter) 2020-02-29 11:51:38 UTC
This bug should be fixed on current Rawhide release (3.5.34-4).