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 gvanrossum
Recipients
Date 2002-06-06.21:11:15
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=6380

Thanks for the new version! I've checked this in.  I made
considerable changes; the following is feedback but you
don't need to respond because I've addressed all these in
the checked-in code!

- Thanks for the cleanup of some non-standard formatting.
However, it's better not to do this so the diffs don't show
changes that are unrelated to the timeout patch.

- You are still importing the select module instead of
calling select() directly. I really think you should do the
latter -- the select module has an enormous overhead (it
allocates several large lists on the heap).

- Instead of explicitly testing the argument to settimeout
for being a float, int or long, you should simply call
PyFloat_AsDouble and handle the error; if someone passes
another object that implements __float__ that should be
acceptable.

- gettimeout() returns sock_timeout without checking if it
is NULL. It can be NULL when a socket object is never
initialized. E.g. I can do this:

>>> from socket import *
>>> s = socket.__new__(socket)
>>> s.gettimeout()

which gives me a segfault. There are probably other places
where this is assumed.

- I addressed the latter two issues by making sock_timeout a
double, whose value is < 0.0 when no timeout is set.
History
Date User Action Args
2007-08-23 15:13:14adminlinkissue555085 messages
2007-08-23 15:13:14admincreate