gh-116646: Add limited C API support to AC fildes converter#116769
gh-116646: Add limited C API support to AC fildes converter#116769vstinner merged 1 commit intopython:mainfrom
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. |
serhiy-storchaka
left a comment
There was a problem hiding this comment.
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.