On 14 août 13:07, Dan Stromberg wrote: > > > For starters, you could probably look over the various changes in 3.0 and > > > 3.1, and compile a list of what needs to change in the code. > > > > > http://www.google.com/search?sourceid=chrome&ie=UTF-8&q=list+of+changes+in+python+3 > > > > > > >From there, the changes could probably be prioritized, and coded one by > > one > > > or in parallel. > > > > IMO, we should rather start launching the 2to3 transformer on pylint and > > its > > dependencies > > Not at all unreasonable, though we'll probably end up passing through a > stage where we have something that runs on Python 3 and checks Python 2 > (except during introspection, which would probably be a hybrid) initially. > I'm fine with that. Anyway that's necessary as a first step. > > , and at first see what can be made to avoid things it doesn't > > deal with. As I see it, the ideal solution would be a purely generated py3k > > branch (eg no manual changes needed), but I've no experience yet with the > > 2to3 > > tool and doesn't know if this is possible (I doubt it is actually, at least > > for > > lib such as logilab-astng). > > > I've converted one (other) project using 2to3 so far. I went the route of > running 2to3 and then making manual changes after that to fix up the > remaining problems - mostly due to strings vs unicode issues. > > What do the owners of the code think about attempting to come up with a > version that runs on (though not _necessarily_ against) 2.6, 2.7 and 3.x > unmodified? This would almost certainly mean this new version would not run > on 2.5.x.
As a code checker, pylint is expected to run on as many version as possible. We only recently dropped 2.2 support. IMO, dropping support for python <= 2.4 is fine (and allow a big cleanup in astng, since we currently have to deal with two underlying ast representation), though I would like to keep the 2.5 support. What pb do you see with it? > This appears to be a quite nice URL about porting from python 2.x to 3.x: > http://wiki.python.org/moin/PortingPythonToPy3k Nice. I've added this link to the ticket regarding the port of pylint to python 3. > I have a -=Little=- bit of available time (probably just an hour or few on > Tuesdays and Fridays), and I can't think of many projects that would be more > useful that time into than a py3k version of pylint. Cool :) > It looks like the code is checked into mercurial? Here're some cheat sheets > about using mercurial: > http://mercurial.selenic.com/wiki/QuickReferenceCardsAndCheatSheets > I've checked out the sources with: > hg clone http://www.logilab.org/hg/pylint > hg clone http://www.logilab.org/src/logilab/astng > hg clone http://www.logilab.org/src/logilab/common That's a good start. More about mercurial in Nico's post. > I've done a lot with Subversion (including administration), but I've not > done much with Mercurial yet. Is it important to start py3k branches of > each of these before we embark on porting? Or is it just as well to get > started against these URL's? In subversion, we'd probably want to branch > before starting to make changes. > > Sylvain, you mentioned you had a py3k branch for logilab-common. May I ask > what the URL to it is? And could this same resource be used for astng and > pylint branches for python 3k? Simply 'hg up py3k' in logilab/common checkout directory. And yes, we could have similar branches in astng/pylint. The point is that maintaining multiple branch may be very painful and time consuming. And as I think pylint will have to support python 2 for a while, the happier I'll be... We'll have to think about this, but I would definitly like to manage to use approach 1 or 2 of the above document you mentionned (that doesn't mean we won't have additional checkers for python 3). -- Sylvain Thénault LOGILAB, Paris (France) Formations Python, Debian, Méth. Agiles: http://www.logilab.fr/formations Développement logiciel sur mesure: http://www.logilab.fr/services CubicWeb, the semantic web framework: http://www.cubicweb.org _______________________________________________ Python-Projects mailing list Python-Projects@lists.logilab.org http://lists.logilab.org/mailman/listinfo/python-projects