[Python-checkins] gh-74166: break cycle by clearing the list instead of dropping its reference (GH-91685)
iritkatriel
webhook-mailer at python.org
Tue Apr 19 05:09:14 EDT 2022
https://github.com/python/cpython/commit/5b37b49ebc7a81e0a3f9b60ef82e804ab9e1badf
commit: 5b37b49ebc7a81e0a3f9b60ef82e804ab9e1badf
branch: main
author: Irit Katriel <1055913+iritkatriel at users.noreply.github.com>
committer: iritkatriel <1055913+iritkatriel at users.noreply.github.com>
date: 2022-04-19T10:09:10+01:00
summary:
gh-74166: break cycle by clearing the list instead of dropping its reference (GH-91685)
files:
M Lib/socket.py
diff --git a/Lib/socket.py b/Lib/socket.py
index 97362d92f6465..28d9c89d601aa 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")
More information about the Python-checkins
mailing list