-
-
Notifications
You must be signed in to change notification settings - Fork 32k
gh-116646: Add limited C API support to AC fildes converter #116769
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
Conversation
Add tests on the "fildes" converter to _testclinic_limited.
@serhiy-storchaka @erlend-aasland: Ok, this approach should be the least intrusive and the least controversial. It only adds support for the limited C API, but keep the code for the internal C API using converter. In the worst case, it generates internal C API code for the limited C API, but we can revisit this corner case later. |
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.
Why bother with limited_capi? It is okay to use PyObject_AsFileDescriptor
unconditionally.
You explained to me that all converters must support the PyArg_ParseTuple() fallback, here using I prefer to move slowly, step by step, when touching Argument Clinic which is fragile and has a small test suite. This change adds a test on the "fildes" converter for the limited C API. |
The fallback is still here if you do not remove |
I prefer to not add an indentation and the limited_capi check. The fallback is still used in a number of modules. |
Ok, let me elaborate. I tried to move code to converter_init(). The problem is that the logic to decide if an |
Merged, thanks for the review @serhiy-storchaka. |
This comment was marked as off-topic.
This comment was marked as off-topic.
LGTM; thanks. |
You keep repeating this, but the latter part is not true. Please keep to the facts, and don't invent FUD about the Argument Clinic test suite. |
Your right, AC has a large test suite today, and mypy is a great help. Sorry. |
…thon#116769) Add tests on the "fildes" converter to _testclinic_limited.
…thon#116769) Add tests on the "fildes" converter to _testclinic_limited.
…thon#116769) Add tests on the "fildes" converter to _testclinic_limited.
Add tests on the "fildes" converter to _testclinic_limited.