Skip to content

Modernize annotation usage in pyrepl #149985

@JelleZijlstra

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

Metadata

Metadata

Assignees

Labels

stdlibStandard 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