Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.1k
gh-103921: Document PEP 695#104642
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
gh-103921: Document PEP 695#104642
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Uh oh!
There was an error while loading.Please reload this page.
You could add this PEP to the release highlights:https://docs.python.org/3.12/whatsnew/3.12.html#summary-release-highlights |
AlexWaygood left a comment• edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
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.
I'd like us to explicitly state somewhere thattyping.TypeAliasType
is not the type oftyping.TypeAlias
(and that in fact, they basically don't compose at all). I feel like this will inevitably cause confusion otherwise.
This allows :keyword:`type` to link to docs for the new `type`statement (being written inpythongh-104642) instead of to this headerin the argparse docs.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
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.
Other than#104642 (comment) and one tiny last nit, this looks fantastic. Thanks for the huge amount of effort here, and for putting up with my many rounds of review!
Objects/typevarobject.c Outdated
The latter example's signature is essentially the overloading\n\ | ||
of (str, str) -> str and (bytes, bytes) -> bytes. Also note\n\ | ||
that if the arguments are instances of some subclass of str,\n\ | ||
the return type is still plain str.\n\ | ||
\n\ |
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.
Don't think two line breaks are necessary here
\n\ |
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, fixed.
Also thanks for all the thorough reviews! I am going to merge this now so I can stop worrying about conflicts.
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.
Yup, it's time :)
Thanks@JelleZijlstra for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12. |
(cherry picked from commit060277d)Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
bedevere-bot commentedMay 26, 2023
GH-104989 is a backport of this pull request to the3.12 branch. |
🎉 |
🥳🚀 |
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>.(cherry picked from commit060277d)Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
bedevere-bot commentedMay 27, 2023
GH-105007 is a backport of this pull request to the3.11 branch. |
Function and class definitions | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
.. class:: FunctionDef(name, args, body, decorator_list, returns, type_comment) | ||
.. class:: FunctionDef(name,type_params,args, body, decorator_list, returns, type_comment) |
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.
Just realised thattype_params
is in the wrong place here for the AST as it currently exists onmain
, wheretype_params
is at the end. But probably not worth fixing that until questions about the ABI are resolved in#104974.
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.
Also, looks like you might have addedtype_params
to the constructor forFunctionDef
andClassDef
, but notAsyncFunctionDef
!
Uh oh!
There was an error while loading.Please reload this page.
📚 Documentation preview 📚:https://cpython-previews--104642.org.readthedocs.build/