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 should not import typing at runtime #128559

Closed
mikeshardmind opened this issue Jan 6, 2025 · 1 comment
Closed

Asyncio should not import typing at runtime #128559

mikeshardmind opened this issue Jan 6, 2025 · 1 comment
Labels
performance Performance or resource usage stdlib Python modules in the Lib dir topic-asyncio type-feature A feature request or enhancement

Comments

@mikeshardmind
Copy link
Contributor

mikeshardmind commented Jan 6, 2025

Feature or enhancement

Proposal:

Currently, asyncio.timeout imports final, Type, and Optional from typing.

final has no impact on type checkers, as they use the typeshed for the standard library, and type and optional can be written without importing from typing. This caused a noticable impossibility to remove typing from startup costs.

(I'll PR the corresponding easy changes)

Has this already been discussed elsewhere?

This is a minor feature, which does not need previous discussion elsewhere

Links to previous discussion of this feature:

No response

Linked PRs

@mikeshardmind mikeshardmind added the type-feature A feature request or enhancement label Jan 6, 2025
@github-project-automation github-project-automation bot moved this to Todo in asyncio Jan 6, 2025
@picnixz picnixz added stdlib Python modules in the Lib dir and removed topic-typing labels Jan 6, 2025
@picnixz
Copy link
Member

picnixz commented Jan 6, 2025

(Not really a typing related stuff even though we're import typing)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Performance or resource usage stdlib Python modules in the Lib dir topic-asyncio type-feature A feature request or enhancement
Projects
Status: Done
Development

No branches or pull requests

4 participants