Skip to content

Conversation

@edmorley
Copy link
Member

@edmorley edmorley commented Jan 23, 2025

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 (similar to what's already supported for the .python-version file).

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 in heroku/heroku-buildpack-python#1664).

The runtime.txt file 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.

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.
@edmorley edmorley added the enhancement New feature or request label Jan 23, 2025
@edmorley edmorley self-assigned this Jan 23, 2025
@edmorley edmorley marked this pull request as ready for review January 23, 2025 14:35
@edmorley edmorley requested a review from a team as a code owner January 23, 2025 14:35
@edmorley edmorley enabled auto-merge (squash) January 23, 2025 14:36
@edmorley edmorley merged commit aef5e69 into main Jan 23, 2025
8 checks passed
@edmorley edmorley deleted the runtime-txt-major-version branch January 23, 2025 16:52
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))
@heroku-linguist heroku-linguist bot mentioned this pull request Feb 5, 2025
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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants