[3.10] bpo-44098: Drop ParamSpec from most __parameters__ in typing generics (GH-26013)#26091
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 <28750310+Fidget-Spinner@users.noreply.github.com>
|
@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 <28750310+Fidget-Spinner@users.noreply.github.com> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
…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 <28750310+Fidget-Spinner@users.noreply.github.com> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
…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 <28750310+Fidget-Spinner@users.noreply.github.com> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Added two new attributes to
_GenericAlias:_typevar_types, a single type or tuple of types indicating what types are treated as aTypeVar. Used forisinstancechecks._paramspec_tvars, a boolean flag which guards special behavior for dealing withParamSpec. Setting it toTruemeans this class deals withParamSpec.Automerge-Triggered-By: GH:gvanrossum
(cherry picked from commit b2f3f8e)
Co-authored-by: Ken Jin 28750310+Fidget-Spinner@users.noreply.github.com
https://bugs.python.org/issue44098
Automerge-Triggered-By: GH:gvanrossum