Sorry, something went wrong.
|
Most changes to Python require a NEWS entry. Please add it using the blurb_it web app or the blurb command-line tool. |
Sorry, something went wrong.
|
Most changes to Python require a NEWS entry. Please add it using the blurb_it web app or the blurb command-line tool. |
Sorry, something went wrong.
|
Thanks for taking this on! I suggest you take a look at how the test_capi module is laid out; the C code lives in the Modules/ dir, and the test code lives in Lib/test/test_capi.py. The tests there can be split in two patterns:
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 configure.ac, Makefile.pre.in, and Modules/Setup.stdlib for the new module; you can grep -i for _testcapi in those files to see what needs to be done. |
Sorry, something went wrong.
|
You'll also need to modify configure.ac, Makefile.pre.in, and Modules/Setup.stdlib for the new module; you can grep -i for _testcapi in those files to see what needs to be done. Thanks for your advise. Once the framework is ready, I will add more case into it. |
Sorry, something went wrong.
There was a problem hiding this comment.
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)
Sorry, something went wrong.
|
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 I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request. |
Sorry, something went wrong.
|
@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, something went wrong.
|
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. |
Sorry, something went wrong.
|
Now RETURN_PACKED_ARGS macro accepts a wrapper function and invoke it inside a for loop. |
Sorry, something went wrong.
There was a problem hiding this comment.
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.)
fix indentation and align line breakers neatly ↩
Sorry, something went wrong.
|
Also, I'll wait for @kumaraditya303's thumbs up before landing this. @isidentical, do you want to have a look? |
Sorry, something went wrong.
|
BTW, @colorfulappl, please resolve the conflicts in Modules/Setup.stdlib.in (it's because of my recent PRs for the _testcapi module). |
Sorry, something went wrong.
|
Sure. It's done. :) |
Sorry, something went wrong.
|
Note to self: Like with _testcapi, we should consider adding a short README (or C comment) regarding how to add new tests. We can do this in a follow-up PR. |
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM
Sorry, something went wrong.
|
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 :) |
Sorry, something went wrong.
|
@erlend-aasland @kumaraditya303 Thank you very much for your patient guidance! 🎉 |
Sorry, something went wrong.
|
@colorfulappl: please go ahead with the various Argument Clinic bugfixes and their accompanying tests :) |
Sorry, something went wrong.
|
@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. |
Sorry, something went wrong.
|
I think we should backport this to 3.11 and 3.10. SGTM |
Sorry, something went wrong.
|
GH-100230 is a backport of this pull request to the 3.11 branch. |
Sorry, something went wrong.
|
GH-100232 is a backport of this pull request to the 3.10 branch. |
Sorry, something went wrong.
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