Bug 2211685

Summary: python-tornado fails to build with Python 3.12: AssertionError: Lists differ: [b'asdfqwer'] != [b'asdf', b'qwer']
Product: [Fedora] Fedora Reporter: Tomáš Hrnčiar <thrnciar>
Component: python-tornadoAssignee: Python Maintainers <python-maint>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: rawhideCC: aurelien, gwync, mail, mhroncok, orion, python-packagers-sig, thrnciar, tomspur
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: 2023-06-27 16:24:09 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: 2135404    

Description Tomáš Hrnčiar 2023-06-01 13:46:27 UTC
Setting severity to high because this block urllib3, which is important package for Python 3.12 mass rebuild.

python-tornado fails to build with Python 3.12.0b1.

======================================================================
FAIL: test_chunked (tornado.test.httpclient_test.HTTPClientCommonTestCase.test_chunked)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/tornado-6.3.2/tornado/testing.py", line 102, in __call__
    result = self.orig_method(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/tornado-6.3.2/tornado/test/httpclient_test.py", line 225, in test_chunked
    self.assertEqual(chunks, [b"asdf", b"qwer"])
AssertionError: Lists differ: [b'asdfqwer'] != [b'asdf', b'qwer']

First differing element 0:
b'asdfqwer'
b'asdf'

Second list contains 1 additional elements.
First extra element 1:
b'qwer'

- [b'asdfqwer']
+ [b'asdf', b'qwer']
?        +++++


======================================================================
FAIL: test_gzip (tornado.test.httpclient_test.HTTPClientCommonTestCase.test_gzip)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/tornado-6.3.2/tornado/testing.py", line 102, in __call__
    result = self.orig_method(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/tornado-6.3.2/tornado/test/httpclient_test.py", line 438, in test_gzip
    self.assertEqual(len(response.body), 34)
AssertionError: 28 != 34

======================================================================
FAIL: test_header_callback (tornado.test.httpclient_test.HTTPClientCommonTestCase.test_header_callback)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/tornado-6.3.2/tornado/testing.py", line 102, in __call__
    result = self.orig_method(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/tornado-6.3.2/tornado/test/httpclient_test.py", line 484, in test_header_callback
    self.assertEqual(chunks, [b"asdf", b"qwer"])
AssertionError: Lists differ: [b'asdfqwer'] != [b'asdf', b'qwer']

First differing element 0:
b'asdfqwer'
b'asdf'

Second list contains 1 additional elements.
First extra element 1:
b'qwer'

- [b'asdfqwer']
+ [b'asdf', b'qwer']
?        +++++


======================================================================
FAIL: test_chunked (tornado.test.simple_httpclient_test.SimpleHTTPClientCommonTestCase.test_chunked)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/tornado-6.3.2/tornado/testing.py", line 102, in __call__
    result = self.orig_method(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/tornado-6.3.2/tornado/test/httpclient_test.py", line 225, in test_chunked
    self.assertEqual(chunks, [b"asdf", b"qwer"])
AssertionError: Lists differ: [b'asdfqwer'] != [b'asdf', b'qwer']

First differing element 0:
b'asdfqwer'
b'asdf'

Second list contains 1 additional elements.
First extra element 1:
b'qwer'

- [b'asdfqwer']
+ [b'asdf', b'qwer']
?        +++++


======================================================================
FAIL: test_gzip (tornado.test.simple_httpclient_test.SimpleHTTPClientCommonTestCase.test_gzip)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/tornado-6.3.2/tornado/testing.py", line 102, in __call__
    result = self.orig_method(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/tornado-6.3.2/tornado/test/httpclient_test.py", line 438, in test_gzip
    self.assertEqual(len(response.body), 34)
AssertionError: 28 != 34

======================================================================
FAIL: test_header_callback (tornado.test.simple_httpclient_test.SimpleHTTPClientCommonTestCase.test_header_callback)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/tornado-6.3.2/tornado/testing.py", line 102, in __call__
    result = self.orig_method(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/tornado-6.3.2/tornado/test/httpclient_test.py", line 484, in test_header_callback
    self.assertEqual(chunks, [b"asdf", b"qwer"])
AssertionError: Lists differ: [b'asdfqwer'] != [b'asdf', b'qwer']

First differing element 0:
b'asdfqwer'
b'asdf'

Second list contains 1 additional elements.
First extra element 1:
b'qwer'

- [b'asdfqwer']
+ [b'asdf', b'qwer']
?        +++++


----------------------------------------------------------------------
Ran 1189 tests in 17.011s

FAILED (failures=6, skipped=66)

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

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.12/fedora-rawhide-x86_64/05988268-python-tornado/

For all our attempts to build python-tornado with Python 3.12, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.12/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.12:
https://copr.fedorainfracloud.org/coprs/g/python/python3.12/

Let us know here if you have any questions.

Python 3.12 is planned to be included in Fedora 39. To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.12.
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.