uv/crates
Andrew Gallant 15ef807c80
add support for specifying conflicting extras (#8976)
This PR adds support for conflicting extras. For example, consider
some optional dependencies like this:

```toml
[project.optional-dependencies]
project1 = ["numpy==1.26.3"]
project2 = ["numpy==1.26.4"]
```

These dependency specifications are not compatible with one another.
And if you ask uv to lock these, you'll get an unresolvable error.

With this PR, you can now add this to your `pyproject.toml` to get
around this:

```toml
[tool.uv]
conflicting-groups = [
    [
      { package = "project", extra = "project1" },
      { package = "project", extra = "project2" },
    ],
]
```

This will make the universal resolver create additional forks
internally that keep the dependencies from the `project1` and
`project2` extras separate. And we make all of this work by reporting
an error at **install** time if one tries to install with two or more
extras that have been declared as conflicting. (If we didn't do this,
it would be possible to try and install two different versions of the
same package into the same environment.)

This PR does *not* add support for conflicting **groups**, but it is
intended to add support in a follow-up PR.

Closes #6981

Fixes #8024

Ref #6729, Ref #6830

This should also hopefully unblock
https://github.com/dagster-io/dagster/pull/23814, but in my testing, I
did run into other problems (specifically, with `pywin`). But it does
resolve the problem with incompatible dependencies in two different
extras once you declare `test-airflow-1` and `test-airflow-2` as
conflicting for `dagster-airflow`.

NOTE: This PR doesn't make `conflicting-groups` public yet. And in a
follow-up PR, I plan to switch the name to `conflicts` instead of
`conflicting-groups`, since it will be able to accept conflicting extras
_and_ conflicting groups.
2024-11-13 09:52:28 -05:00
..
uv add support for specifying conflicting extras (#8976) 2024-11-13 09:52:28 -05:00
uv-auth Document .netrc environment variable and path (#8511) 2024-10-24 02:34:45 +00:00
uv-bench add support for specifying conflicting extras (#8976) 2024-11-13 09:52:28 -05:00
uv-build-backend Build basic source distributions (#8886) 2024-11-07 14:29:54 +01:00
uv-build-frontend Add dedicated cache method for creating build directories (#8910) 2024-11-08 00:50:55 +00:00
uv-cache Add dedicated cache method for creating build directories (#8910) 2024-11-08 00:50:55 +00:00
uv-cache-info Improve error message for cache info serialization (#8500) 2024-10-23 13:17:31 +00:00
uv-cache-key chore: Move all integration tests to a single binary (#8093) 2024-10-11 16:41:35 +02:00
uv-cli Hide --no-system from uv pip tree CLI (#9040) 2024-11-12 02:32:31 +00:00
uv-client Extend BaseClient to accept extra middleware (#8807) 2024-11-04 07:04:26 -06:00
uv-configuration Add --no-group support to CLI (#8477) 2024-10-25 13:27:37 -05:00
uv-console Support interactive input in uv publish (#8158) 2024-10-15 10:00:43 +02:00
uv-dev Update format of environment variable reference (#9018) 2024-11-11 12:41:33 -06:00
uv-dirs Eliminate dependencies on directores and dirs-sys (#8048) 2024-11-07 14:29:54 -06:00
uv-dispatch add support for specifying conflicting extras (#8976) 2024-11-13 09:52:28 -05:00
uv-distribution Update Rust crate url to v2.5.3 (#9002) 2024-11-11 14:49:31 +00:00
uv-distribution-filename Add uv tree --outdated (#8893) 2024-11-07 14:10:46 -06:00
uv-distribution-types Remove some unused public methods (#8993) 2024-11-10 22:55:22 +00:00
uv-extract Sanitize filenames during zip extraction (#8732) 2024-10-31 19:12:51 +00:00
uv-fs Add support for installing versioned Python executables on Windows (#8663) 2024-10-31 15:58:35 +00:00
uv-git Allow dependency metadata entries for direct URL requirements (#7846) 2024-10-22 22:01:23 -04:00
uv-install-wheel Enable uv to replace and delete itself on Windows (#8914) 2024-11-07 21:57:38 -05:00
uv-installer Use rich diagnostic formatting for install failures (#9043) 2024-11-11 22:54:30 -05:00
uv-macros Generate environment variables doc from code (#8493) 2024-11-03 08:31:38 -06:00
uv-metadata chore: Move all integration tests to a single binary (#8093) 2024-10-11 16:41:35 +02:00
uv-normalize uv-normalize: add as_str method 2024-11-04 11:09:06 -05:00
uv-once-map Use shared resolver state between add and lock (#8146) 2024-10-12 14:58:07 +00:00
uv-options-metadata chore: Move all integration tests to a single binary (#8093) 2024-10-11 16:41:35 +02:00
uv-pep440 Typo fixes (#9057) 2024-11-12 13:45:22 +00:00
uv-pep508 Allow semicolons directly after direct URLs (#8836) 2024-11-05 16:07:07 -05:00
uv-performance-flate2-backend Run cargo update (#8703) 2024-11-01 10:26:21 -04:00
uv-performance-memory-allocator Run cargo update (#8703) 2024-11-01 10:26:21 -04:00
uv-platform-tags Allow installation of manylinux wheels on riscv64 (#8934) 2024-11-08 16:57:51 +01:00
uv-publish Publish: Ignore non-matching files (#8986) 2024-11-13 12:58:28 +01:00
uv-pypi-types add support for specifying conflicting extras (#8976) 2024-11-13 09:52:28 -05:00
uv-python Implement PEP 440-compliant local version semantics (#8797) 2024-11-07 14:29:54 -06:00
uv-requirements Consistently box distributions in fetch and build errors (#9038) 2024-11-12 02:19:38 +00:00
uv-requirements-txt Allow semicolons directly after direct URLs (#8836) 2024-11-05 16:07:07 -05:00
uv-resolver add support for specifying conflicting extras (#8976) 2024-11-13 09:52:28 -05:00
uv-scripts Discover and respect .python-version files in parent directories (#6370) 2024-11-07 14:29:54 -06:00
uv-settings add support for specifying conflicting extras (#8976) 2024-11-13 09:52:28 -05:00
uv-shell chore: unify all env vars used (#8151) 2024-10-14 16:48:13 -05:00
uv-state Add uv-dirs to consolidate directory lookup methods (#8453) 2024-10-22 11:33:25 -05:00
uv-static Remove some missed references to ~/.cargo/bin (#8936) 2024-11-08 07:29:32 -06:00
uv-tool Eliminate dependencies on directores and dirs-sys (#8048) 2024-11-07 14:29:54 -06:00
uv-trampoline Update Rust crate anyhow to v1.0.93 (#8996) 2024-11-11 02:13:34 +00:00
uv-trampoline-builder Add support for installing versioned Python executables on Windows (#8663) 2024-10-31 15:58:35 +00:00
uv-types Allow incompatible requires-python for source distributions with static metadata (#8768) 2024-11-03 19:03:55 +00:00
uv-version Bump to 0.5.1 (#8959) 2024-11-08 17:15:28 -06:00
uv-virtualenv Use base executable to set virtualenv Python path (#8481) 2024-11-07 14:29:54 -06:00
uv-warnings chore: Move all integration tests to a single binary (#8093) 2024-10-11 16:41:35 +02:00
uv-workspace add support for specifying conflicting extras (#8976) 2024-11-13 09:52:28 -05:00
README.md Link to Dependency specifiers instead of PEP 508 (#8411) 2024-10-21 14:43:38 -04:00

Crates

uv-bench

Functionality for benchmarking uv.

uv-cache-key

Generic functionality for caching paths, URLs, and other resources across platforms.

uv-distribution-filename

Parse built distribution (wheel) and source distribution (sdist) filenames to extract structured metadata.

uv-distribution-types

Abstractions for representing built distributions (wheels) and source distributions (sdists), and the sources from which they can be downloaded.

uv-install-wheel-rs

Install built distributions (wheels) into a virtual environment.

uv-once-map

A waitmap-like concurrent hash map for executing tasks exactly once.

uv-pep440-rs

Utilities for interacting with Python version numbers and specifiers.

uv-pep508-rs

Utilities for parsing and evaluating dependency specifiers, previously known as PEP 508.

uv-platform-tags

Functionality for parsing and inferring Python platform tags as per PEP 425.

uv-cli

Command-line interface for the uv package manager.

uv-build-frontend

A PEP 517-compatible build frontend for uv.

uv-cache

Functionality for caching Python packages and associated metadata.

uv-client

Client for interacting with PyPI-compatible HTTP APIs.

uv-dev

Development utilities for uv.

uv-dispatch

A centralized struct for resolving and building source distributions in isolated environments. Implements the traits defined in uv-types.

uv-distribution

Client for interacting with built distributions (wheels) and source distributions (sdists). Capable of fetching metadata, distribution contents, etc.

uv-extract

Utilities for extracting files from archives.

uv-fs

Utilities for interacting with the filesystem.

uv-git

Functionality for interacting with Git repositories.

uv-installer

Functionality for installing Python packages into a virtual environment.

uv-python

Functionality for detecting and leveraging the current Python interpreter.

uv-normalize

Normalize package and extra names as per Python specifications.

uv-requirements

Utilities for reading package requirements from pyproject.toml and requirements.txt files.

uv-resolver

Functionality for resolving Python packages and their dependencies.

uv-shell

Utilities for detecting and manipulating shell environments.

uv-types

Shared traits for uv, to avoid circular dependencies.

uv-pypi-types

General-purpose type definitions for types used in PyPI-compatible APIs.

uv-virtualenv

A venv replacement to create virtual environments in Rust.

uv-warnings

User-facing warnings for uv.

uv-workspace

Workspace abstractions for uv.

uv-requirements-txt

Functionality for parsing requirements.txt files.