Uh oh!
There was an error while loading. Please reload this page.
gh-103921: Document PEP 695 - #104642
Conversation
Uh oh!
There was an error while loading. Please reload this page.
hugovk
commented
May 19, 2023
You could add this PEP to the release highlights: https://docs.python.org/3.12/whatsnew/3.12.html#summary-release-highlights |
This allows :keyword:`type` to link to docs for the new `type` statement (being written in pythongh-104642) instead of to this header in 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.
AlexWaygood
left a comment
There was a problem hiding this comment.
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!
| 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.
Don't think two line breaks are necessary here
| \n\ |
There was a problem hiding this comment.
Thanks, fixed.
Also thanks for all the thorough reviews! I am going to merge this now so I can stop worrying about conflicts.
miss-islington
commented
May 26, 2023
Thanks @JelleZijlstra for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12. |
(cherry picked from commit 060277d) Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
bedevere-bot
commented
May 26, 2023
GH-104989 is a backport of this pull request to the 3.12 branch. |
carljm
commented
May 26, 2023
🎉 |
AlexWaygood
commented
May 26, 2023
🥳🚀 |
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>. (cherry picked from commit 060277d) Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
bedevere-bot
commented
May 27, 2023
GH-105007 is a backport of this pull request to the 3.11 branch. |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| .. 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.
Just realised that type_params is in the wrong place here for the AST as it currently exists on main, where type_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.
Also, looks like you might have added type_params to the constructor for FunctionDef and ClassDef, but not AsyncFunctionDef!
📚 Documentation preview 📚: https://cpython-previews--104642.org.readthedocs.build/