https://bugzilla.redhat.com/show_bug.cgi?id=2251779
Bug ID: 2251779 Summary: python-zope-testrunner fails to build with Python 3.13: ImportError: cannot import name '_start_new_thread' from 'threading' Product: Fedora Version: rawhide Status: NEW Component: python-zope-testrunner Assignee: loganjerry@gmail.com Reporter: ksurma@redhat.com QA Contact: extras-qa@fedoraproject.org CC: aurelien@bompard.org, epel-packagers-sig@lists.fedoraproject.org, infra-sig@lists.fedoraproject.org, ksurma@redhat.com, loganjerry@gmail.com, mhroncok@redhat.com, michel@michel-slm.name Blocks: 2244836 (PYTHON3.13) Target Milestone: --- Classification: Fedora
python-zope-testrunner fails to build with Python 3.13.0a1.
This report is automated and not very verbose, but we'll try to get back here with details.
+ python3 -m unittest discover -s zope/testrunner -t . .........................................E ====================================================================== ERROR: zope.testrunner.tests.test_threadsupport (unittest.loader._FailedTest.zope.testrunner.tests.test_threadsupport) ---------------------------------------------------------------------- ImportError: Failed to import test module: zope.testrunner.tests.test_threadsupport Traceback (most recent call last): File "/usr/lib64/python3.13/unittest/loader.py", line 394, in _find_test_path module = self._get_module_from_name(name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib64/python3.13/unittest/loader.py", line 337, in _get_module_from_name __import__(name) File "/builddir/build/BUILDROOT/python-zope-testrunner-6.2-1.fc40.x86_64/usr/lib/python3.13/site-packages/zope/testrunner/tests/test_threadsupport.py", line 16, in <module> from threading import _start_new_thread ImportError: cannot import name '_start_new_thread' from 'threading' (/usr/lib64/python3.13/threading.py). Did you mean: '_start_joinable_thread'?
---------------------------------------------------------------------- Ran 42 tests in 0.014s
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-ra...
For all our attempts to build python-zope-testrunner with Python 3.13, see: https://copr.fedorainfracloud.org/coprs/g/python/python3.13/package/python-z...
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.
Referenced Bugs:
https://bugzilla.redhat.com/show_bug.cgi?id=2244836 [Bug 2244836] Python 3.13
https://bugzilla.redhat.com/show_bug.cgi?id=2251779
--- Comment #2 from Michel Lind michel@michel-slm.name --- Looks like only doctests are failing now
https://bugzilla.redhat.com/show_bug.cgi?id=2251779
Jerry James loganjerry@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED
--- Comment #3 from Jerry James loganjerry@gmail.com --- Yes, there are extra lines of output with python 3.13. This patch fixes the build with 3.13:
--- zope.testrunner-6.4/src/zope/testrunner/tests/testrunner-subunit.rst.orig 2024-02-27 02:42:53.000000000 -0700 +++ zope.testrunner-6.4/src/zope/testrunner/tests/testrunner-subunit.rst 2024-03-14 20:09:07.806043416 -0600 @@ -495,6 +495,7 @@ Let's run tests including a module with Traceback (most recent call last): File "/home/benji/workspace/all-the-trunks/zope.testrunner/src/zope/testrunner/testrunner-ex/sample2/sample23/sampletests_i.py", line 17, in <module> class Test(unittest.TestCase): + ... File "/home/benji/workspace/all-the-trunks/zope.testrunner/src/zope/testrunner/testrunner-ex/sample2/sample23/sampletests_i.py", line 22, in Test raise TypeError('eek') TypeError: eek --- zope.testrunner-6.4/src/zope/testrunner/tests/testrunner-subunit-v2.rst.orig 2024-02-27 02:42:53.000000000 -0700 +++ zope.testrunner-6.4/src/zope/testrunner/tests/testrunner-subunit-v2.rst 2024-03-14 20:09:20.740858494 -0600 @@ -458,6 +458,7 @@ Let's run tests including a module with Traceback (most recent call last): File "/home/benji/workspace/all-the-trunks/zope.testrunner/src/zope/testrunner/testrunner-ex/sample2/sample23/sampletests_i.py", line 17, in <module> class Test(unittest.TestCase): + ... File "/home/benji/workspace/all-the-trunks/zope.testrunner/src/zope/testrunner/testrunner-ex/sample2/sample23/sampletests_i.py", line 22, in Test raise TypeError('eek') TypeError: eek
Sadly, it breaks the build with python 3.12. Apparently ellipsis does not match zero lines. I'm not very familiar with python's doctest module. If somebody knows how to match zero or more lines at that spot, please educate me.
https://bugzilla.redhat.com/show_bug.cgi?id=2251779
Jerry James loganjerry@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Link ID| |Github | |zopefoundation/zope.testrun | |ner/issues/167
https://bugzilla.redhat.com/show_bug.cgi?id=2251779
Miro Hrončok mhroncok@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Severity|unspecified |high
--- Comment #4 from Miro Hrončok mhroncok@redhat.com --- I tried applying https://github.com/zopefoundation/zope.testrunner/pull/172 but it still fails as if the ellipsis was not working:
+ /usr/bin/python3 -m tox --current-env -q --recreate -e py313 Running tests at level 1 Running zope.testrunner.layer.UnitTests tests: Set up zope.testrunner.layer.UnitTests in 0.000 seconds. Running: ............................./usr/lib/python3.13/site-packages/pkg_resources/__init__.py:2833: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('zope')`. Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namesp... declare_namespace(pkg) ............/builddir/build/BUILD/python-zope-testrunner-6.4-build/BUILDROOT/usr/lib/python3.13/site-packages/zope/testrunner/tests/testrunner-ex/gc-after-test.py:59: ResourceWarning: not closed - this is no error: testing ResourceWarning here warn(ResourceWarning( /builddir/build/BUILD/python-zope-testrunner-6.4-build/BUILDROOT/usr/lib/python3.13/site-packages/zope/testrunner/tests/testrunner-ex/gc-after-test.py:59: ResourceWarning: not closed - this is no error: testing ResourceWarning here warn(ResourceWarning( .../builddir/build/BUILD/python-zope-testrunner-6.4-build/BUILDROOT/usr/lib/python3.13/site-packages/zope/testrunner/tests/testrunner-ex/gc-after-test.py:59: ResourceWarning: not closed - this is no error: testing ResourceWarning here warn(ResourceWarning( .
Failure in test /builddir/build/BUILD/python-zope-testrunner-6.4-build/BUILDROOT/usr/lib/python3.13/site-packages/zope/testrunner/tests/testrunner-subunit.rst Failed doctest test for testrunner-subunit.rst File "/builddir/build/BUILD/python-zope-testrunner-6.4-build/BUILDROOT/usr/lib/python3.13/site-packages/zope/testrunner/tests/testrunner-subunit.rst", line 0
---------------------------------------------------------------------- File "/builddir/build/BUILD/python-zope-testrunner-6.4-build/BUILDROOT/usr/lib/python3.13/site-packages/zope/testrunner/tests/testrunner-subunit.rst", line 475, in testrunner-subunit.rst Failed example: testrunner.run_internal(defaults) Differences (ndiff with -expected +actual): test: sample2.badsyntax tags: zope:import_error - error: sample2.badsyntax [... ? --- + error: sample2.badsyntax [ testrunner-ex/sample2/badsyntax.py", line 16 importx unittest # noqa: E999 - ...^ + ^^^^^^^^ - SyntaxError: invalid syntax... ? --- + SyntaxError: invalid syntax ] test: sample2.sample21.sampletests_i tags: zope:import_error error: sample2.sample21.sampletests_i [ Traceback (most recent call last): testrunner-ex/sample2/sample21/sampletests_i.py", Line NNN, in ? - import zope.testrunner.huh # noqa: F401... ? --- + import zope.testrunner.huh # noqa: F401 + ^^^^^^^^^^^^^^^^^^^^^^^^^^ ModuleNotFoundError: No module named 'zope.testrunner.huh' ] test: sample2.sample23.sampletests_i tags: zope:import_error error: sample2.sample23.sampletests_i [ Traceback (most recent call last): testrunner-ex/sample2/sample23/sampletests_i.py", Line NNN, in ? class Test(unittest.TestCase): + ...<4 lines>... + raise TypeError('eek') testrunner-ex/sample2/sample23/sampletests_i.py", Line NNN, in Test raise TypeError('eek') TypeError: eek ] time: YYYY-MM-DD HH:MM:SS.mmmmmmZ test: samplelayers.Layer1:setUp tags: zope:layer - ... + time: YYYY-MM-DD HH:MM:SS.mmmmmmZ + successful: samplelayers.Layer1:setUp ... snip ... + time: YYYY-MM-DD HH:MM:SS.mmmmmmZ + successful: samplelayers.Layer1:tearDown True
.
Failure in test /builddir/build/BUILD/python-zope-testrunner-6.4-build/BUILDROOT/usr/lib/python3.13/site-packages/zope/testrunner/tests/testrunner-subunit-v2.rst Failed doctest test for testrunner-subunit-v2.rst File "/builddir/build/BUILD/python-zope-testrunner-6.4-build/BUILDROOT/usr/lib/python3.13/site-packages/zope/testrunner/tests/testrunner-subunit-v2.rst", line 0
---------------------------------------------------------------------- File "/builddir/build/BUILD/python-zope-testrunner-6.4-build/BUILDROOT/usr/lib/python3.13/site-packages/zope/testrunner/tests/testrunner-subunit-v2.rst", line 436, in testrunner-subunit-v2.rst Failed example: subunit_summarize(testrunner.run_internal, defaults) Differences (ndiff with -expected +actual): - id=sample2.badsyntax status=inprogress + id=sample2.badsyntax status=inprogress ? + - id=sample2.badsyntax + id=sample2.badsyntax ? + - traceback (text/x-traceback...)... + traceback (text/x-traceback; charset="utf8"; language="python") testrunner-ex/sample2/badsyntax.py", line 16 importx unittest # noqa: E999 - ...^ + ^^^^^^^^ - SyntaxError: invalid syntax... ? --- + SyntaxError: invalid syntax <BLANKLINE> - id=sample2.badsyntax status=fail tags=(zope:import_error) + id=sample2.badsyntax status=fail tags=(zope:import_error) ? + - id=sample2.sample21.sampletests_i status=inprogress + id=sample2.sample21.sampletests_i status=inprogress ? + - id=sample2.sample21.sampletests_i + id=sample2.sample21.sampletests_i ? + - traceback (text/x-traceback...) + traceback (text/x-traceback; charset="utf8"; language="python") Traceback (most recent call last): testrunner-ex/sample2/sample21/sampletests_i.py", Line NNN, in ? - import zope.testrunner.huh # noqa: F401... ? --- + import zope.testrunner.huh # noqa: F401 + ^^^^^^^^^^^^^^^^^^^^^^^^^^ ModuleNotFoundError: No module named 'zope.testrunner.huh' <BLANKLINE> - id=sample2.sample21.sampletests_i status=fail tags=(zope:import_error) + id=sample2.sample21.sampletests_i status=fail tags=(zope:import_error) ? + - id=sample2.sample23.sampletests_i status=inprogress + id=sample2.sample23.sampletests_i status=inprogress ? + - id=sample2.sample23.sampletests_i + id=sample2.sample23.sampletests_i ? + - traceback (text/x-traceback...) + traceback (text/x-traceback; charset="utf8"; language="python") Traceback (most recent call last): testrunner-ex/sample2/sample23/sampletests_i.py", Line NNN, in ? class Test(unittest.TestCase): + ...<4 lines>... + raise TypeError('eek') testrunner-ex/sample2/sample23/sampletests_i.py", Line NNN, in Test raise TypeError('eek') TypeError: eek <BLANKLINE> - id=sample2.sample23.sampletests_i status=fail tags=(zope:import_error) + id=sample2.sample23.sampletests_i status=fail tags=(zope:import_error) ? + - id=samplelayers.Layer1:setUp status=inprogress... ? ^^^ + id=samplelayers.Layer1:setUp status=inprogress !runnable ? ^^^^^^^^^^^ - ... + id=samplelayers.Layer1:setUp status=success tags=(zope:layer) !runnable + id=sampletestsf.TestA1.test_x1 status=inprogress ... snip ... + id=samplelayers.Layer1:tearDown status=success tags=(zope:layer) !runnable True
................................................. Ran 95 tests with 2 failures, 0 errors, 0 skipped in 13.140 seconds. Tearing down left over layers: Tear down zope.testrunner.layer.UnitTests in 0.000 seconds.
Tests with failures:
/builddir/build/BUILD/python-zope-testrunner-6.4-build/BUILDROOT/usr/lib/python3.13/site-packages/zope/testrunner/tests/testrunner-subunit.rst
/builddir/build/BUILD/python-zope-testrunner-6.4-build/BUILDROOT/usr/lib/python3.13/site-packages/zope/testrunner/tests/testrunner-subunit-v2.rst py313: exit 1 (13.29 seconds) /builddir/build/BUILD/python-zope-testrunner-6.4-build/zope.testrunner-6.4> zope-testrunner --test-path=src -vc pid=1956 py313: FAIL code 1 (13.29 seconds) evaluation failed :( (13.33 seconds)
https://bugzilla.redhat.com/show_bug.cgi?id=2251779
Miro Hrončok mhroncok@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Assignee|loganjerry@gmail.com |mhroncok@redhat.com
--- Comment #5 from Miro Hrončok mhroncok@redhat.com --- Ah, https://github.com/zopefoundation/zope.testrunner/pull/173 was needed as well.
https://bugzilla.redhat.com/show_bug.cgi?id=2251779
Miro Hrončok mhroncok@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Link ID| |Fedora Package Sources | |python-zope-testrunner/pull | |-request/2 Status|ASSIGNED |POST Assignee|mhroncok@redhat.com |loganjerry@gmail.com
https://bugzilla.redhat.com/show_bug.cgi?id=2251779
Charalampos Stratakis cstratak@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |RAWHIDE Status|POST |CLOSED CC| |cstratak@redhat.com Fixed In Version| |python-zope-testrunner-6.4- | |3.fc41 Last Closed| |2024-06-19 00:17:39
epel-packagers-sig@lists.fedoraproject.org