[Twisted-Python] irc DCC file receive, error: invalid argument

2015-05-23 Thread peter
hi, found this code online: http://paste.pound-python.org/show/zeavfM7XjrXL2psPWxlv/ added some print statements and changed the logging to private/channel. if i send the xdccbot a file from a second irc connection (x-chat) i get this error: 2015-05-23 22:30:01,384 : Bot connection made 201

[Twisted-Python] irc bot, reacting to: irc_ERR_NOSUCHNICK. after the code where the reactor was started

2015-10-05 Thread peter
my bot inherits from irc.IRCClient, when it sends a message to another user who isnt online irc_ERR_NOSUCHNICK(self, prefix, command) is called. how can i react to that message, my code is called with: class mybot(irc.IRCClient): ... if __name__ == "__main__": factory = XdccBotFactory( cha

[Twisted-Python] irc bot, reacting to: irc_ERR_NOSUCHNICK. after the code where the reactor was started

2015-10-05 Thread peter
my bot inherits from irc.IRCClient, when it sends a message to another user who isnt online irc_ERR_NOSUCHNICK(self, prefix, command) is called. how can i react to that message, my code is called with: class mybot(irc.IRCClient): ... if __name__ == "__main__": factory = XdccBotFactory( cha

Re: [Twisted-Python] irc bot, reacting to: irc_ERR_NOSUCHNICK. after the code where the reactor was started

2015-10-06 Thread peter
On 10/05/2015 11:12 PM, Glyph Lefkowitz wrote: On Oct 5, 2015, at 2:33 AM, peter <mailto:commercial...@yahoo.de>> wrote: my bot inherits from irc.IRCClient, when it sends a message to another user who isnt online irc_ERR_NOSUCHNICK(self, prefix, command) is called. how can i reac

Re: [Twisted-Python] irc bot, reacting to: irc_ERR_NOSUCHNICK. after the code where the reactor was started

2015-10-07 Thread peter
On 10/07/2015 09:49 AM, Glyph Lefkowitz wrote: On Oct 6, 2015, at 11:38 PM, peter <mailto:commercial...@yahoo.de>> wrote: im sure youre solution is just fine, could you show me how you would contruct isBotOnline? im assuming that code would go into the class "m

[Twisted-Python] dcc, idea for file resume

2015-10-12 Thread peter
hi, the way file resume is implemented in DccFileReceive requires to user to determine the file size manually and set _resumeOffset. wouldnt it make sene to just kill the last few bytes of the file and resume it? below is the current connectionMade method from: http://twistedmatrix.com/trac/

Re: [Twisted-Python] dcc, idea for file resume

2015-10-21 Thread peter
On 10/13/2015 02:51 AM, Glyph Lefkowitz wrote: On Oct 12, 2015, at 11:01 AM, peter <mailto:commercial...@yahoo.de>> wrote: hi, the way file resume is implemented in DccFileReceive requires to user to determine the file size manually and set _resumeOffset. wouldnt it make sene to

[Twisted-Python] questions about deferreds and code structure

2015-10-22 Thread peter
hi, i would like todo a few operations for a bunch of irc servers, basically all thats done in main for a list of ips. heres what i came up with (this does not contain the actual class that inherits from irc.IRCClient code) questions (i will refer to the pb.codehash.net for line numbers) 1

[Twisted-Python] twisted.web response.py questions

2015-11-29 Thread peter
hi, looking over: https://twistedmatrix.com/documents/14.0.2/_downloads/response.py im not really sure why one would use the line: self.remaining = 1024 * 10 this suggest to me that one knew what kind of page size was expected...but what if you dont? wouldnt it make more sense to use

[Twisted-Python] twisted.web response.py questions

2015-12-04 Thread peter
hi, looking over: https://twistedmatrix.com/documents/14.0.2/_downloads/response.py im not really sure why one would use the line: self.remaining = 1024 * 10 this suggest to me that one knew what kind of page size was expected...but what if you dont? wouldnt it make more sense to use

[Twisted-Python] When would you considering split a server application to some physical instance with different logic function?

2008-12-01 Thread Peter Cai
Hi all, First, I am sorry because it's not a question related to twisted. But since twisted is a networking programming framework, you might be interested. Some of my colleagues have a view that a net work server should be split to small parts with different functions, either with processes comm

Re: [Twisted-Python] SQLAlchemy and Twisted

2009-02-13 Thread Peter Cai
Hi, Thanks for this insightful comments on Sqlalchmy and Twisted. I hope I had read your mail before I start my current project. At that time, I simply thought using deferToThread would solve everything since the twisted.enterprise.adbapi simply use threads.deferToThreadPool to make database in

[Twisted-Python] Using sqlalchemy in twisted.

2009-03-04 Thread Peter Cai
Hi, all I am using sqlalchemy in twisted in my project in the way below. Defer any database operation so the twisted's main thread won't be blocked. And I use scoped_session, so that sessions won't have to be created again and again. == class Database() de

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

2009-03-04 Thread Peter Cai
;t give up orm as these mapper classes are used everywhere in my application. On Thu, Mar 5, 2009 at 3:04 AM, Valentino Volonghi wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > > On Mar 4, 2009, at 3:28 AM, Peter Cai wrote: > > The code d

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

2009-03-04 Thread Peter Cai
I changed my code to this style, it works again. This code would create a new session on each request and close it immediately. Hope this trick could save me! #= def require_session(f): '''create and close session for each synchronous method''' de

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

2009-03-11 Thread Peter Cai
Hi, I've read some mails in this list that recommend use sqlalchemy in separate processes. But if u use multiprocessing which provides only synchronous API, doesn't you have to use deferToThread also? Another way would be using "twisted.internet.protocol.ProcessProtocol", which use pipes. But ca

Re: [Twisted-Python] Noob Question

2009-03-14 Thread Peter Sabaini
> int(m.group(1)) 123 No? If its a binary protocol, look at the struct module and the functions pack() and unpack() hth, peter. signature.asc Description: This is a digitally signed message part. ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Re: [Twisted-Python] Noob Question

2009-03-14 Thread Peter Sabaini
On Saturday 14 March 2009 19:54:04 Shelby Ramsey wrote: > Peter, > > Thanks for the quick response. The issue isn't grabbing the content length > ... but rather grabbing the body ... > > The protocol is TCP so the text (not binary) comes in streams ... so the > body

Re: [Twisted-Python] Noob Question

2009-03-14 Thread Peter Sabaini
On Saturday 14 March 2009 22:12:49 Shelby Ramsey wrote: > Peter, > > Thanks for the help. Yes I get a header and then am looking to extract the > body. > > So to make sure I understand: > > p = compile('Content-Length:\s(\d+)') Of course I dont know anythin

Re: [Twisted-Python] Noob Question

2009-03-15 Thread Peter Sabaini
On Sunday 15 March 2009 14:55:25 Shelby Ramsey wrote: > Peter, > > Thanks for the assistance. I think you and David have me on the right > path. Just to clarify the protocol looks like this: > > Content-Length: 984 > Content-Type: text/event-xml > > > >$

[Twisted-Python] How to split a huge 'service' class.

2009-03-25 Thread Peter Cai
Hi all, I am writing a network application based on twisted and following the "finger service" tutorial in twisted document. I wrote multiple protocols classes and a single service class. This allows client to choose the most suitable protocol to access services. My problem is : the service class

[Twisted-Python] Incorrect "Another twistd server is running..."

2009-07-21 Thread Peter Cai
When my server reboot after an unexpected power cut, supervisord tried to start a twisted app after an unexpected power cut, but it fails because "Another twistd server is running, PID 4607" 4607 is the PID of the twisted app before power cut. After I stopped and restart supervisord, everything is

[Twisted-Python] How to debug an AMP connection?

2009-07-24 Thread Peter Westlake
ssages in the log. That's consistent with the Deferred not firing, because the error callback (self.next_or_retry) would log a message if the remote command failed. So, what can possibly be happening? And how can I find out? All suggestions most gratefully received. Peter. Client-side code

Re: [Twisted-Python] How to debug an AMP connection?

2009-07-24 Thread Peter Westlake
On Fri, 24 Jul 2009 10:44 -0400, "Drew Smathers" wrote: > On Fri, Jul 24, 2009 at 9:35 AM, Peter Westlake > wrote: > > Hello, > > > > I'm having trouble with an AMP connection that doesn't fire > > the Deferred returned by callRemote. The AMP

Re: [Twisted-Python] How to debug an AMP connection?

2009-07-24 Thread Peter Westlake
On Fri, 24 Jul 2009 12:01 -0400, "Jean-Paul Calderone" wrote: > On Fri, 24 Jul 2009 16:12:28 +0100, Peter Westlake > wrote: > >> In general, though, if you're trying to debug Deferreds you might > >> try setting debugging with defer.setDebugging(1

Re: [Twisted-Python] How to debug an AMP connection?

2009-08-05 Thread Peter Westlake
en tracing it. At this point, I'm stuck! If there isn't a solution to this, the only answer will be to time out and retry the command. But since TCP connections are meant to be reliable (or to give an error if they fail), I hope it won't come to that. Peter. ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Re: [Twisted-Python] How to debug an AMP connection?

2009-08-10 Thread Peter Westlake
nection I was tracing. There would have been very much more log data otherwise. It makes a big difference being able to see values of variables without having to add new log statements and spend another working day waiting for the bug. Whoever invented it - thank you! Peter. ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

[Twisted-Python] Is there an equivalent of tap2deb?

2009-09-04 Thread Peter Westlake
Now that .tap files are obsolete, is there a supported way of making Debian packages like tap2dep? Thanks, Peter. ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Re: [Twisted-Python] Is there an equivalent of tap2deb?

2009-09-04 Thread Peter Westlake
On Sat, 05 Sep 2009 00:29 +1000, "Tim Allen" wrote: > On Fri, Sep 04, 2009 at 02:53:37PM +0100, Peter Westlake wrote: > > Now that .tap files are obsolete, is there a supported way of making > > Debian packages like tap2dep? > > .tap files (Pickle-based config file

Re: [Twisted-Python] PB/Remote Object/Deferred question

2009-09-09 Thread Peter Westlake
, and d2 fires. It doesn't have any callbacks (that you know about, at least) so it returns the value. The code of Deferred.callback that previously stashed d2 notices that it has fired, picks up the value and passes it along the next callback in d's chain, the lambda echo. Regards, Peter. ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

[Twisted-Python] Using sqlalchemy in twisted.

2009-11-11 Thread Peter Cai
If you Google "sqlalchemy twisted", you can see my post is on the top: http://groups.google.com/group/sqlalchemy/browse_thread/thread/c802749c9d0dd6 I've been busy for a long time so I didn't considered this question anymore. But occasionally, I got some new ideas today. I was suggested to sand

[Twisted-Python] My twisted application could not start after reboot be cause of "twistd.pid"

2010-03-15 Thread Peter Cai
Someone turn off the server by cutting power of the server. When the machine is power on, I found my twisted application could not start and emit the following error. Another twistd server is running, PID 3398 This could either be a previously started instance of your application or a different a

Re: [Twisted-Python] My twisted application could not start after reboot be cause of "twistd.pid"

2010-03-16 Thread Peter Cai
Mar 15, 2010 at 06:32:23PM +0800, Peter Cai wrote: > > Someone turn off the server by cutting power of the server. > > When the machine is power on, I found my twisted application could not > start > > and emit the following error. > > > > Another twistd server is ru

Re: [Twisted-Python] How to use AmpList?

2010-03-29 Thread Peter Westlake
known at run-time. Your code might not need to do any of that. First, the command: class RunCmd(amp.Command): arguments = [..., ('env', amp.AmpList([('var', amp.String()), ('val', amp.String())])), .

[Twisted-Python] Comparing "Stackless Python + Nonblocking Stackless Modules" with Twisted.

2010-05-09 Thread Peter Cai
Today, a guy gave me an URL http://code.google.com/p/stacklessexamples/wiki/StacklessNonblockModules It's a replacement of standard python socket module. What make it different is that this module only blocks a tasklet, not an entire Python thread. With this module and stackless python, theoretic

Re: [Twisted-Python] Comparing "Stackless Python + Nonblocking Stackless Modules" with Twisted.

2010-05-09 Thread Peter Cai
On Mon, May 10, 2010 at 8:17 AM, Andrew Francis wrote: > Hi Peter: > I think things get more complex when one is dealing with multiple end-points > in sequence (now callbacks are chained) or one is using iterators > (cooperators/coiterators now needed?). What light-weight thread

Re: [Twisted-Python] ANNOUNCING Tahoe, the Least-Authority File System, v1.7.0

2010-06-22 Thread Peter Westlake
build? I can't afford to move to 10.0 until I've had time to track down a certain bug that appeared between 2.5.0 and version 8. Peter. ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Re: [Twisted-Python] ANNOUNCING Tahoe, the Least-Authority File System, v1.7.0

2010-06-27 Thread Peter Westlake
[resending after the glitch with the domain] On Thu, 24 Jun 2010 18:34 -0700, "Zooko O'Whielacronx" wrote: > On Tue, Jun 22, 2010 at 10:35 AM, Peter Westlake > wrote: > > > > I downloaded it and typed "python setup.py build", and it went off and

Re: [Twisted-Python] ANNOUNCING Tahoe, the Least-Authority File System, v1.7.0

2010-06-29 Thread Peter Westlake
On Mon, 28 Jun 2010 21:41 -0600, "Zooko O'Whielacronx" wrote: > On Sun, Jun 27, 2010 at 4:04 AM, Peter Westlake > wrote: > > > >> python -c "import pkg_resources;print pkg_resources.require('Twisted')" > > > > It says:

Re: [Twisted-Python] ANNOUNCING Tahoe, the Least-Authority File System, v1.7.0

2010-06-29 Thread Peter Westlake
ation of the Tahoe-LAFS apt > repository. Maybe it was temporarily down when you tried to apt-get > update? > > Let's take it to the tahoe-...@tahoe-lafs.org list. Okay - see you there! Thanks, Peter. ___ Twisted-Python mailing lis

[Twisted-Python] Problem with twistedmatrix.com

2010-07-05 Thread Peter Westlake
Some of twistedmatrix.com is working, but the top level (http://twistedmatrix.com/) says "Could not connect", and the Subversion repository does the same: svn checkout svn://svn.twistedmatrix.com/svn/Twisted svn: Can't connect to host 'svn.twistedmatrix.com':

Re: [Twisted-Python] Problem with twistedmatrix.com

2010-07-05 Thread Peter Westlake
It's all working again now. On Mon, 05 Jul 2010 13:22 +0100, "Peter Westlake" wrote: > Some of twistedmatrix.com is working, but the top level > (http://twistedmatrix.com/) says "Could not connect", and the Subversion > repository does the same: > > svn

[Twisted-Python] LDAP binds appears to succeed with no password

2010-07-30 Thread Peter Westlake
I'm using LDAP to authenticate users, and when I give it an empty password, it appears to succeed! Can anyone see what I'm doing wrong? I've added comments by the log messages that appear in the output. Peter. from twisted.internet import reactor, defer from ldaptor.protoc

Re: [Twisted-Python] LDAP binds appears to succeed with no password

2010-07-30 Thread Peter Westlake
On Fri, 30 Jul 2010 13:55 +0200, "Alan Franzoni" wrote: > On 7/30/10 12:54 PM, Peter Westlake wrote: > > I'm using LDAP to authenticate users, and when I give it an empty > > password, it appears to succeed! Can anyone see what I'm doing wrong? > > I&#

[Twisted-Python] How to bisect Twisted?

2010-08-11 Thread Peter Westlake
h for "git bisect" to work with. I'm trying to trace a bug that wasn't in 2.5.0 but is in 8.0.0; what arguments should I give to bisect? Apologies if this is obvious to anyone who knows how to use git, but I'm just a beginner. Thanks, Peter. ___

Re: [Twisted-Python] How to bisect Twisted?

2010-08-12 Thread Peter Westlake
On Wed, 11 Aug 2010 17:50 +0100, "Jonathan Lange" wrote: > On Wed, Aug 11, 2010 at 5:30 PM, Peter Westlake > wrote: > > In the Git version of the Twisted source code, there are tags for > > releases, e.g. the revision with SHA id > > 85a6a0f9e3c4ea22d1d72d4ca8e

Re: [Twisted-Python] How to bisect Twisted?

2010-08-12 Thread Peter Westlake
On Thu, 12 Aug 2010 12:49 +1000, "Tim Allen" wrote: > On Wed, Aug 11, 2010 at 05:30:36PM +0100, Peter Westlake wrote: > > In the Git version of the Twisted source code, there are tags for > > releases, e.g. the revision with SHA id > > 85a6a0f9e3c4ea22d1d72d4ca8eb0c

Re: [Twisted-Python] Missing connections with Perspective Broker ( newbie alert )

2010-11-30 Thread Peter Westlake
d 8.x. Any pointers? I've seen strange sporadic errors with networking in 8.x that weren't there in 2.5.0, so would you be able to test it with 2.5.0? Peter. ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

[Twisted-Python] Screen clearing in the Manhole

2015-08-25 Thread Peter Westlake
. So far I can't find where in the code this happens. Is there a way to print a message and not have it scrolled off the screen? Thanks, Peter. ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Re: [Twisted-Python] Screen clearing in the Manhole

2015-08-26 Thread Peter Westlake
ich calls HistoricRecvLine.connectionMade, which calls RecvLine.connectionMade, which resets the screen exactly as you say. Then, after the screen has been reset, I print the message. But then the screen is cleared a second time! Peter. ___ Twisted-Python mailing lis

Re: [Twisted-Python] Screen clearing in the Manhole

2015-08-26 Thread Peter Westlake
ur symptoms. > > See ticket # 7514: https://twistedmatrix.com/trac/ticket/7514 This does sound like a scary bug, especially on a real terminal, but I tried your patch and it didn't affect my symptom of the screen being cleared again. That's more about "when" rather than &qu

Re: [Twisted-Python] Screen clearing in the Manhole

2015-08-26 Thread Peter Westlake
on is made, I'm not sure that much can be done about this. I was able to make my message stay visible by overriding terminalSize with a version that didn't erase, but that isn't very clean or general. Peter. ___ Twisted-Python mailing

[Twisted-Python] Asynchronous code in a context manager

2018-03-23 Thread Peter Westlake
ect that this is the case! Peter. ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com https://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Re: [Twisted-Python] Asynchronous code in a context manager

2018-03-26 Thread Peter Westlake
Sadly, no. Should have said, sorry: it's 2.7.3. Peter. On Fri, 23 Mar 2018, at 17:54, meejah wrote: > > Are you using Python3? Then there's "asynchronous context managers". I > finally found a use-case for one in txtorcon, so here's an example: > >

[Twisted-Python] Negative error code breaks twisted.conch

2019-01-14 Thread Peter Westlake
around the error by doing that in a copy of _dumbwin32proc.py which was copied into the project (historical reasons, don't ask) but it would be nice to have a proper upstream fix. Not least because I want to purge the copied-in file, as you can imagine. Peter.

Re: [Twisted-Python] Negative error code breaks twisted.conch

2019-01-15 Thread Peter Westlake
Thank you! Filed: https://twistedmatrix.com/trac/ticket/9573 I'll go off and read about submitting a fix now. Peter. On Tue, 15 Jan 2019, at 07:41, Glyph wrote: > > >> On Jan 14, 2019, at 7:23 AM, Peter Westlake >> wrote:>> >> An SSCCE: >> >

[Twisted-Python] ClientFactory design

2020-11-30 Thread Peter Westlake
I'm studying an SSH client implementation using Conch, and was surprised to see that the ClientFactory subclass had a connect() method which calls connectTCP. This isn't really a problem - the code works - but it seems like an odd place to do the connection. Am I right to be surpris

Re: [Twisted-Python] ClientFactory design

2020-11-30 Thread Peter Westlake
On Mon, 30 Nov 2020, at 13:38, Jean-Paul Calderone wrote: > On Mon, Nov 30, 2020 at 6:48 AM Peter Westlake > wrote: >> __ >> I'm studying an SSH client implementation using Conch, and was surprised to >> see that the ClientFactory subclass had a connect() method whi

[Twisted-Python] Ldaptor attributes in Python 3

2021-01-22 Thread Peter Westlake
way? I've also found that the items() method gives something more tractable: >>> entry.items() [ (b'cn', b'Peter Westlake'), ... ] so I can turn that into a dict and index that. But again, this seems like an odd design for an API. Is

Re: [Twisted-Python] Ldaptor attributes in Python 3

2021-01-23 Thread Peter Westlake
On Sat, 23 Jan 2021, at 22:09, Adi Roiban wrote: > Hi, > > On Fri, 22 Jan 2021 at 11:15, Peter Westlake wrote: >> I'm using Ldaptor for LDAP access because it fits in with Twisted, and the >> results are a bit mystifying. >> ... > > Can you send a full exa

[Twisted-Python] Strange recursion error with twisted.web

2021-03-09 Thread Peter Westlake
might explain why I only see the error on the first visit to the page (as far as I can tell). The system recursion limit is the standard 1000. My HTML is only nested a few tags deep, two orders of magnitude short of that. Is there anything about the way flatten() works that might cause th

Re: [Twisted-Python] Strange recursion error with twisted.web

2021-03-09 Thread Peter Westlake
On Tue, 9 Mar 2021, at 19:28, Glyph wrote: > > > > On Mar 9, 2021, at 4:54 AM, Peter Westlake wrote: > > > > I'm getting a "maximum recursion depth exceeded" error that appears to be > > coming from flatten(). The odd thing is that it only hap

Re: [Twisted-Python] Strange recursion error with twisted.web

2021-03-10 Thread Peter Westlake
On Tue, 9 Mar 2021, at 19:28, Glyph wrote: > > > > On Mar 9, 2021, at 4:54 AM, Peter Westlake wrote: > > > > I'm getting a "maximum recursion depth exceeded" error that appears to be > > coming from flatten(). The odd thing is that it only

Re: [Twisted-Python] Strange recursion error with twisted.web

2021-03-11 Thread Peter Westlake
/trac/ticket/10125#ticket thanks, Peter. ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com https://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Re: [Twisted-Python] Strange recursion error with twisted.web

2021-03-16 Thread Peter Westlake
Excellent, thank you! I think I understand how it works, but one thing puzzles me: how does the queue in the jump() function ever get longer than one element? Is it because it might contain a recursive call, which is activated by the unpause()? Peter.

Re: [Twisted-Python] Strange recursion error with twisted.web

2021-03-17 Thread Peter Westlake
On Wed, 17 Mar 2021, at 02:50, Glyph wrote: > >> Excellent, thank you! >> >> I think I understand how it works, but one thing puzzles me: how does the >> queue in the jump() function ever get longer than one element? Is it because >> it might contain a recursive call, which is activated by the

Re: [Twisted-Python] Strange recursion error with twisted.web

2021-06-14 Thread Peter Westlake
Hello Twisted team, Do we have any idea when the fix for "RecursionError with synchronous deferreds (#1549)" will appear in a release? Peter.___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com https://twistedmatrix.com/cgi-b

Re: [Twisted-Python] Strange recursion error with twisted.web

2021-06-15 Thread Peter Westlake
On Tue, 15 Jun 2021, at 01:58, Wim Lewis wrote: > On Mon, Jun 14, 2021 at 05:25:42PM +0100, Peter Westlake wrote: > > Do we have any idea when the fix for "RecursionError with synchronous > > deferreds (#1549)" will appear in a release? > > It's been merg

Re: [Twisted-Python] Strange recursion error with twisted.web

2021-06-16 Thread Peter Westlake
Works a treat! Thank you! Peter. On Tue, 15 Jun 2021, at 18:51, Tom Most wrote: > On Tue, Jun 15, 2021, at 2:46 AM, Peter Westlake wrote: > > On Tue, 15 Jun 2021, at 01:58, Wim Lewis wrote: > > > On Mon, Jun 14, 2021 at 05:25:42PM +0100, Peter Westlake wrote: > > > >

Re: [Twisted-Python] Strange recursion error with twisted.web

2021-06-16 Thread Peter Westlake
And just to be clear, yes, it fixes my bug too. Peter. On Wed, 16 Jun 2021, at 12:30, Peter Westlake wrote: > Works a treat! Thank you! > > Peter. > > On Tue, 15 Jun 2021, at 18:51, Tom Most wrote: > > On Tue, Jun 15, 2021, at 2:46 AM, Peter Westlake wrote: > > >

Re: [Twisted-Python] Deferred documentation.

2011-03-29 Thread Peter Hogg
I haven't been following the thread, but just wanted to mention something that caught me out when I was learning to use deferreds. Both the old deferred documentation and your fix-up fail to mention addCallbacks() until near the end, when in practice I find addCallbacks() to be much more useful

Re: [Twisted-Python] Ideas for a Twisted Training

2011-06-17 Thread Peter Inglesby
> > > Will there be a Twisted table at PyBeer/PyFiorentina? :) > > If so, I'll be there! ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

[Twisted-Python] twisted.enterprise.adbapi broken by loss of python-pgsql

2011-10-17 Thread Peter Westlake
txPostgres? http://twistedmatrix.com/trac/ticket/4397 Peter. ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Re: [Twisted-Python] twisted.enterprise.adbapi broken by loss of python-pgsql

2011-10-17 Thread Peter Westlake
e > user to specify which module to use. Oh, I see! I saw the error message coming from t.e.a and deduced, wrongly, that it imported it directly! The fact that the Debian python-twisted package doesn't depend on python-pgsql should have given me a clue. Thank you for the retroactive fix!

[Twisted-Python] Speed of rendering?

2012-06-21 Thread Peter Westlake
ested specifically in what happens between the end of beforeRender and the request being completed. It takes about a minute and a quarter. Is that normal, or is there a delay in my code that I haven't found yet? Thanks, Peter. ___ Twisted-Python mailing li

Re: [Twisted-Python] Speed of rendering?

2012-06-22 Thread Peter Westlake
On Thu, Jun 21, 2012, at 10:16, Glyph wrote: > > Le Jun 21, 2012 à 6:52 AM, Peter Westlake a > écrit : > > > How fast is rendering in nevow? I have a page which is mostly a large > > table with a couple of hundred rows, each containing a form. The > > generated

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

2012-09-03 Thread Peter Westlake
cProfile.run() can be read. Running twistd without --savestats generates a valid-looking textual report. This is Python 2.7.3, Twisted 12.0.0, on Debian. Peter. ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi

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

2012-09-05 Thread Peter Westlake
On Wed, Sep 5, 2012, at 02:26, Itamar Turner-Trauring wrote: > On Mon, Sep 3, 2012 at 12:10 PM, Peter Westlake > wrote: > > > An output file generated with cProfile.run() can be read. > > Running twistd without --savestats generates a valid-looking > > textual r

[Twisted-Python] Request for help: throttling serving of static content

2012-11-05 Thread Peter Inglesby
Tomorrow I'm giving a talk to provide an introduction to asynchronous programming. I'll be mentioning Twisted in passing, but the meat of the talk will be about writing a web crawler for finding broken links, first using single-threaded blocking code, then multi-threaded blocking code, before demo

Re: [Twisted-Python] Request for help: throttling serving of static content

2012-11-05 Thread Peter Inglesby
Thanks for the responses. I'll see what I can do about tracking down the problem. In the meantime, I'll give dragnet a look. ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-pytho

[Twisted-Python] Must avatarId always be a string?

2013-01-09 Thread Peter Westlake
ation. Until I read that doc I was happily passing back the tuple of LDAP details as an avatarId, and it all works perfectly well. Is it really wrong, and if so, how will it fail? And what should I do instead to pass back the details? Peter. ___ Twisted-P

Re: [Twisted-Python] Must avatarId always be a string?

2013-01-09 Thread Peter Westlake
f doing it. > I have also asked over IRC and I got the good to go answer for using > anything as AvatarID. > > As long as you are only using your custom credentials checkers and > your custom realm, everything should be ok. > > I am using Objects as

Re: [Twisted-Python] Must avatarId always be a string?

2013-01-10 Thread Peter Westlake
On Wed, Jan 9, 2013, at 18:02, Glyph wrote > On Jan 9, 2013, at 9:26 AM, Peter Westlake > wrote: > > On Jan 9, Adi wrote: > >> I am not an expert in Twisted, but from my understanding, the "string" > >> requirement is there to provide a plugable inte

Re: [Twisted-Python] Must avatarId always be a string?

2013-01-14 Thread Peter Westlake
On Sun, Jan 13, 2013, at 6:39, Glyph wrote: > > On Jan 10, 2013, at 6:41 AM, Peter Westlake > wrote: > > > On Wed, Jan 9, 2013, at 18:02, Glyph wrote > >> On Jan 9, 2013, at 9:26 AM, Peter Westlake > >> wrote: > >>> On Jan 9, Adi wrote: &

Re: [Twisted-Python] Must avatarId always be a string?

2013-01-14 Thread Peter Westlake
Interesting... those portals could be on different Realms too. It would also allow more than one checker to be tried per interface, which would allow (say) a credentials.IUsernamePassword to be tried against different checkers. Peter. On Sun, Jan 13, 2013, at 14:08, Itamar Turner-Trauring wrote

Re: [Twisted-Python] Must avatarId always be a string?

2013-01-14 Thread Peter Westlake
On Mon, Jan 14, 2013, at 22:58, Glyph wrote: > On Jan 14, 2013, at 3:18 AM, Peter Westlake > wrote: > > >> It seems like the "shared caching reference" would solve this problem > >> as well? > > > > Yes, I think that's the right answe

Re: [Twisted-Python] So... Python 3.4 is getting its own async I/O system

2013-03-25 Thread Peter Westlake
d threads behind the scenes and returned a Deferred (for small files) or a Protocol (for big ones) would be a nice thing to have. Peter. ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Re: [Twisted-Python] logging

2013-06-18 Thread Peter Westlake
html, there is no mention of logging levels. For that matter it doesn't mention twisted.python.log.msg() either! Peter. ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

[Twisted-Python] ftpclient connection lost callback

2013-09-05 Thread Peter Ryan
itly when the client is closed. Thanks, Peter ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Re: [Twisted-Python] ftpclient connection lost callback

2013-09-05 Thread Peter Ryan
hed quite a bit but I cannot determine a way to register a >> callback for when the TCP transport is actually disconnected. Can anyone >> offer some insight? I'd like to know explicitly when the client is closed. >> >> Thanks, >> >>

[Twisted-Python] Could Service.startService return a Deferred?

2013-11-27 Thread Peter Westlake
t service would only be started up when the Deferred fired. Peter. ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Re: [Twisted-Python] Could Service.startService return a Deferred?

2013-11-27 Thread Peter Westlake
lf.realStartService)) self.baton.addErrback(report) def realStartService(self): print 'realStartService', self.name, reactor.running baton = defer.succeed('pass me to each service') foo = Runner(baton) foo.setName('foo&#

Re: [Twisted-Python] Could Service.startService return a Deferred?

2013-11-28 Thread Peter Westlake
lated in the implementation of Deferred cancellation where > it belongs - eg, with this `deferLater`-based asynchronousness it's > alreay present since deferLater implements cancellation already). I'll add it to my list of things to do one of these years :-) Would you like to put in a ticket with a spec? Thanks for the help, Peter. ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Re: [Twisted-Python] Could Service.startService return a Deferred?

2013-11-28 Thread Peter Westlake
cation.setServiceParent(service) A small detail: should this be service.setServiceParent(application)? Peter. > loading = Runner.initializeFromWhatever("foo") > loading.addCallback(parent) > loading.addCallback(lambda ignored: > Runner.initializeFromWhatever(&

Re: [Twisted-Python] How to get callback return value

2013-12-03 Thread Peter Westlake
addCallback(self.textLabel_Platform.setText) When the callRemote succeeds, it calls the callbacks on the Deferred. First, it passes the return value from the remote call to success(). Then it passes the return value from success() to textLabel_Platform.setText. Peter. ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Re: [Twisted-Python] [RELEASE] Nevow 0.11.1

2014-06-24 Thread Peter Westlake
Good to see Nevow is still being maintained! What are the chances of 0.11.2 including the fix for https://bugs.launchpad.net/nevow/+bug/892794, filed in November 2011 complete with a test case and a patch? Peter. On Sat, Jun 21, 2014, at 15:46, exar...@twistedmatrix.com wrote: > Hello, >

Re: [Twisted-Python] [RELEASE] Nevow 0.11.1

2014-06-25 Thread Peter Westlake
794, filed in November 2011 > >complete with a test case and a patch? > > Issues were migrated to Github as well, fwiw: > > https://github.com/twisted/nevow/issues/11 ... > Meanwhile, Peter, if you turn that patch into a PR then I'll try to > remember to review it soon.

[Twisted-Python] How do I debug this network problem?

2014-11-13 Thread Peter Westlake
el, Python and Twisted versions - but the problem persists. Anyway, I don't want to make the problem go away without understanding it, for fear that it will come back a third time. Peter. ___ Twisted-Python mailing list Twisted-Python@twisted

Re: [Twisted-Python] How do I debug this network problem?

2014-11-13 Thread Peter Westlake
On Thu, 13 Nov 2014, at 13:17, Glyph wrote: > >> On Nov 13, 2014, at 1:15 PM, Peter Westlake >> wrote: >> >> I've had a look at the code, and got rather lost amongst the >> interfaces and inheritance and protocols and transports. If someone >> can h

Re: [Twisted-Python] How do I debug this network problem?

2014-11-13 Thread Peter Westlake
{2188, 2189} So as you say, TCP must have delivered the data to someone, or at least believe it has. How much code is there between there and dataReceived? I imagine most of it is in the kernel? Peter. ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

  1   2   >