Visitar URL original
Asyncio should not import typing at runtime · Issue #128559 · python/cpython · GitHub
Skip to content

Asyncio should not import typing at runtime #128559

Closed

Description

@mikeshardmind

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

Activity

  1. added
    stdlibStandard Library Python modules in the Lib/ directory
    and removed on Jan 6, 2025
  2. picnixz commented on Jan 6, 2025

    @picnixz
    Member

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

  3. added a commit that references this issue on Jan 6, 2025
  4. moved this from Todo to Done in asyncioon Jan 6, 2025
  5. added a commit that references this issue on Jan 8, 2025
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

    performancePerformance or resource usagestdlibStandard Library Python modules in the Lib/ directorytopic-asynciotype-featureA feature request or enhancement

    Projects

    • Status
      Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions