Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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

Merged
merged 2 commits into from
May 13, 2021

Conversation

Fidget-Spinner
Copy link
Member

@Fidget-Spinner Fidget-Spinner commented May 10, 2021

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.

https://bugs.python.org/issue44098

Automerge-Triggered-By: GH:gvanrossum

Lib/typing.py Outdated Show resolved Hide resolved
Copy link
Member

@gvanrossum gvanrossum left a 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?

@miss-islington
Copy link
Contributor

@Fidget-Spinner: Status check is done, and it's a success ✅ .

@miss-islington miss-islington merged commit b2f3f8e into python:main May 13, 2021
@miss-islington
Copy link
Contributor

Thanks @Fidget-Spinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.10.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 13, 2021
…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>
@bedevere-bot
Copy link

GH-26091 is a backport of this pull request to the 3.10 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.10 only security fixes label May 13, 2021
@Fidget-Spinner
Copy link
Member Author

Fidget-Spinner commented May 13, 2021

Thanks. Is this back port worthy?

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.

@Fidget-Spinner Fidget-Spinner deleted the no_paramspec_params branch May 13, 2021 06:47
gvanrossum pushed a commit that referenced this pull request May 13, 2021
…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)
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.

5 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.