On Wed, May 08, 2013 at 07:02:47PM -0000, exar...@twistedmatrix.com wrote: > On 02:30 pm, j...@multani.info wrote: > >Hi, > > > >I'm interested to give a help to port Twisted to Python 3. > >I gave a look at the tickets on Trac tagged with py3k and those in the > >Python-3.x milestone. I gave a try at > >http://twistedmatrix.com/trac/ticket/5802 to see what still needed to > >be > >done, and after rebasing the patch on trunk and starting to hack a few > >modules, I noticed that I have to do those 3 things in a bunch of > >places: > > > >* use the newer "except Exception as e" instead of "except Exception, > >e" > >* use the print function instead of the print statement > >* replace "implements(IFoo)" by the class decorator > >"@implementer(IFoo)" > > > >I can probably post a new patch which fixes all those things in order > >for Trial (as per #5802) to just start, but I wonder if this is the > >right approach and if it wouldn't be better to fix those first (since > >they are, AFAIK, compatible with Python 2.6 anyway). > > > >Any idea? > > To expand on what others have said in this thread, here's another > approach you might consider: > > 1) Open up twisted/scripts/trial.py and look at what Twisted modules it > imports. > > 2) If you do this, you'll see it uses (among other things) > twisted.python.usage. > > 3) Look at admin/_twistedpython3.py, you'll see that > twisted.python.usage hasn't been ported yet. > > 4) Look at twisted/python/usage.py and you'll see it doesn't have very > many Twisted dependencies (making it a better candidate for porting work > than twisted/scripts/trial.py). Look through the tracker to see if > there's a ticket for porting any of these. As it turns out, > twisted.python.util has already been ported and there are tickets for > twisted.python.reflect (#6239 - sort of) and twisted.python.text (#1601 > and #6341 - sort of). > > 5) Pick up one of those dependency tickets to start with - #1601 and > #6341 seem to be in progress, but I don't see anyone actively working on > #6239. > > 6) Port that module by making its test suite pass and generally > following the steps given the Python 3 porting page on the wiki.
OK, so we can probably sum all of this with: get the dependencies ticketed, ported and merged first, before tackling big things like twisted/scripts/trial.py Is that right? Jonathan _______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python