Sep 20, 2019

Saying goodbye to Python 2 so that Python can keep up with the times

The Python Software Foundation, a nonprofit organization tasked with developing and maintaining the Python programming language, confirmed that the team will be officially sunsetting Python 2 on January 1, 2020.

Over the last few years, Python has been at the forefront of a machine learning and data science renaissance, providing the backbone for artificial intelligence libraries and deep learning frameworks. But with new languages like Julia and Rust making serious inroads into the development world, Python will need to improve faster if it hopes to preserve its dominance.

Developers are encouraged to port all Python code to Python 3, the latest iteration that was launched over 10 years ago in 2008. According to the Python team: “we will not improve [Python 2] anymore after that day, even if someone finds a security problem in it.”

Transitioning the entire Python community to the latest language version has often faced unexpected challenges over the last few years. The Python team originally stated that support for Python 2 would end in 2015, but after receiving community feedback, developers were given an extra five years of support. During that extra time many large companies, such as Instagram and Dropbox, completed their migrations from Python 2 to Python 3. Other companies, however, are still struggling to migrate their codebase even as time runs out. Sources say that JPMorgan, one of the largest banks in the world, will be unable to complete its Python transition by the 2020 deadline. For such companies, specialist third-party vendors are the only solution to maintain existing Python 2 code if any security patches or updates are needed.

Launched in 2000, Python 2 has left an indelible mark on the software development world, but its reign is slowly ending to usher in a more dynamic period of innovation for the Python community. For the Python development team, dropping support for legacy versions frees up resources to develop new features that will define the future of Python. The move also encourages the greater Python development community to evolve as well, nudging engineering teams to make use of new tools available in Python 3 and modernize the remaining vast swaths of legacy code written in Python 2.

Want to get more of these in your inbox?

Subscribe for weekly updates from the Software team.