-
-
Notifications
You must be signed in to change notification settings - Fork 33.6k
Open
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-C-APItype-featureA feature request or enhancementA feature request or enhancement
Description
I propose to deprecate the _Py_Identifier API.
- Deprecate private
_PyObject_CallMethodId(),_PyObject_GetAttrId(),_PyUnicode_FromId(). - Remove immediately internal functions using
_Py_Identifier.
See also the discussions:
- https://discuss.python.org/t/c-api-how-much-private-is-the-private-py-identifier-api/29190 (2023).
- https://mail.python.org/archives/list/python-dev@python.org/thread/DNMZAMB4M6RVR76RDZMUK2WRLI6KAAYS/ (2022)
Since 2022, CPython has been modified to replace _Py_IDENTIFIER() with _Py_STR(). Python no longer uses the _Py_IDENTIFIER() API anymore.
See also issue #141049 "Deprecate private C API functions".
Linked PRs
Metadata
Metadata
Assignees
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-C-APItype-featureA feature request or enhancementA feature request or enhancement