Skip to content

Modernize annotation usage in pyrepl #149985

Description

@JelleZijlstra

Bug description:

The pyrepl code uses from __future__ import annotations and if TYPE_CHECKING unnecessarily. The former is mostly redundant on 3.14+, the latter can usually be replaced with lazy imports on 3.15+. Let's set a good example.

CPython versions tested on:

CPython main branch

Operating systems tested on:

No response

Linked PRs

Activity

  1. added
    topic-replRelated to the interactive shell
    type-refactorCode refactoring (with no changes in behavior)
    on May 18, 2026
  2. added
    stdlibStandard Library Python modules in the Lib/ directory
    on May 18, 2026
  3. added a commit that references this issue on Aug 25, 2026
  4. added a commit that references this issue on Aug 27, 2026
  5. StanFromIreland commented on Sep 4, 2026

    @StanFromIreland
    Member

    Triage: Can this be closed as completed?

  6. added
    pendingThe issue will be closed if no feedback is provided
    on Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

pendingThe issue will be closed if no feedback is providedstdlibStandard Library Python modules in the Lib/ directorytopic-replRelated to the interactive shelltype-refactorCode refactoring (with no changes in behavior)

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions