Skip to content

comments in a nearby line might be lost through uv remove #18555

@neutrinoceros

Description

@neutrinoceros

Summary

similar to #16719

found in an automated PR to astropy, which boils down to just commiting the result of uv remove astropy-iers-data && uv add astropy-iers-data (+ some related changes which are not relevant here).

See the diff from the first commit of astropy/astropy#19461:
astropy/astropy@be46a46

(a second commit was then performed manually to revert the unwanted part)

Or, for a MRE: starting with this pyproject.toml

[project]
name = "test"
version = "0.1.0"
dependencies = [
    "numpy>=2.4.3", # this comment is clearly essential
    "requests>=2.32.5",
]

and then running uv remove requests produces the following diff

diff --git a/pyproject.toml b/pyproject.toml
index ef43a93..18cda89 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -2,6 +2,5 @@
 name = "test"
 version = "0.1.0"
 dependencies = [
-    "numpy>=2.4.3", # this comment is clearly essential
-    "requests>=2.32.5",
+    "numpy>=2.4.3",
 ]

Platform

Darwin 25.3.0 arm64

Version

uv 0.10.11 (006b56b 2026-03-16)

Python version

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions