[Twisted-Python] Getting deprecation warnings?

exarkun at twistedmatrix.com exarkun at twistedmatrix.com
Wed Sep 5 15:11:19 EDT 2012

On 06:41 pm, _ at lvh.cc wrote:
>What is the appropriate way to run twistd apps in such a way that I get
>nice and loud deprecation warnings?

1) Have complete unit test coverage and run your tests with trial.  All 
deprecation warnings will be written out as part of the test suite run.

2) Run twistd with Python 2.6

3) Run twistd with Python 2.7 and pass "-W::DeprecationWarning:"

>I ran into an issue with one of my apps with the new release because
>t.w.error.NoResource is now t.w.resource.NoResource, I would like to 
>my code as forward compatible as possible as we go along, of course :)
>(Actually this issue was because I stole some non-released code from 
>which wasn't being tested, but the not being tested part is now fixed.)

More information about the Twisted-Python mailing list