Uh oh!
There was an error while loading. Please reload this page.
gh-95065: Add Argument Clinic support for deprecating positional use of parameters - #95151
Conversation
erlend-aasland
commented
Jul 22, 2022
Disclaimer: there's probably a lot of corner cases I haven't thought of yet. This is very much a draft. |
erlend-aasland
commented
Jul 26, 2022
@zware, are you interested in reviewing this? This is probably quite crude, but my Argument Clinic knowledge is minimal, so I think getting a round of reviews is needed for me to move forward with this. |
erlend-aasland
commented
Jul 26, 2022
cc. @arhadthedev, if you would like to review this. |
arhadthedev
left a comment
There was a problem hiding this comment.
if you would like to review this
I have neither objections nor extra ideas here. Also, I fully agree that [...] we should create separate issues for each feature later, not here and now.
The feature is not ready yet; dismissing premature approval.
serhiy-storchaka
left a comment
There was a problem hiding this comment.
LGTM, besides few nitpicks.
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.
erlend-aasland
commented
Aug 7, 2023
Thank you all so much for helping out with this PR. I learned some new tricks, and it was very good with some extra pairs of eyes on this. |
erlend-aasland
commented
Aug 7, 2023
I improved the NEWS entry, but I also think we should promote this feature in What's New. I'm not sure where in What's New, though. |
serhiy-storchaka
left a comment
There was a problem hiding this comment.
No, I do not think that it should be in What's New. Argument Clinic is an implementation detail. Everything made with Argument Clinic can be made without Argument Clinic. Only the end result is important for users.
Uh oh!
There was an error while loading. Please reload this page.
…5.NfCCpp.rst Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
erlend-aasland
commented
Aug 7, 2023
Thanks again. I'll wait for Alex's approval before landing. |
AlexWaygood
left a comment
There was a problem hiding this comment.
The grammar in one of the deprecation messages in the tests is still not ideal — here's a way to fix it:
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.
This reverts commit d2130ab, but keeps the test.
…of parameters (python/cpython#95151) It is now possible to deprecate passing parameters positionally with Argument Clinic, using the new '* [from X.Y]' syntax. (To be read as "keyword-only from Python version X.Y") Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
…itional use of parameters (python/cpython#95151) It is now possible to deprecate passing parameters positionally with Argument Clinic, using the new '* [from X.Y]' syntax. (To be read as "keyword-only from Python version X.Y") Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
…itional use of parameters (python/cpython#95151) It is now possible to deprecate passing parameters positionally with Argument Clinic, using the new '* [from X.Y]' syntax. (To be read as "keyword-only from Python version X.Y") Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Add support for deprecating positional use of optional parameters by
introducing the
* [from X.Y]syntax, meaning the following parameterswill be keyword-only starting with Python version X.Y. Code that emits
DeprecationWarnings and compile time messages will be automatically
generated.
Multiple
* [from X.Y]lines are not allowed (yet).