-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Replace pip with uv for the project files #5356
Conversation
Sounds cool!
Found the issue tracking that dependabot/dependabot-core#10478 |
Alternatively, renovate already has uv support it seems: renovatebot/renovate#30756 |
5e39fb3
to
0ba7619
Compare
5f0fd9e
to
8c8b7fb
Compare
Time to merge this before it is getting out of sync with requirements.txt again. |
Nice work! |
Just some additional context reaffirming that: This change is not intended to replace As far as I know, it is not yet possible to replace pip with uv in the generated project because Heroku does not support it yet on the Heroku's Classic Python Buildpack and because the Heroku's Classic Python Buildpack requires the In parallel with Heroku's Classic Python Buildpack, Heroku is developing a new buildpack standard and a new buildpack for Python, the Heroku's Cloud Native Buildpack for Python applications, which may eventually support Issues directly and indirectly related to Heroku support in general, now and in the future: Heroku's Classic Python Buildpack: heroku/heroku-buildpack-python#834 Heroku's Cloud Native Buildpack for Python applications: heroku/buildpacks-python#261 |
The generated project is indeed untouched. But not for long if it is up to me. In one of my projects running on Heroku I'm using the pre-commit hook to generate a requirements.txt as described over here: https://docs.astral.sh/uv/guides/integration/pre-commit/ works like a charm because uv is blazing fast. |
Description
uv
is maturing out and I played around a bit by replacing pip with uv for the project files. The generated project template stay's untouched.Rationale
Dependencies
The dependencies located in requirements.txt are now included in
pyproject.toml
in theproject.dependencies
section.pyproject-fmt
sorts them alphabetical so I had to remove the comments. There is also a lock file (uv.lock) but dependabot doesn't have support for this at the moment.Actions
Each action uses
astral-sh/setup-uv@v2
for installing and caching the dependencies. From what I saw the actions are a few seconds faster but not much.Scripts
The scripts located in
/scripts/
have now a dependencies section for standalone execution: https://docs.astral.sh/uv/guides/scripts/ and are run by invokinguv run scripts/create_django_issue.py
Looking forward to implement
uv
in the project template to!