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
Keep deprecated functions in Python 3.13: remove this deprecation #105373
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:
#definePyObject_DelAttr(O, A) PyObject_SetAttr((O), (A), NULL)
I wanted to propose the keep the deprecated logging.Logger.warn() method (remove its deprecation)... but instead I proposed to remove it :-) see issue #105376.
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.
There are few situations where platform- or compiler-dependent wchar_t arrays are useful.
Many users use array('u') as a mutable Unicode buffer, and array('w') is recommended for that use.
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. (...)
I created issue #106572: "Deprecate PyObject_SetAttr(obj, name, NULL): PyObject_DelAttr(obj, name) must be used instead".
Well, I did the cleanup that I wanted to do about pending incompatible changes. I just proposed a new PR #106675 to elaborate the "Pending Removal" documentation.
I propose to open new issues if we want to adjust other pending incompatible changes: unschedule them, schedule them, or schedule them earlier.
Activity
hugovk commentedon Jun 6, 2023
See also #80480 which links to a merged PR to add
array.array('w')and with an open PR to deprecatearray.array('u'), cc @methane.pythongh-105373: PyObject_SetAttr() to delete an attr is no longer de…
pythongh-105373: PyObject_SetAttr(NULL) is no longer deprecated
pythongh-105373: PyObject_SetAttr(NULL) is no longer deprecated
vstinner commentedon Jun 6, 2023
I wanted to propose the keep the deprecated logging.Logger.warn() method (remove its deprecation)... but instead I proposed to remove it :-) see issue #105376.
pythongh-105373: Remove PyArg_Parse() deprecation
pythongh-105373: Fix decimal documentation formatting
gh-105373: Fix decimal documentation formatting (#105395)
pythongh-105373: Remove PyArg_Parse() deprecation
arhadthedev commentedon Jun 11, 2023
methane commentedon Jun 12, 2023
See #80480 (comment)
There are few situations where platform- or compiler-dependent
wchar_tarrays are useful.Many users use
array('u')as a mutable Unicode buffer, andarray('w')is recommended for that use.gh-105373: Remove PyArg_Parse() deprecation (#105394)
pythongh-105373: Doc lists pending C API removals
gh-105373: Doc lists pending C API removals (#106537)
5 remaining items
pythongh-105373: Doc lists pending removals
gh-105373: Doc lists pending removals (#106540)
pythongh-105373: Deprecate PyObject_SelAttr(v, name, NULL)
pythongh-105373: Deprecate PyObject_SelAttr(v, name, NULL)
pythongh-105373: Deprecate PyObject_SetAttr(v, name, NULL)
vstinner commentedon Jul 10, 2023
I created issue #106572: "Deprecate PyObject_SetAttr(obj, name, NULL): PyObject_DelAttr(obj, name) must be used instead".
pythongh-105373: Eloborate Pending Removal in What's New in Python 3.13
pythongh-105373: Elaborate Pending Removal in What's New in Python 3.13
vstinner commentedon Jul 12, 2023
Well, I did the cleanup that I wanted to do about pending incompatible changes. I just proposed a new PR #106675 to elaborate the "Pending Removal" documentation.
I propose to open new issues if we want to adjust other pending incompatible changes: unschedule them, schedule them, or schedule them earlier.
gh-105373: Elaborate Pending Removal in What's New in Python 3.13 (#1…
j4hangir commentedon Aug 23, 2025
Would be nice to have .warn() kept.
vstinner commentedon Sep 1, 2025
The removal of logging.Logger.warn() is not planned.
j4hangir commentedon Sep 1, 2025
I assumed since it's deprecated it'll be eventually removed, in that case I'd agree that the deprecation is also not needed on it.
vstinner commentedon Sep 1, 2025
Since this issue is closed, I suggest you opening a new issue if you have a strong opinion on warn() deprecation.