Differences between revisions 3 and 23 (spanning 20 versions)
Revision 3 as of 2012-05-18 20:18:32
Size: 2330
Comment: Mention problems with old Python versions and ssl and urllib
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 2: Line 2:
<<Include(A:dev)>>
Line 10: Line 8:
Mercurial currently supports Python versions 2.4 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 14: Line 13:
 * ssl
Line 17: Line 17:
== 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 to testing compatibility.
Line 22: Line 34:
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. Python did however have a lot of problems with HTTP and SSL until 2.6.3. Mercurial on these old versions can thus only create insecure HTTP connections and has limited support for proxy use.

We now have a suite 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.

== 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.
We may drop support for older versions of Python 3 in the future.
Line 34: Line 37:
CategoryDeveloper

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)