Skip to content

gh-140000: Traverse name attribute for TypeVar, TypeVarTuple, TypeAliasType, ParamSpec - #140016

Merged
JelleZijlstra merged 2 commits into
python:mainfrom
efimov-mikhail:issue-140000-str-leak
Oct 13, 2025
Merged

gh-140000: Traverse name attribute for TypeVar, TypeVarTuple, TypeAliasType, ParamSpec#140016
JelleZijlstra merged 2 commits into
python:mainfrom
efimov-mikhail:issue-140000-str-leak

Conversation

@efimov-mikhail

@efimov-mikhailefimov-mikhail commented Oct 12, 2025

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

@efimov-mikhailefimov-mikhail changed the title Traverse name attribute for TypeVar, TypeVarTuple, TypeAliasType, ParamSpecgh-140000: Traverse name attribute for TypeVar, TypeVarTuple, TypeAliasType, ParamSpecOct 12, 2025
Comment threadObjects/typevarobject.c
@JelleZijlstraJelleZijlstra added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes labels Oct 13, 2025
@efimov-mikhail

Copy link
Copy Markdown
MemberAuthor

I've added news entry, CI is green

@JelleZijlstra
JelleZijlstra merged commit be60e4b into python:mainOct 13, 2025
53 checks passed
@miss-islington-app

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.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 13, 2025
…le`, `TypeAliasType`, `ParamSpec` (pythonGH-140016)
(cherry picked from commit be60e4b)
Co-authored-by: Mikhail Efimov <efimov.mikhail@gmail.com>
@miss-islington-app

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

@bedevere-app

Copy link
Copy Markdown

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

@bedevere-appbedevere-appBot 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
…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 <efimov.mikhail@gmail.com>
@bedevere-app

Copy link
Copy Markdown

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

@bedevere-appbedevere-appBot removed the needs backport to 3.13 bugs and security fixes label Oct 14, 2025
JelleZijlstra pushed a commit that referenced this pull request Oct 14, 2025
…ple`, `TypeAliasType`, `ParamSpec` (GH-140016) (#140073)
Correct traversing name attribute for TypeVar, TypeVarTuple, TypeAliasType, ParamSpec
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@efimov-mikhail@sergey-miryanov@JelleZijlstra@kumaraditya303