Re: [Python-Dev] Python-Dev Digest, Vol 53, Issue 23

2007-12-09 Thread Giampaolo Rodola'
Some things I would change in the docstrings:

> +A dispatcher object handles a single socket, processing connect,
> +accept, close, read and write events as defined by the child
> +handle_connect, handle_accept, handle_close, handle_read and
> +handle_write methods, respectively.  The child may also define
> +handle_expt to handle exceptions raised during the communication
> +process.

handle_expt is used for managing of OOB (Out Of Band) data.
The method called when an unhandled exception is raised is
dispatcher.handle_error().

> +"""Sets the socket.SO_REUSEADDR socket option, is possible

Typo ("IF possible").

>  def handle_error(self):
> +"""Internal method, do not override."""

I would change into: "Called when an exception is raised and not
otherwise handled. The default version prints a condensed traceback.",
the same thing reported in the doc.

>  def handle_expt(self):
> +"""Called to handle an exception event.
> +
> +Children may override this method to implement exception
> +processing.
> +
> +"""

Like said above, this is called when arrived some OOB data.
I would change this into something like: "Called when some OOB data
arrived."
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Python-Dev Digest, Vol 53, Issue 23

2007-12-09 Thread James Y Knight

On Dec 9, 2007, at 5:52 AM, Giampaolo Rodola' wrote:
>> def handle_expt(self):
>
> Like said above, this is called when arrived some OOB data.
> I would change this into something like: "Called when some OOB data
> arrived."

Of course, that's not actually true. It's called for whatever the exc  
bit from select indicates, which varies by platform. Oh, and if you're  
using the "poll2" implementation of asyncore, handle_expt is called  
only when there's an error on the socket, instead. Ah, wonderful  
abstraction.

James

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Python-Dev Digest, Vol 53, Issue 23

2007-12-09 Thread Giampaolo Rodola'
M...
This is what asyncore documentation says about handle_expt:

> Called when there is out of band (OOB) data for a socket connection.
> This will almost never happen, as OOB is tenuously supported and
> rarely used.

So, if you're right, the doc is wrong and should be rewritten.
Or maybe this is just a big mistake: could you please take a look at
Python issue #1541?


On 9 Dic, 17:35, James Y Knight <[EMAIL PROTECTED]> wrote:
> On Dec 9, 2007, at 5:52 AM, Giampaolo Rodola' wrote:
>
> >> def handle_expt(self):
>
> > Like said above, this is called when arrived some OOB data.
> > I would change this into something like: "Called when some OOB data
> > arrived."
>
> Of course, that's not actually true. It's called for whatever the exc  
> bit from select indicates, which varies by platform. Oh, and if you're  
> using the "poll2" implementation of asyncore, handle_expt is called  
> only when there's an error on the socket, instead. Ah, wonderful  
> abstraction.
>
> James
>
> ___
> Python-Dev mailing list
> [EMAIL PROTECTED]://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe:http://mail.python.org/mailman/options/python-dev/python-dev2-garchiv...
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


[Python-Dev] Missing _sqlite checkin on trunk?

2007-12-09 Thread skip
On Nov 25 Gerhard Haering checked in a change to the release25-maint branch:

Author: gerhard.haering
Date: Sun Nov 25 18:40:35 2007
New Revision: 59184

Modified:
   python/branches/release25-maint/Modules/_sqlite/statement.c
   python/branches/release25-maint/Modules/_sqlite/util.c
Log:
- Backported a workaround for a bug in SQLite 3.2.x/3.3.x versions where a
  statement recompilation with no bound parameters lead to a segfault
- Backported a fix necessary because of an SQLite API change in version 3.5.
  This prevents segfaults when executing empty queries, like our test suite
  does.

This bug is also present on the trunk, yet I saw no indication that he
checked in such a fix there.  Gerhard's patch applies cleanly.  I sent him
an email after I saw the checkin and verified that the patch worked on the
trunk, but have yet to hear back from him.

Is there some different method for getting sqlite changes into the trunk?

Thx,

Skip

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Signals+Threads (PyGTK waking up 10x/sec).

2007-12-09 Thread glyph

On 12:21 am, [EMAIL PROTECTED] wrote:
>Anyway, I would still like to discuss this on #python-dev Monday.
>Adam, in what time zone are you? (I'm PST.) Who else is interested?

I'm also interested.  I'm EST, but my schedule is very flexible (I'm on 
IRC pretty much all day for work anyway).  Just let me know when it is.
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com