Support major Python version syntax in runtime.txt#322
Merged
Conversation
Historically the `runtime.txt` file has only supported specifying an exact Python version, in the form `python-3.X.Y`. This adds support for the `python-3.X` form too, which means the app will automatically receive new Python patch updates during subsequent builds. This means the Python CNB's `runtime.txt` supported syntax now matches that supported by the classic Python buildpack (which gained support for the major version form as part of adding support for the `.python-version` file). The `runtime.txt` file remains deprecated (a deprecation warning will be added shortly), however, in the meantime this improves parity between the classic buildpack and CNB. GUS-W-17660224.
Malax
approved these changes
Jan 23, 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))
This file contains hidden or 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
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.
Historically the
runtime.txtfile has only supported specifying an exact Python version, in the formpython-3.X.Y.This adds support for the
python-3.Xform too, which means the app will automatically receive new Python patch updates during subsequent builds (similar to what's already supported for the.python-versionfile).This means the Python CNB's
runtime.txtsupported syntax now matches that supported by the classic Python buildpack (which gained support for the major version form as part of adding support for the.python-versionfile in heroku/heroku-buildpack-python#1664).The
runtime.txtfile remains deprecated (a deprecation warning will be added shortly: #275), however, in the meantime this improves parity between the classic buildpack and CNB.GUS-W-17660224.