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-140000: Traverse `name` attribute for `TypeVar`, `TypeVarTuple`, `TypeAliasType`, `ParamSpec` by efimov-mikhail · Pull Request #140016 · python/cpython

Conversation

@efimov-mikhail

@efimov-mikhail efimov-mikhail commented Oct 12, 2025 •
edited by bedevere-app Bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

I'm not sure should we add tests on these.
But I've checked code snippet from the issue on all 4 types, they work as expected.

IMO, it'd be better to merge this PR first and provide a backports for 3.14 and 3.13.
We could merge #139919 after this (qualname traversing will be there).

cc @JelleZijlstra

  • Issue: TypeAliasType can leak memory if name is a str subclass #140000

Sorry, something went wrong.

Uh oh!

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

All reactions
@efimov-mikhail
Correct traversing name attribute for TypeVar, TypeVarTuple, TypeAlia…
26498ca
…sType, ParamSpec
@efimov-mikhail
efimov-mikhail requested a review from JelleZijlstra as a code owner October 12, 2025 21:48
@bedevere-app bedevere-app Bot added the awaiting review label Oct 12, 2025
@efimov-mikhail efimov-mikhail changed the title Traverse name attribute for TypeVar, TypeVarTuple, TypeAliasType, ParamSpec gh-140000: Traverse name attribute for TypeVar, TypeVarTuple, TypeAliasType, ParamSpec Oct 12, 2025
@bedevere-app bedevere-app Bot mentioned this pull request Oct 12, 2025
TypeAliasType can leak memory if name is a str subclass #140000
Closed
JelleZijlstra
JelleZijlstra reviewed Oct 13, 2025
View reviewed changes
Comment thread Objects/typevarobject.c Resolved

Uh oh!

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

@efimov-mikhail
efimov-mikhail requested a review from JelleZijlstra October 13, 2025 10:57
@JelleZijlstra JelleZijlstra added needs backport to 3.13 only security fixes needs backport to 3.14 bugs and security fixes labels Oct 13, 2025
@efimov-mikhail
Add news entry
585de5b
@efimov-mikhail

efimov-mikhail commented Oct 13, 2025

Copy link
Copy Markdown
Member Author

I've added news entry, CI is green

All reactions

Sorry, something went wrong.

Uh oh!

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

sergey-miryanov
sergey-miryanov approved these changes Oct 13, 2025
View reviewed changes
@bedevere-app bedevere-app Bot added awaiting core review and removed awaiting review labels Oct 13, 2025
kumaraditya303
kumaraditya303 approved these changes Oct 13, 2025
View reviewed changes
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting core review labels Oct 13, 2025
@JelleZijlstra
JelleZijlstra merged commit be60e4b into python:main Oct 13, 2025
4 checks passed

Uh oh!

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

@bedevere-app bedevere-app Bot removed the awaiting merge label Oct 13, 2025
@miss-islington-app

miss-islington-app Bot commented Oct 13, 2025

Copy link
Copy Markdown

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

All reactions

Sorry, something went wrong.

Uh oh!

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

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 13, 2025
@efimov-mikhail @miss-islington
pythongh-140000: Traverse name attribute for TypeVar, `TypeVarTup…
6e92029
…le`, `TypeAliasType`, `ParamSpec` (pythonGH-140016)

(cherry picked from commit be60e4b)

Co-authored-by: Mikhail Efimov <[email protected]>
@miss-islington-app

miss-islington-app Bot commented Oct 13, 2025

Copy link
Copy Markdown

Sorry, @efimov-mikhail and @JelleZijlstra, I could not cleanly backport this to 3.13 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker be60e4b4f34a097d999d337446786ae14e35c964 3.13
All reactions

Sorry, something went wrong.

Uh oh!

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

@miss-islington-app miss-islington-app Bot assigned JelleZijlstra Oct 13, 2025
@bedevere-app

bedevere-app Bot commented Oct 13, 2025

Copy link
Copy Markdown

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

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Oct 13, 2025
JelleZijlstra pushed a commit that referenced this pull request Oct 13, 2025
@miss-islington @efimov-mikhail
[3.14] gh-140000: Traverse name attribute for TypeVar, `TypeVarTu…
7a13953
…ple`, `TypeAliasType`, `ParamSpec` (GH-140016) (#140063)

gh-140000: Traverse `name` attribute for `TypeVar`, `TypeVarTuple`, `TypeAliasType`, `ParamSpec` (GH-140016)
(cherry picked from commit be60e4b)

Co-authored-by: Mikhail Efimov <[email protected]>
@bedevere-app

bedevere-app Bot commented Oct 14, 2025

Copy link
Copy Markdown

GH-140073 is a backport of this pull request to the 3.13 branch.

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 only security fixes label Oct 14, 2025
JelleZijlstra pushed a commit that referenced this pull request Oct 14, 2025
@efimov-mikhail
[3.13] gh-140000: Traverse name attribute for TypeVar, `TypeVarTu…
cbcee9a
…ple`, `TypeAliasType`, `ParamSpec` (GH-140016) (#140073)

Correct traversing name attribute for TypeVar, TypeVarTuple, TypeAliasType, ParamSpec
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@sergey-miryanov sergey-miryanov sergey-miryanov approved these changes
@kumaraditya303 kumaraditya303 kumaraditya303 approved these changes
@JelleZijlstra JelleZijlstra Awaiting requested review from JelleZijlstra JelleZijlstra is a code owner

Uh oh!

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

Assignees

@JelleZijlstra JelleZijlstra

Labels

None yet

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.

4 participants

@efimov-mikhail @sergey-miryanov @JelleZijlstra @kumaraditya303
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 01402503 — 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.