-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
[3.10] bpo-44098: Drop ParamSpec from most __parameters__
in typing generics (GH-26013)
#26091
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
Conversation
…rics (pythonGH-26013) Added two new attributes to ``_GenericAlias``: * ``_typevar_types``, a single type or tuple of types indicating what types are treated as a ``TypeVar``. Used for ``isinstance`` checks. * ``_paramspec_tvars ``, a boolean flag which guards special behavior for dealing with ``ParamSpec``. Setting it to ``True`` means this class deals with ``ParamSpec``. Automerge-Triggered-By: GH:gvanrossum (cherry picked from commit b2f3f8e) Co-authored-by: Ken Jin <[email protected]>
@Fidget-Spinner: Status check is done, and it's a success ✅ . |
3 similar comments
@Fidget-Spinner: Status check is done, and it's a success ✅ . |
@Fidget-Spinner: Status check is done, and it's a success ✅ . |
@Fidget-Spinner: Status check is done, and it's a success ✅ . |
@gvanrossum: Please replace |
I know this was merged awhile ago, but should this have included an update to |
Could you please open a bpo issue about that? |
bpo-46581 filed. |
pythonGH-26091 added the _typevar_types and _paramspec_tvars instance variables to _GenericAlias. However, they were not propagated consistently. This commit addresses the most prominent deficiency identified in bpo-46581 (namely their absence from _GenericAlias.copy_with), but there could be others.
GH-26091 added the _typevar_types and _paramspec_tvars instance variables to _GenericAlias. However, they were not propagated consistently. This commit addresses the most prominent deficiency identified in bpo-46581 (namely their absence from _GenericAlias.copy_with), but there could be others. Co-authored-by: Ken Jin <[email protected]> Co-authored-by: Serhiy Storchaka <[email protected]>
…ythonGH-31061) (Cherry-picked from 32bf359.) pythonGH-26091 added the _typevar_types and _paramspec_tvars instance variables to _GenericAlias. However, they were not propagated consistently. This commit addresses the most prominent deficiency identified in bpo-46581 (namely their absence from _GenericAlias.copy_with), but there could be others. Co-authored-by: Ken Jin <[email protected]> Co-authored-by: Serhiy Storchaka <[email protected]>
…H-31061) (GH-31821) (Cherry-picked from 32bf359.) GH-26091 added the _typevar_types and _paramspec_tvars instance variables to _GenericAlias. However, they were not propagated consistently. This commit addresses the most prominent deficiency identified in bpo-46581 (namely their absence from _GenericAlias.copy_with), but there could be others. Co-authored-by: Ken Jin <[email protected]> Co-authored-by: Serhiy Storchaka <[email protected]> Co-authored-by: Ken Jin <[email protected]> Co-authored-by: Serhiy Storchaka <[email protected]>
Added two new attributes to
_GenericAlias
:_typevar_types
, a single type or tuple of types indicating what types are treated as aTypeVar
. Used forisinstance
checks._paramspec_tvars
, a boolean flag which guards special behavior for dealing withParamSpec
. Setting it toTrue
means this class deals withParamSpec
.Automerge-Triggered-By: GH:gvanrossum
(cherry picked from commit b2f3f8e)
Co-authored-by: Ken Jin [email protected]
https://bugs.python.org/issue44098
Automerge-Triggered-By: GH:gvanrossum