Re: [Twisted-Python] Twisted Plugins - Implementation Discussion

2011-04-22 Thread anatoly techtonik
On Fri, Apr 22, 2011 at 10:51 AM, David wrote: > >> [OT] >> I still can't see how it solves even the basic user story - 'i want to >> uninstall twisted' or 'i want two versions of twisted installed'. > > Bento's point is: make packagers life easier (without making life of > users more miserable),

Re: [Twisted-Python] Twisted Plugins - Implementation Discussion

2011-04-22 Thread David
On 04/22/2011 03:03 PM, Glyph Lefkowitz wrote: > > On Apr 21, 2011, at 9:01 PM, David wrote: > >> You can take a look at bento, which is my own response to the distutils >> issues we have in the scipy community (but I would expect twisted and >> most big python libraries to have similar issues): >>

Re: [Twisted-Python] Twisted Plugins - Implementation Discussion

2011-04-22 Thread David
On 04/22/2011 03:41 PM, anatoly techtonik wrote: > On Fri, Apr 22, 2011 at 4:01 AM, David wrote: >> On 04/22/2011 06:21 AM, anatoly techtonik wrote: >>> On Thu, Apr 21, 2011 at 4:48 AM, Kevin Hornwrote: cluster. So he rewrote distutils with an eye on keeping things nice fo

Re: [Twisted-Python] Twisted Plugins - Implementation Discussion

2011-04-22 Thread David
On 04/22/2011 12:13 PM, Mikhail Terekhov wrote: > On Thu, Apr 21, 2011 at 9:01 PM, David > wrote: > > On 04/22/2011 06:21 AM, anatoly techtonik wrote: > > On Thu, Apr 21, 2011 at 4:48 AM, Kevin Horn > wrote: > >> >

Re: [Twisted-Python] Twisted Plugins - Implementation Discussion

2011-04-21 Thread anatoly techtonik
On Fri, Apr 22, 2011 at 4:01 AM, David wrote: > On 04/22/2011 06:21 AM, anatoly techtonik wrote: >> On Thu, Apr 21, 2011 at 4:48 AM, Kevin Horn  wrote: >>> >>> cluster.  So he rewrote distutils with an eye on keeping things nice for >>> everyone.  Project managers, distro packagers, users inst

Re: [Twisted-Python] Twisted Plugins - Implementation Discussion

2011-04-21 Thread Glyph Lefkowitz
On Apr 21, 2011, at 9:01 PM, David wrote: > You can take a look at bento, which is my own response to the distutils > issues we have in the scipy community (but I would expect twisted and > most big python libraries to have similar issues): > > http://cournape.github.com/Bento/ > > It is desi

Re: [Twisted-Python] Twisted Plugins - Implementation Discussion

2011-04-21 Thread Mikhail Terekhov
On Thu, Apr 21, 2011 at 9:01 PM, David wrote: > On 04/22/2011 06:21 AM, anatoly techtonik wrote: > > On Thu, Apr 21, 2011 at 4:48 AM, Kevin Horn > wrote: > >> > >> cluster. So he rewrote distutils with an eye on keeping things nice > for > >> everyone. Project managers, distro packagers, u

Re: [Twisted-Python] Twisted Plugins - Implementation Discussion

2011-04-21 Thread David
On 04/22/2011 06:21 AM, anatoly techtonik wrote: > On Thu, Apr 21, 2011 at 4:48 AM, Kevin Horn wrote: >> >> cluster. So he rewrote distutils with an eye on keeping things nice for >> everyone. Project managers, distro packagers, users installing software, >> etc. This is distutils2. In Pyt

Re: [Twisted-Python] Twisted Plugins - Implementation Discussion

2011-04-21 Thread anatoly techtonik
On Thu, Apr 21, 2011 at 4:48 AM, Kevin Horn wrote: > > cluster.  So he rewrote distutils with an eye on keeping things nice for > everyone.  Project managers, distro packagers, users installing software, > etc.  This is distutils2.  In Python 3.3 and up it will be called > "packaging".  Once p

Re: [Twisted-Python] Twisted Plugins - Implementation Discussion

2011-04-20 Thread Kevin Horn
> I don't believe 'distribute' is ever making it into the standard library. > The thing going into python 3.3 is 'packaging', which, obviously, is a copy > (hopefully unmodified) of 'distutils2', which has nothing in common with > 'distribute' except for its author. > > 'distribute' is a fork of s

Re: [Twisted-Python] Twisted Plugins - Implementation Discussion

2011-04-19 Thread Glyph Lefkowitz
On Apr 19, 2011, at 12:13 PM, exar...@twistedmatrix.com wrote: > On 02:27 pm, marcin.kasper...@mekk.waw.pl wrote: >>> Part of the discussion was about how to rewrite this in such a way >>> that >>> no python code needs to be run in order to discover all the >>> tapname+description combinations th

Re: [Twisted-Python] Twisted Plugins - Implementation Discussion

2011-04-19 Thread exarkun
On 02:27 pm, marcin.kasper...@mekk.waw.pl wrote: >>Part of the discussion was about how to rewrite this in such a way >>that >>no python code needs to be run in order to discover all the >>tapname+description combinations that are available to twistd, this is >>because of a perceived performance a

Re: [Twisted-Python] Twisted Plugins - Implementation Discussion

2011-04-19 Thread Marcin Kasperski
> Part of the discussion was about how to rewrite this in such a way that > no python code needs to be run in order to discover all the > tapname+description combinations that are available to twistd, this is > because of a perceived performance and sanity deficit in using 'twistd'. Have you consi

Re: [Twisted-Python] Twisted Plugins - Implementation Discussion

2011-04-07 Thread Stephen Thorne
On 2011-04-07, Glyph Lefkowitz wrote: > > I am +1 on this idea. I like rdf. My question is now: is there an rdf > > parser lib that is available on python2.4+ which can either be gently > > embedded within twisted, or used as a dependency? > > You're welcome to try and do this; I'm not particularl

Re: [Twisted-Python] Twisted Plugins - Implementation Discussion

2011-04-07 Thread exarkun
On 12:09 am, gl...@twistedmatrix.com wrote: >On Apr 7, 2011, at 7:54 PM, Stephen Thorne wrote: >>On 2011-04-07, Stefano Debenedetti wrote: >>>On Apr 7, 2011, at 1:08 AM, Tim Allen wrote: If you need a non-Turing-complete config language and rule out .ini and XML, I'm not sure what's le

Re: [Twisted-Python] Twisted Plugins - Implementation Discussion

2011-04-07 Thread Glyph Lefkowitz
On Apr 7, 2011, at 7:54 PM, Stephen Thorne wrote: > On 2011-04-07, Stefano Debenedetti wrote: >> On Apr 7, 2011, at 1:08 AM, Tim Allen wrote: >>> If you need a non-Turing-complete config language and rule out .ini and >>> XML, I'm not sure what's left. JSON, perhaps. >> >> I bet a lot of people h

Re: [Twisted-Python] Twisted Plugins - Implementation Discussion

2011-04-07 Thread Stephen Thorne
On 2011-04-07, Stefano Debenedetti wrote: > On Apr 7, 2011, at 1:08 AM, Tim Allen wrote: > > If you need a non-Turing-complete config language and rule out .ini and > > XML, I'm not sure what's left. JSON, perhaps. > > I bet a lot of people have a deja-vu feeling about a config file > syntax debat

Re: [Twisted-Python] Twisted Plugins - Implementation Discussion

2011-04-07 Thread Glyph Lefkowitz
On Apr 7, 2011, at 9:19 AM, Andrew Bennetts wrote: > Itamar Turner-Trauring wrote: > […] >> So, the design has to *not* rely on caching working. > > FWIW: this is an achievable goal. I have 32 different bzr plugins > currently installed, and here's the difference they make: > > $ time bzr --

Re: [Twisted-Python] Twisted Plugins - Implementation Discussion

2011-04-07 Thread Glyph Lefkowitz
On Apr 7, 2011, at 8:14 AM, Itamar Turner-Trauring wrote: > On Thu, 2011-04-07 at 02:08 -0400, Glyph Lefkowitz wrote: > >> My idea for exposing it is that if you then do 'getPlugins(IPlugin2)', >> you will get back an iterable of IPlugin2 providers, but not >> necessarily instances of your class

Re: [Twisted-Python] Twisted Plugins - Implementation Discussion

2011-04-07 Thread Andrew Bennetts
Itamar Turner-Trauring wrote: […] > So, the design has to *not* rely on caching working. FWIW: this is an achievable goal. I have 32 different bzr plugins currently installed, and here's the difference they make: $ time bzr --no-plugins rocks It sure does! real 0m0.075s $ tim

Re: [Twisted-Python] Twisted Plugins - Implementation Discussion

2011-04-07 Thread Stefano Debenedetti
On Apr 7, 2011, at 1:08 AM, Tim Allen wrote: > If you need a non-Turing-complete config language and rule out .ini and > XML, I'm not sure what's left. JSON, perhaps. I bet a lot of people have a deja-vu feeling about a config file syntax debate so I'll propose an alternative approach: RDF. Perha

Re: [Twisted-Python] Twisted Plugins - Implementation Discussion

2011-04-07 Thread Itamar Turner-Trauring
On Thu, 2011-04-07 at 02:08 -0400, Glyph Lefkowitz wrote: > My idea for exposing it is that if you then do 'getPlugins(IPlugin2)', > you will get back an iterable of IPlugin2 providers, but not > necessarily instances of your classes: they could be cached plugins, > with cached results for metadat

Re: [Twisted-Python] Twisted Plugins - Implementation Discussion

2011-04-07 Thread Jason Rennie
On Thu, Apr 7, 2011 at 2:34 AM, Tim Allen wrote: > Well, that's pretty depressing. The only other candidate I can even > think of is YAML, and that's not in the standard library (as far as > I know). > There's Coil, but it's also not in the std lib AFAIK: http://mike.marineau.org/coil/ Jason

Re: [Twisted-Python] Twisted Plugins - Implementation Discussion

2011-04-07 Thread Johan Rydberg
On 4/7/11 8:24 AM, David wrote: > Having had experience with JSON for configuration: it is a terrible > format for configuration, if only because it does not support comments. > > The syntax is also a bit too strict: enough to be annoying in something > you want to edit all the time and easily in m

Re: [Twisted-Python] Twisted Plugins - Implementation Discussion

2011-04-06 Thread David
On 04/07/2011 03:34 PM, Tim Allen wrote: > > Who'd have guessed it'd be so complicated to associate keys with values? If that's the only thing you need, .ini would work fine. Another solution would be python files with only literals, parsed through the ast module for safety. cheers, David __

Re: [Twisted-Python] Twisted Plugins - Implementation Discussion

2011-04-06 Thread Tim Allen
On Thu, Apr 07, 2011 at 03:24:57PM +0900, David wrote: > On 04/07/2011 02:08 PM, Tim Allen wrote: > > If you need a non-Turing-complete config language and rule out .ini and > > XML, I'm not sure what's left. JSON, perhaps. > > Having had experience with JSON for configuration: it is a terrible >

Re: [Twisted-Python] Twisted Plugins - Implementation Discussion

2011-04-06 Thread David
On 04/07/2011 02:08 PM, Tim Allen wrote: > > If you need a non-Turing-complete config language and rule out .ini and > XML, I'm not sure what's left. JSON, perhaps. Having had experience with JSON for configuration: it is a terrible format for configuration, if only because it does not support c

Re: [Twisted-Python] Twisted Plugins - Implementation Discussion

2011-04-06 Thread Glyph Lefkowitz
On Apr 6, 2011, at 8:35 PM, Stephen Thorne wrote: > Part of the discussion was about how to rewrite this in such a way that > no python code needs to be run in order to discover all the > tapname+description combinations that are available to twistd, this is > because of a perceived performance a

Re: [Twisted-Python] Twisted Plugins - Implementation Discussion

2011-04-06 Thread Glyph Lefkowitz
On Apr 7, 2011, at 1:55 AM, Stephen Thorne wrote: > On 2011-04-07, Glyph Lefkowitz wrote: >> >> On Apr 7, 2011, at 1:08 AM, Tim Allen wrote: >> >>> Well, the nice thing about ConfigParser is that it's in the stdlib, and >>> people already know how to create them, and rolling >>> yet-another-con

Re: [Twisted-Python] Twisted Plugins - Implementation Discussion

2011-04-06 Thread Stephen Thorne
On 2011-04-07, Glyph Lefkowitz wrote: > > On Apr 7, 2011, at 1:08 AM, Tim Allen wrote: > > > Well, the nice thing about ConfigParser is that it's in the stdlib, and > > people already know how to create them, and rolling > > yet-another-config-file-format seems crazy in this day and age. > > My

Re: [Twisted-Python] Twisted Plugins - Implementation Discussion

2011-04-06 Thread Stephen Thorne
On 2011-04-07, Glyph Lefkowitz wrote: > > On Apr 7, 2011, at 1:38 AM, Stephen Thorne wrote: > > > On 2011-04-07, Glyph Lefkowitz wrote: > >> Because, frankly, Python installation tools REALLY REALLY SHOULD be > >> able to install Python files into Python packages. I'm not sure I can > >> make an

Re: [Twisted-Python] Twisted Plugins - Implementation Discussion

2011-04-06 Thread Tristan Seligmann
On 7 Apr 2011 06:56, "Glyph Lefkowitz" wrote: >>- Each section blah blah terrible user interface stuff about 'sections' and other misfeatures of ini files. > > > I don't want a solution that is hard-coded to deal with the metadata that 'twistd' specifically needs, as Twisted plugins are alread

Re: [Twisted-Python] Twisted Plugins - Implementation Discussion

2011-04-06 Thread Glyph Lefkowitz
On Apr 7, 2011, at 1:08 AM, Tim Allen wrote: > Well, the nice thing about ConfigParser is that it's in the stdlib, and > people already know how to create them, and rolling > yet-another-config-file-format seems crazy in this day and age. My point was really that people think they know how to cr

Re: [Twisted-Python] Twisted Plugins - Implementation Discussion

2011-04-06 Thread Glyph Lefkowitz
On Apr 7, 2011, at 1:38 AM, Stephen Thorne wrote: > On 2011-04-07, Glyph Lefkowitz wrote: >> Because, frankly, Python installation tools REALLY REALLY SHOULD be >> able to install Python files into Python packages. I'm not sure I can >> make any other assertions quite so strongly. I'm pretty su

Re: [Twisted-Python] Twisted Plugins - Implementation Discussion

2011-04-06 Thread Stephen Thorne
On 2011-04-07, Glyph Lefkowitz wrote: > Because, frankly, Python installation tools REALLY REALLY SHOULD be > able to install Python files into Python packages. I'm not sure I can > make any other assertions quite so strongly. I'm pretty sure that > this is a problem that more than one project is

Re: [Twisted-Python] Twisted Plugins - Implementation Discussion

2011-04-06 Thread Tim Allen
On Thu, Apr 07, 2011 at 12:54:45AM -0400, Glyph Lefkowitz wrote: > If we invent our own file extension which has to be separately > installed, we have to teach distutils, and setuptools, and distribute, > and pip, and distutils2, and 'packaging' (as I'm sure that will > eventually be incompatible w

Re: [Twisted-Python] Twisted Plugins - Implementation Discussion

2011-04-06 Thread Glyph Lefkowitz
On Apr 7, 2011, at 12:06 AM, Phil Christensen wrote: > On Apr 6, 2011, at 8:35 PM, Stephen Thorne wrote: >> For your consideration, and (constructive) critcism, here is a twisted >> plugin that is nearly identical to 6 that I have running in >> production: > [snip] >> serviceMaker = ExampleServ

Re: [Twisted-Python] Twisted Plugins - Implementation Discussion

2011-04-06 Thread Glyph Lefkowitz
On Apr 7, 2011, at 12:31 AM, Tim Allen wrote: > On Thu, Apr 07, 2011 at 10:35:18AM +1000, Stephen Thorne wrote: >> So the goal of my post to this mailing list is: >> >> * I would like glyph's goal of having less arbitary code executed at >> twistd launch time to become a realisation, >> >> * I

Re: [Twisted-Python] Twisted Plugins - Implementation Discussion

2011-04-06 Thread Tim Allen
On Thu, Apr 07, 2011 at 10:35:18AM +1000, Stephen Thorne wrote: > So the goal of my post to this mailing list is: > > * I would like glyph's goal of having less arbitary code executed at > twistd launch time to become a realisation, > > * I would like the process of creating a twisted plugin to

Re: [Twisted-Python] Twisted Plugins - Implementation Discussion

2011-04-06 Thread Phil Christensen
On Apr 6, 2011, at 8:35 PM, Stephen Thorne wrote: > For your consideration, and (constructive) critcism, here is a twisted > plugin that is nearly identical to 6 that I have running in > production: [snip] > serviceMaker = ExampleServiceMaker() > > From these 19 lines of code there are 4 things t