-
-
Notifications
You must be signed in to change notification settings - Fork 29.2k
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
gh-105486: Change the repr
of ParamSpec
list of args in GenericAlias
#105488
Conversation
…nericAlias`
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 there anything left? |
@AlexWaygood you added the 3.12 backport label, but this feels like a feature change that should only go into main. What do you think? Also, this PR is linked to issue #105487, but I don't see how it is related. I think this is a good change and we should merge it, but was there some other issue this should be linked to? |
Ah it should be #105486, I'll update the PR. |
repr
of ParamSpec
list of args in GenericAlias
repr
of ParamSpec
list of args in GenericAlias
Hmm, I view the current repr as pretty inconsistent — a latent bug that was exposed by the PEP-695 implementation. So I would favour backporting here. Given that 3.12 has yet to be released, I also think it will be less disruptive to change the repr now rather than have the repr change between 3.12 and 3.13, which could break people's doctests etc. |
That's fair. I suppose you could technically run into this in 3.11, but PEP 695 makes it a lot easier. I'm fine with backporting. |
Thanks @sobolevn for the PR, and @JelleZijlstra for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12. |
…nericAlias` (pythonGH-105488) (cherry picked from commit eb7d6e7) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
GH-106297 is a backport of this pull request to the 3.12 branch. |
…nericAlias` (python#105488)
Now it looks like this:
repr
oftypes.GenericAlias
withParamSpec
#105486