Re: [Twisted-Python] Using decorator syntax in Twisted

2011-12-01 Thread Itamar Turner-Trauring
> Can we start with a limited experimental usage? Some new code can be > written this way, and we'll see if there's any negative feedback > following the next release. > > I don't want existing code to get ported to the new syntax just because > it's possible now. Sure, just because it's possible

Re: [Twisted-Python] MemoryError in twisted.internet.abstract.FileDescriptor

2011-12-09 Thread Itamar Turner-Trauring
> What's the best solution? Apply the patch attached on this ticket, > moving to a producer/consumer approach, or any other idea? The patch will just delay the problem... you're creating a huge number of strings, faster than the transport can write them out. The solution is indeed to use the c

Re: [Twisted-Python] telnet works, why wont this client/protocol test?

2012-01-12 Thread Itamar Turner-Trauring
At a guess, it's because by default LineReceiver splits on '\r\n', but you're sending only '\n'. -Itamar ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Re: [Twisted-Python] telnet works, why wont this client/protocol test?

2012-01-12 Thread Itamar Turner-Trauring
> That helps, thanks. > > I know that http processing does \r\n, I suppose there is an rfc that says > this is reasonable, and LineReceiver is designed to be used in http for > the same reason. So does telnet, smtp, ftp, etc.. ___ Twisted-Python mailin

Re: [Twisted-Python] txjsonrpc.web2 ?

2012-01-13 Thread Itamar Turner-Trauring
On 01/13/2012 04:46 AM, Yaroslav Fedevych wrote: > On 13.01.12 10:46, bino oetomo wrote: > >> I try to install newst twisted from svn ... but got same exception. >> >> Question : Where can i got twisted.web2 ? > If I recall correctly, twisted.web2 was deemed obsolete and unmaintained > a few years

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

2012-01-20 Thread Itamar Turner-Trauring
On 01/20/2012 02:23 PM, Facundo Batista wrote: > 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 th

Re: [Twisted-Python] How to be sure a ssl connection was completed correctly

2012-01-23 Thread Itamar Turner-Trauring
On 01/23/2012 08:46 AM, Hanusz L. wrote: > Hi, > > I'm using the pull method to send events to clients (with xmlrpc over ssl). > The events are in a queue and when a client calls my 'get_event' xmlrpc > function; I get one event from the queue and send it to the client. > > The problem is that I w

Re: [Twisted-Python] help me on startService ( service.Service )

2012-02-03 Thread Itamar Turner-Trauring
On 02/03/2012 01:11 AM, 月忧茗 wrote: > Thanks for reply > > Yes, of course. > > I followed the turotial , > And you ran the file using "twistd -y finger14.tac"? If you did it like that, output may not be visible since the program is daemonized by default. -n option will keep it from daemonizing, a

[Twisted-Python] Twisted in the Google Summer of Code?

2012-02-08 Thread Itamar Turner-Trauring
Sign up is sometime soon, and before considering this it'd be good to know we'd be able to find mentors to help the students with their projects. Would any developers working on Twisted be interested in being mentors for a student over the summer? -Itamar __

Re: [Twisted-Python] Twisted in the Google Summer of Code?

2012-02-09 Thread Itamar Turner-Trauring
On 02/09/2012 07:38 AM, Jessica McKellar wrote: > I'm happy to mentor, deal with administrivia, help write our application, etc. > If you could help with that part, that would be awesome - the list of things Google wants to know is here: http://www.google-melange.com/gsoc/document/show/gsoc_progr

Re: [Twisted-Python] Problem with address-literals and SMTP

2012-02-13 Thread Itamar Turner-Trauring
Could you file a ticket at twistedmatrix.com? Thanks! ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

[Twisted-Python] Have you had problems registering with twistedmatrix.com? It may be fixed now

2012-02-13 Thread Itamar Turner-Trauring
Please try it out and let me know if you can receive registration emails now. -Itamar ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Re: [Twisted-Python] Regression in Gtk2 support testing

2012-02-18 Thread Itamar Turner-Trauring
I'll see what I can do Monday, starting with reenabling gtk2. > Hello all, > > Since #4558 was merged, introducing "gi reactor" based on the new Python > bindings for gobject, all testing of the Gtk2 reactor has been disabled, > on all platforms. > > This is a two-part problem. > > The first part

Re: [Twisted-Python] Regression in Gtk2 support testing

2012-02-19 Thread Itamar Turner-Trauring
On 02/18/2012 10:59 AM, exar...@twistedmatrix.com wrote: > Hello all, > > Since #4558 was merged, introducing "gi reactor" based on the new Python > bindings for gobject, all testing of the Gtk2 reactor has been disabled, > on all platforms. > > This is a two-part problem. > > The first part is the

Re: [Twisted-Python] accurate periodic call

2012-02-19 Thread Itamar Turner-Trauring
On 02/19/2012 11:49 AM, Zoran Bošnjak wrote: > Hello all, > I was astonished to find out that looping call period depends on the system > time by default. The periodic tick can even stall for a long time, if the > system time jumps backwards during program execution. It turned out that this > is

Re: [Twisted-Python] Regression in Gtk2 support testing

2012-02-20 Thread Itamar Turner-Trauring
On 02/20/2012 10:10 AM, exar...@twistedmatrix.com wrote: > On 03:14 am, ita...@itamarst.org wrote: > >> The reactors buildslave is a reasonable strategy: have multiple runs >> with different reactors as the main trial reactor. Especially since, >> even in the absence of this problem, we'd want to c

Re: [Twisted-Python] Question : Failed to read gpsfake

2012-02-23 Thread Itamar Turner-Trauring
On 02/23/2012 04:22 AM, bino oetomo wrote: > Dear All ... > > I try to simulate a gps with gpsfake. > gpsfake create virtual port at /dev/pts/4 > > my code is posted at : http://pastebin.com/j2wn1aXh > > It's never reach the 'lineReceived' part. > I Got no error msg. > > The log only said > > 2012-

Re: [Twisted-Python] connectionMade, TLS and DoS protection timeouts

2012-02-28 Thread Itamar Turner-Trauring
On 02/28/2012 06:42 PM, Tobias Oberstein wrote: > I was wondering how I could protect a Twisted server from evil clients > initiating, > but never completing a TLS handshake. > > connectionMade is only called when the TLS handshake has completed, right? > > When doing listenSSL, is there a hook wh

Re: [Twisted-Python] connectionMade, TLS and DoS protection timeouts

2012-02-29 Thread Itamar Turner-Trauring
On 02/29/2012 03:56 AM, Tobias Oberstein wrote: > Thanks! That sounds reasonable and easy enough. > > Also thanks for pointing to abortConnection() .. which is also a good thing > in the context of DoS protection .. > Although do note using abortConnection will restrict you to very new versions o

Re: [Twisted-Python] Twisted/PyPy rocks!

2012-03-01 Thread Itamar Turner-Trauring
> Couple of points: > > * Have been able to use poll reactor on Linux, but epoll doesnt work .. is > that expected? Maybe because the epoll reactor implementation uses Twisted > own C wrapper instead of the - only > recently - available one in Python standard lib? That was fixed in trunk recently,

Re: [Twisted-Python] Non-PDF version of the Twisted book?

2012-03-01 Thread Itamar Turner-Trauring
On 03/01/2012 07:47 PM, Daniel Bryan wrote: I'm new to Twisted and very interested in learning more, and I learn best with something like a book. I came across this: *twisted*matrix.com/documents/current/core/howto/ *book*.pdf I was wondering

Re: [Twisted-Python] Twisted reactor cpu usage

2012-03-02 Thread Itamar Turner-Trauring
> I'm using epoll reactor and sample HTTP Proxy realization. > > From another process i'm executing ~30 HTTP requests per second and > twisted process is consuming 10% cpu > > What is wrong? Why twisted perfomance is so poor here? The profile output you included doesn't particularly show anything

Re: [Twisted-Python] Twisted reactor cpu usage

2012-03-02 Thread Itamar Turner-Trauring
> cpu load was measured out of profiler. Profilers will slow down your program dramatically. A program that does 10% CPU running under a profiler may use far less CPU when run normally. ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com

Re: [Twisted-Python] Twisted reactor cpu usage

2012-03-02 Thread Itamar Turner-Trauring
> Thank you for help. > As i see there is nothing particular in my test case. It may be that's just how fast it's going to be, yes. One potentially easy way to speed things up: try PyPy. ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com

[Twisted-Python] Anyone still using Python 2.5?

2012-03-04 Thread Itamar Turner-Trauring
In particular, are you using recent versions of Twisted with Python 2.5? Dropping support for 2.5 would make it easier for us to begin the work of supporting Python 3, so I'm wondering how widespread the use of Python 2.5 is. (If you're using the version of Twisted included with your distro tha

Re: [Twisted-Python] How to Improve Twisted efficiency

2012-03-13 Thread Itamar Turner-Trauring
On 03/13/2012 05:50 AM, Peng Xiao -X (penxiao - Digital China at Cisco) wrote: Hi experts, I wrote a TCP client program used twisted to receive lots of data from the server and decode them for analysis. But the efficiency is ugly. I used*"profile" and "pstats" *to analysis and found *selec

[Twisted-Python] cfreactor and global state

2012-03-13 Thread Itamar Turner-Trauring
twisted.internet.test.reactormixins says: CFReactor uses APIs which manipulate global state, so it's not safe to run its own reactor-builder tests under itself. We also don't have a buildslave running under cfreactor. Which means it's currently completely untested. I filed a ticket to fix

Re: [Twisted-Python] Anyone still using Python 2.5?

2012-03-14 Thread Itamar Turner-Trauring
I've opened a ticket to drop support for Python 2.5 *after* our next release: http://twistedmatrix.com/trac/ticket/5553 If this would be a major problem for you please comment on the ticket; just to clarify, regardless of the ticket's resolution the next release (12.1) will continue to support

Re: [Twisted-Python] [Twisted-commits] r33889 - Merge elementresource-5395: Add renderElement, for rendering Elements.

2012-03-17 Thread Itamar Turner-Trauring
On 03/16/2012 10:51 PM, dr...@wolfwood.twistedmatrix.com wrote: > Author: dreid > Date: Fri Mar 16 20:51:46 2012 > New Revision: 33889 > > Added: > trunk/twisted/web/topfiles/5395.feature >- copied unchanged from r33888, > /branches/elementresource-5395/twisted/web/topfiles/5395.featur

[Twisted-Python] "twistd web --port=9000" no longer works

2012-03-17 Thread Itamar Turner-Trauring
Apparently this was removed as part of deprecating the old strports syntax, but: 1) "twistd web --port=9000" never gave a deprecation warnings. itamar@blake:~$ twistd --version twistd (the Twisted daemon) 11.0.0 Copyright (c) 2001-2011 Twisted Matrix Laboratories. See LICENSE for de

Re: [Twisted-Python] Problem about Multithread

2012-03-17 Thread Itamar Turner-Trauring
On 03/17/2012 09:01 PM, hz hanks wrote: > Hi, All > > I just started Twisted and I've a problem when using it. I want to > write a program for both the client and the server that the client can > download something from the server. Therefore, I want every client and > server pair can use multithrea

Re: [Twisted-Python] questions about twisted usage

2012-03-22 Thread Itamar Turner-Trauring
On 03/22/2012 08:05 AM, Uri Okrent wrote: > This implies that twisted can (and will) switch contexts from one > deferred to another even in the middle of execution of the first > deferred, correct? No. Deferreds are just slightly nicer callbacks. They have nothing to do with the event loop, or sc

Re: [Twisted-Python] when will failure.Failure() be a problem?

2012-03-23 Thread Itamar Turner-Trauring
On 03/23/2012 01:48 AM, gelin yan wrote: > Hi All > > As regards issues like #5567 & #4219, Failure object creation is not > thread safe. I use deferToThread daily due to many blocking apis still > have to be used in my system. I looked into the code and noticed there > is a global count used i

Re: [Twisted-Python] when will failure.Failure() be a problem?

2012-03-23 Thread Itamar Turner-Trauring
On 03/23/2012 01:48 AM, gelin yan wrote: > Hi All > > As regards issues like #5567 & #4219, Failure object creation is not > thread safe. I use deferToThread daily due to many blocking apis still > have to be used in my system. I looked into the code and noticed there > is a global count used i

Re: [Twisted-Python] Mimicking a blocking API using Twisted

2012-03-25 Thread Itamar Turner-Trauring
On 03/25/2012 05:02 PM, Laurens Van Houtven wrote: > Hi, > > > I'm trying to find out if there's a reasonable way to mimic a blocking > API with an existing non-blocking API. I want to do this so I can > write doctests. > > For example, I want to make a remote AMP call. It returns a deferred. >

Re: [Twisted-Python] Mimicking a blocking API using Twisted

2012-03-25 Thread Itamar Turner-Trauring
On 03/25/2012 07:54 PM, Laurens Van Houtven wrote: > The thing I'm documenting is a server, I'm documenting it by interacting with > it as a client. I realize that doesn't entirely detract from your point -- > you might still be introducing problems that would not affect a "real" client. > > My i

[Twisted-Python] Sprint report?

2012-03-26 Thread Itamar Turner-Trauring
It sounds like we had lots and lots of people at the sprint; I'm sorry I missed them. Anyone want to write up a report? ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Re: [Twisted-Python] Sprint report?

2012-03-26 Thread Itamar Turner-Trauring
On 03/26/2012 10:10 PM, Itamar Turner-Trauring wrote: > It sounds like we had lots and lots of people at the sprint; I'm sorry I > missed them. Anyone want to write up a report? > How about this - if you were at the PyCon sprint, please reply to me (not to list) with a short descr

Re: [Twisted-Python] Virtual Manager Vacancy

2012-03-27 Thread Itamar Turner-Trauring
On 03/27/2012 02:21 AM, Albert Brandl wrote: > These messages start to annoy me. I'd certainly appreciate if the > mailing-list server > would be reconfigured to prevent this kind of spam ;-). As list admin I saw 12 more of these than you did, so progress is being made. I will continue to improve

Re: [Twisted-Python] Open Position

2012-03-27 Thread Itamar Turner-Trauring
On 03/27/2012 09:40 AM, Orestis Markou wrote: > Um, is there a way to kill this annoying spam? > Like I said, I'm working on it. ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-py

Re: [Twisted-Python] Problem with additional connection

2012-03-28 Thread Itamar Turner-Trauring
On 03/28/2012 03:52 PM, hz hanks wrote: > Hi, all > > I'm writing a client program with Twisted. The client will first > connect one server, and based on the data received in the function of > dataReceived, the client need to connect other servers. I just tried > to call reactor.connectTCP(another

Re: [Twisted-Python] Conflict between Tkinter.mainloop() and twisted.internet.reactor.run()

2012-03-30 Thread Itamar Turner-Trauring
On 03/30/2012 06:36 PM, hz hanks wrote: > Any one knows how to solve this problem? I just need a Template to > realize the Twisted with GUI. Very appreciated! > http://twistedmatrix.com/documents/current/core/howto/choosing-reactor.html#auto15 ___ Twist

[Twisted-Python] Twisted is participating in Google's Summer of Code, and Outreach Program for Women

2012-04-01 Thread Itamar Turner-Trauring
If you're a student (or know a student) interested in a paid summer internship working on Twisted, please get in touch with me. We are also sponsoring one paid internship in partnership with Gnome's Outreach Program for Women, which unlike GSoC is not restricted to students. The deadline for bo

Re: [Twisted-Python] IPv6 Support for Client side

2012-04-10 Thread Itamar Turner-Trauring
On 04/10/2012 10:25 PM, Peng Xiao -X (penxiao - Digital China at Cisco) wrote: Hi experts, The release of Twisted 12.0 support IPV6 on the server side, I want to know that when it will support IPv6 on the client side. Thanks a lot The next release will support it on client side (for TCP),

[Twisted-Python] We need more mentors!

2012-04-12 Thread Itamar Turner-Trauring
We have a pile of enthusiastic Google Summer of Code applicants, and not enough mentors at the moment. Anyone interested in mentoring a student or two over the summer? If so, email me ASAP. Thanks! ___ Twisted-Python mailing list Twisted-Python@twiste

Re: [Twisted-Python] We need more mentors!

2012-04-12 Thread Itamar Turner-Trauring
On 04/12/2012 09:57 AM, Jonathan Lange wrote: I'm interested, but I'd like to know what's involved and over what period of time before I sign up. Helping students with design, planning and scoping, possibly doing code reviews if no code reviews are forthcoming, and then doing a review at the e

Re: [Twisted-Python] We need more mentors!

2012-04-12 Thread Itamar Turner-Trauring
The five hour estimate comes from the FAQ, and may be underestimate: https://www.google-melange.com/gsoc/document/show/gsoc_program/google/gsoc2012/faqs#time_mentor ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.co

Re: [Twisted-Python] Coverage summary with trial

2012-04-13 Thread Itamar Turner-Trauring
> Hi all, > > I would like to collect coverage statistic for my twisted code with trial > and > was wondering how to achieve this. > > I run something like: > $ trial --coverage testdir/*_test.py coverage.py is a much nicer tool: http://nedbatchelder.com/code/coverage/ You'd do "coverage.p

Re: [Twisted-Python] CPU usage.

2012-04-26 Thread Itamar Turner-Trauring
On 04/26/2012 02:14 AM, 黄 轶明 wrote: > hi > > I use twisted to build some web services, using twistd to start a application. > > When I start the twistd, and without any connection, the cpu usage of twistd > process comes to about 10%. > > I don't think it's normal. I think it should be much low th

[Twisted-Python] Releasing 12.1

2012-05-01 Thread Itamar Turner-Trauring
Once 12.1 is out, we'll be able to drop Python 2.5 support in trunk. This will make life easier for one of our Google Summer of Code students who will be working on the start of Python 3 support, so it'd be good to get it done soon. In order to release 12.1, we need: 1. To finish code reviews o

Re: [Twisted-Python] (no subject)

2012-05-01 Thread Itamar Turner-Trauring
On 05/01/2012 04:38 PM, Dmitriy Komarov wrote: > Hi All, > > Our team is setting up Twisted to access Mercurial over SSH. So this means SSH is on the server side, right? > SSH connection, key exchange, and receiving large amount of data from > the client work nicely, > but sending server data bac

Re: [Twisted-Python] (no subject)

2012-05-01 Thread Itamar Turner-Trauring
On 05/01/2012 04:38 PM, Dmitriy Komarov wrote: > If anyone had a similar issue before, I'd appreciate any pointers on > resolving or avoiding it. > Actually, one thing does occur to me - are you using the IOCP reactor? If so, try the select() reactor, the IOCP reactor unfortunately has a bunch o

Re: [Twisted-Python] (no subject)

2012-05-02 Thread Itamar Turner-Trauring
On 05/02/2012 02:57 PM, Glyph wrote: On May 2, 2012, at 12:37 AM, Itamar Turner-Trauring wrote: abunch of serious bugs Can you be more specific? Let's not spread vague FUD about ourselves :). I suspect you're mostly talking about <http://twistedmatrix.com/trac/ticket/1551>

Re: [Twisted-Python] (no subject)

2012-05-03 Thread Itamar Turner-Trauring
On 05/03/2012 05:27 PM, Dmitriy wrote: > To add more details, unfortunately, I'm already running SelectReactor with > pretty recent packages: > Twisted==12.0.0 > pyasn1==0.1.2 > pycrypto==2.5 > > After some heavy experimenting, I really think that plink is the weakest > link: > the error happens at

Re: [Twisted-Python] question : json.loads failed using LineReceiver data

2012-05-14 Thread Itamar Turner-Trauring
On 05/14/2012 04:53 AM, bino oetomo wrote: > Kindly please tell me why the 'json.loads' is failed in my tac file > while it work in python console. > Perhaps the JSON spans more than one line? Printing out the repr() of the lines you're receiving may be informative. __

Re: [Twisted-Python] Cannot install Twisted version 8 through PIP

2012-05-14 Thread Itamar Turner-Trauring
On 05/14/2012 09:14 AM, Pascal Briet wrote: > Hi, > > We're having some troubles today, because it seems that old packages > of Twisted are not available anymore. > We are currently relying on Twisted 8.2.0. > > pip install twisted==8.2.0 is failing (first version available seems > to be 9.0.0)

Re: [Twisted-Python] Cannot install Twisted version 8 through PIP

2012-05-14 Thread Itamar Turner-Trauring
On 05/14/2012 09:35 AM, Pascal Briet wrote: > Hi, > > Thanks for your answer. > > Well, there is no specific reason that we use the 8.2.0 version. > It's just... history. We never needed to upgrade it. > > Do you think we can easily upgrade to 9/10/11/12 ?? > Thanks very much, > We have a strict b

[Twisted-Python] Getting rid of "DirtyReactorWarning"

2012-05-15 Thread Itamar Turner-Trauring
I have a ticket open for allowing tests that look like this, where each run has a new reactor instance: def test_somethingShouldHappen(self, reactor): result = [] reactor.listenTCP(...) self.runReactor(reactor) self.assertEqual(result, ["hooray"]) Further thought sugges

Re: [Twisted-Python] deferLater with trial issue

2012-05-23 Thread Itamar Turner-Trauring
On 05/23/2012 06:04 PM, Laurens Van Houtven wrote: > You're supposed to clean up whatever junk you left in the reactor after your > test. Do that in the tearDown method. > An excellent way to do that is to not use the reactor for scheduling time in tests; this has the additional benefit of lettin

[Twisted-Python] Spam in the list

2012-05-26 Thread Itamar Turner-Trauring
On 05/26/2012 07:10 AM, Yaroslav Fedevych wrote: > As a side note, I heard some work was underway in order to prevent messages > like this infiltrating the list… > The problem is they end up in my spam folder so I don't see them, so thanks for pointing it out. I added another filter which should

Re: [Twisted-Python] question : dbus for twistd application framework

2012-05-29 Thread Itamar Turner-Trauring
On 05/28/2012 11:03 PM, bino oetomo wrote: > Dear all ... > > I need my twistd script to also 'listen' to dbus. > The only example that I found so far is : > http://twistedmatrix.com/trac/attachment/ticket/1352/dbus-twisted.py > Buit that example not using some thing like : > application = service.

Re: [Twisted-Python] Log file ownership

2012-06-06 Thread Itamar Turner-Trauring
On 06/06/2012 08:46 PM, Enrique Samson Jr, wrote: > Hi, > > I am running an app as root on Linux using a .tac file and twistd. The > application object is initialized with a certain gid and uid. Logging is > configured to rotate daily by way of DailyLogFile. However, the log file > it creates is ow

Re: [Twisted-Python] protocol connectionLost clientConnectionLost

2012-06-07 Thread Itamar Turner-Trauring
On 06/07/2012 10:23 PM, Kevin McIntyre wrote: > Below is my sample code. I'm hoping to unplug my internet cable and > get a connectionLost. But this doesn't happen. Is there anyway to > detect this? > Send out a message every few seconds or minutes; if you're not sending any traffic the OS will

[Twisted-Python] I will try to beef up the mailing list's anti-spam filters now

2012-06-12 Thread Itamar Turner-Trauring
Sorry for the problems. -Itamar ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Re: [Twisted-Python] iConnector factory not what expected

2012-06-15 Thread Itamar Turner-Trauring
On 06/15/2012 12:46 PM, Martin wrote: > What happens if I create two SSL connections with the same factory f? > Would calling "stopTrying" on that f then affect both connections? Or > just the last? I guess I can simply test this out myself, it's just > slightly weird to me. :) It's better to have

Re: [Twisted-Python] Python 3 support in Twisted: Request for relaxation of coverage requirements

2012-06-19 Thread Itamar Turner-Trauring
On 06/19/2012 10:43 AM, Vladimir Perić wrote: > 3) apply > > To quote Lennart Regebro, "The Python 2 builtin apply() has been > removed in Python 3. It’s used to call a function, but since you can > call the function directly it serves no purpose and has been > deprecated since Python 2.3." I've re

Re: [Twisted-Python] Python 3 support in Twisted: Request for relaxation of coverage requirements

2012-06-19 Thread Itamar Turner-Trauring
> That said, there are > syntax changes ('except...as...' being the big one) that make supporting > 2.5->3 difficult, and only becomes reasonable at 2.6->3. So it may be > necessary to get 2to3 involved for some fixers. We've dropped support for 2.6 post-12.1. So that's not a problem. We can do

Re: [Twisted-Python] Python 3 support in Twisted: Request for relaxation of coverage requirements

2012-06-19 Thread Itamar Turner-Trauring
> Le Jun 19, 2012 à 10:50 AM, Itamar Turner-Trauring a > écrit : > >> We've dropped support for 2.6 post-12.1. So that's not a problem. We can >> do these changes now in trunk. > > I really hope you mean 2.5. Sigh. Ye

Re: [Twisted-Python] Python 3 support in Twisted: Request for relaxation of coverage requirements

2012-06-19 Thread Itamar Turner-Trauring
On 06/19/2012 03:01 PM, gelin yan wrote: > > Sigh too, I am still using 2.6.6 & twisted 11.0; however I think it > is not so difficult to migrate to 2.7. > Just to be clear, Python 2.6 is still supported as of 12.1 and will continue to be supported (at the minimum for the next release and proba

Re: [Twisted-Python] Doing HTTP file uploads (multipart forms)

2012-07-06 Thread Itamar Turner-Trauring
On 07/06/2012 07:42 AM, Phil Mayers wrote: > On 06/07/12 10:52, Laurens Van Houtven wrote: >> Aha, okay, so that's that possible culprit off the table. Thanks! >> >> FWIW: Chunked transfer encoding *should* work with twisted.web.server, right? > Good question. Unfortunately the Trac implementation

Re: [Twisted-Python] Logging observers and threads

2012-07-12 Thread Itamar Turner-Trauring
On 07/12/2012 05:17 AM, Tristan Seligmann wrote: > 3) log observers should expect to be inovked in non-reactor threads, > making this a Mantissa bug. > In theory this is the case - the logging howto says "The observer needs to be thread safe if you anticipate using threads in your program." The A

Re: [Twisted-Python] How to best log server/client interactions from a test?

2012-07-16 Thread Itamar Turner-Trauring
On 07/16/2012 09:40 AM, Dan Milstein wrote: > To be clear: my current interest is really just doing this during unit > tests/ongoing development (e.g. not diagnosing prod issues, where > Wireshark would make plenty of sense). So something integrated into > Twisted feels natural. > > That said,

Re: [Twisted-Python] Twisted 12.0.0 - Facing Issue in SSL/TLS connection setup

2012-07-17 Thread Itamar Turner-Trauring
On 07/17/2012 06:42 AM, Guru Prasad wrote: > : File > "/usr/local/lib/python2.7/dist-packages/gnutls/interfaces/twisted/__init__.py", > > line 322, in loseConnection > : tcp.Server.loseConnection(self, reason) > : TypeError: loseConnection() takes exactly 1 argument (2 given) > > Anyone el

Re: [Twisted-Python] unit testing question: twisted with tk

2012-07-18 Thread Itamar Turner-Trauring
On 07/18/2012 01:01 PM, Russell E. Owen wrote: > I have a bit of code that combines twisted with Tkinter > and now I'd like to write some unittests for it. > > I can't seem to figure out how to get TwistedTrial to handle this case. > I've written a unit test like this: > > from twisted.trial import

Re: [Twisted-Python] A few simple questions

2012-07-18 Thread Itamar Turner-Trauring
On 07/18/2012 01:31 PM, Russell E. Owen wrote: > If there is a "best practices for error handling" document I'd love to > read it. I found an overview of deferreds that was helpful. It pointed > out that addCallbacks is not the same as addCallback followed by > addErrback and I'm not sure I'm handl

Re: [Twisted-Python] Effects of backlog parameter on listenTCP

2012-07-18 Thread Itamar Turner-Trauring
On 07/18/2012 07:43 PM, Tobias Oberstein wrote: > Could someone shortly elaborate on the semantics / effect of the parameter > "backlog" with listenTCP? > > The docs say: "size of the listen queue". > > Is that a tunable within Twisted? > > I mean, there are kernel parameters for queue sizes of no

Re: [Twisted-Python] i want to update 1000 devices running as servers

2012-07-20 Thread Itamar Turner-Trauring
On 07/20/2012 04:26 AM, Luka Rahne wrote: > for each line in sx: > encode line whit extra data in packet (packet is like len + encrypted_) > Send packet over UDP (tcp not supported) > wait for ACK ("OK" packet in my example) > wait for 0.05 s (not in included example) > > > I d

Re: [Twisted-Python] Ping on Ticket

2012-07-23 Thread Itamar Turner-Trauring
On 07/23/2012 09:54 AM, Dan Milstein wrote: > Just wanted to make sure I followed the proper steps. Two weeks ago, I > submitted a patch to an existing bug in twisted.mail.imap4, along with new > tests + a description of what I did: > > http://twistedmatrix.com/trac/ticket/4080 > > Is there anyt

Re: [Twisted-Python] SMTP authentication

2012-07-24 Thread Itamar Turner-Trauring
n that CRAM-MD5 is a problem with this particular server, filing a ticket for that on http://twistedmatrix.com might be nice. -- Itamar Turner-Trauring, Future Foundries LLC http://futurefoundries.com/ — Twisted consulting, training and support. ___

Re: [Twisted-Python] SMTP authentication

2012-07-24 Thread Itamar Turner-Trauring
On Tue, Jul 24, 2012 at 6:54 AM, Phil Mayers wrote: > IIRC the Twisted SMTP stuff has support for handling auth errors and > trying other methods; it should "just work". > The code is a bit convoluted, so I can't be sure without more time than I want to spend on it, but I wouldn't expect it to tr

Re: [Twisted-Python] SMTP authentication

2012-07-24 Thread Itamar Turner-Trauring
On Tue, Jul 24, 2012 at 9:54 AM, Phil Mayers wrote: > On 24/07/12 14:29, Itamar Turner-Trauring wrote: > > > 3. The SMTP server's CRAM-MD5 implementation is buggy. > > If I understand the issue correctly, this is the case. The server > incorrectly advertises CRAM-MD5, b

Re: [Twisted-Python] SMTP authentication

2012-07-24 Thread Itamar Turner-Trauring
On Tue, Jul 24, 2012 at 10:16 AM, Sarah Addis wrote: > Ok.. so I have found this piece of code in my smtp.py file: > > def _registerAuthenticators(self): > # Register Authenticator in order from most secure to least secure > > self.registerAuthenticator(CramMD5ClientAuthenticator(self

Re: [Twisted-Python] stopping a twistd daemon: SIGTERM or SIGKILL

2012-07-25 Thread Itamar Turner-Trauring
ould be helpful, since you won't actually see the final reactor shutdown message ("Main loop terminated."). -- Itamar Turner-Trauring, Future Foundries LLC http://futurefoundries.com/ — Twisted consulting, training and support. ___ Twisted-

Re: [Twisted-Python] Deferreds and progress

2012-07-26 Thread Itamar Turner-Trauring
On Thu, Jul 26, 2012 at 1:51 PM, Tobias Oberstein < tobias.oberst...@tavendo.de> wrote: > With Twisted, a Deferred can have it's callback only triggered once. > > ** ** > > With Deferreds in popular JavaScript libraries (when.js, jQuery Deferred, > upcoming JS PromiseA proposal), > > there

Re: [Twisted-Python] Deferreds and progress

2012-07-26 Thread Itamar Turner-Trauring
, if you want something super simple, you can implement if you want for your code only. -- Itamar Turner-Trauring, Future Foundries LLC http://futurefoundries.com/ — Twisted consulting, training and support. ___ Twisted-Python mailing list Twisted-Python@

Re: [Twisted-Python] [RFC] Introducing six as a dependency

2012-07-26 Thread Itamar Turner-Trauring
On Thu, Jul 26, 2012 at 3:06 PM, Kevin Horn wrote: > > This is only accurate to within a first approximation, but... pip does not >> work for Windows users. >> > > > Um, howso? I use it all the time, including for installing Twisted. > Unless you mean it doesn't work fro installing twisted for

Re: [Twisted-Python] How to deal with deferreds across several layers of namespaces?

2012-08-17 Thread Itamar Turner-Trauring
ossibly wasting resources) unless you cancel them in response to the connectionLost() call. Can you give a tiny code example, perhaps, demonstrating the kind of Deferred management problem you're having? -- Itamar Turner-Trauring, Future Foundries LLC http://future

[Twisted-Python] To those who are about to sprint

2012-08-18 Thread Itamar Turner-Trauring
mmits are spread out. 2. If you're just doing some initial cross-platform testing using force-builds.py, use the command line option that lets you run only some of the tests (e.g. "twisted.web" or "twisted.python.test.test_versions") instead of running the whole

Re: [Twisted-Python] Profiling problem: "bad marshal data"

2012-09-04 Thread Itamar Turner-Trauring
=cprofile or --profiler=profile. -- Itamar Turner-Trauring, Future Foundries LLC http://futurefoundries.com/ — Twisted consulting, training and support. ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mail

Re: [Twisted-Python] Fitting cred into my application

2012-09-22 Thread Itamar Turner-Trauring
nt XMLRPC objects. Alternatively, the XMLRPC layer could log-in to the portal, in which case it would get back different business logic objects with different capabilities. An example of a full setup is twisted.protocols.ftp combined with twisted.tap.ftp, the ftp plugin for twistd, but the detai

Re: [Twisted-Python] Fitting cred into my application

2012-09-23 Thread Itamar Turner-Trauring
just add a Portal to the XML-RPC object, rather than the Site. I'll try to write some example code later today, if I have time. -- Itamar Turner-Trauring, Future Foundries LLC http://futurefoundries.com/ — Twisted consulting, training and support. ___

Re: [Twisted-Python] Fitting cred into my application

2012-09-23 Thread Itamar Turner-Trauring
Attached find an example server, and a client demonstration - it's only very lightly tested, so likely wrong or buggy somewhere. I didn't bother to implement sessions, so you need to login with every command if you want extended access. -- Itamar Turner-Trauring, Future Foundrie

Re: [Twisted-Python] unhandled exception in deferred has a delayed logging ?

2012-09-26 Thread Itamar Turner-Trauring
d # remove extra reference that prevents garbage collection http://bit.ly/NS6ptj explains the issue. -- Itamar Turner-Trauring, Future Foundries LLC http://futurefoundries.com/ — Twisted consulting, training and support. ___ Twisted-Python mailing list

Re: [Twisted-Python] Twisted + Redis-py + Connection Pooling

2012-09-28 Thread Itamar Turner-Trauring
dis client that supports Twisted directly. -- Itamar Turner-Trauring, Future Foundries LLC http://futurefoundries.com/ — Twisted consulting, training and support. ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/

Re: [Twisted-Python] dynamic FTP realm

2012-09-30 Thread Itamar Turner-Trauring
If you're using Twisted's web clients (getPage or the more complex but superior Agent) you do not need threads, Twisted will do the networking in a non-blocking manner. E.g. def list(self, path): return twisted.web.client.getPage(...).addCallback(convertHTTPResponseToFTPListing) --

Re: [Twisted-Python] dynamic FTP realm

2012-10-01 Thread Itamar Turner-Trauring
rnally? or is this something Agent > could deal with? > Agent could certainly deal with this; alternatively, if you're using a blocking API you could use deferToThread (make sure the function you call that way doesn't touch any global state or call any Twisted APIs.) --

Re: [Twisted-Python] Consensus on how to handle "MySQL server has gone away"

2012-10-03 Thread Itamar Turner-Trauring
On 10/03/2012 04:28 AM, Phil Mayers wrote: > I think the behaviour it should be aiming for is clear: > 1. Test each connection with "good_sql" before beginning the user > interaction/query The problem is that this adds latency; this can add up to quite a slowdown if your database server is on a

[Twisted-Python] If you can read this, the mailing list is working again

2012-10-15 Thread Itamar Turner-Trauring
We've been having some delivery issues, if this arrives in your inbox then probably the mailing list is working again. -Itamar ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-pyth

Re: [Twisted-Python] Adding mock as a test suite dependency

2012-10-22 Thread Itamar Turner-Trauring
getting Twisted installed. > A testing dependency isn't quite as problematic as a regular dependency; you'd only need to install it if you wanted to run Twisted's test suite, which probably most users do not bother with. -- Itamar Turner-Trauring, Future Foundries LLC http://futurefo

Re: [Twisted-Python] Running twisted test suite produces errors and hangs

2012-10-23 Thread Itamar Turner-Trauring
//pastebin.com/6065dX6a > Which operating system, and what sort of environment? The UDP failures suggest some sort of firewalling. -- Itamar Turner-Trauring, Future Foundries LLC http://futurefoundries.com/ — Twisted consulting, training and support.

<    1   2   3   4   5   >