bpo-40422: move _Py_closerange to core#22680
Conversation
This API is relatively lightweight and organizationally, given that it's used by multiple modules, it makes sense to move it to fileutils.
|
LGTM. Just leaving time for @vstinner to confirm this is what he had in mind. Victor: feel free to merge. |
It is made on purpose: the internal C API should not be used by 3rd party C extensions. You can modify setup.py and Modules/Setup to define the Py_BUILD_CORE_BUILTIN macro. There are many examples in these files. |
Requires making sure that _posixsubprocess is compiled with the appropriate Py_BUIILD_CORE_BUILTIN macro.
|
Sure, easy enough; I've moved the declaration and defined Py_BUILD_CORE_{BUILTIN,MODULE} as appropriate. I made sure to test with Modules/Setup including the module as well. |
vstinner
left a comment
There was a problem hiding this comment.
LGTM, I just have a minor coding style suggestion.
Co-authored-by: Victor Stinner <[email protected]>
|
Thanks for being patient with me here~ still getting used to the organization here, since I've only done drive-by optimization work on CPython. |
|
Merged, thanks! Python will now be really efficient to close file descriptors on recent FreeBSD versions! :-D |
This API is relatively lightweight and organizationally, given that it's used by multiple modules, it makes sense to move it to fileutils. Requires making sure that _posixsubprocess is compiled with the appropriate Py_BUIILD_CORE_BUILTIN macro.
This API is relatively lightweight and organizationally, given that it's used by multiple modules, it makes sense to move it to fileutils. Requires making sure that _posixsubprocess is compiled with the appropriate Py_BUIILD_CORE_BUILTIN macro.
This API is relatively lightweight and organizationally, given that it's
used by multiple modules, it makes sense to move it to fileutils.
https://bugs.python.org/issue40422