Re: [Twisted-Python] XMPP server connection question

2008-12-05 Thread Phil Mayers
Christopher Zorn wrote: On Tue, Dec 2, 2008 at 8:21 AM, Gabriel Rossetti <[EMAIL PROTECTED] > wrote: Gabriel Rossetti wrote: Hello everyone, I wrote an XMPP client and I have a question, when it tries to connect and the server is not li

Re: [Twisted-Python] Re: How is happened?

2008-12-22 Thread Phil Mayers
biziap biziap wrote: 2008/12/22 biziap biziap mailto:fet...@gmail.com>> I am trying to migrate to web2. And find the "OldRequestAdapter". What I did is callling: Any hints are appericated. 1. Ask on the twisted-web list 2. Don't use web2: http://twistedmatrix.com/trac/wiki

[Twisted-Python] SIP support

2009-01-15 Thread Phil Mayers
What's the current status of SIP support in twisted? I know the support in trunk is older, and there's some newer stuff (Sine) on divmod.org (see below) but that's seems heavily dependent on mantissa, and crucially doesn't support TCP. Also - I'm having problems resolving divmod.org from here

Re: [Twisted-Python] How to invoke the remote method based on twisted in django web app?

2009-03-06 Thread Phil Mayers
Boern wrote: hi,all: I developed a web app in diango and a remote service in twisted, and I want to invoke the twisted remote method in django web. example: the remote service code : class Echoer(pb.Root): def remote_echo(self, task): print 'echoing:', task

Re: [Twisted-Python] Re: So how does everyone use an ORM in twisted?

2009-03-18 Thread Phil Mayers
I guess what I always run into with ORMs is that I'm rarely lucky enough to have my Python module be the only user of the database, and Very strongly agreed. One of the things I hate about most ORMs is their desire to define the SQL schema for you - they mostly do a half-assed job because the

Re: [Twisted-Python] addCallback0 convenience method

2009-05-05 Thread Phil Mayers
> Still - just my opinion, of course - having such a function (either > callback0 or shiftargs) feels too esoteric, and the intent is less > explicit than the lambda statement. +1 ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://t

Re: [Twisted-Python] copy domish element

2009-06-08 Thread Phil Mayers
Jack Bates wrote: > i have a domish element - when i try the following, > message = element del message['from'] element['from'] > > - i get a key error Well, yes. That's how python works ;o) > > to avoid this key error, i think i want to copy the element, so i can > drop the 'fr

Re: [Twisted-Python] stop conditions and deferToThread()

2009-06-10 Thread Phil Mayers
Thomas Jakobsen wrote: > Hi > > As discussed in a previous thread > >http://twistedmatrix.com/pipermail/twisted-python/2009-May/019717.html > > a task put in its own thread via deferToThread() won't stop even > though the reactor has stopped. It has to carry out its own check that > the reac

Re: [Twisted-Python] Need working examples of imap4 client.

2009-06-11 Thread Phil Mayers
Pywinder Singh wrote: > > Ideally, I'd love to see a snipped which is able to log into an imap > server and gets a list of mailboxes. If the example on the site works Here you go: #!/usr/bin/python from twisted.internet import reactor, protocol, defer from twisted.mail import imap4 # change

Re: [Twisted-Python] http.Request and JSON

2009-06-30 Thread Phil Mayers
On Tue, Jun 30, 2009 at 09:07:57AM +0100, Vincent Gulinao wrote: >How do you read JSON content from a POST using http.Request. I peeked >on args and it's empty. "args" is www-urlencoded only. If the content-type is something else it's not filled in. You want: request.content.read() IIRC _

Re: [Twisted-Python] Problem with twisted.names.client.lookupPointer

2009-07-19 Thread Phil Mayers
On Sun, Jul 19, 2009 at 06:34:21AM +0100, Kieran Simkin wrote: > >Nowhere in this output is the actual PTR record - the first entry looks like >it should be the PTR record, but the name is '128.244.209.91.in-addr.arpa' - >I'm expecting it to be node2.digital-crocus.com. Can anyone clarify whether

Re: [Twisted-Python] LoopingCall at a non-idling reactor

2009-07-19 Thread Phil Mayers
On Sun, Jul 19, 2009 at 09:01:34AM +0100, Ilya Etingof wrote: > >[ skipped ] > >> The above is something which you're more or less not allowed to do in a >> Twisted application. That simulated data processing is blocking the >> main event loop. Nothing else happens until it finishes - that includ

Re: [Twisted-Python] LoopingCall at a non-idling reactor

2009-07-19 Thread Phil Mayers
On Sun, Jul 19, 2009 at 02:58:40PM +0100, Jean-Paul Calderone wrote: > >It will eventually stop reading datagrams and go do something else. The >exact way it decides when to stop is completely arbitrary and I don't >think anyone has ever demonstrated that it's clever or appropriate in the >general

Re: [Twisted-Python] LoopingCall at a non-idling reactor

2009-07-20 Thread Phil Mayers
> > I know what you mean. If you trawl through my really old blog posts > (I think the one I'm thinking of is on livejournal, but I can't find > it quickly) you'll see that I've thought about this before. The two > main deterrents to changing the reactor to be a set of abstract > "events" placed

[Twisted-Python] Python/twisted BGP code

2009-08-13 Thread Phil Mayers
All, People might be interested in: https://launchpad.net/pybgp It is a VERY SIMPLE implementation of BGP4 in python. It's sufficient to advertise IPv4 prefixes, which is of use e.g. for doing DNS anycast, and withdrawing the routes if the local nameservers stops answering queries. There is a

Re: [Twisted-Python] OT - adbapi, connection timeouts, mysql - OT

2009-08-25 Thread Phil Mayers
Phil Christensen wrote: > On Aug 24, 2009, at 9:14 PM, Garret Heaton wrote: >> On Mon, Aug 24, 2009 at 3:53 PM, Phil Christensen >> wrote: >>> I feel like I can think of any number of ways running the same >>> series of queries twice would be a bad thing. I have some very >>> important queries

[Twisted-Python] IPv6

2009-08-28 Thread Phil Mayers
What's the IPv6 support like in Twisted? ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

[Twisted-Python] Conch/SSH & Cisco IOS

2009-09-03 Thread Phil Mayers
All, I've been having some problems using Conch/SSH to talk to the SSH server on Cisco IOS (specifically the netconf subsystem) It seems that the IOS SSH server reacts badly to the following: c: syn s: syn,ack c: ack c: PSH , s: PSH i.e. IOS doesn't like being bombarded with either the vers

Re: [Twisted-Python] Conch/SSH & Cisco IOS

2009-09-03 Thread Phil Mayers
James Y Knight wrote: >> It seems that the IOS SSH server reacts badly to the following: >> >> c: syn >> s: syn,ack >> c: ack >> c: PSH , >> s: PSH >> >> >> i.e. IOS doesn't like being bombarded with either the version string >> or >> KEX before it's sent its own banner. > > I'm surprised to

Re: [Twisted-Python] Conch/SSH & Cisco IOS

2009-09-03 Thread Phil Mayers
Pavel Pergamenshchik wrote: > On Thu, Sep 3, 2009 at 2:38 AM, Phil Mayers wrote: >> All, >> >> I've been having some problems using Conch/SSH to talk to the SSH server >> on Cisco IOS (specifically the netconf subsystem) > ... >> i.e. IOS doesn't like

Re: [Twisted-Python] Conch/SSH & Cisco IOS

2009-09-04 Thread Phil Mayers
James Y Knight wrote: > On Sep 3, 2009, at 5:38 AM, Phil Mayers wrote: > >> All, >> >> I've been having some problems using Conch/SSH to talk to the SSH >> server >> on Cisco IOS (specifically the netconf subsystem) >> >> It seems that the

Re: [Twisted-Python] Using reactor with multiple processes

2009-09-16 Thread Phil Mayers
Dimitri Vorona wrote: > Hi, > > i'd like to be able to start additional instances of my server using > multiprocess module. To do it i just start a new Process with > mutiprocessing and then create a new instance of my Application there. > Everything works fine, but i can't figure out a way to > s

Re: [Twisted-Python] Using reactor with multiple processes

2009-09-17 Thread Phil Mayers
James Y Knight wrote: > On Sep 16, 2009, at 12:33 PM, David Yoakley wrote: >> Thanks Phil for the reference to ampoule. We will look at that >> next. We are still hoping to get the parent set up in such a way >> that whatever the forking :-) shared state is, it does not get >> established

Re: [Twisted-Python] Unpedictable behaviour of transport.write call: Problem with return the control to reactor

2009-11-04 Thread Phil Mayers
naman jain wrote: > Hi, > > I was trying this out: > > > Server code: > > def dataReceived(self, data): > if (args["cmd"] == "CHECK_IN"): > foo = subprocess.Popen('python master.py',shell = True) > /# this ACK notifies the client to close the connection/ > self.trans

Re: [Twisted-Python] Using sqlalchemy in twisted.

2009-11-12 Thread Phil Mayers
> Is there a reason why multiprocessing could not be used? > > http://docs.python.org/library/multiprocessing.html#exchanging-objects-between-processes > Yes http://twistedmatrix.com/trac/ticket/3901 ___ Twisted-Python mailing list Twisted-Python@tw

Re: [Twisted-Python] Syntactic sugar for deferreds

2009-12-07 Thread Phil Mayers
sstein...@gmail.com wrote: > On Dec 7, 2009, at 9:50 AM, Konrads Smelkovs wrote: > >> Hi, >> >> One project I had a look at had this nice syntactic sugar for async function >> chaining: >> > event_one() | event_two() | event_three() >> I think this could be an interesting alternative to addCa

Re: [Twisted-Python] zope.interface

2009-12-14 Thread Phil Mayers
Jared Gisin wrote: > Is there a good document that explains why zope.interface is necessary > to the twisted project? A counter-question: Is there a good document that explains why people care? It's just another dependency isn't it? ___ Twisted-Python

Re: [Twisted-Python] zope.interface

2009-12-14 Thread Phil Mayers
Tim Allen wrote: > On Mon, Dec 14, 2009 at 11:48:48AM +0000, Phil Mayers wrote: >> Jared Gisin wrote: >>> Is there a good document that explains why zope.interface is necessary >>> to the twisted project? >> A counter-question: Is there a good document that explai

Re: [Twisted-Python] Accessing the request object from a different thread

2010-01-16 Thread Phil Mayers
> > All of the accesses to the request object are read operations. If > those read operations occur on data that does not get messed with by > the main thread, then this should be thread-safe code. However, it > seems that the official word is "do not use request objects from other > threads."

Re: [Twisted-Python] XMPP server implementations with twisted/words

2010-02-16 Thread Phil Mayers
On 02/16/2010 05:06 AM, Werner Thie wrote: > best grades in stability (see the discussion of the XMPP server > Chesspark uses, they ran into memory problems such that periodic > rebooting was the only solution). Politically I'm wary to introduce a That was jabberd2 I think. They moved to ejabberd

Re: [Twisted-Python] sniffing multicast traffic

2010-03-10 Thread Phil Mayers
On 10/03/10 10:35, Ben Barker wrote: > Hello - I wonder if someone can help: > > We have some status info being sent by various machines using > multicast addressed udp packets. I have been attempting to use twisted > to write a python script that will passively monitor on the relevant > port for a

Re: [Twisted-Python] sniffing multicast traffic

2010-03-10 Thread Phil Mayers
On 10/03/10 13:03, Ben Barker wrote: >>> But I seem to have trouble getting them to receive anything at all. >> >> That's a little vague. Does "trouble" mean "it sometimes works" or >> "never works"? >> > > Sorry - yes, it was very vague! Never works. If I run wiresahrk I can > see udp packets addr

Re: [Twisted-Python] sniffing multicast traffic

2010-03-10 Thread Phil Mayers
On 10/03/10 13:18, Ben Barker wrote: > Well that's odd... > > I changed the interfaces over - used eth1 for the connection to the > network I need to sniff... > > and now /sbin/ip maddr tells me I have joined 224.0.0.4 on eth0 ! > > Whichever interface is live, the join seems to happen on the other

Re: [Twisted-Python] data update to multiple clients

2010-04-05 Thread Phil Mayers
On 04/05/2010 12:39 PM, Chris Cusack wrote: > Probably another newbie question but after much effort I am not > progressing on the following. > > I am trying to design a system where I have a microprocessor > periodically feeding data on a serial connection to a server script. I > would then like t

Re: [Twisted-Python] Question about processes in python

2010-04-12 Thread Phil Mayers
On 04/12/2010 01:09 PM, Gabriel Rossetti wrote: > Hello everyone, > > I'd like to run a python function in a new process, like python 2.6's > multiprocessing does. I wanted to use ProcessProtocol, but it seems to > only work for executing executables and interacting with them using > stdin/stdout/o

Re: [Twisted-Python] Question about processes in python

2010-04-12 Thread Phil Mayers
On 04/12/2010 04:39 PM, Jason J. W. Williams wrote: > Haven't had any issues yet. Twisted imports occur inside the process > function. The app was originally written as a purely blocking > multiprocessing app and rewritten to use Twisted inside the > sub-processes. It's passed all automated and han

Re: [Twisted-Python] Getting a synchronous interface to a twisted reactor

2010-04-22 Thread Phil Mayers
On 04/22/2010 07:06 AM, Andrey Fedorov wrote: > Thanks! The main reason for the question, though, is just curiosity from > playing with and learning the Twisted API, not necessarily getting the > example working :) > > A more direct question would have been - is there a Twisted reactor > which prov

Re: [Twisted-Python] Getting a synchronous interface to a twisted reactor

2010-04-22 Thread Phil Mayers
On 22/04/10 15:50, Andrey Fedorov wrote: > On Thu, Apr 22, 2010 at 3:21 AM, Phil Mayers <mailto:p.may...@imperial.ac.uk>> wrote: > > If that's the case, then the answer is "sort of" but I think you > might have misunderstood Twisted a bit. The entire

Re: [Twisted-Python] print unicode

2010-05-05 Thread Phil Mayers
On 05/05/10 13:31, Pet wrote: > On Wed, May 5, 2010 at 2:05 PM, Maarten ter Huurne > wrote: >> On Wednesday 05 May 2010, Pet wrote: >> >>> I'm using Twisted 10.0 and as usually sometime print debug infos with >>> myunicodestr.encode('UTF-8') which are saved to logfile, but since >>> using twisted

Re: [Twisted-Python] Reactor Spinning?

2010-05-05 Thread Phil Mayers
On 05/05/10 15:22, Moxie Marlinspike wrote: > > I've confirmed that when spinning the FD corresponds with a client > connection. What would you suggest logging that might provide some insight? > > Given what I understand about manholes, the fact that this only occurs > in a production environment

Re: [Twisted-Python] SQLAlchemy and Twisted

2010-05-09 Thread Phil Mayers
On 05/09/2010 07:07 AM, Daniel Griffin wrote: > If you let SQLAlchemy block twisted would there be any impact besides > performance? Depends how long it blocks for, and what else your process is doing. With the reactor blocked: * no socket reads or accepts can be done * no callLater or Loopi

Re: [Twisted-Python] [#24487862] Re: SQLAlchemy and Twisted

2010-05-09 Thread Phil Mayers
Erm... Someone appears to have subscribed a ticketing system w/ autoresponer to the Twisted mailing list; any chance a list admin could unsubscribe it? The email below claimed a "From:" of the m/l but a "Reply-To:" of supp...@mpcustomer.com On 05/09/2010 10:49 AM, twisted-python@twistedmatrix.

Re: [Twisted-Python] Multiple clients

2010-06-18 Thread Phil Mayers
On 18/06/10 15:34, Szabolcs Balogh wrote: > def get_mailbox_list(self): > twisted.internet.reactor.run() > The reactor isn't restartable. You can only start it once. ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://t

Re: [Twisted-Python] Multiple clients

2010-06-18 Thread Phil Mayers
On 18/06/10 16:25, Szabolcs Balogh wrote: > On Friday 18 June 2010 17:49:27 Phil Mayers wrote: >> On 18/06/10 15:34, Szabolcs Balogh wrote: >>> def get_mailbox_list(self): >>> twisted.internet.reactor.run() >> >> The reactor isn&#x

Re: [Twisted-Python] twistd --uid and --logfile

2010-08-18 Thread Phil Mayers
On 18/08/10 10:25, twisted-...@udmvt.ru wrote: > I think --uid option is too dangerous. > sudo or su or setuidgid (from http://cr.yp.to/daemontools.html) is more > appropriate for changing uids. In all cases? I think not. > It will always be hard to design application, that opens some files or >

Re: [Twisted-Python] twistd --uid and --logfile

2010-08-18 Thread Phil Mayers
On 08/18/2010 05:01 PM, exar...@twistedmatrix.com wrote: > On 03:35 pm, p.may...@imperial.ac.uk wrote: >> On 18/08/10 10:25, twisted-...@udmvt.ru wrote: >>> I think --uid option is too dangerous. >>> sudo or su or setuidgid (from http://cr.yp.to/daemontools.html) is >>> more >>> appropriate for cha

Re: [Twisted-Python] twistd --uid and --logfile

2010-08-19 Thread Phil Mayers
On 08/19/2010 07:55 AM, twisted-...@udmvt.ru wrote: > On Wed, Aug 18, 2010 at 04:35:29PM +0100, Phil Mayers wrote: >> On 18/08/10 10:25, twisted-...@udmvt.ru wrote: >> >>> I think --uid option is too dangerous. >>> sudo or su or setuidgid (from http://c

Re: [Twisted-Python] twistd --uid and --logfile

2010-08-19 Thread Phil Mayers
On 08/19/2010 08:30 AM, twisted-...@udmvt.ru wrote: > On Thu, Aug 19, 2010 at 07:22:37AM +0100, Phil Mayers wrote: >> On 08/18/2010 05:01 PM, exar...@twistedmatrix.com wrote: >> I wonder whether one could do something with SELinux today? (As an >> aside, one of the reasons t

Re: [Twisted-Python] How to cap the buffering size of data to be sent in Protocol class

2010-09-22 Thread Phil Mayers
On 09/22/2010 08:52 AM, Weikai Xie wrote > My questions is that whether there is any mechanism in Twisted > which can be used to set the maximum buffering size of the Protocol; > and whenever if this cap is reached, I can be informed to give a > chance to know the client is experiencing proble

Re: [Twisted-Python] how to write a safe catch-all

2010-09-29 Thread Phil Mayers
On 29/09/10 16:56, Chris Withers wrote: > On 28/09/2010 15:21, exar...@twistedmatrix.com wrote: >>> But, more crucially, the looping call then appears to stop. >> >> The function you're looping over returns a Deferred that never fires. >> The LoopingCall isn't stopped, it's waiting for the Deferred

Re: [Twisted-Python] how to write a safe catch-all

2010-09-30 Thread Phil Mayers
On 30/09/10 11:48, Chris Withers wrote: > On 30/09/2010 04:45, exar...@twistedmatrix.com wrote: >> On 12:52 am, ch...@simplistix.co.uk wrote: >>> >>> Because I haven't found any permutation that doesn't result in the >>> LoopingCall's calls to `loop` from stopping after the exception. >>> >>> I wou

Re: [Twisted-Python] how to write a safe catch-all

2010-09-30 Thread Phil Mayers
On 30/09/10 13:44, Phil Mayers wrote: > This is because (as you've discovered) there are circumstances when a > function is called in Twisted where the exception can't propagate "up" > to the caller, because the caller is no longer higher in the call stack. > Mos

Re: [Twisted-Python] how to write a safe catch-all

2010-09-30 Thread Phil Mayers
On 30/09/10 14:36, Chris Withers wrote: > > Indeed, but, as I keep saying, I need to build a scheduler that's > resilient to errors in the tasks its running ;-) Sure. > >>> Most prominent is reactor.callLater. > > ...which I'm not actually using, it was just a small-as-possible way I > could simu

Re: [Twisted-Python] how to write a safe catch-all

2010-09-30 Thread Phil Mayers
On 30/09/10 15:13, Chris Withers wrote: > On 30/09/2010 14:39, Jonathan Lange wrote: >> On Thu, Sep 30, 2010 at 2:36 PM, Chris Withers >> wrote: >> ... >>> >>> Is there any way I can get both errbacks *and* exceptions handled nicely in >>> my `loop` call? >> >> You know about defer.maybeDeferred

Re: [Twisted-Python] The Real Error (tm) [was Re: how to write a safe catch-all]

2010-09-30 Thread Phil Mayers
On 30/09/10 15:35, Chris Withers wrote: > On 30/09/2010 15:23, Phil Mayers wrote: >>> def loop(): >>> d = maybeDeferred(doStuff) >>> d.addErrback(partial(log.err,_why='Unhandled scheduled exception')) >> >>> So, how come my log.err doesn'

Re: [Twisted-Python] The Real Error (tm) [was Re: how to write a safe catch-all]

2010-09-30 Thread Phil Mayers
On 30/09/10 16:10, Chris Withers wrote: > On 30/09/2010 15:53, Phil Mayers wrote: >>> So, I appear to be back to the case where I can either gracefully handle >>> the exception *or* gracefully handle the errback, but not both? >> >> It should be possible if using T

[Twisted-Python] Limiting a task.Cooperator to N work units / sec

2010-10-01 Thread Phil Mayers
Is there an easy way to make a task.Cooperator instance only execute N ticks / sec, summed across all iterators it's driving? So if you add two iterators, they each run at N/2 per sec, 3 at N/3, etc. It seems like this ought to do it: N = def myScheduler(x): # reschedule N times per second

Re: [Twisted-Python] Limiting a task.Cooperator to N work units / sec

2010-10-01 Thread Phil Mayers
On 01/10/10 13:46, exar...@twistedmatrix.com wrote: > On 09:41 am, p.may...@imperial.ac.uk wrote: >> Is there an easy way to make a task.Cooperator instance only execute N >> ticks / sec, summed across all iterators it's driving? So if you add >> two >> iterators, they each run at N/2 per sec, 3 at

Re: [Twisted-Python] The Real Error (tm) [was Re: how to write a safe catch-all]

2010-10-01 Thread Phil Mayers
On 01/10/10 14:19, Chris Withers wrote: > On 30/09/2010 18:01, Phil Mayers wrote: >> It is more than a little confusing, and I'm sure frustrating. >> >> I've tried to produce something like this locally, but cannot. > > The very first message in this thre

Re: [Twisted-Python] Limiting a task.Cooperator to N work units / sec

2010-10-03 Thread Phil Mayers
On 10/01/2010 02:27 PM, exar...@twistedmatrix.com wrote: > On 12:58 pm, p.may...@imperial.ac.uk wrote: >> On 01/10/10 13:46, exar...@twistedmatrix.com wrote: >>> On 09:41 am, p.may...@imperial.ac.uk wrote: Is there an easy way to make a task.Cooperator instance only execute N ticks /

Re: [Twisted-Python] _twistd_unix.py / daemonize() / OSX / USING_FORK_WITHOUT_EXEC_IS_NOT_SUPPORTED_BY_FILE_MANAGER

2010-10-13 Thread Phil Mayers
On 13/10/10 15:55, Erik van Blokland wrote: > > The code calls fork(), but no exec(): fork() with no exec() is legal Unix. Various googling led me to: http://trac.adium.im/ticket/13976#comment:28 """The problem is that OSX since version 10.6 (Snow Leopard) does NOT allow processes launched via

Re: [Twisted-Python] _twistd_unix.py / daemonize() / OSX / USING_FORK_WITHOUT_EXEC_IS_NOT_SUPPORTED_BY_FILE_MANAGER

2010-10-13 Thread Phil Mayers
On 13/10/10 16:40, Phil Mayers wrote: > On 13/10/10 15:55, Erik van Blokland wrote: >> >> The code calls fork(), but no exec(): > > fork() with no exec() is legal Unix. > > Various googling led me to: > > http://trac.adium.im/ticket/13976#comment:28 > > &

Re: [Twisted-Python] _twistd_unix.py / daemonize() / OSX / USING_FORK_WITHOUT_EXEC_IS_NOT_SUPPORTED_BY_FILE_MANAGER

2010-10-13 Thread Phil Mayers
On 13/10/10 16:52, Phil Mayers wrote: > > If this really is true, then MacOS X is no longer posix-compliant in > those circumstances, and Twisted is going to need some work :o( > > Can you share more details about the application; the context in which > it is started, and whic

Re: [Twisted-Python] _twistd_unix.py / daemonize() / OSX / USING_FORK_WITHOUT_EXEC_IS_NOT_SUPPORTED_BY_FILE_MANAGER

2010-10-13 Thread Phil Mayers
On 13/10/10 16:52, Phil Mayers wrote: > > If this really is true, then MacOS X is no longer posix-compliant in > those circumstances, and Twisted is going to need some work :o( One final note (sorry for the fragmentary posts!) - it seems the only places Twisted calls fork() are in Ba

Re: [Twisted-Python] Names DNS Client too chatty

2011-01-24 Thread Phil Mayers
On 01/24/2011 02:43 AM, Glyph Lefkowitz wrote: > > Personally I'd say 'false'. This is technically a change in > behavior, but I don't think that we should make guarantees about > emitted log messages. Practically speaking, I've never seen any code > which would care about an unstructured log mes

Re: [Twisted-Python] A thread in isolation

2011-02-17 Thread Phil Mayers
On 02/17/2011 09:38 PM, andy.hens...@gtri.gatech.edu wrote: > My controlling thread just wants to start Twisted, let it do its thing, > and then let the thread stop. Later on, I’d like to do it again. In the That's your problem. The reactor is not, in general, restartable. You need to start it o

Re: [Twisted-Python] Error (and response) handling in protocols

2011-02-21 Thread Phil Mayers
On 02/21/2011 06:26 AM, Jason Heeris wrote: > > So how I do I deal with protocol errors in a connectionless protocol? I'm a little confused as to why this is a connectionless protocol, if it's talking on a serial port? Surely it's a singleton connection, with no connect/disconnect events? I kno

Re: [Twisted-Python] Error (and response) handling in protocols

2011-02-21 Thread Phil Mayers
On 21/02/11 10:39, Jason Heeris wrote: > On 21 February 2011 15:58, Michael Thompson wrote: >> The app should be waiting on the result of a deferred (which it >> expects to fire with the result of the serial comms) so you can simply >> errback that deferred. > > I get that bit, but my question is

Re: [Twisted-Python] Removing Python 2.6 Support after Twisted 15.1

2015-03-18 Thread Phil Mayers
On 18/03/15 10:45, HawkOwl wrote: Hi, As Python 2.6 has been officially abandoned for a year+ (and will receive no further official security updates) and Python 2.7 has been available for almost five years, it might be time to put Python 2.6 support to bed. The only currently supported distro th

Re: [Twisted-Python] Removing Python 2.6 Support after Twisted 15.1

2015-03-18 Thread Phil Mayers
On 18/03/15 12:29, Donald Stufft wrote: Isn’t the RHEL answer here to just use SCLs to install Python 2.7? I've never actually come across the SCL stuff before. Thanks for the pointer. My latter point still stands - don't do it because others do it, do it because it's good for Twisted (or

Re: [Twisted-Python] Removing Python 2.6 Support after Twisted 15.1

2015-03-19 Thread Phil Mayers
On 19/03/15 00:42, Donald Stufft wrote: If you want newer than that you could possibly convince PyPy to build RPMs with COPR. I’m doing that for python-pip and co and it’s not very hard once you have the RPM spec file originally written, which could probably just be taken from Fedora. IME that

Re: [Twisted-Python] Removing Python 2.6 Support after Twisted 15.1

2015-03-19 Thread Phil Mayers
On 18/03/15 23:57, Glyph Lefkowitz wrote: Rather than just suggest we preserve the status quo and stay on 2.6 forever to do indefinite free work to support Red Hat's obsolescence You *definitely* shouldn't do that. Push back on RedHat, and tell customers to push back on RedHat. I say this to

Re: [Twisted-Python] Removing Python 2.6 Support after Twisted 15.1

2015-03-24 Thread Phil Mayers
On 20/03/15 00:23, David Ripton wrote: On 03/19/2015 08:05 AM, Phil Mayers wrote: On 18/03/15 23:57, Glyph Lefkowitz wrote: Rather than just suggest we preserve the status quo and stay on 2.6 forever to do indefinite free work to support Red Hat's obsolescence You *definitely* shouldn

Re: [Twisted-Python] Adding support for Diameter protocol

2015-04-14 Thread Phil Mayers
On 14/04/15 06:42, Glyph wrote: On Apr 14, 2015, at 00:22, Hamza Sheikh mailto:fehr...@codeghar.com>> wrote: I am new to Twisted and its community Welcome, we are happy to have you! and exploring adding Diameter support. What is Diameter? It's a bit like RADIUS-over-TCP but with knob

Re: [Twisted-Python] Add support for Next Protocol Negotiation and Application Layer Protocol Negotiation

2015-04-21 Thread Phil Mayers
On 21/04/15 16:25, Adi Roiban wrote: Hi, I just want to let you know about this patch which is in work : https://twistedmatrix.com/trac/ticket/7860 Nice. I did an initial review but it would help to get more feedback for this new API. I would very, very much like to see something along th

Re: [Twisted-Python] Deprecating subproject packaging

2015-04-22 Thread Phil Mayers
On 22/04/15 09:04, HawkOwl wrote: Hi, I think that Twisted should deprecate subproject packaging -- they Agreed. It's largely pointless. ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listin

[Twisted-Python] List admin attention

2015-08-11 Thread Phil Mayers
Someone please un-sub this person? Forwarded Message Subject:Re: [Twisted-Python] ANN: Eliot 0.8, the logging system with causality Date: Mon, 10 Aug 2015 12:59:48 -0600 From: Judy Craig Reply-To: Twisted general discussion To: twisted-python@twistedmatr

Re: [Twisted-Python] Asynchronously initializing objects in twisted.web?

2015-09-08 Thread Phil Mayers
On 08/09/15 15:51, Nagy, Attila wrote: The goal here is that the HTTP server shouldn't start until it can fetch the desired data. Of course I can do this in a synchronous way, but it feels so unnatural and bad practice to fetch the same stuff Load the resources in a callback using "reactor.cal

[Twisted-Python] doc breakage

2015-11-27 Thread Phil Mayers
Does this look right? https://twistedmatrix.com/documents/current/api/twisted.internet.interfaces.IReadWriteDescriptor.html Looks like docs for logPrefix has stomped on docs for all the other interface methods? ___ Twisted-Python mailing list Twiste

Re: [Twisted-Python] Writing a low-level network debugging tool

2015-11-27 Thread Phil Mayers
On 27/11/15 14:05, Jonathan Ballet wrote: * how long does it take to resolv the domain name to (at least) one of its IP address - against a specified name server or using the system configured servers That is relatively straightforward. - how many tries did it require * if there w

Re: [Twisted-Python] Writing a low-level network debugging tool

2015-11-27 Thread Phil Mayers
On 27/11/15 14:39, Phil Mayers wrote: But the info above may be a helpful start. You may also want to look at TCP_CC_INFO. See the kernel source: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/net/ipv4/tcp.c?id=refs/tags/v4.4-rc2 ...for an idea of what else is

Re: [Twisted-Python] Python 2.7 on CentOS 6

2015-12-15 Thread Phil Mayers
On 15/12/15 04:16, Amber "Hawkie" Brown wrote: There is a solution to this, and Nick Coghlan has mentioned it to me many times -- Software Collections for RHEL and CentOS. Software Collections is RH's answer to "new software" on "stable distributions" -- SCLs operate side-by-side with system pa

Re: [Twisted-Python] Python 2.7 on CentOS 6

2015-12-16 Thread Phil Mayers
On 15/12/2015 16:40, Ray Cote wrote: We have a fair bit of Python 2.7 Twisted code deployed on RHEL and CentOS 5 and 6. In each case, we build from source and do a make altinstall so we’re running a Python separate from the system’s. We build an RPM, but basically yes; put it in a different pat

Re: [Twisted-Python] Twisted + OpenSSL 1.0.2f issues resolved

2016-02-22 Thread Phil Mayers
On 20/02/16 09:33, Glyph Lefkowitz wrote: I assume that they subscribed by accident (spammers seem to periodically attempt to mass-subscribe people using our listserv, I have no idea why, and some of them click the "yes subscribe me" link for some reason). FWIW, our local mailman install is pa

Re: [Twisted-Python] Twisted + OpenSSL 1.0.2f issues resolved

2016-02-23 Thread Phil Mayers
On 22/02/16 21:18, Glyph Lefkowitz wrote: On Feb 22, 2016, at 09:26, Phil Mayers wrote: On 20/02/16 09:33, Glyph Lefkowitz wrote: I assume that they subscribed by accident (spammers seem to periodically attempt to mass-subscribe people using our listserv, I have no idea why, and some of

Re: [Twisted-Python] [Twisted-web] upcoming changes to twistedmatrix.com mail infrastructure

2016-03-19 Thread Phil Mayers
On 16/03/16 18:52, Glyph wrote: Over the last few months, twistedmatrix.com 's mailman installation has been used increasingly frequently to execute denial-of-service attacks against people's mailboxes. This is My sympathies; this exact problem was the reason we CAPTC

Re: [Twisted-Python] twisted listening on UDP port, why?

2016-04-20 Thread Phil Mayers
On 20/04/16 01:01, Glyph wrote: Perhaps this is libc's DNS client? Twisted doesn't do anything like this. It does something similar with win32reactor IIRC? http://twistedmatrix.com/trac/browser/tags/releases/twisted-16.1.1/twisted/internet/posixbase.py#L60 ...but that binds to 127.0.0.1 not

Re: [Twisted-Python] twisted listening on UDP port, why?

2016-04-23 Thread Phil Mayers
On 23/04/16 03:36, Jonathan Vanasco wrote: Thanks for all this. A few quick notes: On Apr 20, 2016, at 9:15 PM, Glyph wrote: This isn't so much a feature of Python as it is a feature of the BSD sockets API. Sending traffic through a socket, whether it's TCP or UDP, has to bind a client port.

[Twisted-Python] Style/testing for log-related changes

2016-06-06 Thread Phil Mayers
All, I'd like to submit a patch to convert t.conch.ssh to the new logging. The main reason is that the conch code logs a *lot* of really, really, really boring crap that I want to throw away because it just clutters up the logs e.g. https://github.com/twisted/twisted/blob/twisted-16.2.0/twis

Re: [Twisted-Python] How do you determine the buffer size of a transport - a use-case for not using back pressure

2016-08-22 Thread Phil Mayers
On 17/08/16 23:43, Steve Morin wrote: Twisted Community Problem: How do you determine the buffer size of a transport, to know how much data is waiting to be transmitted from using transport.write? You haven't received many responses, so I'll add a short note here: The ideal way to do this IMO

Re: [Twisted-Python] Problems with inlineCallback, Deferred, yield and Python 3 in buildbot

2017-01-25 Thread Phil Mayers
On 24/01/2017 21:14, Glyph Lefkowitz wrote: I've encountered this before and quickly worked around it, but I think this might actually be a bug in python 3, or at least its documentation. The language docs officially say that a "list display" (which is what I believe we're looking at here) "yie

Re: [Twisted-Python] Twisted 17.1 Release Announcement

2017-02-11 Thread Phil Mayers
On 11/02/2017 17:28, Tristan Seligmann wrote: String endpoint descriptions, as used by twist/twistd among other things, for listening on tcp ports now require the "tcp:": that is, "80" is no longer accepted, you need to use "tcp:80". In which case there's a regression in the "portforward" twis

Re: [Twisted-Python] Twisted 17.1 Release Announcement

2017-02-11 Thread Phil Mayers
On 11/02/17 18:12, Phil Mayers wrote: On 11/02/2017 17:28, Tristan Seligmann wrote: String endpoint descriptions, as used by twist/twistd among other things, for listening on tcp ports now require the "tcp:": that is, "80" is no longer accepted, you need to use "

Re: [Twisted-Python] Twisted 17.1 Release Announcement

2017-02-12 Thread Phil Mayers
On 12/02/2017 01:44, Glyph Lefkowitz wrote: Yeah, this is a lack of test coverage for the 'default' case. Technically it /is/ a regression, but it's probably pretty unusual to use the default; point being, I don't think we need an emergency release here. Agreed. It's completely tolerable. N

Re: [Twisted-Python] Python3 twistd daemon for Ubuntu 14.04 alternatives

2017-02-22 Thread Phil Mayers
On 22/02/17 11:12, Glyph Lefkowitz wrote: I'm tempted to launch into a diatribe about namespacing, containers, and application isolation generally, but before I do - why is it that you /want/ to use the system Python environment? Had you just not considered the option of virtual environments?

Re: [Twisted-Python] Python3 twistd daemon for Ubuntu 14.04 alternatives

2017-02-22 Thread Phil Mayers
On 22/02/17 12:49, Hynek Schlawack wrote: That’s why you should use a build server and not ship build environments. Which we do. I don’t see how that’s tedious since a compute does that for me. Although I don’t see any value at wheeling them (and some packages cannot be wheeled); my CI build

Re: [Twisted-Python] Python3 twistd daemon for Ubuntu 14.04 alternatives

2017-02-22 Thread Phil Mayers
On 22/02/17 13:06, Jean-Paul Calderone wrote: Ah! They are now, maybe you haven't seen them? Check out https://github.com/pypa/manylinux and https://github.com/pypa/python-manylinux-demo I had not seen this. Thanks, this looks like a big leap forward. A lot of people seem to be thinking th

Re: [Twisted-Python] Python3 twistd daemon for Ubuntu 14.04 alternatives

2017-02-22 Thread Phil Mayers
On 22/02/17 15:00, Steve Waterbury wrote: Have you considered the 'conda' package manager? I've never come across it. It looks too big for me to give a quick opinion on, but I'll bear it in mind. Thanks for the pointer. ___ Twisted-Python mailing

Re: [Twisted-Python] Python3 twistd daemon for Ubuntu 14.04 alternatives

2017-02-22 Thread Phil Mayers
On 22/02/17 17:42, Hynek Schlawack wrote: I have to disagree here: I don’t want build tools of any kind in my final containers therefore I build my artifacts separately no matter what language. Of course you can just build the venv on your build Agreed, 100%. Apologies if I gave you the impr

Re: [Twisted-Python] Python3 twistd daemon for Ubuntu 14.04 alternatives

2017-02-22 Thread Phil Mayers
On 22/02/17 17:35, Steve Waterbury wrote: On 02/22/2017 12:23 PM, Phil Mayers wrote: On 22/02/17 15:00, Steve Waterbury wrote: Have you considered the 'conda' package manager? I've never come across it. It looks too big for me to give a quick opinion on, but I'll bear it

  1   2   3   >