Skip to content

Migrate to use .python-version instead of runtime.txt #516

@smartspot2

Description

@smartspot2

Heroku has recently deprecated the runtime.txt file for specifying Python versions: https://devcenter.heroku.com/changelog-items/3141

They recommend using a .python-version file instead, due to greater compatibility with other tooling.

Further, it's generally recommended to only specify the minor version of Python, rather than include the micro version (i.e. we should specify 3.12 rather than 3.12.4), since generally we'd want to keep up with security releases.

To make this change in this repository, we'd need to modify the setup.sh script to check for .python-version, and additionally modify the check to only look for a prefix match, rather than an exact match.

The README should also be updated with this change. Some issues may arise if people pull this change locally though, since many use pyenv, which creates a .python-version file in their local repository.

Metadata

Metadata

Assignees

No one assigned

    Labels

    dependenciesPull requests that update a dependency fileherokuItems involving Heroku deploymentspythonPull requests that update Python code

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions