Skip to content
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

Inconsistent repr of types.GenericAlias with ParamSpec #105486

Closed
sobolevn opened this issue Jun 8, 2023 · 0 comments
Closed

Inconsistent repr of types.GenericAlias with ParamSpec #105486

sobolevn opened this issue Jun 8, 2023 · 0 comments
Assignees
Labels
topic-typing type-bug An unexpected behavior, bug, or error

Comments

@sobolevn
Copy link
Member

sobolevn commented Jun 8, 2023

The simplest repro:

>>> type A[X, **Y] = None
>>> A[int, [str]]
A[int, [<class 'str'>]]

I think that it should be:

>>> type A[X, **Y] = None
>>> A[int, [str]]
A[int, [str]]

We already had similar issues in the past: #102637

This happens somewhere in ga_repr, I will have a look.

Linked PRs

@sobolevn sobolevn added type-bug An unexpected behavior, bug, or error topic-typing labels Jun 8, 2023
@sobolevn sobolevn self-assigned this Jun 8, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Jul 1, 2023
…nericAlias` (pythonGH-105488)

(cherry picked from commit eb7d6e7)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
JelleZijlstra pushed a commit that referenced this issue Jul 1, 2023
…enericAlias` (GH-105488) (#106297)

gh-105486: Change the `repr` of `ParamSpec` list of args in `GenericAlias` (GH-105488)
(cherry picked from commit eb7d6e7)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
manosriram pushed a commit to manosriram/cpython that referenced this issue Jul 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic-typing type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

2 participants