1311
Comment: clarify next steps
|
1443
link to test-check-py3-compat.t
|
Deletions are marked like this. | Additions are marked like this. |
Line 6: | Line 6: |
This is a status page for keeping track of what needs to be done to make progress on Mercurial on Python 3. Nobody is actively working on this - AugieFackler works on it sporadically, and would be happy to see patches on this topic flagged with Py3 on the mailing list. The work in progress is visible at http://hg.durin42.com/hg-py3k/ - note that ChangesetEvolution is in use on that repository, and so hashes will change over time as the patchset is rebased. | This is a status page for keeping track of what needs to be done to make progress on Mercurial on Python 3. Nobody is actively working on this - AugieFackler works on it sporadically, and would be happy to see patches on this topic flagged with Py3 on the mailing list. The work in progress is visible at http://hg.durin42.com/hg-py3k/ - note that ChangesetEvolution is in use on that repository, and so hashes will change over time as the patchset is rebased. |
Line 9: | Line 11: |
run-tests.py can pass its own tests (test-run-tests.py and test-run-tests.t) under 2.6, 2.7 and 3.5 as of [[https://hg.python.org/cpython/rev/1764d42b340d|this change in cpython]]. The series will be submitted for review to hg once we're ready to drop Python 2.4 and 2.5. | run-tests.py can pass its own tests (test-run-tests.py and test-run-tests.t) under 2.6, 2.7 and 3.5. |
Line 12: | Line 14: |
* Get the entire codebase working with 'from __future__ import absolute_import' | * Eliminate all Python 3 compatibility warnings from [[https://selenic.com/repo/hg/file/default/tests/test-check-py3-compat.t|test-check-py3-compat.t]] * Get the entire codebase working with 'from future import absolute_import' |
Line 15: | Line 18: |
* Remove 2to3 and have the source be 2.6/2.7/3.5 compatible | |
Line 17: | Line 21: |
* Start adding b'' and u'' everywhere and using 'from future import unicode_literals' |
Note:
This page is primarily intended for developers of Mercurial.
Python 3
To see a summary of our current position on Python 3 support, see SupportedPythonVersions#Python_3.x_support.
This is a status page for keeping track of what needs to be done to make progress on Mercurial on Python 3.
Nobody is actively working on this - AugieFackler works on it sporadically, and would be happy to see patches on this topic flagged with Py3 on the mailing list. The work in progress is visible at http://hg.durin42.com/hg-py3k/ - note that ChangesetEvolution is in use on that repository, and so hashes will change over time as the patchset is rebased.
1. What Works
run-tests.py can pass its own tests (test-run-tests.py and test-run-tests.t) under 2.6, 2.7 and 3.5.
2. Next Steps
Eliminate all Python 3 compatibility warnings from test-check-py3-compat.t
- Get the entire codebase working with 'from future import absolute_import'
- This requires fixing some cyclic imports. See test-module-imports.t for currently whitelisted cyclic imports.
- Make existing modules at least parse with Python 3 (still some Python 2.x syntax)
- Remove 2to3 and have the source be 2.6/2.7/3.5 compatible
- Conditionalize imports for renamed modules
- Get the C extensions compiling correctly in Python 3
Start adding b and u everywhere and using 'from future import unicode_literals'