Python Foundation sounds official death knell for Python 2

Python Foundation sounds official death knell for Python 2

After over a decade of sniping, the war between Python 2 and Python 3 supporters will soon be over: The Python Foundation has published an official execution date for Python 2.

The Foundation has posted a warning that January 1, 2020 will be the final day of official support for version 2 of the language. This means that its development team will no longer fix security problems in Python 2 or submit improvements to it.

Python 2 launched in October 2000. When Python 3 came along in 2008, its designers tried to remove duplicate ways of doing things. In doing so, they broke backwards compatibility with version 2. This created disagreements about which version to use. However, as of this year, a survey by IDE company JetBrains found Python 3 clearly winning out, with 87 per cent of Python devs using that version.

“If many people keep using Python 2, then that makes it hard for the volunteers who use Python to make software,” said the Foundation in its post. “They can’t use the good new things in Python 3 to improve the tools they make.”

The sunset date shouldn’t come as a surprise to Python devs, as the language’s creator Guido van Rossum explained in 2014 that Python 2.7 would be the last release on the version 2 branch, save for some maintenance point releases. He pinpointed the date in March 2018. The Python Foundation had originally planned to sunset Python 2 in 2015, but gave it a five-year extension.

Project authors have been methodically hammering nails into Python 2’s coffin by announcing that they will no longer support Python 2. There’s a website dedicated to them.

However, Python developers still using the old version will become a major security problem soon, say experts. An analysis of the top ten packages from the Python Package Index by the UK National Cyber Security Centre (NCSC) in August found that most of the downloads were still for Python 2 versions. The agency sounded the alarm, warning that this posed a major security risk.

“If you continue to use unsupported modules, you are risking the security of your organisation and data, as vulnerabilities will sooner or later appear which nobody is fixing,” it said.

Laggards need not fear, though; the Foundation has a guide for porting Python 2 code to Python 3.