Alex Martelli <[EMAIL PROTECTED]> wrote:
> What about doing it with a per-thread-timeout in TLS (overriding the
> global one if a thread does have it set in its TLS)? Not as clean,
> but perhaps far easier to implement than patching dozens of
> modules/functions/classes to provide timeout= opt
Guido> OK, you've convinced me. Now where's that SF patch you were
Guido> promising? :-)
A starting point is probably the patch Georg referred to a couple days ago:
Georg> There was one patch that did this: http://python.org/sf/723312.
Alas, it's assigned to me and I let it get so s
What about doing it with a per-thread-timeout in TLS (overriding the
global one if a thread does have it set in its TLS)? Not as clean,
but perhaps far easier to implement than patching dozens of
modules/functions/classes to provide timeout= options everywhere...
Alex
On 7/5/06, Guido van Ross
OK, you've convinced me. Now where's that SF patch you were promising? :-)
--Guido
On 7/5/06, Facundo Batista <[EMAIL PROTECTED]> wrote:
> 2006/7/4, Guido van Rossum <[EMAIL PROTECTED]>:
>
> > > This affect all the sockets.
> >
> > So, assuming your app is single-threaded, set the timeout, call
>
2006/7/4, Guido van Rossum <[EMAIL PROTECTED]>:
> > This affect all the sockets.
>
> So, assuming your app is single-threaded, set the timeout, call
> urlopen(), and reset the timeout to None.
No, it's multithreaded, :D
> > And I hit the problem when servicing
> > information with a web service
On 7/4/06, Facundo Batista <[EMAIL PROTECTED]> wrote:
> 2006/7/3, Guido van Rossum <[EMAIL PROTECTED]>:
>
> > To fake things like this, socket.setdefaulttimeout() was added, though
> > I don't know if it actually works. Have you tried that?
>
> This affect all the sockets.
So, assuming your app is
2006/7/3, Guido van Rossum <[EMAIL PROTECTED]>:
> To fake things like this, socket.setdefaulttimeout() was added, though
> I don't know if it actually works. Have you tried that?
This affect all the sockets. And I hit the problem when servicing
information with a web service (TCPServer), and I ne
[EMAIL PROTECTED] wrote:
> Facundo> I need a timeout in urlopen, just to be able to make:
>
> urllib2.urlopen("http://no.host.org";, timeout=2)
>
> Facundo> This is actually not possible, but I'll make it work.
>
> Facundo> I want to know, please, if this is useful in genera
On Mon, 3 Jul 2006, Guido van Rossum wrote:
> To fake things like this, socket.setdefaulttimeout() was added, though
> I don't know if it actually works. Have you tried that?
[...]
It works. I think there's some issue with SSL, though (can't seem to find
the issue now).
Of course, feeding thro
Guido> To fake things like this, socket.setdefaulttimeout() was added,
Guido> though I don't know if it actually works. Have you tried that?
I'm pretty sure it does, but is a rather blunt instrument for the task, as
it affects all socket connections the app might make.
Skip
_
Facundo> I need a timeout in urlopen, just to be able to make:
urllib2.urlopen("http://no.host.org";, timeout=2)
Facundo> This is actually not possible, but I'll make it work.
Facundo> I want to know, please, if this is useful in general, for me to
Facundo> post a patch
To fake things like this, socket.setdefaulttimeout() was added, though
I don't know if it actually works. Have you tried that?
--Guido
On 7/3/06, Facundo Batista <[EMAIL PROTECTED]> wrote:
> I need a timeout in urlopen, just to be able to make:
>
> >>> urllib2.urlopen("http://no.host.org";, timeo
Facundo Batista wrote:
urllib2.urlopen("http://no.host.org";, timeout=2)
>
> This is actually not possible, but I'll make it work.
>
> I want to know, please, if this is useful in general, for me to post a
> patch in SF.
While it might be useful, it can only be added to Python 2.6 now.
So t
On Monday 03 July 2006 14:07, Facundo Batista wrote:
> I want to know, please, if this is useful in general, for me to post a
> patch in SF.
It seems like something that should be easy, and lots of people need to
consider this for applications.
-Fred
--
Fred L. Drake, Jr.
_
I need a timeout in urlopen, just to be able to make:
>>> urllib2.urlopen("http://no.host.org";, timeout=2)
This is actually not possible, but I'll make it work.
I want to know, please, if this is useful in general, for me to post a
patch in SF.
Regards,
--
.Facundo
Blog: http://www.tani
15 matches
Mail list logo