Bug 2259527

Summary: python-distlib fails to build with Python 3.13: AssertionError: b'[Interpreter(id=0, isolated=None)]' not found in b'Traceback (most recent call last):
Product: [Fedora] Fedora Reporter: Karolina Surma <ksurma>
Component: python-distlibAssignee: Charalampos Stratakis <cstratak>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 40CC: cstratak, ksurma, logans, mhroncok, python-packagers-sig, torsava
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: 2024-02-28 13:15:35 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: 2244836    

Description Karolina Surma 2024-01-22 08:37:46 UTC
python-distlib fails to build with Python 3.13.0a3.

=================================== FAILURES ===================================
________________________ ScriptTestCase.test_script_run ________________________

self = <test_scripts.ScriptTestCase testMethod=test_script_run>

    def test_script_run(self):
        if sys.version_info[:2] < (3, 13):
            target = 'cgi:print_directory'
        else:
            target = 'test.support.interpreters:list_all'
        files = self.maker.make('test = %s' % target)
        self.assertEqual(len(files), 2)
        p = subprocess.Popen([sys.executable, files[0]],
                             stdout=subprocess.PIPE, stderr=subprocess.PIPE)
        stdout, stderr = p.communicate()
        if sys.version_info[:2] < (3, 13):
            self.assertIn(b'<H3>Current Working Directory:</H3>', stdout)
            self.assertIn(os.getcwd().encode('utf-8'), stdout)
        else:
>           self.assertIn(b'[Interpreter(id=0, isolated=None)]', stderr)
E           AssertionError: b'[Interpreter(id=0, isolated=None)]' not found in b'Traceback (most recent call last):\n  File "/tmp/distlib-test-5n5zd_29/test", line 5, in <module>\n    from test.support.interpreters import list_all\nModuleNotFoundError: No module named \'test.support.interpreters\'\n'

tests/test_scripts.py:342: AssertionError
=========================== short test summary info ============================
FAILED tests/test_scripts.py::ScriptTestCase::test_script_run - AssertionErro...
===== 1 failed, 202 passed, 34 skipped, 1 deselected, 5 warnings in 10.06s =====

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

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.13/fedora-rawhide-x86_64/06931610-python-distlib/

For all our attempts to build python-distlib with Python 3.13, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.13/package/python-distlib/

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

Let us know here if you have any questions.

Python 3.13 is planned to be included in Fedora 41.
To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.13.
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 Karolina Surma 2024-02-14 13:51:45 UTC
Upstream issue: https://github.com/pypa/distlib/issues/214

Comment 2 Aoife Moloney 2024-02-15 23:11:09 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 40 development cycle.
Changing version to 40.