Skip to content

uv add should roll back changes to pyproject.toml if the automatic sync is cancelled #6818

@akx

Description

@akx

uv 0.4.0, macOS.

A minimal code snippet that reproduces the issue:

$ uv init foo
$ cd foo
$ uv add pyobjc
💭 oh crud, I don't need every single pyobjc framework! that's a lot of framework!
^C
$ uv add pyobjc-core
💭 oh crud, it's still downloading all frameworks! what's happening?!
^C
$ cat pyproject.toml
[...]
dependencies = [
    "pyobjc",
    "pyobjc-core",
]
$

IOW, I'd expect that if I cancel the uv add operation (even if it's made up of add and implicit sync afterwards), pyproject.toml was back to the state it was before uv add.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingprojectsRelated to project management capabilities

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions