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 facundobatista
Recipients facundobatista, jjlee
Date 2008-03-22.00:27:24
SpamBayes Score 0.12481577
Marked as misclassified No
Message-id <1206145646.16.0.870543227852.issue2451@psf.upfronthosting.co.za>
In-reply-to
Content
Two or three threads run in parallel at that time for this issue, don't
remember exactly where this was decided.

> *Because* socket.setdefaulttimeout() is a hack for when nothing else is
> available, there should be a way to avoid that global state.

Yes: don't call setdefaulttimeout().


> socket.setdefaulttimeout(), or requires use of it in order to set a
> timeout.  Can you explain why this state of affairs makes it necessary
> to force this global state on users of httplib?

The issue is that to allow caller to override the default state you
should pass it None, but None is for default timeout value in the call,
so you should be passing a specific object to mean "override default
timeout", etc... all this is well explained in that thread.

Lot of suggestions were handled, and the final decision was that all
that behaviours will complicate unnecessarily the semantics here (with
the cost of not being able to override the global default).

I suggest you to raise the discussion again in python-dev if you want
this decided behaviour to change.
History
Date User Action Args
2008-03-22 00:27:26facundobatistasetspambayes_score: 0.124816 -> 0.12481577
recipients: + facundobatista, jjlee
2008-03-22 00:27:26facundobatistasetspambayes_score: 0.124816 -> 0.124816
messageid: <1206145646.16.0.870543227852.issue2451@psf.upfronthosting.co.za>
2008-03-22 00:27:24facundobatistalinkissue2451 messages
2008-03-22 00:27:24facundobatistacreate