-
Notifications
You must be signed in to change notification settings - Fork 2.9k
uv version --bump ... drops comments just before the version #16133
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers
Description
Summary
I noticed that using uv version --bump ... will drop any comments in pyproject.toml on lines immediately preceding the "version = ..." line.
For example, running uv version --bump patch with this pyproject.toml:
# hello
[project]
# hello
name = "hello-world"
# hello
version = "0.1.0"
# hello
description = "Add your description here"
# hello
readme = "README.md"
# hello
requires-python = ">=3.13"
# hello
dependencies = []
# helloWill result in this:
# hello
[project]
# hello
name = "hello-world"
version = "0.1.1"
# hello
description = "Add your description here"
# hello
readme = "README.md"
# hello
requires-python = ">=3.13"
# hello
dependencies = []
# helloPlatform
macOS 15 arm64
Version
uv 0.8.22 (Homebrew 2025-09-23)
Python version
Python 3.13.7 (main, Sep 18 2025, 22:52:34) [Clang 20.1.4 ]
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers