Re: [Twisted-Python] [Twisted-web] Changing the Twisted Compatibility Policy

2015-10-25 Thread Glyph Lefkowitz
> On Oct 25, 2015, at 5:48 PM, Amber Hawkie Brown > wrote: > > Hi everyone, > > As many know, one of the things that makes the Twisted project so unique is > our conformance to our Compatibility Policy. This policy means that users of > Twisted can freely upgrade between versions with all in

Re: [Twisted-Python] SNI callback with support for deferreds

2015-10-25 Thread Glyph Lefkowitz
> On Oct 25, 2015, at 4:54 AM, Jonathan Stoppani wrote: > > Hello, > > A couple of days ago I asked on Stack Overflow about returning a deferred > from an SNI callback and have pyOpenSSL wait for it to fire before continuing > handling the request. > > Thanks to some pointers by Gyph I've fo

Re: [Twisted-Python] How to handle arguments with undocumented types and argument deprecation

2015-10-25 Thread Glyph Lefkowitz
> On Oct 25, 2015, at 1:34 AM, Adi Roiban wrote: > > Is there a way to deprecate a single argument from a method/function? Sometimes. The idea with a deprecation is that you can remove something, emit a warning if it's used, then eventually remove it entirely, and get an error if it's used.

Re: [Twisted-Python] How to design REST API with Twisted?

2015-10-25 Thread Glyph Lefkowitz
> On Oct 25, 2015, at 5:13 AM, Burak Arslan wrote: > > It's a bit different from what you to with stock Twisted though. More > specifically, there's no NOT_DONE_YET. I should just mention that NOT_DONE_YET actually _predates_ Deferreds, and one glorious day, we will get rid of it :). See for

Re: [Twisted-Python] [Twisted-web] Changing the Twisted Compatibility Policy

2015-10-25 Thread Ray Cote
This is a reasonable change. I say that as someone who rarely tracks individual Twisted releases. We typically upgrade client-deployed applications every three to five years (at the moment, I’m working on upgrading several projects from 12.1 to 15.4). For us, being able to easily track back throu

[Twisted-Python] Changing the Twisted Compatibility Policy

2015-10-25 Thread Amber "Hawkie" Brown
Hi everyone, As many know, one of the things that makes the Twisted project so unique is our conformance to our Compatibility Policy. This policy means that users of Twisted can freely upgrade between versions with all incompatibilities being warned about before causing code to break. However,

Re: [Twisted-Python] txtorcon 0.14.0

2015-10-25 Thread meejah
meejah writes: > * add .is_built Deferred to txtorcon.Circuit that gets callback()'d > when the circuit becomes BUILT This had a bug in it. I give you 0.14.1: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 There was a subtle bug with the Circuit.is_built API introduced in 0.14.0, necessitatin

Re: [Twisted-Python] How to design REST API with Twisted?

2015-10-25 Thread Burak Arslan
Hey! On 10/25/15 13:04, Wang Yan wrote: > Hi, > > I'm confused about how to design REST APIs with Twisted, especially > when my app have to interact with MySQL. > > Is there any basic design patterns for this kind of situation? I do Spyne, and I think it's _fa-bu-lous_ for building any web API o

[Twisted-Python] SNI callback with support for deferreds

2015-10-25 Thread Jonathan Stoppani
Hello, A couple of days ago I asked on Stack Overflow about returning a deferred from an SNI callback and have pyOpenSSL wait for it to fire before continuing handling the request. Thanks to some pointers by Gyph I've found a solution ("workaround") for my problem, involving a fake TLSMemoryBIOPr

[Twisted-Python] How to design REST API with Twisted?

2015-10-25 Thread Wang Yan
Hi, I'm confused about how to design REST APIs with Twisted, especially when my app have to interact with MySQL. Is there any basic design patterns for this kind of situation? Thanks!___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com

[Twisted-Python] How to handle arguments with undocumented types and argument deprecation

2015-10-25 Thread Adi Roiban
Hi, This message is based on https://twistedmatrix.com/trac/ticket/5911#comment:14 In twisted/web/http.py we have the addCookie method which has the 'max_age' argument. In the current code, the max_age is used as just anything which can be converted into a text. cookie = cookie +"; Max-Age=%s"