Skip to content
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 and eventually sunset runtime.txt support #275

Open
edmorley opened this issue Sep 17, 2024 · 1 comment · Fixed by #325
Open

Deprecate and eventually sunset runtime.txt support #275

edmorley opened this issue Sep 17, 2024 · 1 comment · Fixed by #325
Assignees

Comments

@edmorley
Copy link
Member

edmorley commented Sep 17, 2024

As of #272, the buildpack now supports the .python-version file for configuring the Python version.

The .python-version file is superior in several ways:

  • it is commonly supported/used by other tools (unlike runtime.txt, which is Heroku proprietary)
  • it supports the major Python version syntax (eg 3.X rather than 3.X.Y), so supports automatic security updates without needing to manually bump the patch version each time.

As such, we should deprecate runtime.txt support in the CNB, and then eventually remove support from the CNB entirely.

For the classic buildpack, see:
heroku/heroku-buildpack-python#1642

GUS-W-16878239.
GUS-W-16878263.

edmorley added a commit that referenced this issue Feb 4, 2025
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.
edmorley added a commit that referenced this issue Feb 4, 2025
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.
edmorley added a commit that referenced this issue Feb 4, 2025
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.
edmorley added a commit that referenced this issue Feb 4, 2025
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.
@edmorley edmorley self-assigned this Feb 4, 2025
@edmorley edmorley linked a pull request Feb 5, 2025 that will close this issue
@edmorley
Copy link
Member Author

edmorley commented Feb 6, 2025

Deprecation announcement:
https://devcenter.heroku.com/changelog-items/3141

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant