Message64301
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. |
|
| Date |
User |
Action |
Args |
| 2008-03-22 00:27:26 | facundobatista | set | spambayes_score: 0.124816 -> 0.12481577 recipients:
+ facundobatista, jjlee |
| 2008-03-22 00:27:26 | facundobatista | set | spambayes_score: 0.124816 -> 0.124816 messageid: <[email protected]> |
| 2008-03-22 00:27:24 | facundobatista | link | issue2451 messages |
| 2008-03-22 00:27:24 | facundobatista | create | |
|