Skip to content

Fix missing names for asyncio in 3.14#15533

Open
tjkuson wants to merge 5 commits intopython:mainfrom
tjkuson:fix-asyncio
Open

Fix missing names for asyncio in 3.14#15533
tjkuson wants to merge 5 commits intopython:mainfrom
tjkuson:fix-asyncio

Conversation

@tjkuson
Copy link
Contributor

@tjkuson tjkuson commented Mar 21, 2026

AbstractEventLoopPolicy, DefaultEventLoopPolicy, WindowsSelectorEventLoopPolicyc and WindowsProactorEventLoopPolicy are exported by asyncio via __getattr__ in 3.14, but are missing from the stubs.

https://github.com/python/cpython/blob/3.14/Lib/asyncio/__init__.py

The names were removed in #14128.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@tjkuson tjkuson force-pushed the fix-asyncio branch 4 times, most recently from 47b3f0d to df3417c Compare March 21, 2026 00:30
@github-actions

This comment has been minimized.

@tjkuson tjkuson marked this pull request as ready for review March 21, 2026 00:39
@github-actions

This comment has been minimized.

Copy link
Collaborator

@brianschubert brianschubert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding the re-exports makes sense to me, but we shouldn't change __all__ on Python >=3.14 if these names are not present in __all__ at runtime. That would make tools incorrectly think that these names are imported by from asyncio import * when they are not.

(also, please try not to force push since that makes reviewing harder. In this case, seeing the stubtest errors from the earlier commits is actually really helpful)

@tjkuson
Copy link
Contributor Author

tjkuson commented Mar 21, 2026

@brianschubert Thanks for the review. I've updated the PR!

Noted about force pushing (I thought I marked the PR as draft before doing that but evidently did not, sorry about the noise). For what it's worth, the changes weren't stubtest fixes and I didn't see any stubtest errors.

@github-actions

This comment has been minimized.

@github-actions
Copy link
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants