The state of Python 2.7 support on Heroku, and questions users might have.
Python 2.7 Community EOL FAQ
For questions around Heroku’s Python 2 support policy, please see the Python 2.7 EOL FAQ.
How do I upgrade my Python application from 2 to 3?
The PSF has put together a helpful Porting Guide - this is a great place to start migrating your Python 2 applications to Python 3.
If you've completed the migration and your app works locally with a supported version of Python 3, then all you need to do is update your
runtime.txt to deploy with this new version on Heroku.
How do I keep using Python 2?
You do not need to do anything to keep using Python 2. Python 2.7.17 applications will continue to build and run on Heroku 18 for the lifetime of the stack, until April 2023.
However, Python 2.7 on Heroku will no longer receive security updates after January 1, 2020, as it has reached it’s community specified end of life date.
Because of this, Heroku platform support for these applications will end as soon as February 1st, 2021. On that sunset date, these applications will continue to build and run, but they will no longer fall under our Support Policy.
We recommend that you migrate your app to a supported Python runtime to ensure that it's running in a secure environment as soon as possible.
Are older versions of CPython 2 supported on Heroku?
No. For all Python versions, only the latest security patch is supported on the platform.
Will there be more CPython releases on Heroku?
Heroku will provide any future releases of Python 2.7 from the core CPython team, but Heroku does not maintain any Python distributions itself. We will not release our own patches for Python 2.7.
What’s the difference between CPython and Pypy?
CPython and Pypy are two different versions of Python. CPython is the distribution that is sunsetting the 2.7 branch.
How to I migrate to Pypy 2?
To get started with local Pypy development, check out their documentation or use pyenv to install. Once your application works locally with Pypy 2.7 - v7.2.0, you can update your runtime the way you normally would. See Specifying a Python runtime for more information.