Re: [Twisted-Python] If the errbacks of a canceled Deferred are called with error other than CancelledError, is this acceptable?

2013-06-21 Thread Glyph
On Jun 20, 2013, at 12:34 PM, exar...@twistedmatrix.com wrote: > Thank you for pointing this out. It seems like an important fact that makes > the rest of the discussion moot. > > By making `Deferred.cancel` work on any Deferred by triggering a > `CancelledError`, we have already decided on t

Re: [Twisted-Python] Private positional argument API anti-pattern

2013-06-21 Thread Glyph
On Jun 21, 2013, at 8:05 AM, exar...@twistedmatrix.com wrote: > Hello, > > I've noticed there are a couple public APIs in Twisted now that accept a > "private" positional argument. I use scare quotes because I don't see how > it's actually possible to make a positional argument private. > >

Re: [Twisted-Python] IMAP IDLE

2013-06-21 Thread Glyph
On Jun 21, 2013, at 7:20 AM, William McCall wrote: > Comments welcome! The main comment I have is: no tests!!! ;) If you're going to submit this as a patch, it would of course be very helpful to have unit test coverage. If you need help figuring out how to do that, feel free to ask questions

Re: [Twisted-Python] How hard is it to have log levels, really? was: logging

2013-06-21 Thread Glyph
On Jun 20, 2013, at 4:03 PM, exar...@twistedmatrix.com wrote: > On 18 Jun, 08:58 pm, ter...@gmail.com wrote: >> From the practical POV the most welcomed first step in updating the Twisted >> log system would be introduction of ready made log levels (with an ability >> to filter on them in observe

Re: [Twisted-Python] If the errbacks of a canceled Deferred are called with error other than CancelledError, is this acceptable?

2013-06-21 Thread exarkun
On 03:42 pm, te...@jon.es wrote: Hi JP Thanks for the summary. I agree (and agreed in my first post in this thread) that the CancelledError should (has to) come all the way back. I missed that we were still talking about that. Was there a conclusion on Glyph's suggestion of using subclasses o

Re: [Twisted-Python] If the errbacks of a canceled Deferred are called with error other than CancelledError, is this acceptable?

2013-06-21 Thread Terry Jones
Hi JP Thanks for the summary. I agree (and agreed in my first post in this thread) that the CancelledError should (has to) come all the way back. I missed that we were still talking about that. Was there a conclusion on Glyph's suggestion of using subclasses of CancelledError? Chris raised the po

[Twisted-Python] Private positional argument API anti-pattern

2013-06-21 Thread exarkun
Hello, I've noticed there are a couple public APIs in Twisted now that accept a "private" positional argument. I use scare quotes because I don't see how it's actually possible to make a positional argument private. Given a function defined like this: def foo(_bar=None): ... Ther

Re: [Twisted-Python] If the errbacks of a canceled Deferred are called with error other than CancelledError, is this acceptable?

2013-06-21 Thread exarkun
On 10:26 am, te...@jon.es wrote: Hi Tom Since most apis in twisted don't pass a canceller, the behavior is a2+a3. Right. That was the intention (glyph's). It was expected that over time more Twisted apis that create deferreds would add cancellers. As I understand it, Kai Zhang is now adding ca

[Twisted-Python] IMAP IDLE

2013-06-21 Thread William McCall
All-- Because I have seen it asked before (and because I have plans for it), I have a half-way implementation of IMAP IDLE. Yes, I am aware this is very uhh... fabulously written. https://github.com/williammccall/twisted-imap-idle Something I am looking to do is add a method to the Command c

Re: [Twisted-Python] Switiching to Formal Parser.

2013-06-21 Thread Shiyao Ma
I've come across some problems in parsley. One problem is that dns lables has a compression scheme "11offset". I dunno how to jump back to the parsed data to get the labels. On Thu, Jun 20, 2013 at 8:39 PM, Shiyao Ma wrote: > My original plan, as suggested by exarkun, is to start with something

Re: [Twisted-Python] If the errbacks of a canceled Deferred are called with error other than CancelledError, is this acceptable?

2013-06-21 Thread Terry Jones
Hi again Tom > So, it seems to me that you want to represent your jobs as > more than simply a deferred. At the very least, you need to record what > the jobs is, so that it can be restarted later, if necessary. Yes. The job class contained things like the function to call, its args, timing infor

Re: [Twisted-Python] If the errbacks of a canceled Deferred are called with error other than CancelledError, is this acceptable?

2013-06-21 Thread Terry Jones
Hi Tom > Since most apis in twisted don't pass a canceller, the behavior is a2+a3. Right. That was the intention (glyph's). It was expected that over time more Twisted apis that create deferreds would add cancellers. As I understand it, Kai Zhang is now adding cancellers to some apis returning de