Facundo Batista <[EMAIL PROTECTED]> added the comment:

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.

__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2451>
__________________________________
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to