[Twisted-Python] Twisted Jabber mailinglist

Hi all, Recently I set up a mailinglist [1,2] for Jabber development using Twisted. I invited the developers from projects like pyMSNt, pyAIMt, pyICQt, PunJab and Twibber and the list now has 15 members. I invite everyone who is interested in Jabber development using Twisted to join. Also, Jp released Twisted Words 0.3 that saw a restucturing of the Jabber bits. The Twisted Xish project, that was changed in the same restructuring, has been folded in Words now. Xish should be usuable for non-Jabber XML streaming as well. I made a few comments and notes [3] on the release and changes this on the new list. [1] mailto:twisted-jabber@ik.nu [2] https://mailman.ik.nu/mailman/listinfo/twisted-jabber [3] https://mailman.ik.nu/pipermail/twisted-jabber/2005-October/000019.html -- Groetjes, ralphm

On Sun, 23 Oct 2005 13:26:05 +0200, Ralph Meijer <twisted@ralphm.ik.nu> wrote:
Hi all,
Recently I set up a mailinglist for Jabber development using Twisted.
Thanks for setting this up, Ralph.
I will subscribe soon, but I'm going to reply to the message that you linked to here, because it impacts other projects.
Xish's utility is not at issue. I think it's great that it's useful for non-jabber uses. Guido's opinion [1] notwithstanding, Python is a framework [2] and so should each Twisted subprojects be. I mentioned this in an earlier post [3] but as long as I'm talking I might as well explain a bit further. There are a plethora of buggy, one-off libraries in the Python world that are not supported or tested because they don't have any user-facing tools which can be tested. They're easy to write, and easy to release, but libraries should always be written in support of applications, not simply in the hopes they will be useful. As Rails has famously declared, good frameworks are "extracted". As an example of this, Twisted Matrix Labs' experience with distributing libraries has been, to put it politely, poor. Aside from .xish, whose function was mainly to complicate t.words releases and installations, our other two libraries are .pair and .flow, both of which are pretty much useless to everyone but their respective authors and currently unmaintained. Users of xish can easily install twisted.words, then import only xish. Keep your import dependencies as clean as possible so that if they do this and then use a tool like freeze or py2exe, they won't suck in all of twisted.words by accident. The rest of Twisted has been historically careful about this, because while I have encountered several situations where deployment footprint was a concern, I have yet to meet a developer whose hard drive was so full that they couldn't spare an additional 100k on their disk for a full subproject during installation. The main message here is that each Twisted subproject should be a coherent whole that performs an actual function. If .xish grew a tool for monitoring or transforming XML streams that would actually be useful to a reasonable-sized audience (i.e. not just for the author of the tool to test the library and not just so it can be split out ^_^), then it might be a good candidate for being split out into its own project again. [1]: http://mail.python.org/pipermail/python-dev/2005-October/057486.html [2]: http://www.twistedmatrix.com/users/glyph/rant/extendit.html [3]: http://archives.free.net.ph/message/20050929.162612.040ae285.en.html

On Sun, Oct 23, 2005, glyph@divmod.com wrote:
Users of xish can easily install twisted.words, then import only xish.
It would be useful to people who might want to do this though to thoroughly advertise the existence of whatever incredibly useful libraries you've developed as part of a subproject. At the moment http://twistedmatrix.com/projects/words/ doesn't seem to be extolling the virtues of xish: perhaps it should be? At some point in the distant past (about a year ago actually, when I was in Boston, so not that distant) there was talk of some kind of big matrix, along the lines of "you want to do XML/SMTP/DNS... then look at blah." Given the subproject philosophy Glyph outlined in the parent mail this makes more sense, so I will probably branch something and bug people to contribute descriptions of all their hidden little gems to it. -Mary

On 24/10/05, glyph@divmod.com <glyph@divmod.com> wrote:
The main message here is that each Twisted subproject should be a coherent whole that performs an actual function. If .xish grew a tool for monitoring or transforming XML streams that would actually be useful to a reasonable-sized audience (i.e. not just for the author of the tool to test the library and not just so it can be split out ^_^), then it might be a good candidate for being split out into its own project again.
You know, by these standards, Trial is a good candidate for being split out into its own project. Now, sceptics might say, "ahh, but does not core depend on Trial?". To which I would say, "No it doesn't". cheers, jml

On Tue, 25 Oct 2005 14:19:40 +1100, Jonathan Lange <jml@mumak.net> wrote:
Passing unit tests would be a good start towards that ;) Seriously: leaving twisted.protocols.loopback aside, I still think Core depends on Trial because Trial is how you can *tell* if Core is working: you run its tests. So Core depends on Trial, and Trial depends on core. If you must have both installed for either to work, is there really a benefit to packaging them separately? If you can suggest some other way to demonstrate that a Core install works, maybe you can convince me releasing trial separately has a purpose. Jp

On Tue, Oct 25, 2005 at 12:03:30AM -0400, Jean-Paul Calderone wrote: [...]
I disagree. If someone wrote some sort of really shiny debugger that worked really nicely with Twisted, and so was very helpful as a development tool for hacking on Twisted, I don't think it would qualify as a dependency of core. Much the same way that emacs/vim, epydoc, manhole, and who knows what else aren't dependencies. Trial is a valuable tool that all developers almost certainly should have installed. That doesn't mean it's a dependency in any useful technical sense: I can happily delete twisted/trial and still have all my twisted-using applications I've written or downloaded still work. The fact that Trial is so clearly of use to other projects in exactly the same way that it's of use to core is another reason to have it seperate. Trial and the rest of core are clearly developing at different rates, so there's possibly even some benefit from decoupling their releases. So I think if Jonathan wants to release it seperately, I'm happy to let him. -Andrew.

On Tue, 25 Oct 2005 14:42:24 +1000, Andrew Bennetts <andrew-twisted@puzzling.org> wrote:
Overall I'm a bit reluctant to spin out more new projects right now, but this actually sounds like a pretty compelling case to me. However, a point in JP's favor: there are source files distributed with core (twisted/test/*) that *import* code from Trial. Test cases seem to be, in every sense, a bit of a gnarly special case. Is there anything other than test cases where you think imports are *not* counted as a dependency?

testcases are not necessary for production installation, just as technical docs are. In fact testcases, trial, docs etc are developer-environment tools, not production-environment tools. Maybe it could make sense to distribute: - twisted-core - bunch of libraries performing the twisted job - twisted-dev - trial, testcases, docs etc

Marcin Kasperski wrote:
I consider running unit tests an essential part of the build process. Thus, in my eyes twisted-core has a build-time dependency on trial, even if it doesn't have a runtime dependency.

On Wed, 26 Oct 2005 10:44:14 +1100, Jonathan Lange <jml@mumak.net> wrote:
Do you think a build-time dependency is enough to keep Trial within core?
It's not just build-time. Once you've installed Twisted in a particular environment, trial helps you determine if it's *installed* properly. If chunks have fallen off of your tarball at some point, trial will alert you to this by failing a bunch of tests. It's that dependency which keeps me leaning towards "yes". That said, I'm still undecided - trial is definitely making a lot of progress lately and the rationale of the split was to keep projects like this unconstrained by core's need for stability.

Jonathan Lange wrote:
Do you think a build-time dependency is enough to keep Trial within core?
I think build-time dependencies that do not form a strict DAG to be a pain in ones anatomy. If trial is separated from core, the only reasonable path forward is not running core unit tests during build. Alternatively, wouldn't it be great if stdlib unittest, py.test and trial could _all_ run twisted core unit tests properly?-)

On Wed, 2005-10-26 at 18:58 +0300, Tommi Virtanen wrote:
Alternatively, wouldn't it be great if stdlib unittest, py.test and trial could _all_ run twisted core unit tests properly?-)
If py.test and stdlib unittest could run the tests without Trial *present*, that would mean we'd have to have a core API for running the reactor yourself in a test and shutting it down, so _NO_, that would not be great. This seems to a persistent meme though. I don't understand why you'd want to run the Twisted unittests with a non-Trial runner even *with* Trial installed, especially with Trial getting better all the time. One interpretation of this statement I could make that would in fact be great is that stdlib unittest and py.test could add support for returning Deferreds, but that would make them both alternative implementations of Trial, not of unittest (which is so vanishingly unlikely I can't imagine that's actually what you meant). Based on jml and spiv's earlier mails I presume that some effort is being put towards this. Insofar as this removes duplicate code from trial and uses the standard unittest implementations of things that unittest has an implementation of, great, but is there any more to it than that?

On 27/10/05, Glyph Lefkowitz <glyph@divmod.com> wrote:
In particular, everything needed to actually run a test is (on its way to being) moved into the TestCase class. Already, many of our tests can be run by unittest (unittestgui even works) -- because the reactor stuff is going in TestCase. The advantages definitely include reduced duplication and less code to maintain. But another big advantage is that (when we're ready) Trial can use third-party extensions of unittest straight out of the box. cheers, jml

On Thu, 27 Oct 2005 12:52:37 +1100, Jonathan Lange <jml@mumak.net> wrote:
On 27/10/05, Glyph Lefkowitz <glyph@divmod.com> wrote:
(...) the reactor stuff is going in TestCase.
I believe I've lodged a disagreement with you before about this. If you really think it's best I'll trust your judgement more than mine, since you're certainly doing a bang-up job getting trial into useful shape, but I'll still try to convince you :). The reactor should be started by the command-line tool and stopped after all tests are done. Several reasons why: - Tests should be runnable by "live" processes. *twisted* context should need to be around, not unittest context, for the tests to run properly. This would help a lot in situations where something seems to work for the test framework but doesn't on a live server. - We try, but some event loops really *can't* be stopped and restarted safely or reliably multiple times within the same process. Previous discussions on this list I believe called out cfreactor as an example. I believe there are others. - Normal execution of Twisted programs has the Reactor start up once, lots of stuff run in it, and then it shuts down. I don't mind exercising the edge cases, but this _only_ excercises the edge cases; the reactor starts up and shuts down every time something new happens.
Are there any such third-party extensions which have value?

On 27/10/05, glyph@divmod.com <glyph@divmod.com> wrote:
My judgement is suspended for the moment. My own opinion is that we should bang Trial into a unittest shape first (because that is the closest non-Cthulhain shape to what is currently there). Only once that's done do I want to start thinking about how best to re-gut Trial so that it treats the reactor with the decorum it deserves. In the interim, unittest compatibility is simply a cool feature.
Are there any such third-party extensions which have value?
subunit and testresource are two. I'm told datatest (see http://twistedmatrix.com/bugs/issue529, link at bottom 404s) is another. cheers, jml

glyph@divmod.com wrote:
I fully expect twisted.pair to not release again without major changes. I feel the biggest reason it needed to be split from twisted.core was to give it a way to die. I will pick up twisted.pair (whether with that name or something else, whether as part of twisted or not) only when I get back to writing some DHCP code. Which is not likely to happen soon. Anyone suffering too badly from ISC, feel free to sponsor the work.

On Sun, 23 Oct 2005 13:26:05 +0200, Ralph Meijer <twisted@ralphm.ik.nu> wrote:
Hi all,
Recently I set up a mailinglist for Jabber development using Twisted.
Thanks for setting this up, Ralph.
I will subscribe soon, but I'm going to reply to the message that you linked to here, because it impacts other projects.
Xish's utility is not at issue. I think it's great that it's useful for non-jabber uses. Guido's opinion [1] notwithstanding, Python is a framework [2] and so should each Twisted subprojects be. I mentioned this in an earlier post [3] but as long as I'm talking I might as well explain a bit further. There are a plethora of buggy, one-off libraries in the Python world that are not supported or tested because they don't have any user-facing tools which can be tested. They're easy to write, and easy to release, but libraries should always be written in support of applications, not simply in the hopes they will be useful. As Rails has famously declared, good frameworks are "extracted". As an example of this, Twisted Matrix Labs' experience with distributing libraries has been, to put it politely, poor. Aside from .xish, whose function was mainly to complicate t.words releases and installations, our other two libraries are .pair and .flow, both of which are pretty much useless to everyone but their respective authors and currently unmaintained. Users of xish can easily install twisted.words, then import only xish. Keep your import dependencies as clean as possible so that if they do this and then use a tool like freeze or py2exe, they won't suck in all of twisted.words by accident. The rest of Twisted has been historically careful about this, because while I have encountered several situations where deployment footprint was a concern, I have yet to meet a developer whose hard drive was so full that they couldn't spare an additional 100k on their disk for a full subproject during installation. The main message here is that each Twisted subproject should be a coherent whole that performs an actual function. If .xish grew a tool for monitoring or transforming XML streams that would actually be useful to a reasonable-sized audience (i.e. not just for the author of the tool to test the library and not just so it can be split out ^_^), then it might be a good candidate for being split out into its own project again. [1]: http://mail.python.org/pipermail/python-dev/2005-October/057486.html [2]: http://www.twistedmatrix.com/users/glyph/rant/extendit.html [3]: http://archives.free.net.ph/message/20050929.162612.040ae285.en.html

On Sun, Oct 23, 2005, glyph@divmod.com wrote:
Users of xish can easily install twisted.words, then import only xish.
It would be useful to people who might want to do this though to thoroughly advertise the existence of whatever incredibly useful libraries you've developed as part of a subproject. At the moment http://twistedmatrix.com/projects/words/ doesn't seem to be extolling the virtues of xish: perhaps it should be? At some point in the distant past (about a year ago actually, when I was in Boston, so not that distant) there was talk of some kind of big matrix, along the lines of "you want to do XML/SMTP/DNS... then look at blah." Given the subproject philosophy Glyph outlined in the parent mail this makes more sense, so I will probably branch something and bug people to contribute descriptions of all their hidden little gems to it. -Mary

On 24/10/05, glyph@divmod.com <glyph@divmod.com> wrote:
The main message here is that each Twisted subproject should be a coherent whole that performs an actual function. If .xish grew a tool for monitoring or transforming XML streams that would actually be useful to a reasonable-sized audience (i.e. not just for the author of the tool to test the library and not just so it can be split out ^_^), then it might be a good candidate for being split out into its own project again.
You know, by these standards, Trial is a good candidate for being split out into its own project. Now, sceptics might say, "ahh, but does not core depend on Trial?". To which I would say, "No it doesn't". cheers, jml

On Tue, 25 Oct 2005 14:19:40 +1100, Jonathan Lange <jml@mumak.net> wrote:
Passing unit tests would be a good start towards that ;) Seriously: leaving twisted.protocols.loopback aside, I still think Core depends on Trial because Trial is how you can *tell* if Core is working: you run its tests. So Core depends on Trial, and Trial depends on core. If you must have both installed for either to work, is there really a benefit to packaging them separately? If you can suggest some other way to demonstrate that a Core install works, maybe you can convince me releasing trial separately has a purpose. Jp

On Tue, Oct 25, 2005 at 12:03:30AM -0400, Jean-Paul Calderone wrote: [...]
I disagree. If someone wrote some sort of really shiny debugger that worked really nicely with Twisted, and so was very helpful as a development tool for hacking on Twisted, I don't think it would qualify as a dependency of core. Much the same way that emacs/vim, epydoc, manhole, and who knows what else aren't dependencies. Trial is a valuable tool that all developers almost certainly should have installed. That doesn't mean it's a dependency in any useful technical sense: I can happily delete twisted/trial and still have all my twisted-using applications I've written or downloaded still work. The fact that Trial is so clearly of use to other projects in exactly the same way that it's of use to core is another reason to have it seperate. Trial and the rest of core are clearly developing at different rates, so there's possibly even some benefit from decoupling their releases. So I think if Jonathan wants to release it seperately, I'm happy to let him. -Andrew.

On Tue, 25 Oct 2005 14:42:24 +1000, Andrew Bennetts <andrew-twisted@puzzling.org> wrote:
Overall I'm a bit reluctant to spin out more new projects right now, but this actually sounds like a pretty compelling case to me. However, a point in JP's favor: there are source files distributed with core (twisted/test/*) that *import* code from Trial. Test cases seem to be, in every sense, a bit of a gnarly special case. Is there anything other than test cases where you think imports are *not* counted as a dependency?

testcases are not necessary for production installation, just as technical docs are. In fact testcases, trial, docs etc are developer-environment tools, not production-environment tools. Maybe it could make sense to distribute: - twisted-core - bunch of libraries performing the twisted job - twisted-dev - trial, testcases, docs etc

Marcin Kasperski wrote:
I consider running unit tests an essential part of the build process. Thus, in my eyes twisted-core has a build-time dependency on trial, even if it doesn't have a runtime dependency.

On Wed, 26 Oct 2005 10:44:14 +1100, Jonathan Lange <jml@mumak.net> wrote:
Do you think a build-time dependency is enough to keep Trial within core?
It's not just build-time. Once you've installed Twisted in a particular environment, trial helps you determine if it's *installed* properly. If chunks have fallen off of your tarball at some point, trial will alert you to this by failing a bunch of tests. It's that dependency which keeps me leaning towards "yes". That said, I'm still undecided - trial is definitely making a lot of progress lately and the rationale of the split was to keep projects like this unconstrained by core's need for stability.

Jonathan Lange wrote:
Do you think a build-time dependency is enough to keep Trial within core?
I think build-time dependencies that do not form a strict DAG to be a pain in ones anatomy. If trial is separated from core, the only reasonable path forward is not running core unit tests during build. Alternatively, wouldn't it be great if stdlib unittest, py.test and trial could _all_ run twisted core unit tests properly?-)

On Wed, 2005-10-26 at 18:58 +0300, Tommi Virtanen wrote:
Alternatively, wouldn't it be great if stdlib unittest, py.test and trial could _all_ run twisted core unit tests properly?-)
If py.test and stdlib unittest could run the tests without Trial *present*, that would mean we'd have to have a core API for running the reactor yourself in a test and shutting it down, so _NO_, that would not be great. This seems to a persistent meme though. I don't understand why you'd want to run the Twisted unittests with a non-Trial runner even *with* Trial installed, especially with Trial getting better all the time. One interpretation of this statement I could make that would in fact be great is that stdlib unittest and py.test could add support for returning Deferreds, but that would make them both alternative implementations of Trial, not of unittest (which is so vanishingly unlikely I can't imagine that's actually what you meant). Based on jml and spiv's earlier mails I presume that some effort is being put towards this. Insofar as this removes duplicate code from trial and uses the standard unittest implementations of things that unittest has an implementation of, great, but is there any more to it than that?

On 27/10/05, Glyph Lefkowitz <glyph@divmod.com> wrote:
In particular, everything needed to actually run a test is (on its way to being) moved into the TestCase class. Already, many of our tests can be run by unittest (unittestgui even works) -- because the reactor stuff is going in TestCase. The advantages definitely include reduced duplication and less code to maintain. But another big advantage is that (when we're ready) Trial can use third-party extensions of unittest straight out of the box. cheers, jml

On Thu, 27 Oct 2005 12:52:37 +1100, Jonathan Lange <jml@mumak.net> wrote:
On 27/10/05, Glyph Lefkowitz <glyph@divmod.com> wrote:
(...) the reactor stuff is going in TestCase.
I believe I've lodged a disagreement with you before about this. If you really think it's best I'll trust your judgement more than mine, since you're certainly doing a bang-up job getting trial into useful shape, but I'll still try to convince you :). The reactor should be started by the command-line tool and stopped after all tests are done. Several reasons why: - Tests should be runnable by "live" processes. *twisted* context should need to be around, not unittest context, for the tests to run properly. This would help a lot in situations where something seems to work for the test framework but doesn't on a live server. - We try, but some event loops really *can't* be stopped and restarted safely or reliably multiple times within the same process. Previous discussions on this list I believe called out cfreactor as an example. I believe there are others. - Normal execution of Twisted programs has the Reactor start up once, lots of stuff run in it, and then it shuts down. I don't mind exercising the edge cases, but this _only_ excercises the edge cases; the reactor starts up and shuts down every time something new happens.
Are there any such third-party extensions which have value?

On 27/10/05, glyph@divmod.com <glyph@divmod.com> wrote:
My judgement is suspended for the moment. My own opinion is that we should bang Trial into a unittest shape first (because that is the closest non-Cthulhain shape to what is currently there). Only once that's done do I want to start thinking about how best to re-gut Trial so that it treats the reactor with the decorum it deserves. In the interim, unittest compatibility is simply a cool feature.
Are there any such third-party extensions which have value?
subunit and testresource are two. I'm told datatest (see http://twistedmatrix.com/bugs/issue529, link at bottom 404s) is another. cheers, jml

glyph@divmod.com wrote:
I fully expect twisted.pair to not release again without major changes. I feel the biggest reason it needed to be split from twisted.core was to give it a way to die. I will pick up twisted.pair (whether with that name or something else, whether as part of twisted or not) only when I get back to writing some DHCP code. Which is not likely to happen soon. Anyone suffering too badly from ISC, feel free to sponsor the work.
participants (9)
-
Andrew Bennetts
-
Glyph Lefkowitz
-
glyph@divmod.com
-
Jean-Paul Calderone
-
Jonathan Lange
-
Marcin Kasperski
-
Mary Gardiner
-
Ralph Meijer
-
Tommi Virtanen