Bug 2050083

Summary: python-ansiwrap fails to build with Python 3.11: TypeError: Population must be a sequence.
Product: [Fedora] Fedora Reporter: Tomáš Hrnčiar <thrnciar>
Component: python-ansiwrapAssignee: Fabian Affolter <mail>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 36CC: code, mail, mhroncok, thrnciar
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-ansiwrap-0.8.4-8.fc37 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-06-27 16:09:36 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: 2016048, 2045102, 2045109, 2098725    

Description Tomáš Hrnčiar 2022-02-03 08:42:33 UTC
python-ansiwrap fails to build with Python 3.11.0a4.

==================================== ERRORS ====================================
____________________ ERROR collecting test/test_ansiwrap.py ____________________
test/test_ansiwrap.py:23: in <module>
    other_lengths = (random.sample(set(range(20, 120)).difference(LINE_LENGTHS), 2) +
/usr/lib64/python3.11/random.py:404: in sample
    raise TypeError("Population must be a sequence.  "
E   TypeError: Population must be a sequence.  For dicts or sets, use sorted(d).
=============================== warnings summary ===============================

https://docs.python.org/3.11/whatsnew/3.11.html

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.11/fedora-rawhide-x86_64/03269995-python-ansiwrap/

For all our attempts to build python-ansiwrap with Python 3.11, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.11/package/python-ansiwrap/

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

Let us know here if you have any questions.

Python 3.11 is planned to be included in Fedora 37. To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.11.
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 Ben Cotton 2022-02-08 20:18:23 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 36 development cycle.
Changing version to 36.

Comment 2 Miro Hrončok 2022-06-20 10:16:49 UTC
*** Bug 2098819 has been marked as a duplicate of this bug. ***

Comment 3 Ben Beasley 2022-06-20 13:39:22 UTC
I’ve submitted a fix upstream. Would you mind reviewing the corresponding downstream PR? Thanks!

https://src.fedoraproject.org/rpms/python-ansiwrap/pull-request/1

Comment 4 Fedora Update System 2022-06-27 16:08:44 UTC
FEDORA-2022-2f33ebf3bb has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2022-2f33ebf3bb

Comment 5 Fedora Update System 2022-06-27 16:09:36 UTC
FEDORA-2022-2f33ebf3bb has been pushed to the Fedora 37 stable repository.
If problem still persists, please make note of it in this bug report.