Skip to content

Tweak asyncio.Runner loop_factory docs to emphasize that the default case *does* call set_event_loop() #96036

Closed as not planned

Description

@graingert

Whatever gives users the best guidance. I searched for code that uses Runner(loop_factory=...) and there is one case apart from test_runners.py: in test_asyncio/test_subprocess.py it is used as loop_factory=asyncio.new_event_loop specifically to prevent the watcher to be set (since the test sets its own watcher).

I would emphasize that the default case does call set_event_loop() and implies attaching the watcher (if there is one!) to the loop; it's fine to suggest that loop_factory should be used only if this is undesired.

Originally posted by @gvanrossum in #95979 (comment)

Activity

  1. self-assigned this
    on Aug 16, 2022
  2. changed the title [-]tweak asyncio.Runner loop_factory docs to emphasize that the default case *does* call `set_event_loop()`[/-] [+]Tweak asyncio.Runner loop_factory docs to emphasize that the default case *does* call `set_event_loop()`[/+] on Aug 16, 2022
  3. kumaraditya303 commented on Mar 19, 2023

    @kumaraditya303
    Contributor

    Are you still interested in working on rewording this to your liking? If not I am inclined to close this, for me the existing docs added by myself is sufficient.

  4. added
    pendingThe issue will be closed if no feedback is provided
    on Mar 19, 2023
  5. moved this from Todo to Done in asyncioon Apr 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

docsDocumentation in the Doc dirpendingThe issue will be closed if no feedback is providedtopic-asyncio

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions