[issue29757] The loop in utility `socket.create_connection()` swallows previous errors

Kostis Anagnostopoulos report at bugs.python.org
Thu Feb 21 04:41:32 EST 2019


Kostis Anagnostopoulos <ankostis at gmail.com> added the comment:

The problem of not fixing this (and just add a suggestion in the docs saying that the user may re-implement this method) is that frequently this call is hidden at the core of many networking libraries.  So monkey-patching is needed instead, which is not always nice or easy.


> I just found an old bug in socket.create_connection():
> https://github.com/python/cpython/pull/3546

Regarding #3546, i'm surprised that a function-local variable keeps its contents alive, long after the frame of that function has gone.  I thought that local-variables were deterministically (ref-countering) destructed.  
What is happening?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue29757>
_______________________________________


More information about the Python-bugs-list mailing list