-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Labels
bugSomething isn't workingSomething isn't workinghelp wantedContribution especially encouragedContribution especially encouraged
Description
uv 0.4.24
Maybe this is already reported but I couldn't find it.
Steps to reproduce:
1, uv init temp
2. cd temp
3. uv add requests
4. uv add whenever~=0.6.9
5. Edit project.dependencies in pyproject.toml from:
dependencies = [
"requests>=2.32.3",
"whenever~=0.6.9",
]To:
dependencies = [
"requests>=2.32.3", # Should not expect to be updated frequently
"whenever~=0.6.9", # Pinned to 0.6 due to API not yet being stable
]uv add uv zope- Check
project.dependenciesinpyproject.toml:
Actual output:
dependencies = [
"requests>=2.32.3",
"uv>=0.4.24",
# Should not expect to be updated frequently
"whenever~=0.6.9",
"zope>=5.11",
# Pinned to 0.6 due to API not yet being stable
]Expected output:
dependencies = [
"requests>=2.32.3", # Should not expect to be updated frequently
"uv>=0.4.24",
"whenever~=0.6.9", # Pinned to 0.6 due to API not yet being stable
"zope>=5.11",
]Context:
I often leave comments in my pyproject.toml to explain why a particular dependency is pinned or given an upper bound.
I appreciate that comments are a hard problem when reading and writing toml, and there will always be edge cases where the user needs to manually update them (e.g. a requirement is removed), but I don't think this example is an edge case.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinghelp wantedContribution especially encouragedContribution especially encouraged