From: Irit Katriel <1055913+iritkatriel@users.noreply.github.com> Date: Tue, 19 Apr 2022 09:09:10 +0000 (+0100) Subject: gh-74166: break cycle by clearing the list instead of dropping its reference (GH... X-Git-Tag: v3.11.0b1~305 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5b37b49ebc7a81e0a3f9b60ef82e804ab9e1badf;p=thirdparty%2FPython%2Fcpython.git gh-74166: break cycle by clearing the list instead of dropping its reference (GH-91685) --- diff --git a/Lib/socket.py b/Lib/socket.py index 97362d92f646..28d9c89d601a 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")