Size: 2430
Comment:
|
Size: 2460
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 34: | Line 34: |
* [[http://lucumr.pocoo.org/2010/2/11/porting-to-python-3-a-guide| | * [[http://lucumr.pocoo.org/2010/2/11/porting-to-python-3-a-guide|Porting to Python 3: A Guide]] |
This page describes efforts to port pylint to Python 3.x
Status of the port
- We're really just getting started.
Goals and high level overview of tasks
The idea is to add support for Python 3.0 and 3.1, while eliminating Python 2.4 compatibility because that will simplify some of the code.
- This will require one of the following methods:
- Converting the three Python 2-compatible packages to a common subset of Python 2 and Python 3
- We may or may not be able to do this using 2to3; 2to3 may or may not prove too exuberant about moving to a nice, python 3-only syntax in some areas.
- Creating creating modules that abstract the differences between Python 2 and Python 3 and depending on them instead.
- Converting the three Python 2-compatible packages to a common subset of Python 2 and Python 3
- About the three packages
- Those three packages are:
- logilab-common
- This one is probably the place to start, because it appears to contain the test harness we need.
- The owners of the code believe this will be the easiest part
- 29274 lines of code initially
- logilab-astng
- 18928 lines of code initially
- pylint itself
- 28415 lines of code initially
- logilab-common
- There appear to be test suites for each of these, which can be invoked using the pytest command - pytest appears to be part of logilab-common, which suggests a bit of
- mutual dependency to work around.
- Those three packages are:
- The owners of the code would like to keep the changes compatible with Python 2.5.x to avoid having two code bases to maintain, which of course is a bit more involved
- than targeting 2.6 and up.
Resources
These are all things related to doing python 2 -> python 3 ports
- 2to3
Python Wiki on 2to3
- Notes about how to do 2 to 3 ports
- Specific projects' notes on their ports