Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uv 0.4.0 #182780

Merged
merged 2 commits into from
Aug 28, 2024
Merged

uv 0.4.0 #182780

merged 2 commits into from
Aug 28, 2024

Conversation

BrewTestBot
Copy link
Member

Created by brew bump


Created with brew bump-formula-pr.

release notes
## Release Notes

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 for more details.

Enhancements

  • Add first-class support for non-packaged projects (#6585)
  • Add --app and --lib options to uv init (#6689)
  • Use virtual source label in lockfile for non-packaged dependencies (#6728)
  • Read hash from URL fragment if --hashes are omitted (#6731)
  • Support {package}@{version} in uv tool install (#6762)
  • Publish additional Docker tags without patch version (#6734)

Bug fixes

  • Accept either strings or structs for hosts (#6763)
  • Avoid including non-excluded members in parent workspaces (#6735)
  • Avoid reading stale .egg-info from mutable sources (#6714)
  • Avoid writing invalid PEP 723 scripts on tool.uv.sources (#6706)
  • Compare virtual members when invalidating lockfile (#6754)
  • Do not require workspace members to sync with --frozen (#6737)
  • Implement deserialization for trusted host (#6716)
  • Avoid showing duplicate paths in uv python list (#6740)
  • Raise an error for unclosed script tags in PEP 723 scripts (#6704)

Documentation

  • Add dependabot and renovate documentation page (#6236)
  • Bind to the host to allow connections in FastAPI Docker example (#6753)
  • Fix some broken links (#6705)
  • Update FastAPI guide for virtual projects and use uv init to create the pyproject.toml (#6752)
  • Update project documentation for the application / library concepts (#6718)
  • Update workspace documentation to remove legacy virtual projects (#6720)

Install uv 0.4.0

Install prebuilt binaries via shell script

curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/uv/releases/download/0.4.0/uv-installer.sh | sh

Install prebuilt binaries via powershell script

powershell -c "irm https://github.com/astral-sh/uv/releases/download/0.4.0/uv-installer.ps1 | iex"

Download uv 0.4.0

File Platform Checksum
uv-aarch64-apple-darwin.tar.gz Apple Silicon macOS checksum
uv-x86_64-apple-darwin.tar.gz Intel macOS checksum
uv-i686-pc-windows-msvc.zip x86 Windows checksum
uv-x86_64-pc-windows-msvc.zip x64 Windows checksum
uv-aarch64-unknown-linux-gnu.tar.gz ARM64 Linux checksum
uv-i686-unknown-linux-gnu.tar.gz x86 Linux checksum
uv-powerpc64-unknown-linux-gnu.tar.gz PPC64 Linux checksum
uv-powerpc64le-unknown-linux-gnu.tar.gz PPC64LE Linux checksum
uv-s390x-unknown-linux-gnu.tar.gz S390x Linux checksum
uv-x86_64-unknown-linux-gnu.tar.gz x64 Linux checksum
uv-armv7-unknown-linux-gnueabihf.tar.gz ARMv7 Linux checksum
uv-aarch64-unknown-linux-musl.tar.gz ARM64 MUSL Linux checksum
uv-i686-unknown-linux-musl.tar.gz x86 MUSL Linux checksum
uv-x86_64-unknown-linux-musl.tar.gz x64 MUSL Linux checksum
uv-arm-unknown-linux-musleabihf.tar.gz ARMv6 MUSL Linux (Hardfloat) checksum
uv-armv7-unknown-linux-musleabihf.tar.gz ARMv7 MUSL Linux checksum

@github-actions github-actions bot added rust Rust use is a significant feature of the PR or issue bump-formula-pr PR was created using `brew bump-formula-pr` labels Aug 28, 2024
Copy link
Contributor

🤖 An automated task has requested bottles to be published to this PR.

@github-actions github-actions bot added the CI-published-bottle-commits The commits for the built bottles have been pushed to the PR branch. label Aug 28, 2024
@BrewTestBot BrewTestBot enabled auto-merge August 28, 2024 20:18
@BrewTestBot BrewTestBot added this pull request to the merge queue Aug 28, 2024
Merged via the queue into master with commit ddb4a8c Aug 28, 2024
15 checks passed
@BrewTestBot BrewTestBot deleted the bump-uv-0.4.0 branch August 28, 2024 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bump-formula-pr PR was created using `brew bump-formula-pr` CI-published-bottle-commits The commits for the built bottles have been pushed to the PR branch. rust Rust use is a significant feature of the PR or issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants