Skip to content

Conversation

@edmorley
Copy link
Member

@edmorley edmorley commented Dec 9, 2025

Previously if an app had only a setup.py file and no Python package manager files (such as requirements.txt, Pipfile.lock, Poetry.lock or uv.lock), the buildpack would install the project using pip install --editable .

However, this implicit fallback doesn't make sense now that the buildpack supports multiple package managers, and so has to guess which package manager to use, and whether to install the project in editable mode or not.

As such, in #1897 this fallback was deprecated, and is now being sunset. This also brings the classic Python buildpack's behaviour in line with the Python CNB.

Apps that only have a setup.py file will now need to add an explicit requirements.txt file containing:

--editable .

That said, in general we recommend people don't use setup.py to declare their dependencies, since:

  • the file is deprecated in favour of pyproject.toml
  • it's intended more for libraries rather than applications, and it's much less common (and practical) to list all transitive dependencies in a setup.py, meaning apps using the file typically have unpinned dependencies, which is a production reliability risk. (Apps should either be using a package manager that supports lockfiles, or else using one of the pip requirements files substitutes for lockfiles, like pip-tools or pip freeze etc.)

GUS-W-19275444.

Previously if an app had only a `setup.py` file and no Python package
manager files (such as `requirements.txt`, `Pipfile.lock`, `Poetry.lock`
or `uv.lock`), the buildpack would install the project using
`pip install --editable .`

However, this implicit fallback doesn't make sense now that the
buildpack supports multiple package managers, and so has to guess
which package manager to use, and whether to install the project in
editable mode or not.

As such, in #1897 this fallback was deprecated, and is now being sunset.
This also brings the classic Python buildpack's behaviour in line with
the Python CNB.

Apps that only have a `setup.py` file will now need to add an explicit
`requirements.txt` file containing:

```
--editable .
```

GUS-W-19275444.
@edmorley edmorley self-assigned this Dec 9, 2025
@edmorley edmorley marked this pull request as ready for review December 9, 2025 14:50
@edmorley edmorley requested a review from a team as a code owner December 9, 2025 14:50
@edmorley edmorley merged commit 6d06c3b into main Dec 9, 2025
6 checks passed
@edmorley edmorley deleted the sunset-setup.py branch December 9, 2025 15:13
@heroku-linguist heroku-linguist bot mentioned this pull request Dec 10, 2025
@edmorley
Copy link
Member Author

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.

2 participants