Python 3.9 is no longer supported
Change effective on 07 January 2026
Python 3.9 reached its upstream end-of-life on 31st October 2025 and so no longer receives upstream bug or security fixes.
In accordance with our Python Version Support Policy, we previously deprecated Python 3.9 support on 8th January 2025 and added deprecation warnings announcing its end of support to the build log.
As of today, Python 3.9 is no longer supported, and so the latest version of the Python buildpack rejects builds of apps using it.
Existing Python 3.9 apps continue to run, however, you must upgrade them to a newer version of Python before you can perform any further builds/code deployments.
Since Python 3.9 is no longer receiving security updates, apps still using it may contain security vulnerabilities. Upgrade them to a newer version of Python as soon as possible.
For more information, see Supported Python Versions.
If you are not able to update to newer Python now, then you can temporarily pin to the previous Python buildpack version in order to continue building.
For Cedar-generation apps, switch from the default heroku/python buildpack alias to a classic buildpack URL of: https://github.com/heroku/heroku-buildpack-python.git#v326 (the previous buildpack version). However, this must only be used as a short-term workaround, and after updating to a supported Python version you must remember to switch back to the heroku/python stable release alias to pick up future security updates and platform compatibility changes.
For more information, see Managing Buildpacks.