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 supports ParamSpec, i.e. no Ellipsis, hence #48 also holds for these versions.
This PR monkey patches the copy_with method of typing._ConcatenateGenericAlias with the Python 3.11 equivalent that accepts an ellipsis variant.
This does not solve 110 , which requires an earlier check during Concatenate
A backport to 3.8, 3.9 would need a monkey patch of typing._type_check
Welp it fails the "C[...]" cases in test_typing.py this tries to address 😥 This goes back to ~ https://github.com/python/cpython/pull/27518. I guess its not acceptable then.
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 supportsParamSpec
, i.e. no Ellipsis, hence #48 also holds for these versions.This PR monkey patches the
copy_with
method oftyping._ConcatenateGenericAlias
with the Python 3.11 equivalent that accepts an ellipsis variant.Concatenate
3.8, 3.9
would need a monkey patch oftyping._type_check