Skip to content

tests/test_tcp.py::Test_AIO_TCP::test_create_connection_open_con_addr fails on Python 3.13.9 #701

@mgorny

Description

@mgorny
$ pytest tests/test_tcp.py::Test_AIO_TCP::test_create_connection_open_con_addr -Wignore
========================================================= test session starts =========================================================
platform linux -- Python 3.13.9, pytest-8.4.2, pluggy-1.6.0
rootdir: /tmp/uvloop
configfile: pyproject.toml
collected 1 item                                                                                                                      

tests/test_tcp.py F

============================================================== FAILURES ===============================================================
__________________________________________ Test_AIO_TCP.test_create_connection_open_con_addr __________________________________________
TypeError: data argument must be a bytes, bytearray, or memoryview object, not 'str'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.13/unittest/case.py", line 58, in testPartExecutor
    yield
  File "/usr/lib/python3.13/unittest/case.py", line 651, in run
    self._callTestMethod(testMethod)
    ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
  File "/usr/lib/python3.13/unittest/case.py", line 606, in _callTestMethod
    if method() is not None:
       ~~~~~~^^
  File "/tmp/uvloop/tests/test_tcp.py", line 425, in test_create_connection_open_con_addr
    self._test_create_connection_1(client)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
  File "/tmp/uvloop/tests/test_tcp.py", line 483, in _test_create_connection_1
    run(client_wrapper)
    ~~~^^^^^^^^^^^^^^^^
  File "/tmp/uvloop/tests/test_tcp.py", line 479, in run
    self.loop.run_until_complete(asyncio.gather(*tasks))
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/asyncio/base_events.py", line 725, in run_until_complete
    return future.result()
           ~~~~~~~~~~~~~^^
  File "/tmp/uvloop/tests/test_tcp.py", line 464, in client_wrapper
    await client(addr)
  File "/tmp/uvloop/tests/test_tcp.py", line 410, in client
    with self.assertRaisesRegex(TypeError, re):
         ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/unittest/case.py", line 276, in __exit__
    self._raiseFailure('"{}" does not match "{}"'.format(
    ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
             expected_regex.pattern, str(exc_value)))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/unittest/case.py", line 200, in _raiseFailure
    raise self.test_case.failureException(msg)
AssertionError: "(a bytes-like object)|(must be byte-ish)" does not match "data argument must be a bytes, bytearray, or memoryview object, not 'str'"
======================================================= short test summary info =======================================================
FAILED tests/test_tcp.py::Test_AIO_TCP::test_create_connection_open_con_addr - AssertionError: "(a bytes-like object)|(must be byte-ish)" does not match "data argument must be a bytes, bytearray, or memoryview...
========================================================== 1 failed in 5.19s ==========================================================

On top of 74f4c96 (0.22.1). Looks like the >= (3, 14) condition should read >= (3, 13)?

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