Revision 20 as of 2011-04-17 19:47:07

Clear message

[Introduction]

This is a project[1] for the porting of 'Packaging' over to lesser versions of python i.e. python 2.4 to python 3.2. In nutshell, the project will result in a successful release of a standalone backport of "Packaging" for python2.4 to python3.2 along with a detailed tutorial on the porting of 'Packaging'.

[Benefits to the Python community]

1. Porting of 'Packaging' will make it available to all the other versions of python i.e. python2.4 to python3.2.

2. An automated system will be created which will port 'packaging' over to other specified versions of python even after changes in 'packaging' codes with ease and little modifications.

3. It is known that python3.3 is going to be released and similar other python3.x releases have yet to be done. Since 'Packaging' is compatible with python3.x, it would certainly be less painful to port 'Packaging' for the lesser versions of python i.e. python3.2 to python2.4, rather than porting distutils2 to python3.x with each new release of python3.x.

4. The tutorial provided will help in the further development of the project.

Thanks.

[Project Details]

1. Make 'Packaging' compatible with python3.2 to python2.4 which includes following steps.

* Applying 3to2 to 'Packaging' for all the versions of python2.

There would be set of fixers which will be taking care for different incompatibility issues for python 3.1. Also, these set of fixers will be handling all these kinds of feature issues occurring in python 3.x itself.

* fixing 'type' issues corresponding to bytes and string.

Manual fixing won't be adequate in this case. Considering that there'll be several further modifications in the codes and whole porting process should be automated, there would be certain scripts which will be taking care of these kinds of type issues.

* Few basic modifications in the code to make it compatible with other versions of python.

>> Precisely?

Some functionalities in python2 works differently compared to python3 i.e. we may need to write slight different codes for the same result, say 'tokenize' in this case.

2. Adding and rewriting a few tests for the newly made changes.

At certain instances, tests written for python3 may not work for python2 i.e. the returned value may differ. In those cases, we would have to manually rewrite codes for different test behaviors.

Documentations would be updated simultaneously with the progress of the work.

3. Ensure that build and installation process goes well for all the versions of python i.e. 2.4 - 3.2 which includes porting files like setup.py, setup.cfg, Makefile, etc to make it compatible with other versions of python.

Currently 'import build_py_2to3 as build_py' is taking care of build and installation process for different versions of distutils2. But that won't be adequate for the backport. For this project, I'm not sure if we can modify 'build_py' file in distutils for 'build_py_3to2', so that it can work other way round. If we can't, in that case there should be a piece of script which will run 3to2 on all files of 'packaging' and then copy them to a temporary directory or may be directly build it.

4. Write a tutorial on the porting work of 'Packaging' to support further development of the project.

[Milestones]

Initial preparations includes the following:

Start of Program (May 24)

Before Midterm Evaluation [May 24 - July 12]

  1. [May 24 - May 29] Porting 'Packaging' to all the versions of python 3.x at first.
  2. [May 30 - June 6] Testing and finalizing the porting work on python 3.x.
  3. [June 7 - June 14] Porting 'command' module to python2.4 - python2.7. 4 [June 15 - June 21] Testing and finalizing porting of 'command' module
  4. [June 22 - June 28] Porting 'compiler' module to python2.4 - python2.7.
  5. [June 29 - July 6] Testing and finalizing porting of 'compiler' module.
  6. [July 7 - July 11] Porting 'index' module to python2.4 - python2.7.

Midterm Evaluation (July 12)

[Deliverables]

  1. 'Packaging' ported for all the versions of python 3.x
  2. Completion of following modules for python 2.4 to python 3.2:
    • command
    • compiler
  3. Documentation on the porting work till date.

Before Final Evaluation [July 13 - August 15]

  1. [July 13 - July 22] Testing and finalizing porting of 'index' module.
  2. [July 23 - July 30] Ensure the installation and working of 'Packaging' in all the given versions of python i.e. python2.4 to python3.2.
  3. [July 31 - August 7] Editing and completion of documentation on the porting work of 'Packaging'.
  4. [August 8 - August 15] Testing and wrap up.

Final Evaluation (Aug 16)

[Deliverables]

  1. 'Packaging' compatible with python2.4 to python3.2.
  2. A automated system of 'packaging' to govern the porting process for different specified versions of python.
  3. A detailed documentation on the porting of 'Packaging'.

[1] https://bitbucket.org/pkumar/packaging_cpython

Thanks for the suggestion. It would certainly be a very bad idea to convert 'packaging' now and keep changing again and again with every new modification. Just manual fixes would not be suited in this case. There should be a automated system which should govern all the porting process. It should check the specified version of python, port it accordingly and build/install the 'packaging' for the certain version of python. So, let's say for python 2.6 it would be:

python setup.py build

>> run 3to2

>> apply the custom fixers for specified version (python 2.6, here)

>>build

In my milestones I divided the work on different modules but I didn't specified 'How' the work is going to progress. That's a fault on my part I guess. As per your suggestion, I'm currently going through the projects using 3to2 and their implementation of 3to2.

Unable to edit the page? See the FrontPage for instructions.