History
This page is now an archive of part of the transition from Python 2 to 3.
By around 2015, when Python 2 support was originally planned to end, many important Python libraries and tools supported Python 3. But Python 2 still had a lot of users, and projects needed to support both major versions. The end of Python 2 support was postponed to 2020, and some people argued that development of Python 2 should resume. It seemed like a real possibility that the end date would be postponed again, and we’d need to support two versions of the language indefinitely.
The Python 3 statement was drawn up around 2016. Projects pledged to require Python 3 by 2020, giving other projects confidence that they could plan a similar transition, and allowing downstream users to figure out their options without a nasty surprise. We didn’t force people to move to Python 3, but if they wanted to stick with Python 2, they would stop getting new versions of our projects. The focus was originally on the scientific Python ecosystem, with Jupyter and matplotlib among the first projects involved, but in late 2017 it was expanded to any Python projects. A rapidly growing number of projects signed up as we approached 2020.
The long-term transition we hoped for has succeeded: in 2024 it is entirely normal for projects to support only Python 3, simplifying maintainers’ lives and letting us take full advantage of newer language features.
Thank-you to all of the people, in projects big and small, who contributed their support to the statement!
Moving to require Python 3
Almost all major open source Python packages now support both Python 3.x and Python 2.7, and many projects have been supporting these two versions of the language for several years. While we have developed tools and techniques to maintain compatibility efficiently, it is a small but constant friction in the development of a lot of code.
We are keen to use Python 3 to its full potential, and though we accepted the cost of writing cross-compatible code to allow a smooth transition, we did not intend to maintain this compatibility indefinitely. Although the transition was not as quick as we hoped, it is taking place, with more and more people using, teaching and recommending Python 3.
The developers of the Python language extended support of Python 2.7 from 2015 to January 1, 2020, recognising that many people were still using Python 2. We believe that the extra 5 years was sufficient to transition off of Python 2, and now that upstream support has ended, our projects have stopped supporting Python 2 or will do so before the end of 2020. We will thus be able to simplify our code and take advantage of the many new features in the current version of the Python language and standard library.
Third parties may offer paid support for our projects on old Python versions for longer than we support them ourselves. We won’t obstruct this, and it is a core principle of free and open source software that this is possible. However, if you enjoy the free, first party support for many projects including the Scientific Python stack, please move to Python 3.
For all of these reasons, the following projects have pledged to drop support for Python 2.7 no later than 2020, following the end of support for Python 2.7 itself at the start of the year.
Projects
Participating Projects
These projects pledge to drop Python 2 support in or before 2020.
- TensorFlow
- scikit-learn
- PyTorch
- Apache Spark
- pandas
- Tornado
- Apache MXNet (Incubating)
- XGBoost
- mitmproxy
- IPython
- ccxt
- NumPy
- SaltStack
- Zulip
- Bokeh
- Matplotlib
- Kivy
- Pelican
- Pillow
- PyInstaller
- SciPy
- SymPy
- Jupyter notebook
- Dask
- Spyder
- pytest
- Tensorpack
- statsmodels
- PyMC3
- Cython
- marshmallow
- Hypothesis
- Apache Beam
- xonsh
- Scikit Image
- Sphinx
- geopy
- Neural Network Libraries
- MISP
- Astropy
- Biopython
- FontTools
- Nikola
- xarray
- GluonNLP
- Apache Libcloud
- Weblate
- Pythran
- dateutil
- CherryPy
- Tryton
- MNE
- Adversarial Robustness Toolbox
- tikzplotlib
- stumpy
- pydicom
- PyStan
- RDKit
- Software Carpentry
- ADB-Enhanced
- Cartopy
- fecon235
- scikit-bio
- MetPy
- Bottleneck
- SunPy
- Nengo
- Axelrod
- rpy2
- Toyplot
- Psi4
- pyLast
- iris
- ESMValTool
- meshio
- perfplot
- cmd2
- yt
- quadpy
- PySCIPOpt
- betterbib
- OpenQuake engine
- PyMeasure
- Urduhack
- osBrain
- Cylc Workflow
- FEniCS
- GSSAPI
- colorio
- TatSu
- Chaquopy
- angr
- BioBuilds
- orthopy
- freud
- signac
- Manticore
- PLATON
- GSTools
- Cantor
- DocRaptor
- Connectome Mapper 3
- lib3to6
- NetworkX
- folium
- PyQt5
- better-exceptions
- umap-learn
- hdbscan
- h5py
- python-gitlab
- python-chess
- awslimitchecker
- Altair
- music21
- imageio
- An Introduction to Applied Bioinformatics
- pyfakefs
- pvlib-python
- QIIME
- Py-ART
- SPADE
- Plyara
- gala
- stomp.py
- CIS
- cual-id
- tinytext
- fino
- OSMViz
- MambuPy
- Pyramid
- eml_parser
- odin
- jenkinsflow
- multiconf
- pyApp
- python-daemon
timeline
Projects Timeline
In the following chart, you can see many projects that have decided to stop supporting Python 2 before 2020. The chart is a guideline to show what versions of each project support Python 2, or not, their release timelines, and extended support. (Python’s own timeline is available here).
Compatible with Python 2 and Python 3.
Compatible with Python 3 only.
See how to add your project to the list of participating projects and to this timeline
why
Why switch to Python 3?
Here are some resources on why Python 3 was created, and how and why to update code to use Python 3:
- Why Python 3 exists (Brett Cannon)
- How to add Python 3 support to your code
- Python FAQ: Why should I use Python 3? (lexy munroe)
- Python FAQ: How do I port to Python 3? (lexy munroe)
- Stop supporting Python 2.6 for free (Nick Coghlan)
- Why Python 4.0 won’t be like Python 3.0 (Nick Coghlan)
- Python 3 for scientists
- scikit-bio py3-only RFC
sign
Sign the statement
Do you want to sign the statement for your project? Open an issue with your project information, or directly submit a pull-request.
discuss
Discuss
While the above statement has been signed by dozens of developers, it is still open for discussion. Feel free to open an issue on our GitHub repository or browse the open and closed ones.
If you think some information is missing or inaccurate, please let us know as well.
Practicalities
Practicalities
While most of the projects that have signed up above are migrating to Python 3 only code bases, we are gathering information about the difficulties that can be encountered both by developers and users during this process.
We are thus collecting a list of things to be aware of for when transitioning that are less obvious. For example : as a developer, how to make sure that your package manager like pip does not upgrade your libraries to incompatible versions on Python 2. See the Practicality Page for information and check our repository to contribute.