gh-74166: break cycle by clearing the list instead of dropping its reference (GH-91685)

This commit is contained in:
Irit Katriel 2022-04-19 10:09:10 +01:00 committed by GitHub
parent e590379197
commit 5b37b49ebc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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")