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 sidnei
Recipients sidnei
Date 2008-10-08.18:29:57
SpamBayes Score 0.00020891527
Marked as misclassified No
Message-id <1223490599.12.0.198174561396.issue4079@psf.upfronthosting.co.za>
In-reply-to
Content
'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__()
History
Date User Action Args
2008-10-08 18:29:59sidneisetrecipients: + sidnei
2008-10-08 18:29:59sidneisetmessageid: <1223490599.12.0.198174561396.issue4079@psf.upfronthosting.co.za>
2008-10-08 18:29:58sidneilinkissue4079 messages
2008-10-08 18:29:57sidneicreate