Re: improved async support in psycopg python2 branch

Jan UrbaƄski <[email protected]> Tue, 06 Apr 2010 12:58:06 +0200
Newsgroups gmane.comp.python.db.psycopg.devel
Message-ID <[email protected]>
On 05/04/10 17:10, Federico Di Gregorio wrote:
> Hi *,
> 
> I just merged and pushed almost all of Jan's changes into the official
> python2 branch of psycopg. All tests still pass and Jan changes
> _simplified_ somehow some internal paths so I am quite confident that th
> next release won't break anything but I'd like to have as many people as
> possible test the current release candidate tarball:

Cool! Thanks for your effort.

> I said "almost all" because I did some little fixes here and there,
> especially to make it possible to call .poll() outside of the
> asynchronous context. This is necessary for NOTIFYs to work.
> 
> Jan, please review by changes, especially moving POLL_OK from 3 to 0 to
> mimic old isready() usage. Also, let's start telling Twisted people they
> don't need an extra thread for psycopg anymore. :)

I'll have a look in the next day or two, still recovering from Easter
holidays :o)

As for Twisted, I have a half-done implementation. I'll open a ticket in
the Twisted trac once I finish that.

Thanks again,
Jan

PS: If things work out well I think I'll try to submit a lightning talk
for PGCon 2010 about PG, Python, psycopg2 and Twisted. That should at
least bring some testers to shake out bugs in the async code :)

Jan