Skip to content

Test failures with Python 3.12 b1 & b2 #3278

@hrnciar

Description

@hrnciar

Hello,

I'd like to ask for help with tornado and its compatibility with Python 3.12. Up until the 7th alpha tornado was building fine. I started to see the following failures with the 1st beta. You can see the failure also in CI of this PR #3277.

Thank you.

======================================================================
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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions