]> git.ipfire.org Git - thirdparty/tornado.git/commit
asyncio: Remove obsolete code
authorBen Darnell <ben@bendarnell.com>
Wed, 8 Feb 2023 20:12:47 +0000 (20:12 +0000)
committerBen Darnell <ben@bendarnell.com>
Wed, 8 Feb 2023 21:13:12 +0000 (21:13 +0000)
commita706b98bd8842b190c6a3e16e28186adb6d131a1
treed9c197af76f97180eab1b173c2c0befa378ab279
parent0f8e10b9756dfa35b5a2345d0d5d978e1e09dc2b
asyncio: Remove obsolete code

AsyncioLoop.start() used to save, set, and restore the thread-local
event loop. This avoided some edge cases in early versions of asyncio;
this appears to no longer be necessary since Python 3.7 introduced
the get_running_loop() method.

Removing this logic improves compatibility with Python 3.12, where
it is difficult if not impossible to do the same thing without
generating DeprecationWarnings.
tornado/platform/asyncio.py