This article is more than 1 year old
Snakes on a wane: Python 2 development is finally frozen in time, version 3 slithers on
I'm not quite dead, mutters 2.7 as rigor mortis sets in
With the arrival of 2020, the Python Clock has stopped ticking, marking the end of development for the Python 2 programming language.
Nevertheless, Python 2 should still be shambling about through April at least, when the final Python 2.7 release (v2.7.18) is slated for delivery. And it's likely to linger for years to come in corporate environments, propped up by enterprise vendors.
But the Python 2.7.18 code base has officially been frozen. Between now and PyCon 2020 (April 15-23), code fixes developed in 2019 will be integrated through the beta and Release Candidate process and new pull requests are blocked.
"The CPython core developer community is retiring the Python 2 series after nearly 20 years of development," the Python Foundation said in a statement last month. "The last major version 2.7 will be released in April 2020, and then all development will cease for Python 2."
That's significant primarily in terms of security issues. The CPython development group will not be dealing with security vulnerabilities identified after the final release. (CPython refers to the reference implementation of the Python specification.) As such, existing users will be increasingly at risk.
When Python 3 was released in late 2008, it was not backward-compatible with Python 2. The plan since then has been to sunset v2 once enough developers made the transition to v3, also initially known among its developers as Python 3000 and Py3k.
At first, Pythonistas thought the version migration could be managed by 2015. But by the time 2014 rolled around, vendors weren't ready and there were still unresolved Unicode handling issues in the Python standard library and in various third-party libraries. So those maintaining the language decided to wait until 2020 before lowering the lifeboats and abandoning Python 2.
Python 3 adoption surpassed Python 2 in 2016 or thereabout, based on data from JetBrains, which makes a Python IDE. As of October 2018, 84 per cent of those responding to the company's survey said they'd made the switch. And the top 360 Python packages distributed through PyPI are all Python 3 compatible.
Vendors of Unix/Linux-based systems have handled the transition differently. Arch Linux made the "python" command point at Python 3 back in 2010; in response the Python community formulated PEP 394 to ensure that the "python" command always gets linked to Python 2, to avoid confusion and potential problems.
In the latest macOS release (Catalina), typing "python" on the command line still invokes Python 2 (as recommended), but future macOS releases won't ship with any scripting language by default (PHP, Python, or Ruby), so users will have to install the desired version on their own.
Those catering to corporate clients intend to continue support Python 2.7 for a while. In October, Red Hat said it will stop supporting Python 2.7 in RHEL 8 come June 2024.
But those developing Python code should be focusing on Python 3. ®