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
expert-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 expert-asyncio labels Nov 10, 2022
@kumaraditya303
Copy link
Contributor

kumaraditya303 commented Nov 11, 2022

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

@xiaochen7
Copy link
Contributor

xiaochen7 commented Nov 12, 2022

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>
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
expert-asyncio type-bug An unexpected behavior, bug, or error
Projects
Status: Done
Development

No branches or pull requests

3 participants