Repository navigation
Keep deprecated functions in Python 3.13: remove this deprecation #105373
Description
Activity
- addedtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
on 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.
- added 4 commits that reference this issue
on Jun 6, 2023 For example, the
array.array('u')format was deprecated since it used thePy_UNICODEC type (which is deprecated), but the code was updated to use thewchar_tC type which is fine and not depreated.- gh-80480: Emit DeprecationWarning for array's 'u' type code #95760 was merged few hours ago. Is the cited point relevant then?
See #80480 (comment)
There are few situations where platform- or compiler-dependent
wchar_tarrays are useful.
Many users usearray('u')as a mutable Unicode buffer, andarray('w')is recommended for that use.Reacted by Oleg Iarygin- added a commit that references this issue
on Jun 13, 2023 5 remaining items
- added 5 commits that reference this issue
on Jul 8, 2023 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.
- added a commit that references this issue
on Jul 12, 2023 Would be nice to have .warn() kept.
Would be nice to have .warn() kept.
The removal of logging.Logger.warn() is not planned.
Would be nice to have .warn() kept.
The removal of logging.Logger.warn() is not planned.
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.
Since this issue is closed, I suggest you opening a new issue if you have a strong opinion on warn() deprecation.
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 thePy_UNICODEC type (which is deprecated), but the code was updated to use thewchar_tC 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. ThePyObject_DelAttr()function is just implemented as a macro passing NULL:Linked PRs