Deprecate support for the runtime.txt
file
#325
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
runtime.txt
file is a classic Heroku Python buildpack invention that's not widely supported in the Python ecosystem. Instead, most other tooling (pyenv, package managers, GitHub Actions, dependency update bots etc) support/use the.python-version
file.As such, we recently added
.python-version
support to both the Python CNB and the classic Python buildpack, and updated all documentation and guides to use it instead of theruntime.txt
file. eg:https://devcenter.heroku.com/articles/python-runtimes
We would prefer apps use the new file, since it helps ensure their deployed app is using the same Python version used locally (via eg pyenv or uv) or in CI.
As such this adds a deprecation warning for apps using
runtime.txt
, which will be made an error in the CNB in near future (likely before Fir GA). We'll also be adding a deprecation warning to the classic Python buildpack, however, won't be making that an error any time soon (and maybe at all; but TBD).Towards #275.
GUS-W-16878239.