[Twisted-Python] Phasing out old-style classes

James Y Knight foom at fuhm.net
Tue Oct 27 09:39:22 MDT 2009


On Oct 27, 2009, at 10:32 AM, Steve Steiner (listsin) wrote:
> Is this something that can be handled by just running the tests with
> the right switch so we can see everything that passes without the
> switch but doesn't with?
>
> Is there a "new-style" switch or just -3?


Download:
http://twistedmatrix.com/trac/browser/sandbox/foom/newstyler.py?format=txt

And, before importing anything from twisted, run:
   import newstyler
   newstyler.newstyle_prefix('twisted')

Or (perhaps easier), you could put those statements in your copy of  
twisted/__init__.py before it does anything else.

I haven't run the tests to see what breaks; I'll leave that to you. :)

James





More information about the Twisted-Python mailing list