L.D.
L.D.

Reputation: 91

Why are they some new releases of Python 3 on older Python 3 versions?

Right now, on the "All releases" page of the Python Software Foundation website, the "Download latest release" links to the Python 3.6.4 version. However, you can find on the page that the release is from the 2017-12-19 and there has been two others release since, for Python 3.5.5 and Python 3.4.8 .

I understand why there is two parallel version of Python with 3 and 2.7, but I do not understand why they are multiple versions of Python 3, as it should be backward compatible with Python 3 code.

Upvotes: 4

Views: 337

Answers (3)

glibdud
glibdud

Reputation: 7880

The Python Development Cycle page describes how python maintains versions. Here are some snippets:

17.1.1. In-development (main) branch

The master branch is the branch for the next feature release; it is under active development for all kinds of changes: new features, semantic changes, performance improvements, bug fixes.

17.1.2. Maintenance branches

A branch for a previous feature release, currently being maintained for bug fixes. There are usually two maintenance branches at any given time: one for Python 3.x and one for Python 2.x.

17.1.3. Security branches

A branch less than 5 years old but no longer in maintenance mode is a security branch. The only changes made to a security branch are those fixing issues exploitable by attackers such as crashes, privilege escalation and, optionally, other issues such as denial of service attacks.

So in addition to the main branch receiving new feature updates, there is a maintenance branch receiving general bugfixes for each of Python 2 and 3, and a number of other branches receiving security fixes. When bug/security fixes are applied, the micro/patch version (the third number in the version) is incremented. Here's a snapshot of what it looks like as of when this was written, from the same document:

17.1.4. Summary

There are 6 open branches right now in the Git repository:

  • the master branch accepts features and bugs fixes for the future 3.8.0 feature release (RM: Łukasz Langa)
  • the 3.7 branch accepts bug, regression, and doc fixes for the upcoming 3.7.0 feature release (RM: Ned Deily)
  • the 3.6 branch accepts bug fixes for future 3.6.x maintenance releases (RM: Ned Deily)
  • the 3.5 branch accepts security fixes for future 3.5.x security releases (RM: Larry Hastings)
  • the 3.4 branch accepts security fixes for future 3.4.x security releases (RM: Larry Hastings)
  • the 2.7 branch accepts bug fixes for future 2.7.x maintenance releases (RM: Benjamin Peterson)

Upvotes: 1

deceze
deceze

Reputation: 522567

x.y.Z point releases are usually bug fix releases.
x.Y releases are usually feature releases, but might contain minor backwards incompatibilities.
X releases are large changes possibly breaking a lot of existing code.

In practice you cannot always upgrade your x.Y version immediately; reasons range from actual code incompatibilities which cannot be fixed quickly to internal deployment limitations to scheduling reasons. Linux distributions also often distribute one specific x.Y version and will pick up the next version only a year later in their annual release cycle or so. However, x.y.Z versions are often picked up soon and can typically be installed without breaking existing code.

The reason several x.y.Z versions are maintained in parallel is that users want to reap the benefits of bug fixes without being forced to upgrade to a new major version.

Upvotes: 5

Lingster
Lingster

Reputation: 1087

Python 3.x is not nesscarily backward compatible. For instance in python 3.6, string interpolation was introduced, aka f-string. In python 3.5 type hints were introduced which would not be backwards compatible with older 3.x versions.

Upvotes: 1

Related Questions