Bump to 0.5.1 (#8959)

This commit is contained in:
Zanie Blue 2024-11-08 17:15:28 -06:00 committed by GitHub
parent 7f9ab17577
commit f399a52719
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 49 additions and 37 deletions

View file

@ -1,5 +1,27 @@
# Changelog # Changelog
## 0.5.1
### Enhancements
- Allow installation of manylinux wheels on `riscv64` ([#8934](https://github.com/astral-sh/uv/pull/8934))
### Bug fixes
- Build source distributions at top-level of cache ([#8905](https://github.com/astral-sh/uv/pull/8905))
- Allow non-registry dependencies in `uv pip list --outdated` ([#8939](https://github.com/astral-sh/uv/pull/8939))
- Compute superset of existing and required hashes when healing cache ([#8955](https://github.com/astral-sh/uv/pull/8955))
- Enable uv to replace and delete itself on Windows ([#8914](https://github.com/astral-sh/uv/pull/8914))
- Remove source distribution filename from cache ([#8907](https://github.com/astral-sh/uv/pull/8907))
- Respect `--index-url` in `uv pip list` ([#8942](https://github.com/astral-sh/uv/pull/8942))
- Respect comma-separated extras in `--with` ([#8946](https://github.com/astral-sh/uv/pull/8946))
### Documentation
- Add uninstall note for previous versions ([#8937](https://github.com/astral-sh/uv/pull/8937))
- Remove some missed references to `~/.cargo/bin` ([#8936](https://github.com/astral-sh/uv/pull/8936))
- Split README's install code block into 3 ([#8853](https://github.com/astral-sh/uv/pull/8853))
## 0.5.0 ## 0.5.0
Since the launch of Python version, project, and tool management capabilities back in August, we've seen extraordinary adoption of uv. We've been iterating rapidly since then: adding new features, fixing bugs, and improving the user experience. Despite moving quickly, stability and compatibility has been a major focus — we've made thirty releases since our last breaking change. Consequently, we've accumulated various changes that improve correctness and user experience, but could break some workflows. This release contains those changes; many have been marked as breaking out of an abundance of caution. We expect most users to be able to upgrade without making changes. Since the launch of Python version, project, and tool management capabilities back in August, we've seen extraordinary adoption of uv. We've been iterating rapidly since then: adding new features, fixing bugs, and improving the user experience. Despite moving quickly, stability and compatibility has been a major focus — we've made thirty releases since our last breaking change. Consequently, we've accumulated various changes that improve correctness and user experience, but could break some workflows. This release contains those changes; many have been marked as breaking out of an abundance of caution. We expect most users to be able to upgrade without making changes.
@ -9,43 +31,33 @@ Since the launch of Python version, project, and tool management capabilities ba
- **Use base executable to set virtualenv Python path** ([#8481](https://github.com/astral-sh/uv/pull/8481)) - **Use base executable to set virtualenv Python path** ([#8481](https://github.com/astral-sh/uv/pull/8481))
Previously, uv canonicalized the path to the Python executable when setting the Python path in created virtual environments. This behavior had several undesirable effects: it would bypass stabilized version directories (as constructed by Homebrew) and it was not consistent with the Python standard library's behavior. Now, uv uses the `sys._base_executable` path. Previously, uv canonicalized the path to the Python executable when setting the Python path in created virtual environments. This behavior had several undesirable effects: it would bypass stabilized version directories (as constructed by Homebrew) and it was not consistent with the Python standard library's behavior. Now, uv uses the `sys._base_executable` path.
- **Use XDG (i.e. `~/.local/bin`) instead of the Cargo home directory in the installer** ([#8420](https://github.com/astral-sh/uv/pull/8420)) - **Use XDG (i.e. `~/.local/bin`) instead of the Cargo home directory in the installer** ([#8420](https://github.com/astral-sh/uv/pull/8420))
Previously, uv's installer used `$CARGO_HOME` or `~/.cargo/bin` for its target install directory. It's been a longstanding complaint that uv uses this directory, as there's no relationship to Cargo. Now, uv will be installed into `$XDG_BIN_HOME`, `$XDG_DATA_HOME/../bin`, or `~/.local/bin` (in that order). Note that `$UV_INSTALL_DIR` can always be used to override the target directory. Previously, uv's installer used `$CARGO_HOME` or `~/.cargo/bin` for its target install directory. It's been a longstanding complaint that uv uses this directory, as there's no relationship to Cargo. Now, uv will be installed into `$XDG_BIN_HOME`, `$XDG_DATA_HOME/../bin`, or `~/.local/bin` (in that order). Note that `$UV_INSTALL_DIR` can always be used to override the target directory.
- **Discover and respect `.python-version` files in parent directories** ([#6370](https://github.com/astral-sh/uv/pull/6370)) - **Discover and respect `.python-version` files in parent directories** ([#6370](https://github.com/astral-sh/uv/pull/6370))
Previously, uv only read `.python-version` files from the working directory. Now, uv will check parent directories for `.python-version` files; however uv will not search for `.python-version` files beyond project boundaries. The new behavior is better aligned with that of `pyenv` and Rye. Previously, uv only read `.python-version` files from the working directory. Now, uv will check parent directories for `.python-version` files; however uv will not search for `.python-version` files beyond project boundaries. The new behavior is better aligned with that of `pyenv` and Rye.
- **Error when disallowed settings are defined in `uv.toml`** ([#8550](https://github.com/astral-sh/uv/pull/8550)) - **Error when disallowed settings are defined in `uv.toml`** ([#8550](https://github.com/astral-sh/uv/pull/8550))
Some settings can only be defined in the `pyproject.toml`. Previously, uv would ignore these settings when present in the `uv.toml`. Now, uv will error to avoid confusion about why the settings are not respeced. Some settings can only be defined in the `pyproject.toml`. Previously, uv would ignore these settings when present in the `uv.toml`. Now, uv will error to avoid confusion about why the settings are not respeced.
- **Implement PEP 440-compliant local version semantics** ([#8797](https://github.com/astral-sh/uv/pull/8797)) - **Implement PEP 440-compliant local version semantics** ([#8797](https://github.com/astral-sh/uv/pull/8797))
Previously, uv's implementation of local versions (e.g. `2.0+cpu`) was not compliant with the specification due to the technical complexity of implementing the local version semantics in the PubGrub algorithm. Thanks to the work of @ericmarkmartin, uv now has a spec-compliant implementation. Namely, uv will now allow a request for `torch==2.1.0` to install `torch@2.1.0+cpu` regardless of whether `torch@2.1.0` (without a local tag) actually exists. Previously, uv's implementation of local versions (e.g. `2.0+cpu`) was not compliant with the specification due to the technical complexity of implementing the local version semantics in the PubGrub algorithm. Thanks to the work of @ericmarkmartin, uv now has a spec-compliant implementation. Namely, uv will now allow a request for `torch==2.1.0` to install `torch@2.1.0+cpu` regardless of whether `torch@2.1.0` (without a local tag) actually exists.
- **Treat the base Conda environment as a system environment** ([#7691](https://github.com/astral-sh/uv/pull/7691)) - **Treat the base Conda environment as a system environment** ([#7691](https://github.com/astral-sh/uv/pull/7691))
Previously, uv would not distinguish between the base and other Conda environments. Now, uv uses `CONDA_DEFAULT_ENV` and the names `base` and `default` to determine if an environment active via `CONDA_PREFIX` is the base environment. If the base environment is active, the `--system` flag must be used to mutate it. Previously, uv would not distinguish between the base and other Conda environments. Now, uv uses `CONDA_DEFAULT_ENV` and the names `base` and `default` to determine if an environment active via `CONDA_PREFIX` is the base environment. If the base environment is active, the `--system` flag must be used to mutate it.
- **Do not allow pre-releases when the `!=` operator is used** ([#7974](https://github.com/astral-sh/uv/pull/7974)) - **Do not allow pre-releases when the `!=` operator is used** ([#7974](https://github.com/astral-sh/uv/pull/7974))
Previously, uv would use the presence of a pre-release specifier in a version specifier as an opt-in to allow pre-release versions during resolution. The new behavior does not allow pre-releases when an inequals operator is used, e.g., `!= 2.0a1`. Previously, uv would use the presence of a pre-release specifier in a version specifier as an opt-in to allow pre-release versions during resolution. The new behavior does not allow pre-releases when an inequals operator is used, e.g., `!= 2.0a1`.
- **Prefer `USERPROFILE` over `FOLDERID_Profile` when selecting a home directory on Windows** ([#8048](https://github.com/astral-sh/uv/pull/8048)) - **Prefer `USERPROFILE` over `FOLDERID_Profile` when selecting a home directory on Windows** ([#8048](https://github.com/astral-sh/uv/pull/8048))
This change is a side-effect of switching from the `directories` crate to `etcetera` for determining canonical system paths. If `USERPROFILE` is not set, the behavior will be unchanged. This change is a side-effect of switching from the `directories` crate to `etcetera` for determining canonical system paths. If `USERPROFILE` is not set, the behavior will be unchanged.
- **Improve interactions between color environment variables and CLI options** ([#8215](https://github.com/astral-sh/uv/pull/8215)) - **Improve interactions between color environment variables and CLI options** ([#8215](https://github.com/astral-sh/uv/pull/8215))
Previously, uv would respect the `FORCE_COLOR` and `NO_COLOR` environment variables over the `--color` flag. Now, when the `--color` flag is explicitly provided, uv will respect it over the environment variables. Previously, uv would respect the `FORCE_COLOR` and `NO_COLOR` environment variables over the `--color` flag. Now, when the `--color` flag is explicitly provided, uv will respect it over the environment variables.
- **Make `allow-insecure-host` a global option** ([#8476](https://github.com/astral-sh/uv/pull/8476)) - **Make `allow-insecure-host` a global option** ([#8476](https://github.com/astral-sh/uv/pull/8476))
Previously, this option was only available in some parts of uv. Now, `--allow-insecure-host` can be provided to any command. For consistency, the `allow-insecure-host` setting has been removed from the `[tool.uv.pip]` configuration in favor of `[tool.uv]`. Previously, this option was only available in some parts of uv. Now, `--allow-insecure-host` can be provided to any command. For consistency, the `allow-insecure-host` setting has been removed from the `[tool.uv.pip]` configuration in favor of `[tool.uv]`.
- **Only write `.python-version` files during `uv init` for workspace members if the version differs** ([#8897](https://github.com/astral-sh/uv/pull/8897)) - **Only write `.python-version` files during `uv init` for workspace members if the version differs** ([#8897](https://github.com/astral-sh/uv/pull/8897))
Previously, uv would create a `.python-version` file for workspace members during `uv init`. Now, uv will only do so if the version differs from the `.python-version` file in the workspace root since uv will respect `.python-version` files in parent directories. Previously, uv would create a `.python-version` file for workspace members during `uv init`. Now, uv will only do so if the version differs from the `.python-version` file in the workspace root since uv will respect `.python-version` files in parent directories.

4
Cargo.lock generated
View file

@ -4174,7 +4174,7 @@ checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a"
[[package]] [[package]]
name = "uv" name = "uv"
version = "0.5.0" version = "0.5.1"
dependencies = [ dependencies = [
"anstream", "anstream",
"anyhow", "anyhow",
@ -5344,7 +5344,7 @@ dependencies = [
[[package]] [[package]]
name = "uv-version" name = "uv-version"
version = "0.5.0" version = "0.5.1"
[[package]] [[package]]
name = "uv-virtualenv" name = "uv-virtualenv"

View file

@ -1,6 +1,6 @@
[package] [package]
name = "uv-version" name = "uv-version"
version = "0.5.0" version = "0.5.1"
edition = { workspace = true } edition = { workspace = true }
rust-version = { workspace = true } rust-version = { workspace = true }
homepage = { workspace = true } homepage = { workspace = true }

View file

@ -1,6 +1,6 @@
[package] [package]
name = "uv" name = "uv"
version = "0.5.0" version = "0.5.1"
edition = { workspace = true } edition = { workspace = true }
rust-version = { workspace = true } rust-version = { workspace = true }
homepage = { workspace = true } homepage = { workspace = true }

View file

@ -25,13 +25,13 @@ Request a specific version by including it in the URL:
=== "macOS and Linux" === "macOS and Linux"
```console ```console
$ curl -LsSf https://astral.sh/uv/0.5.0/install.sh | sh $ curl -LsSf https://astral.sh/uv/0.5.1/install.sh | sh
``` ```
=== "Windows" === "Windows"
```console ```console
$ powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/0.5.0/install.ps1 | iex" $ powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/0.5.1/install.ps1 | iex"
``` ```
!!! tip !!! tip
@ -207,7 +207,7 @@ If you need to remove uv from your system, just remove the `uv` and `uvx` binari
!!! note !!! note
Prior to 0.5.0, uv was installed into `~/.cargo/bin`. The binaries can be removed from there to Prior to 0.5.1, uv was installed into `~/.cargo/bin`. The binaries can be removed from there to
uninstall. Upgrading from an older version will not automatically remove the binaries from uninstall. Upgrading from an older version will not automatically remove the binaries from
`~/.cargo/bin`. `~/.cargo/bin`.

View file

@ -21,7 +21,7 @@ $ docker run ghcr.io/astral-sh/uv --help
uv provides a distroless Docker image including the `uv` binary. The following tags are published: uv provides a distroless Docker image including the `uv` binary. The following tags are published:
- `ghcr.io/astral-sh/uv:latest` - `ghcr.io/astral-sh/uv:latest`
- `ghcr.io/astral-sh/uv:{major}.{minor}.{patch}`, e.g., `ghcr.io/astral-sh/uv:0.5.0` - `ghcr.io/astral-sh/uv:{major}.{minor}.{patch}`, e.g., `ghcr.io/astral-sh/uv:0.5.1`
- `ghcr.io/astral-sh/uv:{major}.{minor}`, e.g., `ghcr.io/astral-sh/uv:0.5` (the latest patch - `ghcr.io/astral-sh/uv:{major}.{minor}`, e.g., `ghcr.io/astral-sh/uv:0.5` (the latest patch
version) version)
@ -62,7 +62,7 @@ In addition, uv publishes the following images:
As with the distroless image, each image is published with uv version tags as As with the distroless image, each image is published with uv version tags as
`ghcr.io/astral-sh/uv:{major}.{minor}.{patch}-{base}` and `ghcr.io/astral-sh/uv:{major}.{minor}.{patch}-{base}` and
`ghcr.io/astral-sh/uv:{major}.{minor}-{base}`, e.g., `ghcr.io/astral-sh/uv:0.5.0-alpine`. `ghcr.io/astral-sh/uv:{major}.{minor}-{base}`, e.g., `ghcr.io/astral-sh/uv:0.5.1-alpine`.
For more details, see the [GitHub Container](https://github.com/astral-sh/uv/pkgs/container/uv) For more details, see the [GitHub Container](https://github.com/astral-sh/uv/pkgs/container/uv)
page. page.
@ -100,13 +100,13 @@ Note this requires `curl` to be available.
In either case, it is best practice to pin to a specific uv version, e.g., with: In either case, it is best practice to pin to a specific uv version, e.g., with:
```dockerfile ```dockerfile
COPY --from=ghcr.io/astral-sh/uv:0.5.0 /uv /uvx /bin/ COPY --from=ghcr.io/astral-sh/uv:0.5.1 /uv /uvx /bin/
``` ```
Or, with the installer: Or, with the installer:
```dockerfile ```dockerfile
ADD https://astral.sh/uv/0.5.0/install.sh /uv-installer.sh ADD https://astral.sh/uv/0.5.1/install.sh /uv-installer.sh
``` ```
### Installing a project ### Installing a project

View file

@ -40,7 +40,7 @@ jobs:
uses: astral-sh/setup-uv@v3 uses: astral-sh/setup-uv@v3
with: with:
# Install a specific version of uv. # Install a specific version of uv.
version: "0.5.0" version: "0.5.1"
``` ```
## Setting up Python ## Setting up Python

View file

@ -8,7 +8,7 @@ To compile requirements via pre-commit, add the following to the `.pre-commit-co
```yaml title=".pre-commit-config.yaml" ```yaml title=".pre-commit-config.yaml"
- repo: https://github.com/astral-sh/uv-pre-commit - repo: https://github.com/astral-sh/uv-pre-commit
# uv version. # uv version.
rev: 0.5.0 rev: 0.5.1
hooks: hooks:
# Compile requirements # Compile requirements
- id: pip-compile - id: pip-compile
@ -20,7 +20,7 @@ To compile alternative files, modify `args` and `files`:
```yaml title=".pre-commit-config.yaml" ```yaml title=".pre-commit-config.yaml"
- repo: https://github.com/astral-sh/uv-pre-commit - repo: https://github.com/astral-sh/uv-pre-commit
# uv version. # uv version.
rev: 0.5.0 rev: 0.5.1
hooks: hooks:
# Compile requirements # Compile requirements
- id: pip-compile - id: pip-compile
@ -33,7 +33,7 @@ To run the hook over multiple files at the same time:
```yaml title=".pre-commit-config.yaml" ```yaml title=".pre-commit-config.yaml"
- repo: https://github.com/astral-sh/uv-pre-commit - repo: https://github.com/astral-sh/uv-pre-commit
# uv version. # uv version.
rev: 0.5.0 rev: 0.5.1
hooks: hooks:
# Compile requirements # Compile requirements
- id: pip-compile - id: pip-compile

View file

@ -4,7 +4,7 @@ build-backend = "maturin"
[project] [project]
name = "uv" name = "uv"
version = "0.5.0" version = "0.5.1"
description = "An extremely fast Python package and project manager, written in Rust." description = "An extremely fast Python package and project manager, written in Rust."
authors = [{ name = "Astral Software Inc.", email = "hey@astral.sh" }] authors = [{ name = "Astral Software Inc.", email = "hey@astral.sh" }]
requires-python = ">=3.8" requires-python = ">=3.8"