set timeout for URLs that do not resolve

Create issue
Issue #15 resolved
Sridhar Ratnakumar created an issue

quick repro:

$ easy_install Axiom

I noticed this command was running on and on .. for about 5 minutes till the server came back.

there needs to be a timeout mechanism when handling with URLs -- not just socket timeout -- but name resolving, everything .. but downloading.

background: I'm using setuptools's PackageIndex to download packages .. as API. so a way to set this timeout would be very helpful. and if we are allowed to have this in distribute, I might consider switching to it. :-)

Comments (6)

  1. Tarek Ziadé repo owner

    I am not sure to understand what you are proposing.

    A global socket timeout handles this problem AFAIK because when a download starts, the timeout is reinitialized everytime some data goes through the socket, so it works even for files that take ages to be downloaded. And as far as I know, all other network work uses socket so they benefit from the timeout.

    What do you have in mind besides setting the socket timeout like we did in zc.buildout ?

  2. Former user Account Deleted

    Yes, a global socket timeout would do. But setuptools does not have one, I think. easy_install does not run with a timeout.

    For API, we can set the timeout ourself.

    For easy_install, perhaps a timeout has to be set by easy_install itself. Else the user may think the command is running forever or hung.

  3. Log in to comment