-
-
Notifications
You must be signed in to change notification settings - Fork 30.6k
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-96002: Add functional test for Argument Clinic #96178
gh-96002: Add functional test for Argument Clinic #96178
Conversation
Most changes to Python require a NEWS entry. Please add it using the blurb_it web app or the blurb command-line tool. |
Most changes to Python require a NEWS entry. Please add it using the blurb_it web app or the blurb command-line tool. |
b703757
to
e67dc12
Compare
Thanks for taking this on! I suggest you take a look at how the
cpython/Modules/_testcapi/heaptype.c Lines 54 to 106 in 129998b
Lines 50 to 65 in 129998b
cpython/Modules/_testcapimodule.c Lines 6518 to 6519 in 129998b
You'll also need to modify |
e67dc12
to
962434c
Compare
Thanks for your advise. Once the framework is ready, I will add more case into it. |
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.
This is nice. I don't think there's need for a new Lib/test/test_clinic_functionality.py
file; we could probably just expand Lib/test_clinic.py
. Alternatively, create a file-system namespace Lib/test_clinic/
, but I don't know if that's worth it (and we could always do such a refactor afterwards).
(I'm not sure I like the _testclinicfunctionality.c
name, but I have no good alternative either; perhaps just _testclinic.c
)
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
@colorfulappl, are you planning to pursue this PR? If not, would you mind me taking over and driving it forward. I'd really like to have this merged; it is good work. |
Sorry, I have been busy with other stuff these days so this PR is delayed. :( I am planning to finish this in this week. Here I made some changes at your suggestions and am going to add more test cases. |
Now |
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.
Now
RETURN_PACKED_ARGS
macro accepts a wrapper function and invoke it inside a for loop.
This indeed handles the arguments one-by-one, though not in an elegant manner.
IMO, it matters more that it is readable and that it is correct, rather than how elegant it is.
I added a few more comments.
(Just a heads-up regarding the macro: I'll reformat it before merging1, but let's not spend time doing that while finishing the review trying to land this; it'll be too much distraction.)
Footnotes
-
fix indentation and align line breakers neatly ↩
Also, I'll wait for @kumaraditya303's thumbs up before landing this. @isidentical, do you want to have a look? |
# Conflicts: # Modules/Setup.stdlib.in
BTW, @colorfulappl, please resolve the conflicts in |
# Conflicts: # Modules/Setup.stdlib.in
Sure. It's done. :) |
Note to self: Like with |
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.
LGTM
I'm going to give Batuhan a chance to chime in before merging. If I haven't heard anything until Friday, I'll land this. Thanks for doing this, and thanks for your patience with our nitpicking, @colorfulappl :) |
@erlend-aasland @kumaraditya303 Thank you very much for your patient guidance! 🎉 |
# Conflicts: # Modules/Setup.stdlib.in
@colorfulappl: please go ahead with the various Argument Clinic bugfixes and their accompanying tests :) |
@kumaraditya303 I think we should backport this to 3.11 and 3.10. CC. @pablogsal as RM. There are multiple clinic bugfixes coming up; IMO we should backport those bugfixes. Backporting this will benefit such bugfix backports. |
SGTM |
(cherry picked from commit c450c8c) Co-authored-by: Kumar Aditya <[email protected]> Co-authored-by: Erlend E. Aasland <[email protected]>
GH-100230 is a backport of this pull request to the 3.11 branch. |
(cherry picked from commit c450c8c) Co-authored-by: Kumar Aditya <[email protected]> Co-authored-by: Erlend E. Aasland <[email protected]>
GH-100232 is a backport of this pull request to the 3.10 branch. |
…100230) (cherry picked from commit c450c8c) Co-authored-by: Kumar Aditya <[email protected]> Co-authored-by: Erlend E. Aasland <[email protected]>
…100232) (cherry picked from commit c450c8c) Co-authored-by: Kumar Aditya <[email protected]> Co-authored-by: Erlend E. Aasland <[email protected]>
A draft implementation of Argument Clinic functional test.
The test do:
Currently it's a draft and only two PoC of #32092 is added, so the test crashes.
cc. @erlend-aasland @kumaraditya303