Skip to content

gh-137706: make typing._is_unpacked_typevartuple check for True instead of truthy#137712

Merged
JelleZijlstra merged 3 commits into
python:mainfrom
DavidCEllis:fix-is-unpacked-typevartuple
Sep 6, 2025
Merged

gh-137706: make typing._is_unpacked_typevartuple check for True instead of truthy#137712
JelleZijlstra merged 3 commits into
python:mainfrom
DavidCEllis:fix-is-unpacked-typevartuple

Conversation

@DavidCEllis

@DavidCEllis DavidCEllis commented Aug 13, 2025

Copy link
Copy Markdown
Contributor

This resolves #137706 making Annotated[undefined, ''] partially resolvable under Format.FORWARDREF

I hope I put the additional test in a reasonable place. It's a large file!

truthy output was interpreting annotationlib _Stringifier instances as unpacked TypeVarTuples
@JelleZijlstra

Copy link
Copy Markdown
Member

Could you add a NEWS entry?

@JelleZijlstra JelleZijlstra added the needs backport to 3.14 bugs and security fixes label Sep 5, 2025
Comment thread Misc/NEWS.d/next/Library/2025-09-05-21-10-24.gh-issue-137706.0EztiJ.rst Outdated
@JelleZijlstra JelleZijlstra enabled auto-merge (squash) September 5, 2025 21:18
@JelleZijlstra JelleZijlstra merged commit 7e652f4 into python:main Sep 6, 2025
85 of 87 checks passed
@miss-islington-app

Copy link
Copy Markdown

Thanks @DavidCEllis 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 Sep 6, 2025
…e` instead of truthy (pythonGH-137712)

(cherry picked from commit 7e652f4)

Co-authored-by: David Ellis <[email protected]>
@bedevere-app

bedevere-app Bot commented Sep 6, 2025

Copy link
Copy Markdown

GH-138574 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 Sep 6, 2025
lkollar pushed a commit to lkollar/cpython that referenced this pull request Sep 9, 2025
JelleZijlstra pushed a commit that referenced this pull request Oct 8, 2025
…ue` instead of truthy (GH-137712) (#138574)

gh-137706: make typing._is_unpacked_typevartuple check for `True` instead of truthy (GH-137712)
(cherry picked from commit 7e652f4)

Co-authored-by: David Ellis <[email protected]>
Sign up for free to 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.

Annotated with forward references does not partially evaluate

2 participants