FTBFS - python-testtools does not support Python 3.10

Bug #1951877 reported by Athos Ribeiro
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-testtools (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

As shown in

https://launchpadlibrarian.net/569859852/buildlog_ubuntu-jammy-amd64.python-testtools_2.5.0-2_BUILDING.txt.gz

python-testtools does not support Python 3.10, and FTBFS for jammy.

+ PYTHONPATH=/<<PKGBUILDDIR>> PYTHON=python3.10 python3.10 -m testtools.run testtools.tests.test_suite
/usr/lib/python3.10/runpy.py:126: RuntimeWarning: 'testtools.run' found in sys.modules after import of package 'testtools', but prior to execution of 'testtools.run'; this may result in unpredictable behaviour
  warn(RuntimeWarning(msg))
No entry for terminal type "unknown";
using dumb terminal settings.
Tests running...
======================================================================
FAIL: testtools.tests.test_testresult.TestNonAsciiResults.test_syntax_error
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/<<PKGBUILDDIR>>/testtools/tests/test_testresult.py", line 2676, in test_syntax_error
    self.assertIn(self._as_output(
  File "/<<PKGBUILDDIR>>/testtools/testcase.py", line 399, in assertIn
    self.assertThat(haystack, Contains(needle), message)
  File "/<<PKGBUILDDIR>>/testtools/testcase.py", line 480, in assertThat
    raise mismatch_error
testtools.matchers._impl.MismatchError: ' File "<string>", line 1\n f(a, b c)\n ^\nSyntaxError: ' not in 'Tests running...\n======================================================================\nERROR: test_syntax_error.Test.runTest\n----------------------------------------------------------------------\nTraceback (most recent call last):\n File "/tmp/TestNonAsciiResultsa_jvxgt3/test_syntax_error.py", line 6, in runTest\n exec (\'f(a, b c)\')\n File "<string>", line 1\n f(a, b c)\n ^^^\nSyntaxError: invalid syntax. Perhaps you forgot a comma?\n\nRan 1 test in 0.001s\nFAILED (failures=1)\n'
======================================================================
FAIL: testtools.tests.test_testresult.TestNonAsciiResultsWithUnittest.test_syntax_error
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/<<PKGBUILDDIR>>/testtools/tests/test_testresult.py", line 2676, in test_syntax_error
    self.assertIn(self._as_output(
  File "/<<PKGBUILDDIR>>/testtools/testcase.py", line 399, in assertIn
    self.assertThat(haystack, Contains(needle), message)
  File "/<<PKGBUILDDIR>>/testtools/testcase.py", line 480, in assertThat
    raise mismatch_error
testtools.matchers._impl.MismatchError: ' File "<string>", line 1\n f(a, b c)\n ^\nSyntaxError: ' not in 'E\n======================================================================\nERROR: runTest (test_syntax_error.Test)\ntest_syntax_error.Test.runTest\n----------------------------------------------------------------------\ntesttools.testresult.real._StringException: Traceback (most recent call last):\n File "/tmp/TestNonAsciiResultsWithUnittest3zrnkc8g/test_syntax_error.py", line 6, in runTest\n exec (\'f(a, b c)\')\n File "<string>", line 1\n f(a, b c)\n ^^^\nSyntaxError: invalid syntax. Perhaps you forgot a comma?\n\n\n----------------------------------------------------------------------\nRan 1 test in 0.000s\n\nFAILED (errors=1)\n'

Ran 2625 tests in 1.221s
FAILED (failures=2)
make[1]: *** [debian/rules:36: override_dh_auto_test] Error 1
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
make: *** [debian/rules:10: build] Error 2
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2
--------------------------------------------------------------------------------
Build finished at 2021-11-20T06:46:48Z

Revision history for this message
Athos Ribeiro (athos-ribeiro) wrote (last edit ):
Revision history for this message
Athos Ribeiro (athos-ribeiro) wrote :
Revision history for this message
Rafael David Tinoco (rafaeldtinoco) wrote :

I've used your git-ubuntu branch to generate the source package and upload it. You (server team) will have to break this merge into the 3 commits again during next merge with upstream (debian) as I did not have permission to upload to pkg/ubuntu/devel (not sure why).

$ dput ubuntu python-testtools_2.5.0-2ubuntu1_source.changes
D: Setting host argument.
Checking signature on .changes
gpg: /home/rafaeldtinoco/work/sources/ubuntu/jammy/python-testtools_2.5.0-2ubuntu1_source.changes: Valid signature from A93E0E0AD83C0D0F
Checking signature on .dsc
gpg: /home/rafaeldtinoco/work/sources/ubuntu/jammy/python-testtools_2.5.0-2ubuntu1.dsc: Valid signature from A93E0E0AD83C0D0F
Uploading to ubuntu (via ftp to upload.ubuntu.com):
  Uploading python-testtools_2.5.0-2ubuntu1.dsc: done.
  Uploading python-testtools_2.5.0-2ubuntu1.debian.tar.xz: done.
  Uploading python-testtools_2.5.0-2ubuntu1_source.buildinfo: done.
  Uploading python-testtools_2.5.0-2ubuntu1_source.changes: done.
Successfully uploaded packages.

Please follow migration to check if it migrates good, let me know otherwise.

PS: I have "quilt refreshed" your patch to avoid hunks (in the other SRU proposal as well). Make sure your patches apply clean wen you suggest a merge/fix. Thanks!

Changed in python-testtools (Ubuntu):
status: New → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-testtools - 2.5.0-2ubuntu1

---------------
python-testtools (2.5.0-2ubuntu1) jammy; urgency=medium

  * d/p/add-python-3.10-support.patch: Add support for Python 3.10
    (LP: #1951877)

 -- Athos Ribeiro <email address hidden> Mon, 22 Nov 2021 17:19:39 -0300

Changed in python-testtools (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.