Bug 1829716

Summary: python-setuptools fails to build with Python 3.9: lib2to3 package is deprecated
Product: [Fedora] Fedora Reporter: Miro Hrončok <mhroncok>
Component: python-setuptoolsAssignee: Miro Hrončok <mhroncok>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: rawhideCC: cstratak, infra-sig, lewk, mhroncok, mplch, python-sig, randy, rkuska
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-04 18:25:02 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-04-30 07:37:05 UTC
python-setuptools fails to build with Python 3.9.0a6.

==================================== ERRORS ====================================
__________________ ERROR collecting setuptools/lib2to3_ex.py ___________________
setuptools/lib2to3_ex.py:12: in <module>
    from lib2to3.refactor import RefactoringTool, get_fixers_from_package
/usr/lib64/python3.9/lib2to3/__init__.py:4: in <module>
    warnings.warn(
E   PendingDeprecationWarning: lib2to3 package is deprecated and may not be able to parse Python 3.10+
_______________ ERROR collecting setuptools/command/build_py.py ________________
setuptools/command/build_py.py:16: in <module>
    from setuptools.lib2to3_ex import Mixin2to3
setuptools/lib2to3_ex.py:12: in <module>
    from lib2to3.refactor import RefactoringTool, get_fixers_from_package
/usr/lib64/python3.9/lib2to3/__init__.py:4: in <module>
    warnings.warn(
E   PendingDeprecationWarning: lib2to3 package is deprecated and may not be able to parse Python 3.10+

...

See https://bugs.python.org/issue40360


lib2to3 package is deprecated and may not be able to parse Python 3.10+. The tests fail becaus ethey treat PendingDeprecationWarning as error.


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

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

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 Miro Hrončok 2020-04-30 07:39:57 UTC
Reported upstream https://github.com/pypa/setuptools/issues/2081

Comment 2 Miro Hrončok 2020-04-30 08:27:01 UTC
Will add https://github.com/pypa/setuptools/pull/2082