python-tornado fails to build with Python 3.11.0a1. ====================================================================== ERROR: test_future_error (tornado.test.concurrent_test.GeneratorClientTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/tornado-6.1.0/tornado/testing.py", line 98, in __call__ result = self.orig_method(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/builddir/build/BUILD/tornado-6.1.0/tornado/test/concurrent_test.py", line 125, in test_future_error self.assertRaisesRegexp(CapError, "already capitalized", future.result) # type: ignore ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'GeneratorClientTest' object has no attribute 'assertRaisesRegexp' ====================================================================== ERROR: test_generator_error (tornado.test.concurrent_test.GeneratorClientTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/tornado-6.1.0/tornado/testing.py", line 98, in __call__ result = self.orig_method(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/builddir/build/BUILD/tornado-6.1.0/tornado/test/concurrent_test.py", line 141, in test_generator_error self.io_loop.run_sync(f) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/builddir/build/BUILD/tornado-6.1.0/tornado/ioloop.py", line 530, in run_sync return future_cell[0].result() ^^^^^^^^^^^^^^^^^^^^^^^ File "/builddir/build/BUILD/tornado-6.1.0/tornado/gen.py", line 234, in wrapper yielded = ctx_run(next, result) ^^^^^^^^^^^^^^^^^^^^^ File "/builddir/build/BUILD/tornado-6.1.0/tornado/test/concurrent_test.py", line 138, in f with self.assertRaisesRegexp(CapError, "already capitalized"): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'GeneratorClientTest' object has no attribute 'assertRaisesRegexp' ====================================================================== ERROR: test_header_callback (tornado.test.httpclient_test.HTTPClientCommonTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/tornado-6.1.0/tornado/testing.py", line 98, in __call__ result = self.orig_method(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/builddir/build/BUILD/tornado-6.1.0/tornado/test/httpclient_test.py", line 477, in test_header_callback self.assertRegexpMatches(first_line[0], "HTTP/[0-9]\\.[0-9] 200.*\r\n") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'HTTPClientCommonTestCase' object has no attribute 'assertRegexpMatches' ====================================================================== ERROR: test_read_until_close_with_error (tornado.test.iostream_test.TestIOStream) ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/tornado-6.1.0/tornado/testing.py", line 98, in __call__ result = self.orig_method(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/builddir/build/BUILD/tornado-6.1.0/tornado/testing.py", line 599, in post_coroutine return self.io_loop.run_sync( ^^^^^^^^^^^^^^^^^^^^^^ File "/builddir/build/BUILD/tornado-6.1.0/tornado/ioloop.py", line 530, in run_sync return future_cell[0].result() ^^^^^^^^^^^^^^^^^^^^^^^ File "/builddir/build/BUILD/tornado-6.1.0/tornado/gen.py", line 775, in run yielded = self.gen.send(value) ^^^^^^^^^^^^^^^^^^^^ File "/builddir/build/BUILD/tornado-6.1.0/tornado/test/iostream_test.py", line 787, in test_read_until_close_with_error with self.assertRaisesRegexp(IOError, "boom"): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'TestIOStream' object has no attribute 'assertRaisesRegexp' ====================================================================== ERROR: test_read_until_close_with_error (tornado.test.iostream_test.TestIOStreamSSL) ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/tornado-6.1.0/tornado/testing.py", line 98, in __call__ result = self.orig_method(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/builddir/build/BUILD/tornado-6.1.0/tornado/testing.py", line 599, in post_coroutine return self.io_loop.run_sync( ^^^^^^^^^^^^^^^^^^^^^^ File "/builddir/build/BUILD/tornado-6.1.0/tornado/ioloop.py", line 530, in run_sync return future_cell[0].result() ^^^^^^^^^^^^^^^^^^^^^^^ File "/builddir/build/BUILD/tornado-6.1.0/tornado/gen.py", line 775, in run yielded = self.gen.send(value) ^^^^^^^^^^^^^^^^^^^^ File "/builddir/build/BUILD/tornado-6.1.0/tornado/test/iostream_test.py", line 787, in test_read_until_close_with_error with self.assertRaisesRegexp(IOError, "boom"): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'TestIOStreamSSL' object has no attribute 'assertRaisesRegexp' ====================================================================== ERROR: test_read_until_close_with_error (tornado.test.iostream_test.TestIOStreamSSLContext) ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/tornado-6.1.0/tornado/testing.py", line 98, in __call__ result = self.orig_method(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/builddir/build/BUILD/tornado-6.1.0/tornado/testing.py", line 599, in post_coroutine return self.io_loop.run_sync( ^^^^^^^^^^^^^^^^^^^^^^ File "/builddir/build/BUILD/tornado-6.1.0/tornado/ioloop.py", line 530, in run_sync return future_cell[0].result() ^^^^^^^^^^^^^^^^^^^^^^^ File "/builddir/build/BUILD/tornado-6.1.0/tornado/gen.py", line 775, in run yielded = self.gen.send(value) ^^^^^^^^^^^^^^^^^^^^ File "/builddir/build/BUILD/tornado-6.1.0/tornado/test/iostream_test.py", line 787, in test_read_until_close_with_error with self.assertRaisesRegexp(IOError, "boom"): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'TestIOStreamSSLContext' object has no attribute 'assertRaisesRegexp' ====================================================================== ERROR: test_log_file (tornado.test.log_test.EnablePrettyLoggingTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/tornado-6.1.0/tornado/test/log_test.py", line 151, in test_log_file self.assertRegexpMatches(f.read(), r"^\[E [^]]*\] hello$") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'EnablePrettyLoggingTest' object has no attribute 'assertRegexpMatches' ====================================================================== ERROR: test_log_file_with_timed_rotating (tornado.test.log_test.EnablePrettyLoggingTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/tornado-6.1.0/tornado/test/log_test.py", line 171, in test_log_file_with_timed_rotating self.assertRegexpMatches(f.read(), r"^\[E [^]]*\] hello$") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'EnablePrettyLoggingTest' object has no attribute 'assertRegexpMatches' ====================================================================== ERROR: test_bytes_exception_logging (tornado.test.log_test.LogFormatterTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/tornado-6.1.0/tornado/test/log_test.py", line 115, in test_bytes_exception_logging self.assertRegexpMatches(output, br"Exception.*\\xe9") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'LogFormatterTest' object has no attribute 'assertRegexpMatches' ====================================================================== ERROR: test_bytes_exception_logging (tornado.test.log_test.UnicodeLogFormatterTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/tornado-6.1.0/tornado/test/log_test.py", line 115, in test_bytes_exception_logging self.assertRegexpMatches(output, br"Exception.*\\xe9") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'UnicodeLogFormatterTest' object has no attribute 'assertRegexpMatches' ====================================================================== ERROR: test_error_redefine (tornado.test.options_test.OptionsTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/tornado-6.1.0/tornado/test/options_test.py", line 265, in test_error_redefine self.assertRegexpMatches(str(cm.exception), "Option.*foo.*already defined") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'OptionsTest' object has no attribute 'assertRegexpMatches' ====================================================================== ERROR: test_error_redefine_underscore (tornado.test.options_test.OptionsTest) (a='foo-bar', b='foo-bar') ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/tornado-6.1.0/tornado/test/options_test.py", line 282, in test_error_redefine_underscore self.assertRegexpMatches( ^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'OptionsTest' object has no attribute 'assertRegexpMatches' ====================================================================== ERROR: test_error_redefine_underscore (tornado.test.options_test.OptionsTest) (a='foo_bar', b='foo_bar') ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/tornado-6.1.0/tornado/test/options_test.py", line 282, in test_error_redefine_underscore self.assertRegexpMatches( ^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'OptionsTest' object has no attribute 'assertRegexpMatches' ====================================================================== ERROR: test_error_redefine_underscore (tornado.test.options_test.OptionsTest) (a='foo-bar', b='foo_bar') ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/tornado-6.1.0/tornado/test/options_test.py", line 282, in test_error_redefine_underscore self.assertRegexpMatches( ^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'OptionsTest' object has no attribute 'assertRegexpMatches' ====================================================================== ERROR: test_error_redefine_underscore (tornado.test.options_test.OptionsTest) (a='foo_bar', b='foo-bar') ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/tornado-6.1.0/tornado/test/options_test.py", line 282, in test_error_redefine_underscore self.assertRegexpMatches( ^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'OptionsTest' object has no attribute 'assertRegexpMatches' ====================================================================== ERROR: test_header_callback (tornado.test.simple_httpclient_test.SimpleHTTPClientCommonTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/tornado-6.1.0/tornado/testing.py", line 98, in __call__ result = self.orig_method(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/builddir/build/BUILD/tornado-6.1.0/tornado/test/httpclient_test.py", line 477, in test_header_callback self.assertRegexpMatches(first_line[0], "HTTP/[0-9]\\.[0-9] 200.*\r\n") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'SimpleHTTPClientCommonTestCase' object has no attribute 'assertRegexpMatches' ---------------------------------------------------------------------- Ran 1167 tests in 16.284s FAILED (errors=16, skipped=52) In Python 3.11 many old deprecated unittest features are removed: TestCase method aliases failUnlessEqual, failIfEqual, failUnless, failIf, failUnlessRaises, failUnlessAlmostEqual, failIfAlmostEqual (deprecated in Python 3.1), assertEquals, assertNotEquals, assert_, assertAlmostEquals, assertNotAlmostEquals, assertRegexpMatches, assertRaisesRegexp (deprecated in Python 3.2), and assertNotRegexpMatches (deprecated in Python 3.5). Undocumented and broken TestCase method assertDictContainsSubset (deprecated in Python 3.2). Undocumented <unittest.TestLoader.loadTestsFromModule> TestLoader.loadTestsFromModule() parameter use_load_tests (deprecated and ignored since Python 3.2). An alias of the TextTestResult class: _TextTestResult (deprecated in Python 3.2). (Contributed by Serhiy Storchaka in bpo-45162.) 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/02910746-python-tornado/ For all our attempts to build python-tornado with Python 3.11, see: https://copr.fedorainfracloud.org/coprs/g/python/python3.11/package/python-tornado/ 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 already included in Fedora 36. 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.
Reported upstream: https://github.com/tornadoweb/tornado/issues/3077
Fixed in https://github.com/tornadoweb/tornado/pull/3052, August 2021. Not yet released, last release was 6.1 in October 2020: https://pypi.org/project/tornado/ In https://github.com/tornadoweb/tornado/issues/3077#issuecomment-983197874, they said in December 2021: "I'm trying to get a new release out the door before the end of the year, but I've got some yaks to shave first (dealing with the 3.10 deprecations and moving the CI/build process off travis-ci), and I haven't had much time for Tornado recently so I can't promise anything." So it should be out sooner or later.
Removal of unittest aliases was reverted in Python 3.11 and will be part of Python 3.12, so the above failure is not present anymore, thus I am closing this bugzilla. On the other hand, Hugo's PR will be needed next year though.