[Twisted-Python] reactor start/stop frustrations in tests

2010-01-20 Thread Brad Milne
Hi all I know this has been discussed numerous times, but I need some extra help. I have used nose.twistedtools' @deferred decorator to run the reactor within a test method to date. Now I am writing some performance tests for our application and need better control over the reactor. nose has thre

[Twisted-Python] Light-est-weight http authentication

2010-02-08 Thread Brad Milne
I have a backend Twisted application with a front end in Django. Some of their communication is via web services. Currently they are deployed on the same box but may be separated in future. I want to enforce some basic authentication on the web services, so some lightweight http header authenticati

Re: [Twisted-Python] Light-est-weight http authentication

2010-02-08 Thread Brad Milne
Just in terms of configuration. It seems that Guard, for example, is designed to cache the credentials and maintain a session. My requirement is just for a single request, so session maintenance seems like overhead. Also in upskill time. The Twisted NPE book, for example, says "It might take you a

Re: [Twisted-Python] Light-est-weight http authentication

2010-02-10 Thread Brad Milne
Thanks. I had actually already found your page and you're right, it does seem to be the best resource out there. Since your email I've had a second look at it, as initially I wasn't sure how to use the example to return a web resource (handler with render_GET etc) in place of the file you returned.

Re: [Twisted-Python] Light-est-weight http authentication

2010-02-10 Thread Brad Milne
End of trace is: File "C:\Python26\lib\site-packages\twisted\web\resource.py", line 189, in render raise UnsupportedMethod(getattr(self, 'allowedMethods', ())) twisted.web.server.UnsupportedMethod: () On 11 February 2010 08:20, Brad Milne wrote: > Thanks. I had actu

Re: [Twisted-Python] Light-est-weight http authentication

2010-02-10 Thread Brad Milne
Haha, resolved now. Previously my setup wasn't sensitive to a missing trailing slash on my PUT and POSTs, but now it is. I don't know why, but at least it's solvable. Thanks for the help Brad On 11 February 2010 08:59, Brad Milne wrote: > End of trace is: > File

[Twisted-Python] Conch SFTP client help

2011-02-08 Thread Brad Milne
Hi all I've looked around for SFTP client doco, but it's come up pretty thin on the ground. I've seen http://twistedmatrix.com/trac/wiki/TwistedConch and everything under it. With it I've been able to connect via SSH to a server and run a command (*a la* the 'cat' example from tutorial page and fr

Re: [Twisted-Python] Conch SFTP client help

2011-02-08 Thread Brad Milne
e sometime On 9 February 2011 10:00, Brad Milne wrote: > Hi all > > I've looked around for SFTP client doco, but it's come up pretty thin on > the ground. I've seen http://twistedmatrix.com/trac/wiki/TwistedConch and > everything under it. With it I've been ab

[Twisted-Python] LoopingCalls and unclean reactor

2011-03-15 Thread Brad Milne
Hi I have a series of MultiService objects, with child Services. Some of these services are TCPServers, for example, and others are my own objects (extending from Service). In the instance that I have a Service which controls a LoopingCall, I am getting intermittent 'unclean reactor' errors during

Re: [Twisted-Python] LoopingCalls and unclean reactor

2011-03-16 Thread Brad Milne
; On Tue, Mar 15, 2011 at 9:55 PM, Brad Milne > wrote: > > Hi > > I have a series of MultiService objects, with child Services. Some of > these > > services are TCPServers, for example, and others are my own objects > > (extending from Service). > > In th

[Twisted-Python] @inlinecallbacks and AlreadyCalledError in test cases

2011-04-04 Thread Brad Milne
Hi all I have recently started switching to trial.unittest from python's own. The trouble I'm experiencing is when a timeout occurs in my test, it errbacks(). Then the @inlineCallbacks decorator sees the error and errbacks(). But then a second @inlineCallback in the chain subsequently sees *that*

Re: [Twisted-Python] @inlinecallbacks and AlreadyCalledError in test cases

2011-04-04 Thread Brad Milne
On 5 April 2011 14:21, wrote: > On 01:39 am, brad.mi...@devx.runthered.com wrote: > >Hi all > > > >I have recently started switching to trial.unittest from python's own. > >The > >trouble I'm experiencing is when a timeout occurs in my test, it > >errbacks(). > >Then the @inlineCallbacks decorato

[Twisted-Python] Twisted enterprise deployment models

2011-10-20 Thread Brad Milne
We have a core message-handling platform which encompasses an ever-increasing array of modules and services run inside one Twisted process. This is good as it means the reactor is in control of most of the stuff relevant to it. However, as the number of deployed services within it grows, it becomes

Re: [Twisted-Python] Twisted enterprise deployment models

2011-10-20 Thread Brad Milne
actice' :) I knew if I went as far as to ask that, I'd get a reasonable gauge back at least Thanks again Brad PS - Christopher, I look forward to seeing that lib On 21 October 2011 07:13, Glyph wrote: > On Oct 20, 2011, at 6:50 AM, Brad Milne wrote: > > > We have a core me

[Twisted-Python] smtp sendmail DSN - NOTIFY

2012-02-27 Thread Brad Milne
Hi all We're using the twisted.mail.smtp.sendmail(..) function to push emails. The options one can pass to it are fairly limited. In particular I'm looking to specify the DSN value NOTIFY=SUCCESS in the RCPT calls. Is this implemented elsewhere in the smtp library? (I can see mention of it missin