Re: [Twisted-Python] Global reactor unit tests in the Twisted test suite

2011-11-03 Thread Phil Mayers
On 11/02/2011 10:56 PM, Glyph Lefkowitz wrote: > > On Nov 2, 2011, at 3:55 AM, Phil Mayers wrote: > >> But I'll note that most people I've seen crib from existing test code >> during the early phases of TDD, tutorials or not - and if most test code >> in Twisted uses the real reactor... > > Thanks

Re: [Twisted-Python] Docs HTML suggestion/request for moving between versions.

2011-11-03 Thread exarkun
On 26 Oct, 03:29 pm, p.may...@imperial.ac.uk wrote: >Lately, I've taken to finding Twisted docs by writing: > >twisted.internet.task.Cooperator > >...into the Chrome bar'o'magic and hitting return to get the Google >hit. >This is great, except that the resultant Google hits almost always >point >

Re: [Twisted-Python] Docs HTML suggestion/request for moving between versions.

2011-11-03 Thread Phil Mayers
On 03/11/11 12:40, exar...@twistedmatrix.com wrote: > I've updated http://twistedmatrix.com/documents/8.0.0/api/ - compare it Cool, that looks good, thanks! ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-b

[Twisted-Python] Second pre-release of Twisted 11.1.0

2011-11-03 Thread Thomas Hervé
From the sunny land of Orlando, I'm pleased to announce the second pre-release of Twisted 11.1. You can find the tarballs here: http://people.canonical.com/~therve/Twisted/11.1.0pre2/ Among the 17 bugs fixed since the last pre-release, a fix in the new TLS code in connection lost managem

Re: [Twisted-Python] Global reactor unit tests in the Twisted test suite

2011-11-03 Thread Glyph
On Nov 3, 2011, at 5:14 AM, Phil Mayers wrote: > On 11/02/2011 10:56 PM, Glyph Lefkowitz wrote: >> >> On Nov 2, 2011, at 3:55 AM, Phil Mayers wrote: >> >>> But I'll note that most people I've seen crib from existing test code >>> during the early phases of TDD, tutorials or not - and if most te

[Twisted-Python] adbapi / Postgres : LISTEN/NOTIFY and RealDictCursor

2011-11-03 Thread Tobias Oberstein
I am using Twisted adbapi, psycopg2 and PostgreSQL which works really great. Now, there are 2 features I'd like to use in this context, which I've been using before without Twisted. I'm missing those. Would be glad for any hints .. If there is work to do to make those features happen, and it's

Re: [Twisted-Python] adbapi / Postgres : LISTEN/NOTIFY and RealDictCursor

2011-11-03 Thread Tobias Oberstein
after actually looking at the adbapi.py code, it's quite accessible, so I guess doing > dict_cursor = db.cursor(cursor_factory = psycopg2.extras.RealDictCursor) would entail forwarding the desired cursor factory to here https://github.com/powdahound/twisted/blob/master/twisted/enterprise/adbapi

Re: [Twisted-Python] adbapi / Postgres : LISTEN/NOTIFY and RealDictCursor

2011-11-03 Thread Glyph Lefkowitz
On Nov 3, 2011, at 2:58 PM, Tobias Oberstein wrote: > btw: are there plans to get Twisted master repo from svn to git? No; the eventual plan is to move to bzr. This is happening very slowly though :). By the way, the official Twisted git mirror _should_ be at

Re: [Twisted-Python] adbapi / Postgres : LISTEN/NOTIFY and RealDictCursor

2011-11-03 Thread exarkun
On 07:21 pm, gl...@twistedmatrix.com wrote: >On Nov 3, 2011, at 2:58 PM, Tobias Oberstein wrote: >>btw: are there plans to get Twisted master repo from svn to git? > >No; the eventual plan is to move to bzr. This is happening very slowly >though :). > >By the way, the official Twisted git mirror

Re: [Twisted-Python] adbapi / Postgres : LISTEN/NOTIFY and RealDictCursor

2011-11-03 Thread Tobias Oberstein
> > btw: are there plans to get Twisted master repo from svn to git? > > No; the eventual plan is to move to bzr. This is happening very slowly though > :). > > By the way, the official Twisted git mirror _should_ be at > . It looks like nobody's updating tha

Re: [Twisted-Python] adbapi / Postgres : LISTEN/NOTIFY and RealDictCursor

2011-11-03 Thread Corbin Simpson
I should point out that git-svn isn't happy about Twisted's repo, so the git mirror is non-trivial to maintain. Last time I tried, I got quite a few curious errors. Sending from a mobile, pardon my terseness. ~ C. On Nov 3, 2011 12:56 PM, "Tobias Oberstein" wrote: > > > btw: are there plans to g

Re: [Twisted-Python] adbapi / Postgres : LISTEN/NOTIFY and RealDictCursor

2011-11-03 Thread Tobias Oberstein
Ok, should anyone else need this, here is working code: class PostgresListenService(twisted.application.service.Service): """ PostgreSQL LISTEN/NOTIFY as Twisted service. http://initd.org/psycopg/docs/advanced.html#asynchronous-notifications """ def __init__(self, dsn, channe

Re: [Twisted-Python] adbapi / Postgres : LISTEN/NOTIFY and RealDictCursor

2011-11-03 Thread Glyph
On Nov 3, 2011, at 6:18 PM, Tobias Oberstein wrote: > while not self.stopped: > if select.select([conn], [], [], self.timeout) == ([], [], []): >pass Please note that on high-volume servers, this is problematic, as 'conn' may be higher than the maximum file descriptor po

Re: [Twisted-Python] adbapi / Postgres : LISTEN/NOTIFY and RealDictCursor

2011-11-03 Thread Ivan Kozik
On Thu, Nov 3, 2011 at 20:54, Corbin Simpson wrote: > I should point out that git-svn isn't happy about Twisted's repo, so the git > mirror is non-trivial to maintain. Last time I tried, I got quite a few > curious errors. I keep a tarball of a git-svn clone of Twisted at https://ludios.org/mirro

Re: [Twisted-Python] adbapi / Postgres : LISTEN/NOTIFY and RealDictCursor

2011-11-03 Thread Tobias Oberstein
Hello Glyph, thank's a lot for this advice! I thought I would have done right, and Twisted-style .. but the select FD trap wasn't on my radar. The https://github.com/wulczer/txpostgres is very interesting. Guess I need to learn about interfaces.IReadWriteDescriptor first to grasp it. Regardin

Re: [Twisted-Python] adbapi / Postgres : LISTEN/NOTIFY and RealDictCursor

2011-11-03 Thread Glyph
On Nov 3, 2011, at 7:40 PM, Tobias Oberstein wrote: > Regarding the broader picture: I cannot say I understand what you say > completely. > > "maximum file descriptor pollable by select()" > > Is this *nix in general? > > Does that only apply to select.select? Yep, only to select.select. Se