From 5a586c3e81ab53bb1f6c20a4c80b4eb69d429410 Mon Sep 17 00:00:00 2001 From: Dino Viehland Date: Fri, 14 Feb 2025 12:50:54 -0800 Subject: gh-130123: Make __new__ wrapper be deferred (#130124) Make __new__ wrapper be deferred --- Objects/typeobject.c | 1 + 1 file changed, 1 insertion(+) diff --git a/Objects/typeobject.c b/Objects/typeobject.c index 818a007..1fa1220 100644 --- a/Objects/typeobject.c +++ b/Objects/typeobject.c @@ -9564,6 +9564,7 @@ add_tp_new_wrapper(PyTypeObject *type) if (func == NULL) { return -1; } + _PyObject_SetDeferredRefcount(func); r = PyDict_SetItem(dict, &_Py_ID(__new__), func); Py_DECREF(func); return r; -- cgit v0.12