cpython
cpython copied to clipboard
Test test_asyncio prints quite a few ResourceWarnings for "unclosed event loop"
It's possible that this only happens when using --with-pydebug. (And perhaps only on Mac?)
I get 8 of these:
/Users/guido/cpython/Lib/asyncio/base_events.py:703: ResourceWarning: unclosed event loop <_UnixSelectorEventLoop running=False closed=False debug=False>
_warn(f"unclosed event loop {self!r}", ResourceWarning, source=self)
ResourceWarning: Enable tracemalloc to get the object allocation traceback
There's also this, once:
/Users/guido/cpython/Lib/test/test_asyncio/test_unix_events.py:1750: DeprecationWarning: 'get_child_watcher' is deprecated as of Python 3.12 and will be removed in Python 3.14.
watcher = policy.get_child_watcher()
I'll take care of the last one in https://github.com/python/cpython/pull/99386
Closing event loop was missed in test_uncancel_structured_blocks, I submitted a PR #99414 to fix this : )