GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-149985: Remove future annotations and if TYPE_CHECKING in pyrepl by JelleZijlstra · Pull Request #149992 · python/cpython

Conversation

@JelleZijlstra

@JelleZijlstra JelleZijlstra commented May 18, 2026 •
edited by bedevere-app Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

from __future__ import annotations is soft-deprecated now that evaluation
of annotations is always deferred. if TYPE_CHECKING can often be replaced
with lazy imports.

A risk is that creation of dataclasses will be slower without from __future__ import annotations, because the dataclass machinery will force evaluation of annotations. However, if the annotations are simple my simple benchmarks do not show an appreciable slowdown.

  • Issue: Modernize annotation usage in pyrepl #149985

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@JelleZijlstra
pythongh-149985: Remove future annotations and if TYPE_CHECKING in py…
03be6c8
…repl

`from __future__ import annotations` is soft-deprecated now that evaluation
of annotations is always deferred. `if TYPE_CHECKING` can often be replaced
with lazy imports.
@JelleZijlstra JelleZijlstra added the skip news label May 18, 2026
@bedevere-app bedevere-app Bot mentioned this pull request May 18, 2026
Modernize annotation usage in pyrepl #149985
Closed
@JelleZijlstra
.
0e8b022
@JelleZijlstra
JelleZijlstra marked this pull request as ready for review May 18, 2026 14:11
@JelleZijlstra
JelleZijlstra requested review from ambv, lysnikolaou and pablogsal as code owners May 18, 2026 14:11
@bedevere-app bedevere-app Bot added the awaiting core review label May 18, 2026
@JelleZijlstra JelleZijlstra mentioned this pull request Jun 6, 2026
Type annotations in _colorize module are unresolvable at runtime #150994
Closed
@github-actions

github-actions Bot commented Aug 19, 2026

Copy link
Copy Markdown

This PR is stale because it has been open for 90 days with no activity.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot added the stale Stale PR or inactive for long period of time. label Aug 19, 2026
@JelleZijlstra
Merge branch 'main' into nofuture
b65df69
@github-actions github-actions Bot removed the stale Stale PR or inactive for long period of time. label Aug 25, 2026
JelleZijlstra added 3 commits August 25, 2026 06:12
@JelleZijlstra
unused ignores
26e1922
@JelleZijlstra
unused
f06ee94
@JelleZijlstra
more
d63a67b
@JelleZijlstra
JelleZijlstra merged commit e2118b0 into python:main Aug 25, 2026
57 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the awaiting core review label Aug 25, 2026
@ashm-dev ashm-dev mentioned this pull request Aug 26, 2026
Modernize annotation usage in libregrtest #156402
Closed
clin1234 pushed a commit to clin1234/cpython that referenced this pull request Aug 27, 2026
@JelleZijlstra @clin1234
pythongh-149985: Remove future annotations and if TYPE_CHECKING in py…
aba1494
…repl (python#149992)

`from __future__ import annotations` is soft-deprecated now that evaluation
of annotations is always deferred. `if TYPE_CHECKING` can often be replaced
with lazy imports.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@pablogsal pablogsal Awaiting requested review from pablogsal pablogsal is a code owner
@lysnikolaou lysnikolaou Awaiting requested review from lysnikolaou lysnikolaou is a code owner
@ambv ambv Awaiting requested review from ambv ambv is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@JelleZijlstra
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.