Closed
Description
When PyObject_SetAttr()
is called with a NULL
value, it's unclear if the caller wants to remove the attribute on purpose, or if the value is NULL
because of an error. Such API is error prone and should be avoided.
In 2005, this feature was already deprecated in the documentation in issue #69887 by commit 45be8d6.
I propose to now emit a DeprecationWarning and schedule the removal of this feature in Python 3.15. If too many C extensions rely on this current behavior, we can consider removing the feature later.