GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Test test_asyncio prints quite a few ResourceWarnings for "unclosed event loop" · Issue #99357 · python/cpython

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

New issue
Copy link
New issue
Copy link
Closed
Closed
Test test_asyncio prints quite a few ResourceWarnings for "unclosed event loop"#99357
Copy link
Labels
topic-asynciotype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@gvanrossum
gvanrossum
opened on Nov 10, 2022
Issue body actions

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()
  • PR: gh-99357: Close the event loop when it is no longer used in test_uncancel_structured_blocks #99414
  • PR: [3.11] gh-99357: Close the event loop when it is no longer used in test_uncancel_structured_blocks (GH-99414) #99424

Activity

  1. gvanrossum
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    topic-asyncio
    on Nov 10, 2022
  2. ezio-melotti
    moved this to Todo in asyncioon Nov 10, 2022
  3. ezio-melotti
    added this to asyncioon Nov 10, 2022
  4. kumaraditya303 commented on Nov 11, 2022

    @kumaraditya303
    kumaraditya303
    on Nov 11, 2022
    Contributor
    More actions

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

  5. xiaochen7
    added a commit that references this issue on Nov 12, 2022

    pythongh-99357: Close the event loop when it is no longer used in tes…

    aaef027
  6. xiaochen7 commented on Nov 12, 2022

    @xiaochen7
    xiaochen7
    on Nov 12, 2022
    Contributor
    More actions

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

  7. gvanrossum
    added a commit that references this issue on Nov 12, 2022

    gh-99357: Close the event loop when it is no longer used in test_unca…

    99972dc
  8. miss-islington
    added a commit that references this issue on Nov 13, 2022

    pythongh-99357: Close the event loop when it is no longer used in tes…

    29f11df
  9. kumaraditya303
    closed this as completedon Nov 13, 2022
  10. Repository owner moved this from Todo to Done in asyncioon Nov 13, 2022
  11. gvanrossum
    added a commit that references this issue on Nov 14, 2022

    [3.11] gh-99357: Close the event loop when it is no longer used in te…

    90de4b7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic-asynciotype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

    Projects

    • asyncio
      Status
      Done
      Show more project fields

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402503 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.