-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deprecate support for the runtime.txt
file
#325
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4dc45ee
to
187ccc8
Compare
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 the `runtime.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 (if at all). Towards #275. GUS-W-16878239.
187ccc8
to
5823f72
Compare
runesoerensen
approved these changes
Feb 4, 2025
heroku-linguist bot
added a commit
that referenced
this pull request
Feb 5, 2025
## heroku/python ### Added - Added `runtime.txt` support for the `python-3.X` major Python version form. ([#322](#322)) - Enabled `libcnb`'s `trace` feature. ([#320](#320)) ### Changed - The Python 3.13 version alias now resolves to Python 3.13.2. ([#326](#326)) - The Python 3.12 version alias now resolves to Python 3.12.9. ([#326](#326)) - Deprecated support for the `runtime.txt` file. ([#325](#325)) - Improved the error messages shown when the `.python-version` file contents aren't valid. ([#325](#325))
Merged
heroku-linguist bot
added a commit
to heroku/cnb-builder-images
that referenced
this pull request
Feb 5, 2025
## heroku/python ### Added - Added `runtime.txt` support for the `python-3.X` major Python version form. ([#322](heroku/buildpacks-python#322)) - Enabled `libcnb`'s `trace` feature. ([#320](heroku/buildpacks-python#320)) ### Changed - The Python 3.13 version alias now resolves to Python 3.13.2. ([#326](heroku/buildpacks-python#326)) - The Python 3.12 version alias now resolves to Python 3.12.9. ([#326](heroku/buildpacks-python#326)) - Deprecated support for the `runtime.txt` file. ([#325](heroku/buildpacks-python#325)) - Improved the error messages shown when the `.python-version` file contents aren't valid. ([#325](heroku/buildpacks-python#325))
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.