Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix ASAN issue, to many DECREFs :P
  • Loading branch information
gpshead committed Jun 4, 2023
commit c6cdc7f87bf6258c36a0ff0c9f91a89a5d428da7
12 changes: 4 additions & 8 deletions Objects/descrobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -1825,14 +1825,10 @@ property_init_impl(propertyobject *self, PyObject *fget, PyObject *fset,
// https://github.com/python/cpython/issues/98963#issuecomment-1574413319
// Python silently dropped this doc assignment through 3.11.
// We preserve that behavior for backwards compatibility.
if (prop_doc == Py_None) {
Py_DECREF(prop_doc);
return 0;
}
// If we ever want to deprecate this behavior, here is where to
// raise a DeprecationWarning; do not generate such noise when
// prop_doc is None.
Py_DECREF(prop_doc);
//
// If we ever want to deprecate this behavior, only raise a
// warning or error when proc_doc is not None so that
// property without a specific doc= still works.
return 0;
} else {
return -1;
Expand Down