Sunset implicit setup.py support #1992
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Previously if an app had only a
setup.pyfile and no Python package manager files (such asrequirements.txt,Pipfile.lock,Poetry.lockoruv.lock), the buildpack would install the project usingpip 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.pyfile will now need to add an explicitrequirements.txtfile containing:That said, in general we recommend people don't use
setup.pyto declare their dependencies, since:pyproject.tomlsetup.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 orpip freezeetc.)GUS-W-19275444.