On Wed, Feb 2, 2022 at 11:49 PM Eric Snow <ericsnowcurren...@gmail.com> wrote: > FTR, here is the (private/internal) C-API affected by getting rid of > _Py_IDENTIFIER(): > > * 21 C-API functions with `_Py_Identifer` parameters - would be dropped > + _PyUnicode_FromId() > + _PyUnicode_EqualToASCIIId() > + _PyObject_CallMethodId() > + _PyObject_CallMethodId_SizeT() > + _PyObject_CallMethodIdObjArgs() > + _PyObject_VectorcallMethodId() > + _PyObject_CallMethodIdNoArgs() > + _PyObject_CallMethodIdOneArg() > + _PyEval_GetBuiltinId() > + _PyDict_GetItemId() > + _PyDict_SetItemId() > + _PyDict_DelItemId() > + _PyDict_ContainsId() > + _PyImport_GetModuleId() > + _PyType_LookupId() > + _PyObject_LookupSpecial() > + _PyObject_GetAttrId() > + _PyObject_SetAttrId() > + _PyObject_LookupAttrId() > + _PySys_GetObjectId() > + _PySys_SetObjectId()
I am well aware that we don't provide any backward compatibility warranty on the private and internal C API. *But*. People love to use they anyway. In the top 5000 PyPI projects, I found 11 projects using them: * Cython-0.29.26 (and so indirect most projects using Cython) * datatable-1.0.0 * frozendict-2.2.0 * multidict-6.0.2 * mypy-0.931 * pickle5-0.0.12 * pysqlite3-0.4.6 * ruamel.ordereddict-0.4.15 * scandir-1.10.0 * typed_ast-1.5.2 * zodbpickle-2.2.0 They use the these 17 functions: * _PyDict_ContainsId() * _PyDict_DelItemId() * _PyDict_GetItemId() * _PyDict_GetItemIdWithError() * _PyDict_SetItemId() * _PyEval_GetBuiltinId() * _PyObject_CallMethodId() * _PyObject_CallMethodIdNoArgs() * _PyObject_CallMethodIdObjArgs() * _PyObject_CallMethodIdOneArg() * _PyObject_GetAttrId() * _PyObject_LookupAttrId() * _PyObject_LookupSpecial() * _PyObject_SetAttrId() * _PySys_GetObjectId() * _PyUnicode_EqualToASCIIId() * _PyUnicode_FromId() If the _Py_IDENTIFIER() API is removed, it would be *nice* to provide a migrate path (tool?) to help these projects moving away the _Py_IDENTIFIER() API. Or at least do the work to update these 11 projects. Victor -- Night gathers, and now my watch begins. It shall not end until my death. _______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/7RMLIJHUWVBZFV747TFEHOE6LNBVQSMM/ Code of Conduct: http://python.org/psf/codeofconduct/