-
Notifications
You must be signed in to change notification settings - Fork 958
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
Use the lockfile as constraints when doing uv run --with #7416
Comments
Agreed - I came looking for a very similar issue to this. In my case I'd like to run Python CLIs in my environment without installing other tools. For example, in a [build-system]
build-backend = "hatchling.build"
requires = ["hatchling"]
[project]
dependencies = [
"requests"
]
name = "example"
readme = "README.md"
requires-python = ">=3.11,<4"
version = "0.1.0"
[tool.uv]
dev-dependencies = [
"ruff>=0.6.5",
"pytest>=8.3.3"
] In this case I would want to run something like this and have it respect my lockfile: uv run --with ruff ruff format . Even better (for my use case), it would be nice to install ruff into my virtual environment without having to install any of my other dev dependencies:
|
@juftin -- Are you looking for |
Kind of, I'm using Maybe this is a niche need, but I'd like to be able to install/run just If |
Yeah I think we should respect the lockfile for the —with dependencies. At the very least we should prefer versions that are in the lockfile. |
awesome, thanks for the fix! |
Hello,
I'm using uv 0.4.10
I'm trying to make my project use uv project semantics and to get around uv not having support for conflicting requirements I have scripts to run my tests with either
uv run --with mypy==1.4.0 django-stubs==4.2.3
oruv run --with mypy==1.11.2 --with django-stubs==5.0.2
and that works.However, it seems that it's not using the lock file as a constraints and so it's not respecting that I have a specific version of django in my project.
Is it possible to make it so that doing a uv run using
--with
uses the lock file as a constraints?The text was updated successfully, but these errors were encountered: