Change8

0.6.0

Breaking Changes
📦 uv
8 breaking3 features🐛 4 fixes🔧 8 symbols

Summary

uv 0.6.0 adds support for --active script environments, lockfile revisions, and stabilizes uv publish, while introducing breaking changes such as a new main.py init file, respect for UV_PYTHON, and altered flag semantics.

⚠️ Breaking Changes

  • uv init now creates main.py instead of hello.py; use the --bare option to avoid creating the file or rename the generated file in existing scripts.
  • uv python install now respects the UV_PYTHON environment variable, which now takes precedence over .python-version files; adjust any custom handling accordingly.
  • When uv spawns a subprocess, the UV environment variable is set to the uv executable path, overwriting any user-defined UV variable; rename your custom variable if needed. Rust entrypoint uv::main is now marked unsafe.
  • uv sync (and other commands) now error on non‑existent extras instead of silently ignoring them; ensure requested extras exist or remove them.
  • uv sync with --frozen now errors if a requested dependency group is missing from the lockfile; add the group to the lockfile or avoid using --frozen for that group.
  • In uv pip compile, the -p flag is now an alias for --python (not --python-version) and UV_PYTHON is respected; also, --python <version> will no longer fail if the interpreter cannot be found. Use --python-version if you need the old behavior.
  • Docker images: uv:alpine now uses Alpine 3.21 and uv:alpine3.20 will no longer be updated.
  • On Windows, uv now uses files instead of junctions for atomic cache replacement, bumping the cache version.

Migration Steps

  1. Update scripts expecting hello.py to main.py or use the --bare flag with uv init.
  2. Review any custom UV environment variable usage; rename if needed because uv now sets UV to its own executable path.
  3. If using -p with uv pip compile, change to --python or adjust expectations about interpreter lookup behavior.
  4. Ensure all requested extras exist; remove or correct any nonexistent extras to avoid errors.
  5. When using --frozen, verify that all requested dependency groups are present in the lockfile.
  6. For Docker users, switch to the uv:alpine image (now based on Alpine 3.21) and stop relying on uv:alpine3.20 updates.
  7. On Windows, no action is required unless you depended on junction behavior; be aware that the cache version has changed.

✨ New Features

  • Support --active for PEP 723 script environments.
  • Add revision field to the lockfile to allow backwards‑compatible metadata changes.
  • uv publish is now stable (no longer preview).

🐛 Bug Fixes

  • Avoid reading metadata from .egg-info files.
  • Include archive bucket version in archive pointers.
  • Omit lockfile version when additional fields are dynamic.
  • Respect executable name in uvx --from tool@latest.

🔧 Affected Symbols

uv inituv python installuv syncuv pip compileuvxuv publishUV environment variableuv::main (Rust entrypoint)