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

package.metadata.requires-dist in uv.lock is incomplete for last added packages. #6614

Closed
kabouzeid opened this issue Aug 25, 2024 · 2 comments · Fixed by #6618
Closed

package.metadata.requires-dist in uv.lock is incomplete for last added packages. #6614

kabouzeid opened this issue Aug 25, 2024 · 2 comments · Fixed by #6618
Assignees
Labels
bug Something isn't working

Comments

@kabouzeid
Copy link
Contributor

package.metadata.requires-dist in uv.lock isn't updated with the version specifier on add. only subsequent add, lock, or sync calls add it.

uv --version
uv 0.3.3 (Homebrew 2024-08-23)uv add ruff
Using Python 3.12.5
Creating virtualenv at: .venv
Resolved 2 packages in 190ms
   Built project @ file:///private/tmp/project
Prepared 2 packages in 695ms
Installed 2 packages in 2ms
 + project==0.1.0 (from file:///private/tmp/project)
 + ruff==0.6.2cat uv.lock | grep requires-dist
requires-dist = [{ name = "ruff" }]uv add polars
Resolved 3 packages in 5ms
   Built project @ file:///private/tmp/project
Prepared 2 packages in 139ms
Uninstalled 1 package in 0.51ms
Installed 2 packages in 2ms
 + polars==1.5.0
 ~ project==0.1.0 (from file:///private/tmp/project)cat uv.lock | grep -A 3 requires-dist
requires-dist = [
    { name = "polars" },
    { name = "ruff", specifier = ">=0.6.2" },
]uv sync
Resolved 3 packages in 16ms
Audited 3 packages in 0.05mscat uv.lock | grep -A 3 requires-dist
requires-dist = [
    { name = "polars", specifier = ">=1.5.0" },
    { name = "ruff", specifier = ">=0.6.2" },
]
@charliermarsh
Copy link
Member

Thanks! Will take a look, looks wrong.

@charliermarsh charliermarsh added the bug Something isn't working label Aug 25, 2024
@charliermarsh charliermarsh self-assigned this Aug 25, 2024
@charliermarsh
Copy link
Member

Oh this actually does make sense (we update the pyproject.toml after the resolution, to set the lower-bound specifier). Difficult to fix but we definitely need to.

charliermarsh added a commit that referenced this issue Aug 25, 2024
## Summary

If we update the project requirements, we _also_ need to update the
lockfile.

Closes #6614.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants