Skip to content

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

Merged
JelleZijlstra merged 7 commits into
python:mainfrom
Daraan:concatenate/ellipsis-3.10-v2
Oct 21, 2024
Merged

Support subscription of Callable[Concatenate[P], Any] with ... in Python 3.10#479
JelleZijlstra merged 7 commits into
python:mainfrom
Daraan:concatenate/ellipsis-3.10-v2

Conversation

@Daraan

Copy link
Copy Markdown
Contributor

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.


Comment threadsrc/typing_extensions.py Outdated
Comment threadsrc/typing_extensions.py Outdated
Comment threadCHANGELOG.md Outdated
Comment threadsrc/test_typing_extensions.py Outdated
Comment threadsrc/typing_extensions.py Outdated
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
@JelleZijlstra

Copy link
Copy Markdown
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.

Comment threadCHANGELOG.md Outdated
Comment threadsrc/test_typing_extensions.py Outdated
@AlexWaygood

Copy link
Copy Markdown
Member

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

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.

Concatenate implementation generates runtime exception if parameterized by ...

3 participants

@Daraan@JelleZijlstra@AlexWaygood