Differences between revisions 1 and 2
Revision 1 as of 2012-05-16 20:54:26
Size: 2116
Editor: mpm
Comment:
Revision 2 as of 2012-05-16 23:18:14
Size: 2145
Editor: abuehl
Comment: add ctypes to required components (only on Windows)
Deletions are marked like this. Additions are marked like this.
Line 18: Line 18:
 * ctypes (only on Windows)

Note:

This page is primarily intended for developers of Mercurial.

Supported Python Versions

The versions of Python supported by Mercurial.

1. Current support

Mercurial currently supports 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)

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 to testing compatibility.

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.

3. Python 3.x support

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.

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.


CategoryDeveloper

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