.python Version

Heroku has used a runtime.txt file for years, but as of 2023, they also support .python-version. Create the file and commit it:

python-3.11.5

Note: Heroku requires the python- prefix on the version string.

Python has evolved significantly over the years, with each version introducing new features, enhancements, and improvements. Understanding the different Python versions and their notable features can help you make informed decisions when choosing a version for your project. By selecting the right version, you can ensure that your project is compatible, maintainable, and well-supported. .python version

Here’s an interesting and slightly quirky take on Python versions — perfect for a blog, a talk, or just to satisfy your curiosity.


Understanding Python versions and their features is essential for effective project management and development. By choosing the right Python version and following best practices, you can ensure your project's success and maintainability. Heroku has used a runtime

First, a quick history lesson. Python 2.7 was officially sunset on January 1, 2020. It receives no security patches, no bug fixes, no nothing. If you still have a Python 2 codebase in production, you are running an unmaintained language. The community has long since moved to Python 3.

There is no debate here. Use Python 3.

Your colleague runs Python 3.10, but you have 3.12 installed. Suddenly, their use of datetime.UTC (new in 3.11) works fine on your machine but fails in CI. A .python-version file eliminates this ambiguity.