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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

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
Daraan and others added 2 commits October 4, 2024 00:32
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
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 ...
2 participants