Message40008
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. |
|
Date |
User |
Action |
Args |
2007-08-23 15:13:14 | admin | link | issue555085 messages |
2007-08-23 15:13:14 | admin | create | |
|