uv/crates
Aria Desires 042df4a7de
Expand the functionality of `uv version --bump` to support pre-releases (#13578)
This adds `alpha`, `beta`, `rc`, `stable`, `post`, and `dev` modes to
`uv version --bump`.

The components that `--bump` accepts are ordered as follows:

    major > minor > patch > stable > alpha > beta > rc > post > dev
    
Bumping a component "clears" all lesser component (`alpha`, `beta`, and
`rc` all overwrite each other):

* `--bump minor` on `1.2.3a4.post5.dev6` => `1.3.0`
* `--bump alpha` on `1.2.3a4.post5.dev6` => `1.2.3a5` 
* `--bump dev  ` on `1.2.3a4.post5.dev6` => `1.2.3a4.post5.dev7`

In addition, `--bump` can now be repeated. The primary motivation of
this is "bump stable version and also enter a prerelease", but it
technically lets you express other things if you want them:

* `--bump patch --bump alpha` on `1.2.3` => `1.2.4a1` ("bump patch
version and go to alpha 1")
* `--bump minor --bump patch` on `1.2.3` => `1.3.1` ("bump minor version
and got to patch 1")
* `--bump minor --bump minor` on `1.2.3` => `1.4.0` ("bump minor version
twice")

The `--bump` flags are sorted by their priority, so that you don't need
to remember the priority yourself. This ordering is the only "useful"
one that preserves every `--bump` you passed, so there's no concern
about loss of expressiveness. For instance `--bump minor --bump major`
would just be `--bump major` if we didn't sort, as the major bump clears
the minor version. The ordering of `beta` after `alpha` means `--bump
alpha --bump beta` will just result in beta 1; this is the one case
where a bump request will effectively get overwritten.

The `stable` mode "bumps to the next stable release", clearing the pre
(`alpha`, `beta`, `rc`), `dev`, and `post` components from a version
(`1.2.3a4.post5.dev6` => `1.2.3`). The choice to clear `post` here is a
bit odd, in that `1.2.3.post4` => `1.2.3` is actually a version
decrease, but I think this gives a more intuitive model (as preserving
`post5` in the previous example is definitely wrong), and also
post-releases are extremely obscure so probably no one will notice. In
the cases where this behaviour isn't useful, you probably wanted to pass
`--bump patch` or something anyway which *should* definitely clear the
`post5` (putting it another way: the only cases where `--bump stable`
has dubious behaviour is when you wanted it to do a noop, which, is a
command you could have just not written at all).

In all cases we preserve the "epoch" and "local" components of a
version, so the `7!` and `+local` in `7!1.2.3+local` will never be
modified by `--bump` (you can use the raw version set mode if you want
to touch those). The preservation of `local` is another slightly odd
choice, but it's a really obscure feature (so again it mostly won't come
up) and when it's used it seems to mostly be used for referring to
variant releases, in which case preserving it tends to be correct.

Fixes #13223

---------

Co-authored-by: Zanie Blue <contact@zanie.dev>
2025-07-10 08:45:17 -05:00
..
uv Expand the functionality of `uv version --bump` to support pre-releases (#13578) 2025-07-10 08:45:17 -05:00
uv-auth Fix `Indexes::new` doc (#14293) 2025-06-26 20:40:40 +00:00
uv-bench Remove unnecessary codspeed deps (#14396) 2025-07-01 11:00:30 -05:00
uv-build Bump version to 0.7.20 (#14525) 2025-07-09 12:15:41 -05:00
uv-build-backend Multiple modules in namespace packages (#14460) 2025-07-09 17:45:44 +00:00
uv-build-frontend Make project and interpreter lock acquisition non-fatal (#14404) 2025-07-02 14:03:43 -04:00
uv-cache Reduce number of reference-checks for `uv cache clean` (#13669) 2025-05-26 21:43:24 -04:00
uv-cache-info Avoid allocations for default cache keys (#12063) 2025-03-17 19:59:32 -04:00
uv-cache-key Add `DisplaySafeUrl` newtype to prevent leaking of credentials by default (#13560) 2025-05-27 00:05:30 +02:00
uv-cli Expand the functionality of `uv version --bump` to support pre-releases (#13578) 2025-07-10 08:45:17 -05:00
uv-client Simplify relative URL handling (#14449) 2025-07-09 23:20:02 +00:00
uv-configuration Fix optional cfg gates (#14448) 2025-07-03 15:29:03 -05:00
uv-console Bump MSRV to 1.85 and Edition 2024 (#13516) 2025-05-18 19:38:43 -04:00
uv-dev Sync latest Python releases (#14531) 2025-07-10 00:40:58 +00:00
uv-dirs Bump MSRV to 1.85 and Edition 2024 (#13516) 2025-05-18 19:38:43 -04:00
uv-dispatch Stabilize the uv build backend (#14311) 2025-07-02 15:37:43 -05:00
uv-distribution Simplify relative URL handling (#14449) 2025-07-09 23:20:02 +00:00
uv-distribution-filename Remove wheel filename-from URL conversion (#14223) 2025-06-23 14:26:14 -04:00
uv-distribution-types Simplify relative URL handling (#14449) 2025-07-09 23:20:02 +00:00
uv-extract Remove transparent variants in `uv-extract` to enable retries (#14450) 2025-07-03 23:32:07 +00:00
uv-fs Bump MSRV and `rust-toolchain` version (#14303) 2025-06-27 10:27:45 -04:00
uv-git Skip GitHub fast path when rate-limited (#13033) 2025-06-24 12:11:41 -07:00
uv-git-types make GitOid strict about parsing exactly 40 hex characters 2025-06-09 23:50:36 +00:00
uv-globfilter Change `GlobDirFilter` fallback to `true` (#13882) 2025-06-06 14:07:34 +02:00
uv-install-wheel Drop trailing arguments when writing shebangs (#14519) 2025-07-09 10:51:06 -05:00
uv-installer Add `DisplaySafeUrl` newtype to prevent leaking of credentials by default (#13560) 2025-05-27 00:05:30 +02:00
uv-macros Bump MSRV to 1.85 and Edition 2024 (#13516) 2025-05-18 19:38:43 -04:00
uv-metadata only warn if CRC appears to be missing (#12722) 2025-04-07 12:49:05 -05:00
uv-normalize Bump MSRV to 1.85 and Edition 2024 (#13516) 2025-05-18 19:38:43 -04:00
uv-once-map Bump MSRV to 1.84 (#12670) 2025-04-04 11:49:26 -04:00
uv-options-metadata Upgrade minimum Rust version to 1.83 (#9815) 2024-12-11 10:06:19 -06:00
uv-pep440 Expand the functionality of `uv version --bump` to support pre-releases (#13578) 2025-07-10 08:45:17 -05:00
uv-pep508 Revert normalization of trailing slashes on index URLs (#14511) 2025-07-09 06:50:31 -05:00
uv-performance-memory-allocator Update Rust crate mimalloc to v0.1.47 (#14207) 2025-06-23 12:07:09 +02:00
uv-platform-tags Add Pyodide support (#12731) 2025-06-03 12:01:26 -05:00
uv-publish Add an `IntoIterator` for `FormMetadata` (#14351) 2025-06-29 15:07:07 -04:00
uv-pypi-types Simplify relative URL handling (#14449) 2025-07-09 23:20:02 +00:00
uv-python Sync latest Python releases (#14531) 2025-07-10 00:40:58 +00:00
uv-redacted Avoid using path URL for workspace Git dependencies in `requirements.txt` (#14288) 2025-06-26 19:48:12 +00:00
uv-requirements Support reading dependency-groups from pyproject.tomls with no project (#13742) 2025-06-13 22:16:48 +00:00
uv-requirements-txt Fix equals-star and tilde-equals with `python_version` and `python_full_version` (#14271) 2025-07-01 17:48:48 +02:00
uv-resolver Revert normalization of trailing slashes on index URLs (#14511) 2025-07-09 06:50:31 -05:00
uv-scripts handle an existing shebang in `uv init --script` (#14141) 2025-06-19 14:47:22 -07:00
uv-settings Update schemars 1.0.0 (#13693) 2025-06-24 21:43:31 +02:00
uv-shell Bump MSRV to 1.85 and Edition 2024 (#13516) 2025-05-18 19:38:43 -04:00
uv-small-str Update schemars 1.0.0 (#13693) 2025-06-24 21:43:31 +02:00
uv-state Bump MSRV to 1.85 and Edition 2024 (#13516) 2025-05-18 19:38:43 -04:00
uv-static move the test buckets dir into the canonicalized temp dir 2025-06-26 14:56:20 -07:00
uv-tool Support transparent Python patch version upgrades (#13954) 2025-06-20 16:17:13 +02:00
uv-torch Add auto-detection for Intel GPUs (#14386) 2025-07-09 13:31:08 +00:00
uv-trampoline Support transparent Python patch version upgrades (#13954) 2025-06-20 16:17:13 +02:00
uv-trampoline-builder Bump MSRV and `rust-toolchain` version (#14303) 2025-06-27 10:27:45 -04:00
uv-types Reuse build (virtual) environments across resolution and installation (#14338) 2025-07-01 13:15:47 -04:00
uv-version Bump version to 0.7.20 (#14525) 2025-07-09 12:15:41 -05:00
uv-virtualenv Add check for using minor version link when creating a venv on Windows (#14252) 2025-06-25 10:12:32 +02:00
uv-warnings Consistently use `Ordering::Relaxed` for standalone atomic use cases (#14190) 2025-06-24 12:30:26 -07:00
uv-workspace chore: remove redundant words in comment (#14532) 2025-07-10 08:25:38 -05:00
README.md Link to Dependency specifiers instead of PEP 508 (#8411) 2024-10-21 14:43:38 -04:00

README.md

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.