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

2021-05-22 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> duplicate superseder: -> OSError: multiple exceptions should preserve the exception type if it is common ___ Python tracker ___

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

2020-01-25 Thread Cheryl Sabella
Change by Cheryl Sabella : -- versions: +Python 3.9 -Python 3.7, Python 3.8 ___ Python tracker ___ ___ Python-bugs-list mailing

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

2019-02-21 Thread STINNER Victor
STINNER Victor added the comment: > I thought that local-variables were deterministically (ref-countering) > destructed. What is happening? IT's a reference cycle. Exception => traceback => frame => exception. The 'err' variable kept the frame alive which kept the exception alive which kept

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

2019-02-21 Thread Kostis Anagnostopoulos
Kostis Anagnostopoulos 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

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

2019-02-20 Thread Brett Cannon
Change by Brett Cannon : -- nosy: -brett.cannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2019-02-19 Thread STINNER Victor
STINNER Victor added the comment: I propose the close the issue as WONTFIX. I don't see how the current behavior is an issue. I expect a very large traceback just because a server is down/reject connections. I'm not sure that I want that by default. > ## The problem > So currently the loop

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

2019-02-16 Thread Cheryl Sabella
Change by Cheryl Sabella : -- stage: -> patch review type: -> enhancement versions: +Python 3.8 ___ Python tracker ___ ___

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

2017-09-13 Thread STINNER Victor
STINNER Victor added the comment: I'm not excited to keep multiple exception objects alive because the Exception.__traceback__ causes many hairy reference cycle issues. I just found an old bug in socket.create_connection(): https://github.com/python/cpython/pull/3546 See

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

2017-05-03 Thread Kostis Anagnostopoulos
Kostis Anagnostopoulos added the comment: Just to remind that as it stands now(b39d4b1c6) it contains no API changes at all, so it should be considered for merge into 3.6.x line. -- ___ Python tracker

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

2017-03-22 Thread Kostis Anagnostopoulos
Kostis Anagnostopoulos added the comment: > This is a new feature, so we can only push it to 3.7. As it stands now(b39d4b1c6) it hardly contains any change - just in the case of multiple intermediate errors AND final failure, the exception raised is a bit different. AFAICS it would be a

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

2017-03-17 Thread Kostis Anagnostopoulos
Kostis Anagnostopoulos added the comment: > When the list of errors is passed as a second argument to the exception, how > is it rendered? This is how my latest ec887c0c3 looks on Linux: >>> import socket >>> socket.create_connection(('localhost', 12345)) Traceback (most recent

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

2017-03-09 Thread Yury Selivanov
Yury Selivanov added the comment: This is a new feature, so we can only push it to 3.7. -- nosy: +brett.cannon, haypo versions: -Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6 ___ Python tracker

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

2017-03-09 Thread Yury Selivanov
Yury Selivanov added the comment: > Case (c) sidesteps the above questions. I like the (c) option. I don't think we should use logging/warnings here, as they can produce unwanted noise that few know how to silence. When the list of errors is passed as a second argument to the exception, how

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

2017-03-08 Thread Kostis Anagnostopoulos
New submission from Kostis Anagnostopoulos: ## Context The utility method `socket.create_connection()` currently works like that: 1. resolve the destination-address into one or more IP(v4 & v6) addresses; 2. loop on each IP address and stop to the 1st one to work; 3. if none works, re-raise the