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

uv pip sync should maybe have a --no-remove flag? #4113

Closed
thejcannon opened this issue Jun 6, 2024 · 6 comments
Closed

uv pip sync should maybe have a --no-remove flag? #4113

thejcannon opened this issue Jun 6, 2024 · 6 comments
Labels
cli Related to the command line interface needs-decision Undecided if this should be done

Comments

@thejcannon
Copy link

👋 Howdy!

At $work we use a global lockfile to manage dependencies, so uv pip sync naturally is a great fit for keeping the transient environment up-to-date with regard to the lockfile as we travel forward and backwards in time (via git ops).

However, we also support people installing certain dependencies for one-off tooling or prototyping and I'd hate to tell them to run uv pip sync and those deps dissapear.

I understand that havign some kind of --no-remove flag is likely not truly what we want (because the env will maybe become bloated over time, or maybe there's conflicting deps, or maybe we're leaving a dep with a security concern) but I think it handles the use-case well-enough that it's worth trying out.

@zanieb
Copy link
Member

zanieb commented Jun 6, 2024

What if we have other ways to managing one-off tooling and prototyping? e.g. uv tool (#3560) or uv run --with <one-off-package>?

@thejcannon
Copy link
Author

I expected this answer 😄 I'd love to see those. I'm not 100% certain I'd be able to convince all of the folks I support (some of which aren't engineers, and don't know what uv is, or that it's used under the hood for our common tooling) to always use the totally-awesome-uv-thing.

@charliermarsh charliermarsh added needs-decision Undecided if this should be done cli Related to the command line interface labels Jun 7, 2024
@charliermarsh
Copy link
Member

I think pip install --no-deps will... basically do what you want? Internally it's like, exactly this.

@zanieb
Copy link
Member

zanieb commented Jun 7, 2024

We'll probably expose something like this, it was in our original designs. I'm just curious to see how far we can get without exposing it by, e.g., building better APIs and want to learn more about the stories behind it. Centrally managing environment state seems like a fair use case, especially if the downstream users have access to pip. You could still definitely break their environment with a sync operation though (or the sync could fail).

@charliermarsh
Copy link
Member

To be clear, I meant uv pip install --no-deps.

@thejcannon
Copy link
Author

Oh...... yeeeeeaaaaaaahhhh I think you're right 🤦

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli Related to the command line interface needs-decision Undecided if this should be done
Projects
None yet
Development

No branches or pull requests

3 participants