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

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

Closed
jamestwebber opened this issue Jun 25, 2023 · 2 comments
Closed

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

jamestwebber opened this issue Jun 25, 2023 · 2 comments
Labels
topic-asyncio type-feature A feature request or enhancement

Comments

@jamestwebber
Copy link
Contributor

jamestwebber commented Jun 25, 2023

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

@jamestwebber jamestwebber added the type-feature A feature request or enhancement label Jun 25, 2023
@gvanrossum
Copy link
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.

kumaraditya303 added a commit that referenced this issue Jun 26, 2023
…6090)

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Jun 26, 2023
pythonGH-106090)

(cherry picked from commit a12e8ff)

Co-authored-by: James Webber <jamestwebber@users.noreply.github.com>
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
kumaraditya303 added a commit that referenced this issue Jun 26, 2023
…_` (GH-106090) (#106098)

gh-106075: add `asyncio.taskgroups.__all__` to `asyncio.__all__` (GH-106090)
(cherry picked from commit a12e8ff)

Co-authored-by: James Webber <jamestwebber@users.noreply.github.com>
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
@AlexWaygood
Copy link
Member

AlexWaygood commented Jun 26, 2023

Looks like this is now fixed! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic-asyncio type-feature A feature request or enhancement
Projects
Status: Done
Development

No branches or pull requests

4 participants