Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
gvanrossum opened this issue Nov 10, 2022 · 2 comments
Labels
topic-asyncio type-bug An unexpected behavior, bug, or error

Comments

@gvanrossum
Copy link
Member

gvanrossum commented Nov 10, 2022

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()
@gvanrossum gvanrossum added type-bug An unexpected behavior, bug, or error topic-asyncio labels Nov 10, 2022
@ezio-melotti ezio-melotti moved this to Todo in asyncio Nov 10, 2022
@kumaraditya303
Copy link
Contributor

I'll take care of the last one in #99386

@xiaochen7
Copy link
Contributor

Closing event loop was missed in test_uncancel_structured_blocks, I submitted a PR #99414 to fix this : )

gvanrossum pushed a commit that referenced this issue Nov 12, 2022
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Nov 13, 2022
…t_uncancel_structured_blocks (pythonGH-99414)

(cherry picked from commit 99972dc)

Co-authored-by: Xiao Chen <chenxiao_7@163.com>
Repository owner moved this from Todo to Done in asyncio Nov 13, 2022
gvanrossum pushed a commit that referenced this issue Nov 14, 2022
…st_uncancel_structured_blocks (GH-99414) (#99424)

(cherry picked from commit 99972dc)

Co-authored-by: Xiao Chen <chenxiao_7@163.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic-asyncio type-bug An unexpected behavior, bug, or error
Projects
Status: Done
Development

No branches or pull requests

3 participants