Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@

## 5.3.3 (unreleased)

<!-- Add future changes here -->
- The uv hook now writes the fully resolved constraints (including external `-c`/`-r`
chains like Plone release constraints) into `[tool.uv] constraint-dependencies`, so
`uv sync` honors them. Source order and provenance comments are preserved; the array is
fully managed by mxdev. Disable via `uv-constraint-dependencies = false` in `[settings]`.
Inspired by Maik Derstappen's `uv-import-constraint-dependencies`. [jensens]


## 5.3.2 (2026-05-30)
Expand Down
31 changes: 31 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,33 @@ override-dependencies = [

This allows you to seamlessly use `uv sync` or `uv run` with the packages mxdev has checked out for you, without needing to use `requirements-mxdev.txt`.

The fully resolved constraints — including external `-c`/`-r` chains such as Plone
release constraints (`-c https://dist.plone.org/release/6.2.0rc1/constraints.txt`) — are
written to `[tool.uv] constraint-dependencies`. uv itself cannot follow `-c URL` includes,
so mxdev expands the whole chain and inlines the pins, preserving source order and the
`# begin/end constraints from: ...` provenance comments. Packages developed from source or
replaced via `version-overrides` are kept as `# ... -> mxdev disabled` comments (they are
provided through `[tool.uv.sources]` / `override-dependencies` instead):

```toml
[tool.uv]
constraint-dependencies = [
# managed by mxdev - do not edit
# begin constraints from: https://dist.plone.org/release/6.2.0rc1/constraints.txt
"Zope==6.0",
"AccessControl==7.3",
# end constraints from: https://dist.plone.org/release/6.2.0rc1/constraints.txt
]
```

mxdev owns this array completely and rewrites it on every run. To turn it off, set in
`mx.ini`:

```ini
[settings]
uv-constraint-dependencies = false
```

To disable this feature, you can either remove the `managed = true` flag from your `pyproject.toml`, or explicitly set it to `false`:
```toml
[tool.uv]
Expand Down Expand Up @@ -408,3 +435,7 @@ Mx (generally pronounced like mix [mɪks], or [məks] in the UK) is meant to be
The VCS-related code is taken from `mr.developer`.
Thanks to Florian Schulze and Contributors.

The approach of importing pip constraints into `[tool.uv] constraint-dependencies` was
inspired by Maik Derstappen's [uv-import-constraint-dependencies](https://github.com/derico-de/uv-import-constraint-dependencies).
Thanks to Maik for the idea and his blessing to adopt it natively.

Loading
Loading