From 26de5beeb14dda7f5d3cc5a4f363c0a13f37cc98 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Sun, 12 Jan 2025 13:19:34 +0200 Subject: [PATCH] Revert "gh-128691: Use deferred reference counting on `_thread._local` (#128693)" This reverts commit c1417487e98e270d614965ed78ff9439044b65a6. --- Modules/_threadmodule.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Modules/_threadmodule.c b/Modules/_threadmodule.c index d19ae326bd6b48..2cbdfeb09b95ae 100644 --- a/Modules/_threadmodule.c +++ b/Modules/_threadmodule.c @@ -1414,10 +1414,6 @@ local_new(PyTypeObject *type, PyObject *args, PyObject *kw) return NULL; } - // gh-128691: Use deferred reference counting for thread-locals to avoid - // contention on the shared object. - _PyObject_SetDeferredRefcount((PyObject *)self); - self->args = Py_XNewRef(args); self->kw = Py_XNewRef(kw);