This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author r.david.murray
Recipients r.david.murray, yselivanov
Date 2017-04-04.17:12:21
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1491325941.34.0.941861469291.issue29980@psf.upfronthosting.co.za>
In-reply-to
Content
create_connection will try multiple times to connect if there are multiple addresses returned by getaddrinfo.  If all connections file it inspects the exceptions, and raises the first one if they are all equal.  But since the addresses are often different (else why would we try multiple times?), the messages will usually be different.  When the messages are different, the code raises an OSError with a list of the exceptions so the user can see them all.  This, however, looses the information as to *what* kind of exception occurred (ie: ConnectioRefusedError, etc).

I propose that if all of the exceptions raised are of the same subclass, that that subclass be raised with the multi-message list, rather than the base OSError.
History
Date User Action Args
2017-04-04 17:12:21r.david.murraysetrecipients: + r.david.murray, yselivanov
2017-04-04 17:12:21r.david.murraysetmessageid: <1491325941.34.0.941861469291.issue29980@psf.upfronthosting.co.za>
2017-04-04 17:12:21r.david.murraylinkissue29980 messages
2017-04-04 17:12:21r.david.murraycreate