-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gh-128863: Deprecate private C API functions #128864
base: main
Are you sure you want to change the base?
Conversation
37869e2
to
18f8581
Compare
* _PyBytes_Join() * _PyDict_GetItemStringWithError() * _PyDict_Pop() * _PyThreadState_UncheckedGet() * _PyUnicode_AsString() * _Py_HashPointer() * _Py_fopen_obj() Replace _Py_HashPointer() with Py_HashPointer(). Remove references to deprecated functions.
18f8581
to
8140437
Compare
This is extra work for both you and for users. I do not see how this would reduce our maintenance burden. I also don't see any other benefit of this PR. |
Removing them from Python 3.16 seems a little hurried. Unless there is a specific reason to remove it sooner, how about schedule it for removal in Python 3.18? |
Code search on PyPI top 7,500 projects (2024-10-16). _PyBytes_Join(): 4 projects
_PyDict_GetItemStringWithError(): 3 projects
_PyDict_Pop(): 1 project
_PyThreadState_UncheckedGet(): 25 projects
_PyUnicode_AsString(): 1 project
_Py_HashPointer(): 3 projects
_Py_fopen_obj(): 1 project
I ignored projects including copies of these dependencies such as pybind11 copies. Total: 33 projects Affected projects (33):
|
I'm fine with using a longer deprecation period for Other functions are used by less than 5 projects and so can use a faster deprecation period, no? |
Python 3.13 will reach EOL in 2029. I want to keep it until 2031 (2029+2).
Python 3.12 will reach EOL in 2028. I want to keep it until 2030 (2028+2). Removing _PyUnicode_AsString with minimum deprecation period is OK because PyUnicode_AsUTF8 is added in 3.3. |
Replace _Py_HashPointer() with Py_HashPointer().
Remove references to deprecated functions.
📚 Documentation preview 📚: https://cpython-previews--128864.org.readthedocs.build/