Description
There are multiple Python functions marked as "deprecated", usually only in the documentation, or sometimes in comments, whereas the feature is there for a long time and there is no need to remove them, or the rationale changed.
For example, the array.array('u')
format was deprecated since it used the Py_UNICODE
C type (which is deprecated), but the code was updated to use the wchar_t
C type which is fine and not depreated.
Another example is passing NULL as value to PyObject_SetAttr(obj, name, value)
to delete an object attribute is deprecated... but this feature exists since the birth of Python. I don't think that it's really useful to deprecate this behavior: it's fine to keep it. The PyObject_DelAttr()
function is just implemented as a macro passing NULL:
#define PyObject_DelAttr(O, A) PyObject_SetAttr((O), (A), NULL)
Linked PRs
- gh-105373: Remove the PyObject_SetAttr(NULL) deprecation #105374
- gh-105373: Remove PyArg_Parse() deprecation #105394
- gh-105373: Fix decimal documentation formatting #105395
- gh-105373: Doc lists pending C API removals #106537
- gh-105373: Remove C API global config vars in Python 3.14 #106538
- gh-105373: Doc lists pending removals #106540
- gh-105373: Elaborate Pending Removal in What's New in Python 3.13 #106675