Skip to content

Test test_asyncio prints quite a few ResourceWarnings for "unclosed event loop" #99357

Closed
@gvanrossum

Description

@gvanrossum

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions