Differences between revisions 1 and 13 (spanning 12 versions)
Revision 1 as of 2012-05-16 20:54:26
Size: 2116
Editor: mpm
Comment:
Revision 13 as of 2015-10-12 18:50:55
Size: 2354
Editor: GregorySzorc
Comment: note on never supporting 3.0 to 3.4
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:

<<Include(A:dev)>>
Line 6: Line 3:
Line 12: Line 8:

Mercurial currently supports Python versions 2.4 to 2.7, provided they include the following standard library components:
Mercurial versions up to 3.4.x support Python versions 2.4 to 2.7, provided they include the following standard library components:
Line 18: Line 13:
 * ctypes (only on Windows)

Mercurial 3.5 dropped support for Python 2.4 and 2.5. As our primary users of these Python versions are enterprise Linux users of RHEL 5 and Centos 5, we've started packaging RPMs for these systems with a private copy of a recent Python.
Line 22: Line 20:
Python 2.3 support was dropped in July 2009 for Mercurial 1.3 when it became difficult for developers to continue testing compatibility. Now that we have a 2.4 [[http://hgbuildbot.kublai.com/waterfall|buildbot]], this is mostly a non-issue.
Line 23: Line 22:
Python 2.3 support was dropped in July 2009 for Mercurial 1.3 when it became difficult for developers to continue to testing compatibility. Python 2.4 and 2.5 support was dropped in May 2015 for Mercurial 3.5 as it was becoming a barrier to Python 3.x support.
Line 25: Line 24:
We will probably continue to support Python 2.4 as long as it doesn't prevent a significant barrier to development. Given that Python 2.5 and later don't contain any features that we're dying to use, that may be a long time off. We now have a suit of automated code tests and a continuous build server that will find most Python 2.4 issues even though most developers now use Python 2.6 or later.

We also will continue to support Python 2.x as long as there is a significant installed base in the form of Red Hat Enterprise Linux and Ubuntu LTS users. RHEL 5, which uses Python 2.4, will reach the end of the "production 2" portion of its lifecycle in Q1 2014 and the end of its regular lifecycle in 2017.
We will continue to support Python 2.6 and 2.7 for the foreseeable future.
Line 30: Line 27:
{i} Python 3.x has no relation to Windows Unicode filename support, see EncodingStrategy.
Line 31: Line 29:
Python 3.x has proven notoriously difficult to support, due to our pervasive dependence on a byte-based encoding strategy and string manipulation. We have supported two GSoC projects to research 3.x support, after which [[mpm]] estimated that it would take at least another person-year of core developer time to make a full 3.x-compatible version. Also, Python 3.x has proven significantly slower in almost all benchmarks that matter to us, especially start-up time. {i} As of April 2014, we have been assured Python 2.x maintenance will continue for the foreseeable future.
Line 33: Line 31:
As there are ''no Python 3.x features that are of interest to us'', and we will need to continue to support 2.x for the foreseeable future, this is not an attractive or high-priority project. Python 3.x has proven notoriously difficult to support, due to our pervasive dependence on a byte-based encoding strategy and string manipulation. We have invested a substantial amount of time into porting at this point and we estimate at least a person-year of core developer time to make a full 3.x-compatible version. Also, Python 3.x has proven significantly slower in almost all benchmarks that matter to us, especially start-up time.

The only features important to us in Python 3.x (improved SSL support) have already been backported to Python 2.7.9. As there is so little else to be gained by a Python 3.x port, so much work involved, and we will need to continue to support 2.x for several years still, this is not an attractive or high-priority project.

Mercurial will never support Python 3.0 to 3.4 because of missing support for the % operator on str types.
Line 36: Line 38:
CategoryDeveloper

Supported Python Versions

The versions of Python supported by Mercurial.

1. Current support

Mercurial versions up to 3.4.x support Python versions 2.4 to 2.7, provided they include the following standard library components:

  • sha/hashlib
  • gzip
  • bz2 (needed for bundles)
  • ctypes (only on Windows)

Mercurial 3.5 dropped support for Python 2.4 and 2.5. As our primary users of these Python versions are enterprise Linux users of RHEL 5 and Centos 5, we've started packaging RPMs for these systems with a private copy of a recent Python.

Some versions of Python may have difficulty with some particular features. For instance, Python before 2.5 cannot properly verify SSL certificates.

2. Future support plan

Python 2.3 support was dropped in July 2009 for Mercurial 1.3 when it became difficult for developers to continue testing compatibility. Now that we have a 2.4 buildbot, this is mostly a non-issue.

Python 2.4 and 2.5 support was dropped in May 2015 for Mercurial 3.5 as it was becoming a barrier to Python 3.x support.

We will continue to support Python 2.6 and 2.7 for the foreseeable future.

3. Python 3.x support

{i} Python 3.x has no relation to Windows Unicode filename support, see EncodingStrategy.

{i} As of April 2014, we have been assured Python 2.x maintenance will continue for the foreseeable future.

Python 3.x has proven notoriously difficult to support, due to our pervasive dependence on a byte-based encoding strategy and string manipulation. We have invested a substantial amount of time into porting at this point and we estimate at least a person-year of core developer time to make a full 3.x-compatible version. Also, Python 3.x has proven significantly slower in almost all benchmarks that matter to us, especially start-up time.

The only features important to us in Python 3.x (improved SSL support) have already been backported to Python 2.7.9. As there is so little else to be gained by a Python 3.x port, so much work involved, and we will need to continue to support 2.x for several years still, this is not an attractive or high-priority project.

Mercurial will never support Python 3.0 to 3.4 because of missing support for the % operator on str types.


SupportedPythonVersions (last edited 2022-03-04 01:04:18 by GregorySzorc)