Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Dynamic version is not omitted when fields other than version are marked as dynamic #11460

Closed
edgarrmondragon opened this issue Feb 12, 2025 · 2 comments · Fixed by #11468
Closed
Assignees
Labels
bug Something isn't working

Comments

@edgarrmondragon
Copy link
Contributor

Summary

Consider this project

# pyproject.toml
[project]
name = "uv-more-dynamic"
dynamic = [
    "version",
]
requires-python = ">=3.13"

[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"

[tool.hatch.version]
source = "vcs"

which results in the lock file

version = 1
requires-python = ">=3.13"

[[package]]
name = "uv-more-dynamic"
source = { editable = "." }

However, marking dependencies or optional-dependencies as dynamic results in the version being added to uv.lock:

  [project]
  name = "uv-more-dynamic"
  dynamic = [
+     "dependencies",
      "version",
  ]
  version = 1
  requires-python = ">=3.13"

  [[package]]
  name = "uv-more-dynamic"
+ version = "0.1.dev0+d20250212"
  source = { editable = "." }

Platform

Darwin 24.3.0 arm64

Version

uv 0.5.30 (ddbc6e3 2025-02-10)

Python version

Python 3.13.1

@edgarrmondragon edgarrmondragon added the bug Something isn't working label Feb 12, 2025
@charliermarsh
Copy link
Member

Interesting... Thanks.

@charliermarsh charliermarsh self-assigned this Feb 12, 2025
@charliermarsh
Copy link
Member

(Reproduced.)

loic-lescoat pushed a commit to loic-lescoat/uv that referenced this issue Mar 2, 2025
…1468)

## Summary

Just a logic issue... If we see a dynamic field that isn't `"version"`,
we end up _not_ propagating the fact that `"version"` is also dynamic.

Closes astral-sh#11460.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants