gh-108494: Argument Clinic: fix support of Limited C API#108536
gh-108494: Argument Clinic: fix support of Limited C API#108536serhiy-storchaka merged 7 commits into
Conversation
952e38c to
1896045
Compare
August 27, 2023 10:47
|
Yet one issue: the |
Sorry, something went wrong.
|
I'm very excited by this change! I will try to review it soon. Would it be possible to write unit tests in _testclinic_limited and test_clinic, for unusual cases like deprecated parameters and (if possible) defining class? In my other PR, I wrote tests for basic positional or keywords parameters. |
Sorry, something went wrong.
|
As for tests, I think that we should run all (or almost all) clinic tests in two modes. Instead of adding new tests for the limited API or duplicating test code we should generate and build different modules from the same source with different options. But this is a different PR. |
Sorry, something went wrong.
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
erlend-aasland
left a comment
There was a problem hiding this comment.
I may have missed something, but this looks good to me. Thanks, Serhiy!
Sorry, something went wrong.
AlexWaygood
left a comment
There was a problem hiding this comment.
No complaints from me (though I'm not an expert on the limited C API)
Sorry, something went wrong.
I tried to enable the use of the limited C API in Argument Clinic for all code. With this PR it generates working code, and all tests are passed, except the low-level vectorcall test in
test_calland few tests intest_clinic(as expected)._struct.candwinreg.cuse converters incompatible with the limited C API. I temporary blacklisted these files. I only tested on Linux, so there may be errors in Windows or macOS specific modules.