[Twisted-Python] Getting deprecation warnings?

exarkun at twistedmatrix.com exarkun at twistedmatrix.com
Wed Sep 5 16:08:35 EDT 2012


On 07:55 pm, glyph at twistedmatrix.com wrote:
>
>On Sep 5, 2012, at 12:11 PM, exarkun at twistedmatrix.com wrote:
>>On 06:41 pm, _ at lvh.cc wrote:
>>>Hey,
>>>
>>>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:"
>
>A note for posterity - if we are ever to implement a generalized 'run 
>an inferior twistd process', or even 'run an inferior python 
>interpreter' mechanism, warning information like this is one of the 
>bits of runtime state that ought to be communicated.

It would be nice if Python preserved its own command-line arguments 
somewhere, but it doesn't seem to. :/  So figuring out what the runtime 
state is is somewhat non-trivial in this case.  Otherwise, I completely 
agree.

Jean-Paul
>-glyph
>_______________________________________________
>Twisted-Python mailing list
>Twisted-Python at twistedmatrix.com
>http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python



More information about the Twisted-Python mailing list