From 4ada2aeeeebf1224ffb621bf06894f914049b78b Mon Sep 17 00:00:00 2001 From: Irit Katriel Date: Tue, 19 Apr 2022 08:42:25 +0100 Subject: [PATCH] gh-74166: break cycle by clearing the list instead of dropping its reference --- Lib/socket.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/socket.py b/Lib/socket.py index 97362d92f64656..28d9c89d601aa3 100755 --- a/Lib/socket.py +++ b/Lib/socket.py @@ -851,7 +851,7 @@ def create_connection(address, timeout=_GLOBAL_DEFAULT_TIMEOUT, raise ExceptionGroup("create_connection failed", exceptions) finally: # Break explicitly a reference cycle - exceptions = None + exceptions.clear() else: raise error("getaddrinfo returns an empty list")