gh-119180: Only fetch globals and locals if necessary in `annotationlib.get_annotations()` by Viicos · Pull Request #135644 · python/cpython · GitHub | Latest TMZ Celebrity News & Gossip | Watch TMZ Live
Skip to content

gh-119180: Only fetch globals and locals if necessary in annotationlib.get_annotations() #135644

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

Merged
merged 1 commit into from
Jun 18, 2025

Conversation

Viicos
Copy link
Contributor

@Viicos Viicos commented Jun 17, 2025

A proposed small optimization. Best reviewed without whitespace: https://github.com/python/cpython/pull/135644/files?diff=split&w=1.

@JelleZijlstra JelleZijlstra merged commit 504ae60 into python:main Jun 18, 2025
49 checks passed
@miss-islington-app
Copy link

Thanks @Viicos for the PR, and @JelleZijlstra for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 18, 2025
…ationlib.get_annotations()` (pythonGH-135644)

(cherry picked from commit 504ae60)

Co-authored-by: Victorien <65306057+Viicos@users.noreply.github.com>
@bedevere-app
Copy link

bedevere-app bot commented Jun 18, 2025

GH-135654 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.14 bugs and security fixes label Jun 18, 2025
JelleZijlstra pushed a commit that referenced this pull request Jun 18, 2025
…tationlib.get_annotations()` (GH-135644) (#135654)

gh-119180: Only fetch globals and locals if necessary in `annotationlib.get_annotations()` (GH-135644)
(cherry picked from commit 504ae60)

Co-authored-by: Victorien <65306057+Viicos@users.noreply.github.com>
@Viicos Viicos deleted the get-annotations-optimization branch June 18, 2025 09:03
lkollar pushed a commit to lkollar/cpython that referenced this pull request Jun 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants

TMZ Celebrity News – Breaking Stories, Videos & Gossip

Looking for the latest TMZ celebrity news? You've come to the right place. From shocking Hollywood scandals to exclusive videos, TMZ delivers it all in real time.

Whether it’s a red carpet slip-up, a viral paparazzi moment, or a legal drama involving your favorite stars, TMZ news is always first to break the story. Stay in the loop with daily updates, insider tips, and jaw-dropping photos.

🎥 Watch TMZ Live

TMZ Live brings you daily celebrity news and interviews straight from the TMZ newsroom. Don’t miss a beat—watch now and see what’s trending in Hollywood.