mirror of
https://github.com/astral-sh/uv.git
synced 2025-11-02 21:02:37 +00:00
Bump to v0.4.0 (#6764)
This commit is contained in:
parent
9f0346592f
commit
d9bd3bc7a5
9 changed files with 66 additions and 15 deletions
51
CHANGELOG.md
51
CHANGELOG.md
|
|
@ -1,5 +1,56 @@
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 0.4.0
|
||||||
|
|
||||||
|
This release adds first-class support for Python projects that are not designed as Python packages (e.g., web applications, data science projects, etc.).
|
||||||
|
|
||||||
|
In doing so, it includes some breaking changes around uv's handling of projects. Previously, uv required that all projects could be built into distributable Python packages, and installed them into the virtual environment. Projects created by `uv init` always included a `[build-system]` definition and existing projects that did not define a `[build-system]` would use the legacy setuptools build backend by default.
|
||||||
|
|
||||||
|
Most users are not developing libraries that need to be packaged and published to PyPI. Instead, they're building applications using web frameworks, or running collections of Python scripts in the project's root directory. In these cases, requiring a `[build-system]` was confusing and error-prone. In this release, uv changes the default behavior to orient around these common use cases.
|
||||||
|
|
||||||
|
In summary, the major changes are:
|
||||||
|
|
||||||
|
- uv no longer attempts to package and install projects that do not define a `[build-system]`.
|
||||||
|
- While the project itself will not be installed into the virtual environment, its dependencies will still be included.
|
||||||
|
- The previous behavior can be recovered by setting `package = true` in the `[tool.uv]` section of your `pyproject.toml`.
|
||||||
|
- `uv init` no longer creates a `src/` directory or defines a `[build-system]` by default.
|
||||||
|
- The previous behavior can be recovered with `uv init --lib` or `uv init --app --package`.
|
||||||
|
- uv allows and recommends including `[project]` definitions in virtual workspace roots.
|
||||||
|
- Previously, the uv required the `[project]` section to be omitted.
|
||||||
|
- uv allows disabling packaging of projects, even if they define a `[build-system]`, by setting `package = false` in the `[tool.uv]` section of your `pyproject.toml`.
|
||||||
|
|
||||||
|
See the latest documentation on [build systems in projects](http://localhost:8000/uv/concepts/projects/#build-systems) for more details.
|
||||||
|
|
||||||
|
### Enhancements
|
||||||
|
|
||||||
|
- Add first-class support for non-packaged projects ([#6585](https://github.com/astral-sh/uv/pull/6585))
|
||||||
|
- Add `--app` and `--lib` options to `uv init` ([#6689](https://github.com/astral-sh/uv/pull/6689))
|
||||||
|
- Use `virtual` source label in lockfile for non-packaged dependencies ([#6728](https://github.com/astral-sh/uv/pull/6728))
|
||||||
|
- Read hash from URL fragment if `--hashes` are omitted ([#6731](https://github.com/astral-sh/uv/pull/6731))
|
||||||
|
- Support `{package}@{version}` in `uv tool install` ([#6762](https://github.com/astral-sh/uv/pull/6762))
|
||||||
|
- Publish additional Docker tags without patch version ([#6734](https://github.com/astral-sh/uv/pull/6734))
|
||||||
|
|
||||||
|
### Bug fixes
|
||||||
|
|
||||||
|
- Accept either strings or structs for hosts ([#6763](https://github.com/astral-sh/uv/pull/6763))
|
||||||
|
- Avoid including non-excluded members in parent workspaces ([#6735](https://github.com/astral-sh/uv/pull/6735))
|
||||||
|
- Avoid reading stale `.egg-info` from mutable sources ([#6714](https://github.com/astral-sh/uv/pull/6714))
|
||||||
|
- Avoid writing invalid PEP 723 scripts on `tool.uv.sources` ([#6706](https://github.com/astral-sh/uv/pull/6706))
|
||||||
|
- Compare virtual members when invalidating lockfile ([#6754](https://github.com/astral-sh/uv/pull/6754))
|
||||||
|
- Do not require workspace members to sync with `--frozen` ([#6737](https://github.com/astral-sh/uv/pull/6737))
|
||||||
|
- Implement deserialization for trusted host ([#6716](https://github.com/astral-sh/uv/pull/6716))
|
||||||
|
- Avoid showing duplicate paths in `uv python list` ([#6740](https://github.com/astral-sh/uv/pull/6740))
|
||||||
|
- Raise an error for unclosed script tags in PEP 723 scripts ([#6704](https://github.com/astral-sh/uv/pull/6704))
|
||||||
|
|
||||||
|
### Documentation
|
||||||
|
|
||||||
|
- Add dependabot and renovate documentation page ([#6236](https://github.com/astral-sh/uv/pull/6236))
|
||||||
|
- Bind to the host to allow connections in FastAPI Docker example ([#6753](https://github.com/astral-sh/uv/pull/6753))
|
||||||
|
- Fix some broken links ([#6705](https://github.com/astral-sh/uv/pull/6705))
|
||||||
|
- Update FastAPI guide for virtual projects and use `uv init` to create the `pyproject.toml` ([#6752](https://github.com/astral-sh/uv/pull/6752))
|
||||||
|
- Update project documentation for the application / library concepts ([#6718](https://github.com/astral-sh/uv/pull/6718))
|
||||||
|
- Update workspace documentation to remove legacy virtual projects ([#6720](https://github.com/astral-sh/uv/pull/6720))
|
||||||
|
|
||||||
## 0.3.5
|
## 0.3.5
|
||||||
|
|
||||||
### Enhancements
|
### Enhancements
|
||||||
|
|
|
||||||
4
Cargo.lock
generated
4
Cargo.lock
generated
|
|
@ -4492,7 +4492,7 @@ checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "uv"
|
name = "uv"
|
||||||
version = "0.3.5"
|
version = "0.4.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anstream",
|
"anstream",
|
||||||
"anyhow",
|
"anyhow",
|
||||||
|
|
@ -5246,7 +5246,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "uv-version"
|
name = "uv-version"
|
||||||
version = "0.3.5"
|
version = "0.4.0"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "uv-virtualenv"
|
name = "uv-virtualenv"
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "uv-version"
|
name = "uv-version"
|
||||||
version = "0.3.5"
|
version = "0.4.0"
|
||||||
edition = { workspace = true }
|
edition = { workspace = true }
|
||||||
rust-version = { workspace = true }
|
rust-version = { workspace = true }
|
||||||
homepage = { workspace = true }
|
homepage = { workspace = true }
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "uv"
|
name = "uv"
|
||||||
version = "0.3.5"
|
version = "0.4.0"
|
||||||
edition = { workspace = true }
|
edition = { workspace = true }
|
||||||
rust-version = { workspace = true }
|
rust-version = { workspace = true }
|
||||||
homepage = { workspace = true }
|
homepage = { workspace = true }
|
||||||
|
|
|
||||||
|
|
@ -45,13 +45,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.3.5/install.sh | sh
|
$ curl -LsSf https://astral.sh/uv/0.4.0/install.sh | sh
|
||||||
```
|
```
|
||||||
|
|
||||||
=== "Windows"
|
=== "Windows"
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ powershell -c "irm https://astral.sh/uv/0.3.5/install.ps1 | iex"
|
$ powershell -c "irm https://astral.sh/uv/0.4.0/install.ps1 | iex"
|
||||||
```
|
```
|
||||||
|
|
||||||
### PyPI
|
### PyPI
|
||||||
|
|
|
||||||
|
|
@ -48,13 +48,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.3.5 /uv /bin/uv
|
COPY --from=ghcr.io/astral-sh/uv:0.4.0 /uv /bin/uv
|
||||||
```
|
```
|
||||||
|
|
||||||
Or, with the installer:
|
Or, with the installer:
|
||||||
|
|
||||||
```dockerfile
|
```dockerfile
|
||||||
ADD https://astral.sh/uv/0.3.5/install.sh /uv-installer.sh
|
ADD https://astral.sh/uv/0.4.0/install.sh /uv-installer.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
### Installing a project
|
### Installing a project
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,7 @@ It is considered best practice to pin to a specific uv version, e.g., with:
|
||||||
|
|
||||||
- name: Set up uv
|
- name: Set up uv
|
||||||
# Install a specific uv version using the installer
|
# Install a specific uv version using the installer
|
||||||
run: curl -LsSf https://astral.sh/uv/0.3.5/install.sh | sh
|
run: curl -LsSf https://astral.sh/uv/0.4.0/install.sh | sh
|
||||||
```
|
```
|
||||||
|
|
||||||
=== "macOS"
|
=== "macOS"
|
||||||
|
|
@ -94,7 +94,7 @@ It is considered best practice to pin to a specific uv version, e.g., with:
|
||||||
|
|
||||||
- name: Set up uv
|
- name: Set up uv
|
||||||
# Install a specific uv version using the installer
|
# Install a specific uv version using the installer
|
||||||
run: curl -LsSf https://astral.sh/uv/0.3.5/install.sh | sh
|
run: curl -LsSf https://astral.sh/uv/0.4.0/install.sh | sh
|
||||||
```
|
```
|
||||||
|
|
||||||
=== "Windows"
|
=== "Windows"
|
||||||
|
|
@ -112,7 +112,7 @@ It is considered best practice to pin to a specific uv version, e.g., with:
|
||||||
|
|
||||||
- name: Set up uv
|
- name: Set up uv
|
||||||
# Install a specific uv version using the installer
|
# Install a specific uv version using the installer
|
||||||
run: irm https://astral.sh/uv/0.3.5/install.ps1 | iex
|
run: irm https://astral.sh/uv/0.4.0/install.ps1 | iex
|
||||||
shell: powershell
|
shell: powershell
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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.3.5
|
rev: 0.4.0
|
||||||
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.3.5
|
rev: 0.4.0
|
||||||
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.3.5
|
rev: 0.4.0
|
||||||
hooks:
|
hooks:
|
||||||
# Compile requirements
|
# Compile requirements
|
||||||
- id: pip-compile
|
- id: pip-compile
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ build-backend = "maturin"
|
||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "uv"
|
name = "uv"
|
||||||
version = "0.3.5"
|
version = "0.4.0"
|
||||||
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"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue