Re: [Python-Dev] SocketServer issues

2012-03-14 Thread Kristján Valur Jónsson
-dev@python.org Subject: Re: [Python-Dev] SocketServer issues Yes, setting a timeout and leaving it that way is not the same. But setting the timeout for _accept only_ is the "same" except one approach requires the check of a bool return, the other the handling of a socket.timeout ex

Re: [Python-Dev] SocketServer issues

2012-03-14 Thread Kristján Valur Jónsson
on. Thanks. K -Original Message- From: gvanros...@gmail.com [mailto:gvanros...@gmail.com] On Behalf Of Guido van Rossum Sent: 14. mars 2012 11:44 To: Kristján Valur Jónsson Cc: Antoine Pitrou; python-dev@python.org Subject: Re: [Python-Dev] SocketServer issues 2012/3/14 Kristján Valur Jónsson : >

Re: [Python-Dev] SocketServer issues

2012-03-14 Thread Guido van Rossum
2012/3/14 Kristján Valur Jónsson : > Maybe this is all just nonsense, still it seems odd to jump through extra > hoops to emulate a functionality that is already supported by the socket > spec, and can be done in the most appropriate way for each implementation. I thought I had already explained

Re: [Python-Dev] SocketServer issues

2012-03-14 Thread Kristján Valur Jónsson
ython-dev-bounces+kristjan=ccpgames@python.org] On Behalf Of Antoine Pitrou Sent: 14. mars 2012 10:23 To: python-dev@python.org Subject: Re: [Python-Dev] SocketServer issues On Wed, 14 Mar 2012 16:59:47 + Kristján Valur Jónsson wrote: > > It just seems odd to me that it was designed

Re: [Python-Dev] SocketServer issues

2012-03-14 Thread Antoine Pitrou
On Wed, 14 Mar 2012 16:59:47 + Kristján Valur Jónsson wrote: > > It just seems odd to me that it was designed to use the "select" api to do > timeouts, > where timeouts are already part of the socket protocol and can be > implemented more > efficiently there. How is it more efficient if it

Re: [Python-Dev] SocketServer issues

2012-03-14 Thread Kristján Valur Jónsson
review. K -Original Message- From: python-dev-bounces+kristjan=ccpgames@python.org [mailto:python-dev-bounces+kristjan=ccpgames@python.org] On Behalf Of Antoine Pitrou Sent: 14. mars 2012 02:02 To: python-dev@python.org Subject: Re: [Python-Dev] SocketServer issues On Wed, 14 Mar 2

Re: [Python-Dev] SocketServer issues

2012-03-14 Thread PJ Eby
On Wed, Mar 14, 2012 at 12:29 PM, Antoine Pitrou wrote: > On Wed, 14 Mar 2012 12:17:06 -0400 > PJ Eby wrote: > > That's not really the point; the frameworks that implement nonblocking > I/O > > by replacing the socket module (and Stackless is only one of many) won't > be > > using that code. > >

Re: [Python-Dev] SocketServer issues

2012-03-14 Thread Guido van Rossum
2012/3/13 Kristján Valur Jónsson : > I want to mention some issues I‘ve had with the socketserver module, and > discuss if there‘s a way to make it nicer. > > So, for a long time we were able to create magic stackless mixin classes for > it, like ThreadingMixIn, and assuming we had the appropriate

Re: [Python-Dev] SocketServer issues

2012-03-14 Thread Antoine Pitrou
On Wed, 14 Mar 2012 12:17:06 -0400 PJ Eby wrote: > > > So, my first question is: Why not simply rely on the already built-in > > timeout > > > support in the socket module? > > > > In case you didn't notice, the built-in timeout support *also* uses > > select(). > > > > That's not really the po

Re: [Python-Dev] SocketServer issues

2012-03-14 Thread Antoine Pitrou
On Wed, 14 Mar 2012 08:27:08 -0700 Guido van Rossum wrote: > Hopefully it doesn't use select if no timeout is set... No, it doesn't :-) Regards Antoine. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-d

Re: [Python-Dev] SocketServer issues

2012-03-14 Thread PJ Eby
On Wed, Mar 14, 2012 at 5:02 AM, Antoine Pitrou wrote: > On Wed, 14 Mar 2012 04:26:16 + > Kristján Valur Jónsson wrote: > > Hi there. > > I want to mention some issues I've had with the socketserver module, and > discuss if there's a way to make it nicer. > > So, for a long time we were able

Re: [Python-Dev] SocketServer issues

2012-03-14 Thread Guido van Rossum
Hopefully it doesn't use select if no timeout is set... --Guido van Rossum (sent from Android phone) On Mar 14, 2012 2:08 AM, "Antoine Pitrou" wrote: > On Wed, 14 Mar 2012 04:26:16 + > Kristján Valur Jónsson wrote: > > Hi there. > > I want to mention some issues I've had with the socketserv

Re: [Python-Dev] SocketServer issues

2012-03-14 Thread Antoine Pitrou
On Wed, 14 Mar 2012 04:26:16 + Kristján Valur Jónsson wrote: > Hi there. > I want to mention some issues I've had with the socketserver module, and > discuss if there's a way to make it nicer. > So, for a long time we were able to create magic stackless mixin classes for > it, like ThreadingM

[Python-Dev] SocketServer issues

2012-03-13 Thread Kristján Valur Jónsson
Hi there. I want to mention some issues I've had with the socketserver module, and discuss if there's a way to make it nicer. So, for a long time we were able to create magic stackless mixin classes for it, like ThreadingMixIn, and assuming we had the appropriate socket replacement library, be a