Skip to content

Conversation

@edmorley
Copy link
Member

@edmorley edmorley commented Apr 17, 2025

The Heroku-proprietary runtime.txt file was previously deprecated in both the classic buildpack and CNB, in favour of the more widely supported .python-version file:
https://devcenter.heroku.com/changelog-items/3005
https://devcenter.heroku.com/changelog-items/3141

We will be keeping support for runtime.txt in the classic Python buildpack for a while longer. However, since the CNB is new (and not used by any/many Heroku apps yet since it only GAed this week), we're dropping support for runtime.txt here sooner, to encourage migration to .python-version when apps migrate from Cedar to Fir. (Particularly since uv support will require apps to be using .python-version)

Closes #275.
GUS-W-16878263.

The Heroku-proprietary `runtime.txt` file was previously
deprecated in both the classic buildpack and CNB, in favour
of the more widely supported `.python-version` file:
https://devcenter.heroku.com/changelog-items/3005
https://devcenter.heroku.com/changelog-items/3141

We will be keeping support for `runtime.txt` in the classic
Python buildpack for a while longer. However, since the CNB
is new (and not used by any/many Heroku apps yet since it only
GAed this week), we're dropping support for `runtime.txt` here
sooner, to encourage migration. (Particularly since uv support
will require apps to be using `.python-version`)

Closes #275.
GUS-W-16878263.
@edmorley edmorley self-assigned this Apr 17, 2025
@edmorley edmorley marked this pull request as ready for review April 17, 2025 13:35
@edmorley edmorley requested a review from a team as a code owner April 17, 2025 13:35
@edmorley edmorley enabled auto-merge (squash) April 17, 2025 13:37
@edmorley edmorley merged commit 3183e18 into main Apr 17, 2025
8 checks passed
@edmorley edmorley deleted the sunset-runtime-txt branch April 17, 2025 14:55
heroku-linguist bot added a commit that referenced this pull request May 2, 2025
## heroku/python

### Removed

- Removed support for the deprecated `runtime.txt` file. Python versions must now be specified using a `.python-version` file instead. ([#352](#352))
- Removed support for Ubuntu 20.04 (and thus Heroku-20 / `heroku/builder:20`). ([#358](#358))

### Changed

- Improved the error messages shown when `.python-version` contains an invalid Python version or stray invisible characters (such as ASCII control codes). ([#353](#353) and [#354](#354))
- Improved the error messages shown if I/O errors occur. ([#355](#355) and [#356](#356))
@heroku-linguist heroku-linguist bot mentioned this pull request May 2, 2025
heroku-linguist bot added a commit to heroku/cnb-builder-images that referenced this pull request May 2, 2025
## heroku/python

### Removed

- Removed support for the deprecated `runtime.txt` file. Python versions must now be specified using a `.python-version` file instead. ([#352](heroku/buildpacks-python#352))
- Removed support for Ubuntu 20.04 (and thus Heroku-20 / `heroku/builder:20`). ([#358](heroku/buildpacks-python#358))

### Changed

- Improved the error messages shown when `.python-version` contains an invalid Python version or stray invisible characters (such as ASCII control codes). ([#353](heroku/buildpacks-python#353) and [#354](heroku/buildpacks-python#354))
- Improved the error messages shown if I/O errors occur. ([#355](heroku/buildpacks-python#355) and [#356](heroku/buildpacks-python#356))
edmorley added a commit to heroku/heroku-buildpack-python that referenced this pull request May 2, 2025
Backports the improvements made as part of:
- heroku/buildpacks-python#352
- heroku/buildpacks-python#353
- heroku/buildpacks-python#354
- heroku/buildpacks-python#355

Plus:
- applies similar changes to equivalent error messages that
  only exist in the classic buildpack (eg the Pipenv errors)
- switches to use of contractions as per the CX team's
  style guidelines

GUS-W-18225347.
GUS-W-18421778.
edmorley added a commit to heroku/heroku-buildpack-python that referenced this pull request May 2, 2025
Backports the error message/build output improvements made as part of:
- heroku/buildpacks-python#352
- heroku/buildpacks-python#353
- heroku/buildpacks-python#354
- heroku/buildpacks-python#355

Plus:
- applies similar changes to equivalent error messages that
  only exist in the classic buildpack (eg the Pipenv errors)
- switches to use of contractions as per the CX team's
  style guidelines

GUS-W-18225347.
GUS-W-18421778.
edmorley added a commit to heroku/heroku-buildpack-python that referenced this pull request May 2, 2025
Backports the error message/build output improvements made as part of:
- heroku/buildpacks-python#352
- heroku/buildpacks-python#353
- heroku/buildpacks-python#354
- heroku/buildpacks-python#355

Plus:
- applies similar changes to equivalent error messages that
  only exist in the classic buildpack (eg the Pipenv errors)
- switches to use of contractions as per the CX team's
  style guidelines

GUS-W-18225347.
GUS-W-18421778.
edmorley added a commit to heroku/heroku-buildpack-python that referenced this pull request May 2, 2025
Backports the error message/build output improvements made as part of:
- heroku/buildpacks-python#352
- heroku/buildpacks-python#353
- heroku/buildpacks-python#354
- heroku/buildpacks-python#355

Plus:
- applies similar changes to equivalent error messages that
  only exist in the classic buildpack (eg the Pipenv errors)
- switches to use of contractions as per the CX team's
  style guidelines

GUS-W-18225347.
GUS-W-18421778.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deprecate and eventually sunset runtime.txt support

2 participants