Closed
Description
I ran into this when test.yml was run for my other pull request, #3457. It looks as though a depreciation warning in asyncio is being raised when running the tests on 3.14. Here is one of the tracebacks:
======================================================================
ERROR: test_write_after_close (tornado.test.websocket_test.WebSocketTest.test_write_after_close)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/runner/work/tornado/tornado/.tox/py314-full/lib/python3.14/site-packages/tornado/test/websocket_test.py", line 219, in setUp
super().setUp()
~~~~~~~~~~~~~^^
File "/home/runner/work/tornado/tornado/.tox/py314-full/lib/python3.14/site-packages/tornado/testing.py", line 385, in setUp
super().setUp()
~~~~~~~~~~~~~^^
File "/home/runner/work/tornado/tornado/.tox/py314-full/lib/python3.14/site-packages/tornado/testing.py", line 162, in setUp
asyncio.set_event_loop(self.io_loop.asyncio_loop) # type: ignore[attr-defined]
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.14.0-alpha.4/x64/lib/python3.14/asyncio/events.py", line 843, in set_event_loop
warnings._deprecated('asyncio.set_event_loop', remove=(3,16))
~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.14.0-alpha.4/x64/lib/python3.14/warnings.py", line 668, in _deprecated
warn(msg, DeprecationWarning, stacklevel=3)
~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
DeprecationWarning: 'asyncio.set_event_loop' is deprecated and slated for removal in Python 3.16
I tried running the tests on different branch without my changes from the PR and it still failed and upon removing the 3.14 tests it succeeded. So, it appears to specifically be an issue with 3.14.
Metadata
Metadata
Assignees
Labels
No labels