Bug 1898727

Summary: python-poetry-core fails to build with Python 3.10: Wheel tag regex in tests is not working for 3.10+
Product: [Fedora] Fedora Reporter: Miro Hrončok <mhroncok>
Component: python-poetry-coreAssignee: Miro Hrončok <mhroncok>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: mhroncok, python-sig, thrnciar
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-11-24 10:38:20 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: 1890881    

Description Miro Hrončok 2020-11-17 23:54:45 UTC
python-poetry-core fails to build with Python 3.10.0a2.

        try:
            wheel_data = decode(zip.read("extended-0.1.dist-info/WHEEL"))
    
>           assert (
                re.match(
                    """(?m)^\
    Wheel-Version: 1.0
    Generator: poetry {}
    Root-Is-Purelib: false
    Tag: cp[23]\\d-cp[23]\\dm?u?-.+
    $""".format(
                        __version__
                    ),
                    wheel_data,
                )
                is not None
            )
E           AssertionError: assert None is not None
E            +  where None = <function match at 0x7efe31006940>('(?m)^Wheel-Version: 1.0\nGenerator: poetry 1.0.0\nRoot-Is-Purelib: false\nTag: cp[23]\\d-cp[23]\\dm?u?-.+\n$', 'Wheel-Version: 1.0\nGenerator: poetry 1.0.0\nRoot-Is-Purelib: false\nTag: cp3_10-cp3_10-manylinux2014_x86_64\n')
E            +    where <function match at 0x7efe31006940> = re.match
E            +    and   '(?m)^Wheel-Version: 1.0\nGenerator: poetry 1.0.0\nRoot-Is-Purelib: false\nTag: cp[23]\\d-cp[23]\\dm?u?-.+\n$' = <built-in method format of str object at 0x7efe2f79a5d0>('1.0.0')
E            +      where <built-in method format of str object at 0x7efe2f79a5d0> = '(?m)^Wheel-Version: 1.0\nGenerator: poetry {}\nRoot-Is-Purelib: false\nTag: cp[23]\\d-cp[23]\\dm?u?-.+\n$'.format


This is closely related to bz1891840 but a bit different.

The test asserts the following regex:  cp[23]\\d-cp[23]\\dm?u?-.+

But that doe snot work with double digit Python minor version. Regardless if this ends up cp3_10 or cp310.


I've reported it to upstream: https://github.com/python-poetry/poetry-core/issues/110



For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.10/fedora-rawhide-x86_64/01772492-python-poetry-core/

For all our attempts to build python-poetry-core with Python 3.10, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.10/package/python-poetry-core/

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.10:
https://copr.fedorainfracloud.org/coprs/g/python/python3.10/

Let us know here if you have any questions.

Python 3.10 will be included in Fedora 35. To make that update smoother, we're building Fedora packages with early pre-releases of Python 3.10.
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-11-18 10:19:06 UTC
An upstream PR: https://github.com/python-poetry/poetry-core/pull/111

Building that in copr for now before upstream gets back to us.

Comment 2 Miro Hrončok 2020-11-18 18:26:06 UTC
Upstream PR was merged.

A Fedora PR: https://src.fedoraproject.org/rpms/python-poetry-core/pull-request/1