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 techtonik
Recipients gregory.p.smith, loewis, techtonik
Date 2009-02-17.23:07:27
SpamBayes Score 8.655541e-08
Marked as misclassified No
Message-id <1234912049.42.0.492929619698.issue5293@psf.upfronthosting.co.za>
In-reply-to
Content
Isn't it a job of crossplatform programming language to abstract from
low-level platform details?

The scope of this bug is not about handling all possible Winsock errors.
It is about proper handling the sole timeout error from the list
http://www.winsock-error.com/ to make socket.connect() interface
consistent for both windows and linux.

In addition I believe that new socket.create_connection() function is
vulnerable to the same issue and its only a matter of time when somebody
reports that its additional "timeout" argument should be less than
mystic system network timeout value. That's why some sort of generalized
socket.connection_timeout exception is still needed.

BTW, I have tested the behaviour on linux - the system timeout on socket
does occur, but with different error code.

socket.error: (110, 'Connection timed out')

Note that the error message is different too. That means that to
properly wait for service to appear (or retry to reconnect later if
server is not available) you need to handle three error cases.
History
Date User Action Args
2009-02-17 23:07:29techtoniksetrecipients: + techtonik, loewis, gregory.p.smith
2009-02-17 23:07:29techtoniksetmessageid: <1234912049.42.0.492929619698.issue5293@psf.upfronthosting.co.za>
2009-02-17 23:07:27techtoniklinkissue5293 messages
2009-02-17 23:07:27techtonikcreate