Skip to content

Deprecate support for the runtime.txt file #1743

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

Merged
merged 1 commit into from
Feb 5, 2025
Merged

Conversation

edmorley
Copy link
Member

@edmorley edmorley commented Feb 4, 2025

This is the classic Python buildpack equivalent of:
heroku/buildpacks-python#325

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.

Closes #1642.
GUS-W-16878260.

@edmorley edmorley self-assigned this Feb 4, 2025
@edmorley edmorley force-pushed the deprecate-runtime-txt branch from 33f390a to f943a2a Compare February 4, 2025 22:44
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`.

Closes #1642.
GUS-W-16878260.
@edmorley edmorley force-pushed the deprecate-runtime-txt branch from f943a2a to b290f6d Compare February 4, 2025 22:49
@edmorley edmorley marked this pull request as ready for review February 4, 2025 22:53
@edmorley edmorley requested a review from a team as a code owner February 4, 2025 22:53
@edmorley edmorley enabled auto-merge (squash) February 4, 2025 23:11
@edmorley edmorley merged commit a61ce1c into main Feb 5, 2025
7 checks passed
@edmorley edmorley deleted the deprecate-runtime-txt branch February 5, 2025 00:24
@heroku-linguist heroku-linguist bot mentioned this pull request Feb 5, 2025
@edmorley
Copy link
Member Author

edmorley commented Feb 6, 2025

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

Successfully merging this pull request may close these issues.

Display a deprecation warning for runtime.txt
2 participants