Skip to content

Fix isinstance(Unpack[Ts], TypeVar) to be False in 3.11 #539

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 4 commits into from
Mar 12, 2025

Conversation

Daraan
Copy link
Contributor

@Daraan Daraan commented Mar 12, 2025

In relation to #538 a minor fix for 3.11 only. For <3.11 it's currently a necessary trick to keep the __class__ = typing.TypeVar attribute allow using Generic[Unpack[Ts]].

I am not sure if the additional test is that important, I slightly in favor of removing it again.

@Daraan Daraan changed the title Fix 3.11 isinstance(Unpack[Ts], TypeVar) to be False Fix isinstance(Unpack[Ts], TypeVar) to be False in 3.11 Mar 12, 2025
@JelleZijlstra JelleZijlstra merged commit 7def253 into python:main Mar 12, 2025
23 checks passed
@Daraan Daraan deleted the 3.11/Unpack__class__ branch March 13, 2025 13:44
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.

2 participants