Skip to content

asyncio.__init__ does not include asyncio.taskgroups in its __all__ #106075

Closed

Description

@jamestwebber

I'm not sure if I should file this as a bug or a feature...I just noticed it in a discussion, and thought I'd raise the issue. It's possible this is intended behavior.

asyncio.__init__ imports everything from all of its submodules and puts almost everything into __all__, I assume so people can from asyncio import *. It looks like asyncio.taskgroups was omitted from this, I am guessing by accident (the lists are not in the same order).

I guess people usually don't use that pattern, or not enough have done so and found the last of TaskGroup annoying, so it went under the radar. But very easy to fix, happy to open a PR if desired.

Linked PRs

Activity

  1. gvanrossum commented on Jun 25, 2023

    @gvanrossum
    Member

    Yeah, I think you're right. Feel free to send a PR. Please make sure it also includes a minor docs note. We can backport this to 3.12.

  2. added a commit that references this issue on Jun 26, 2023
  3. added a commit that references this issue on Jun 26, 2023
  4. added a commit that references this issue on Jun 26, 2023
  5. AlexWaygood commented on Jun 26, 2023

    @AlexWaygood
    Member

    Looks like this is now fixed! 🎉

  6. moved this from Todo to Done in asyncioon Jun 26, 2023
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

    Projects

    • Status
      Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions