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

Support the uv package manager #1616

Open
mikepink opened this issue Jul 25, 2024 · 2 comments
Open

Support the uv package manager #1616

mikepink opened this issue Jul 25, 2024 · 2 comments

Comments

@mikepink
Copy link

uv is a drop-in replacement for pip which runs very quickly. We've replaced pip with uv locally and have noticed a significant speed up in our Python build time in our development and CI environments. By adopting support for uv, we anticipate our Heroku builds would complete ~5 minutes more quickly.

Because uv is a drop-in replacement, we found adoption to be very straightforward in our case. pip install -r requirements.txt becomes uv pip install -r requirements.txt. The promise of significantly improved performance with a very simple migration path was enough to convince us to give it a try internally.

Happy to attempt a PR if that would be welcome/well received.

@edmorley edmorley changed the title uv (pip replacement) support Support the uv package manager Nov 25, 2024
@edmorley
Copy link
Member

edmorley commented Nov 25, 2024

@mikepink Hi! Thank you for opening this - I'd love to see uv support too 😄

Since this issue was opened, uv has added support for project management (uv.lock + the uv sync command etc). As such, I think it would make most sense to support using uv sync rather than the uv pip compatibility commands (on Heroku the latter wouldn't speed up warm builds by much due to the current caching of site-packages, plus wouldn't give any of the determinism benefits etc).

I don't yet have an exact timeline for when I'll be able to add support - I personally would like it to be as soon as possible! (The buildpack refactoring/improvements made as part of adding support for Poetry recently will at least make it much faster to add uv support than for adding Poetry support.)

See also the related issue for the Python CNB (Cloud Native Buildpack; the next-generation buildpack that is due to replace this classic Heroku buildpack in the future):
heroku/buildpacks-python#248

@edmorley
Copy link
Member

Btw the more thumbs up I can get on both this GitHub issue and the roadmap issue (heroku/roadmap#323) the easier it will be to make a case for it during internal roadmap/product planning - so please everyone who is interested in uv support add a 👍 to both GitHub issues!

@edmorley edmorley pinned this issue Nov 26, 2024
edmorley added a commit that referenced this issue Dec 13, 2024
To help gauge how often a uv lockfile exists. (Either from
someone trying to use uv and the build failing, or when a
third-party buildpack is used to export the uv lockfile to a
requirements file etc).

Towards #1616.
GUS-W-17431743.
edmorley added a commit that referenced this issue Dec 13, 2024
To help gauge how often a uv lockfile exists. (Either from
someone trying to use uv and the build failing, or when a
third-party buildpack is used to export the uv lockfile to a
requirements file etc).

Towards #1616.
GUS-W-17431743.
edmorley added a commit that referenced this issue Dec 13, 2024
To help gauge how often a uv lockfile exists. (Either from
someone trying to use uv and the build failing, or when a
third-party buildpack is used to export the uv lockfile to a
requirements file etc).

Towards #1616.
GUS-W-17431743.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants