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
{{ message }}
Repository navigation
Exclude the private API from the stable API #71087
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee='https://github.com/serhiy-storchaka'closed_at=<Date2016-09-13.06:29:27.779>created_at=<Date2016-05-01.10:17:53.238>labels= ['interpreter-core', 'type-feature']
title='Exclude the private API from the stable API'updated_at=<Date2016-09-13.06:29:27.778>user='https://github.com/serhiy-storchaka'
All these names are not documented (except _PyObject_GC_Calloc accidentally mentioned in What's New in 3.5) and are not used implicitly in macros (except _PyObject_CallMethodId_SizeT used in _PyObject_CallMethodId).
Many of these functions were added after implementing PEP-384 and changed its signature during its lifetime. They are not explicitly exclude from the stable API only by accident.
I didn't follow this discussion, but thanks for the fix Serhiy :-) By
the way, I started a thread on python-dev to discuss a new
organization of the C API for Python 3.7.
Activity
serhiy-storchaka commentedon May 1, 2016
Proposed patch excludes the private API from the stable API. This includes:
_Py_Identifier-related API (other _Py_Identifier-related functions are already excluded):
File helpers that hides OS-specific details and handle EINTR:
Other OS functions:
Old helpers kept for binary compatibility of extensions built before 3.2.4:
And other functions and data:
PyAPI_DATA(PyTypeObject) _PyNone_Type;
PyAPI_DATA(PyTypeObject) _PyNotImplemented_Type;
PyAPI_DATA(PyTypeObject) _PyMethodWrapper_Type;
PyAPI_DATA(int) _Py_SwappedOp[];
All these names are not documented (except _PyObject_GC_Calloc accidentally mentioned in What's New in 3.5) and are not used implicitly in macros (except _PyObject_CallMethodId_SizeT used in _PyObject_CallMethodId).
Many of these functions were added after implementing PEP-384 and changed its signature during its lifetime. They are not explicitly exclude from the stable API only by accident.
serhiy-storchaka commentedon May 1, 2016
Added
zware commentedon May 2, 2016
bpo-23903 is closely related, but I haven't made it back to that one in some time.
python-dev commentedon Sep 11, 2016
New changeset d00f15af75ea by Serhiy Storchaka in branch 'default':
Issue bpo-26900: Excluded underscored names and other private API from limited API.
https://hg.python.org/cpython/rev/d00f15af75ea
vstinner commentedon Sep 11, 2016
I didn't follow this discussion, but thanks for the fix Serhiy :-) By
the way, I started a thread on python-dev to discuss a new
organization of the C API for Python 3.7.
serhiy-storchaka commentedon Sep 11, 2016
Maybe new private functions was added after writing the patch.
And many new public functions was added without guarding by specific Py_LIMITED_API value. This is separate issue.