Skip to content
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

Support subscription of Callable[Concatenate[P], Any] with ... in Python 3.10 #479

Merged
merged 7 commits into from
Oct 21, 2024

Conversation

Daraan
Copy link
Contributor

@Daraan Daraan commented Oct 3, 2024

Fixes #48 for python 3.10.3+

The first versions 3.10.0 - 3.10.2 did not enforce restrictions on the last parameter of _ConcatenateGenericAlias. 3.10.3-3.10.* only support ParamSpec, i.e. no Ellipsis, hence #48 also holds for these versions.

This PR adds a backport of _ConcatenateGenericAlias which overrrides the problematic copy_with method.


src/typing_extensions.py Outdated Show resolved Hide resolved
src/typing_extensions.py Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
src/test_typing_extensions.py Outdated Show resolved Hide resolved
src/typing_extensions.py Outdated Show resolved Hide resolved
@JelleZijlstra
Copy link
Member

New changes require approval from someone other than JelleZijlstra because they were the last pusher

That'll teach me to fix merge conflicts, I guess.

CHANGELOG.md Outdated Show resolved Hide resolved
src/test_typing_extensions.py Outdated Show resolved Hide resolved
@AlexWaygood
Copy link
Member

I am now blocked from merging, tossing it back to you @JelleZijlstra

@JelleZijlstra JelleZijlstra merged commit 80958f3 into python:main Oct 21, 2024
21 checks passed
@Daraan Daraan deleted the concatenate/ellipsis-3.10-v2 branch October 22, 2024 08: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.

Concatenate implementation generates runtime exception if parameterized by ...
3 participants