Message74541
'urllib2' has introduced a configurable 'timeout' setting by assigning
to the 'timeout' attribute of the urllib2.Request object. However the
implementation is flawed:
- the 'timeout' attribute is set in OpenerDirector.open() and nowhere else
- if someone overrides OpenerDirector.open() (btw: mechanize does
this), then the 'timeout' attribute will never be set, breaking
other parts of the code which require the 'timeout' attribute to be
present.
A simple workaround for this would be to do one or more of:
a) define the 'timeout' attribute as socket._GLOBAL_DEFAULT_TIMEOUT at
class-level
b) initialize the 'timeout' attribute on urllib2.Request.__init__() |
|
Date |
User |
Action |
Args |
2008-10-08 18:29:59 | sidnei | set | recipients:
+ sidnei |
2008-10-08 18:29:59 | sidnei | set | messageid: <1223490599.12.0.198174561396.issue4079@psf.upfronthosting.co.za> |
2008-10-08 18:29:58 | sidnei | link | issue4079 messages |
2008-10-08 18:29:57 | sidnei | create | |
|