-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
bpo-44098: Drop ParamSpec from most __parameters__
in typing generics
#26013
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
bpo-44098: Drop ParamSpec from most __parameters__
in typing generics
#26013
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Is this back port worthy?
@Fidget-Spinner: Status check is done, and it's a success ✅ . |
Thanks @Fidget-Spinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.10. |
…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 <28750310+Fidget-Spinner@users.noreply.github.com>
GH-26091 is a backport of this pull request to the 3.10 branch. |
Yep (only to 3.10), I added the backport label for that. We need to backport it otherwise the typing generics and builtin generics will have different behaviors. |
…rics (GH-26013) (#26091) 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)
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
.https://bugs.python.org/issue44098
Automerge-Triggered-By: GH:gvanrossum