You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Example: in PR python/cpython#110848 Antoine is surprised that the PyThread_start_new_thread() function is part of the limited C API but is not documented.
We should explain that in the past, we didn't pay much attention to document and tests all limited C API functions, and that some functions were added to the limited C API by mistake. The limited c API was even "the default", before there was a clear cut between limited and non-limited, by creating Include/cpython/ sub-directory.
While the API can be inconsistent, it cannot be changed all sudden. We are not going to remove undocumented functions just because they are undocumented. Documentation can be written. Functions can be removed, but following PEP 387 deprecation process.
The only exception that I saw is when a function is part of the limited C API but cannot be used in the limited C API since it's broken: in that case, it can be removed immediately. I did that for the "trash can" API which was always broken. Same for PyWeakref_GET_OBJECT(): the implementation uses a member of structure whereas the structure is not part of the limited C API.
The text was updated successfully, but these errors were encountered:
You can’t remove 100% broken functions from the Stable ABI though. Code may link with them but never call them, or handle an exception gracefully. Right?
I don't think that we removed any stable ABI function so far, the functions only kept as "ABI only" just works. For immortal unicode, it's implemented by leaking memory (Py_INCREF) if i recall correctly. Maybe it could be modified to use immortal ref count now.
I was only talking about the public C API and the limited API, so at the API level.
The guideline label is for the PEP that will list guidelines for new API. The PEP should just say that API should be documented and tested: #31
I'll remove the label from here.
Example: in PR python/cpython#110848 Antoine is surprised that the PyThread_start_new_thread() function is part of the limited C API but is not documented.
We should explain that in the past, we didn't pay much attention to document and tests all limited C API functions, and that some functions were added to the limited C API by mistake. The limited c API was even "the default", before there was a clear cut between limited and non-limited, by creating
Include/cpython/
sub-directory.While the API can be inconsistent, it cannot be changed all sudden. We are not going to remove undocumented functions just because they are undocumented. Documentation can be written. Functions can be removed, but following PEP 387 deprecation process.
The only exception that I saw is when a function is part of the limited C API but cannot be used in the limited C API since it's broken: in that case, it can be removed immediately. I did that for the "trash can" API which was always broken. Same for PyWeakref_GET_OBJECT(): the implementation uses a member of structure whereas the structure is not part of the limited C API.
The text was updated successfully, but these errors were encountered: