Differences between revisions 15 and 23 (spanning 8 versions)
Revision 15 as of 2016-12-09 17:22:44
Size: 2378
Editor: Rain
Comment:
Revision 23 as of 2022-03-04 01:04:18
Size: 1554
Editor: GregorySzorc
Comment: update state on Python 3.5
Deletions are marked like this. Additions are marked like this.
Line 8: Line 8:
Mercurial versions up to 3.4.x support Python versions 2.6 to 2.7, provided they include the following standard library components:
Mercurial 6.2 (to be released) and newer only has support for Python 3.6+. Mercurial 5.2 and newer has support for Python 2.7 and Python 3.5 and newer. Mercurial 4.3 and newer require at least Python 2.7. Python must include the following standard library components:
Line 12: Line 13:
 * ssl
Line 15: Line 17:
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. == Past support ==

Python 3.5 support is being dropped in Mercurial 6.2.
Python 2 support is being dropped in Mercurial 6.2.

Python 2.6 support was dropped in Mercurial 4.3. As work towards porting to Python 3 progressed, continuing to support Python 2.6 was a hindrance to porting efforts.

Python 2.4 and 2.5 support was dropped in Mercurial 3.5 as it was becoming a barrier to Python 3.x support. 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.

Python 2.3 support was dropped in Mercurial 1.3.
Line 19: Line 30:
Mercurial never supported Python 3.0 to 3.4 because of missing support for the % operator on bytestrings (`bytes` in Python 3).
Line 20: Line 33:
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 22: Line 34:
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.

== 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 bytestrings (`bytes` in Python 3).
We may drop support for older versions of Python 3 in the future.

Supported Python Versions

The versions of Python supported by Mercurial.

1. Current support

Mercurial 6.2 (to be released) and newer only has support for Python 3.6+. Mercurial 5.2 and newer has support for Python 2.7 and Python 3.5 and newer. Mercurial 4.3 and newer require at least Python 2.7. Python must include the following standard library components:

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

2. Past support

Python 3.5 support is being dropped in Mercurial 6.2. Python 2 support is being dropped in Mercurial 6.2.

Python 2.6 support was dropped in Mercurial 4.3. As work towards porting to Python 3 progressed, continuing to support Python 2.6 was a hindrance to porting efforts.

Python 2.4 and 2.5 support was dropped in Mercurial 3.5 as it was becoming a barrier to Python 3.x support. 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.

Python 2.3 support was dropped in Mercurial 1.3.

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

Mercurial never supported Python 3.0 to 3.4 because of missing support for the % operator on bytestrings (bytes in Python 3).

3. Future support plan

We may drop support for older versions of Python 3 in the future.


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