Re: [Twisted-Python] logging

2013-06-13 Thread Facundo Batista
On Thu, Jun 13, 2013 at 7:14 PM, Glyph wrote: > For a long time, there's been consensus among at least a few core Twisted > developers that log messages ought to be specified in terms of a format > message and several relevant keyword arguments, so that tools can extract > the values of the keywo

Re: [Twisted-Python] modal dialogs with the qt4reactor?

2013-05-15 Thread Facundo Batista
On Wed, May 15, 2013 at 6:02 AM, Donal McMullan wrote: > In a 2006 email, Ed Suominen links to two copies of "a non-blocking > modal dialog, immediately obtaining a deferred to the user's eventual > input." In Encuentro [0] I do a very similar thing (using Qt and qtreactor): def interactive

Re: [Twisted-Python] Twisted client memory leak

2013-01-22 Thread Facundo Batista
On Tue, Jan 22, 2013 at 2:37 PM, Phil Mayers wrote: > Because having just tested it, I don't see any problem - his example > code has stable memory usage for both client/server processes, and with > the client making 1, 100 or 1000 connections/sec, and the debug shows > protocol and factory insta

Re: [Twisted-Python] Twisted client memory leak

2013-01-22 Thread Facundo Batista
On Tue, Jan 22, 2013 at 2:02 PM, Phil Mayers wrote: > On 22/01/13 16:45, Facundo Batista wrote: >> >> Yes, but note that without the __del__ it had the same behaviour... >> > > Not quite. The OP said that: > > a) He had a problem with a Twisted app not freein

Re: [Twisted-Python] Twisted client memory leak

2013-01-22 Thread Facundo Batista
On Tue, Jan 22, 2013 at 12:15 PM, Tristan Seligmann wrote: > Adding __del__ methods causes the object to become uncollectable if it > forms part of a reference cycle. Thus it is almost always a bad idea > to add __del__ methods when attempting to debug a space leak, as the > most likely outcome i

Re: [Twisted-Python] Finding out the IP which it failed to connect

2012-01-20 Thread Facundo Batista
On Fri, Jan 20, 2012 at 4:06 PM, Kevin Horn wrote: > twisted.internet.tcp.Connector has a getDestination() method, which should > return an address object. > > Have you tried that? (I haven't, but it looks like the right thing) It returns the name used, not the IP. -- .    Facundo Blog: http:

[Twisted-Python] Finding out the IP which it failed to connect

2012-01-19 Thread Facundo Batista
I have some code that uses a twisted.web.client.HTTPClientFactory. I've found that because some issues (firewall rules, not relevant to the problem), I experienced failures to connect. More specifically, I told it to connect to one particular address, and because of DNS load distribution, that ad

Re: [Twisted-Python] Twisted for Python 3

2011-11-19 Thread Facundo Batista
On Wed, Oct 19, 2011 at 8:50 AM, Antoine Pitrou wrote: > I'm announcing an experimental, work-in-progress port of Twisted to > Python 3. The homepage, where you can find more detailed information, > is at https://bitbucket.org/pitrou/t3k Here's something similar from my side: lp:~facundo/+jun

Re: [Twisted-Python] Some "spread" objects and comparison semantics

2011-05-11 Thread Facundo Batista
On Wed, May 11, 2011 at 2:05 PM, wrote: > I doubt anyone remembers the rationale for these methods.  We should err > on the safe side and preserve the existing behavior. Ok, I'll add tests to check this also. -- .    Facundo Blog: http://www.taniquetil.com.ar/plog/ PyAr: http://www.python.or

[Twisted-Python] Some "spread" objects and comparison semantics

2011-05-10 Thread Facundo Batista
I'm analysing the code in twisted/spread/flavors.py and twisted/spread/pb.py, trying to remove the __cmp__ and cmp() in RemoteCache, RemoteCacheMethod and RemoteCacheObserver classes. They all have __cmp__ methods, but as there is not any test for these, and it's not specified in the documentation

Re: [Twisted-Python] Old-class-only support in manhole

2011-03-26 Thread Facundo Batista
On Sat, Mar 26, 2011 at 3:13 PM, wrote: > The idea here is cool, and I think it would be nice to support it, but > this code is pretty gross and, as far as I know, broken.  I think we > should think about getting rid of it.  If we go that route, then you > should be able to ignore it for your Py

[Twisted-Python] Old-class-only support in manhole

2011-03-25 Thread Facundo Batista
Hello! Creating a test case for a change in twisted/manhole/explorer.py, I found these lines in CRUFT_WatchyThingie.watchObject: if type(object) is not types.InstanceType: raise TypeError, "Sorry, can only place a watch on Instances." Always talking in Python 2, if you pass a

[Twisted-Python] TestCase methods names

2011-03-15 Thread Facundo Batista
Hello! The TestCase class, historically, provided several ways to do the same (I guess because we inherited the semantics from Java). For example, to check equality, In Python2 we have: * assertEquals * assertEqual * failUnlessEqual However, note that "assertEquals" was never documented (not

Re: [Twisted-Python] Failing tests in trunk

2011-03-11 Thread Facundo Batista
On Thu, Mar 10, 2011 at 9:51 PM, wrote: >> __init__ and leave it there, or use other formatting (not >> time.strftime, I prefer this solution). > > I agree with your preference, switching away from time.strftime is probably > the right thing to do. Opened a ticket for this, patch attached:

Re: [Twisted-Python] Failing tests in trunk

2011-03-10 Thread Facundo Batista
On Tue, Mar 8, 2011 at 7:04 AM, Facundo Batista wrote: >> None of these are known failures: >> >>    http://buildbot.twistedmatrix.com/boxes-supported >> >> Just looking at the list of failing tests, I would make a small bet that >> the failures are caused b

Re: [Twisted-Python] Failing tests in trunk

2011-03-08 Thread Facundo Batista
On Mon, Mar 7, 2011 at 9:34 PM, wrote: > None of these are known failures: > >    http://buildbot.twistedmatrix.com/boxes-supported > > Just looking at the list of failing tests, I would make a small bet that > the failures are caused by your locale setting somehow. I thought of that, but why w

[Twisted-Python] Failing tests in trunk

2011-03-07 Thread Facundo Batista
I branched trunk from the LP repository. Running the tests all together ("trial twisted"), consistently makes me fail the following 12: twisted.conch.test.test_cftp.ListingTests.test_newFile twisted.conch.test.test_cftp.ListingTests.test_newSingleDigitDayOfMonth twisted.conch.test.test_cftp.Listin

[Twisted-Python] Twisted for Python 3

2011-02-25 Thread Facundo Batista
I just thought that a good sprint theme for the next PyCon would be porting Twisted for Python 3.2. I wanted to ask which is the status of this, if it's started, a good idea for a sprint, etc. Thanks! -- .    Facundo Blog: http://www.taniquetil.com.ar/plog/ PyAr: http://www.python.org/ar/ ___

Re: [Twisted-Python] Catching all the exceptions in a Twisted program

2010-11-06 Thread Facundo Batista
On Mon, Oct 25, 2010 at 9:29 AM, wrote: >>  Is there a better way to do this?  Actually, this is working correctly, >>  but I don't know if it's the right way to do it, and don't want to >>  depend of DebugInfo() being called always in this case. > > You should add a log observer that watches fo

[Twisted-Python] Catching all the exceptions in a Twisted program

2010-10-25 Thread Facundo Batista
Hello! I've just subscribed to the list, but I'm using Twisted from a while ago. I need to do something, and wasn't able to find out how to do it. Well, I *did* find out, but it's a horrible hack, and actually depends on something that may be a bug, so it's worth asking here about this :) In a