Skip to content

Commit

Permalink
Merge branch 'main' into zb/dev-drive
Browse files Browse the repository at this point in the history
  • Loading branch information
zanieb committed Jan 17, 2025
2 parents 254ac63 + 08da17d commit 84599c1
Show file tree
Hide file tree
Showing 72 changed files with 1,593 additions and 432 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Create Dev Drive using ReFS
- name: Setup Dev Drive
run: ${{ github.workspace }}/.github/workflows/setup-dev-drive.ps1

# actions/checkout does not let us clone into anywhere outside ${{ github.workspace }}, so we have to copy the clone...
Expand Down Expand Up @@ -260,7 +260,7 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Create Dev Drive using ReFS
- name: Setup Dev Drive
run: ${{ github.workspace }}/.github/workflows/setup-dev-drive.ps1

# actions/checkout does not let us clone into anywhere outside ${{ github.workspace }}, so we have to copy the clone...
Expand Down Expand Up @@ -333,7 +333,7 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Create Dev Drive using ReFS
- name: Setup Dev Drive
run: ${{ github.workspace }}/.github/workflows/setup-dev-drive.ps1

# actions/checkout does not let us clone into anywhere outside ${{ github.workspace }}, so we have to copy the clone...
Expand Down Expand Up @@ -522,7 +522,7 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Create Dev Drive using ReFS
- name: Setup Dev Drive
run: ${{ github.workspace }}/.github/workflows/setup-dev-drive.ps1

# actions/checkout does not let us clone into anywhere outside ${{ github.workspace }}, so we have to copy the clone...
Expand Down
43 changes: 32 additions & 11 deletions .github/workflows/setup-dev-drive.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,44 @@

# Note we use `Get-PSDrive` is not sufficient because the drive letter is assigned.
if (Test-Path "D:\") {
Write-Output "Using `D:` drive"
Write-Output "Using existing drive at `D:`"
$Drive = "D:"
} else {
$Volume = New-VHD -Path C:/uv_dev_drive.vhdx -SizeBytes 20GB |
Mount-VHD -Passthru |
Initialize-Disk -Passthru |
New-Partition -AssignDriveLetter -UseMaximumSize |
Format-Volume -FileSystem ReFS -Confirm:$false -Force

Write-Output "Using ReFS drive at $Volume"
$Drive = "$($Volume.DriveLetter):"
# The size (20 GB) is chosen empirically to be large enough for our
# workflows; larger drives can take longer to set up.
$Volume = New-VHD -Path C:/uv_dev_drive.vhdx -SizeBytes 20GB |
Mount-VHD -Passthru |
Initialize-Disk -Passthru |
New-Partition -AssignDriveLetter -UseMaximumSize |
Format-Volume -DevDrive -Confirm:$false -Force
$Drive = "$($Volume.DriveLetter):"
# Set the drive as trusted
# See https://learn.microsoft.com/en-us/windows/dev-drive/#how-do-i-designate-a-dev-drive-as-trusted
fsutil devdrv trust $Drive
# Disable antivirus filtering on dev drives
# See https://learn.microsoft.com/en-us/windows/dev-drive/#how-do-i-configure-additional-filters-on-dev-drive
fsutil devdrv enable /disallowAv
# Remount so the changes take effect
Dismount-VHD -Path C:/uv_dev_drive.vhdx
Mount-VHD -Path C:/uv_dev_drive.vhdx
# Show some debug information
Write-Output $Volume
fsutil devdrv query $Drive
Write-Output "Using Dev Drive at `$Volume`"
}

$Tmp = "$($Drive)\uv-tmp"
$Workspace = "$($Drive)\uv"

# Create the directory ahead of time in an attempt to avoid race-conditions
# Create directories ahead of time in an attempt to avoid race-conditions
New-Item $Tmp -ItemType Directory
New-Item $Workspace -ItemType Directory

Write-Output `
"DEV_DRIVE=$($Drive)" `
Expand All @@ -33,6 +54,6 @@ Write-Output `
"UV_INTERNAL__TEST_DIR=$($Tmp)" `
"RUSTUP_HOME=$($Drive)/.rustup" `
"CARGO_HOME=$($Drive)/.cargo" `
"UV_WORKSPACE=$($Drive)/uv" `
"UV_WORKSPACE=$($Workspace)" `
>> $env:GITHUB_ENV

4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,7 @@ profile.json

# macOS
**/.DS_Store

# IDE
.idea
.vscode
63 changes: 63 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,68 @@
# Changelog

## 0.5.20

### Bug fixes

- Avoid failing when deserializing unknown tags ([#10655](https://github.com/astral-sh/uv/pull/10655))

## 0.5.19

### Enhancements

- Filter wheels from lockfile based on architecture ([#10584](https://github.com/astral-sh/uv/pull/10584))
- Omit dynamic versions from the lockfile ([#10622](https://github.com/astral-sh/uv/pull/10622))
- Add support for `pip freeze --path` ([#10488](https://github.com/astral-sh/uv/pull/10488))
- Reduce verbosity of inline-metadata message when using `uv run <script.py>` ([#10588](https://github.com/astral-sh/uv/pull/10588))
- Add opt-in Git LFS support ([#10335](https://github.com/astral-sh/uv/pull/10335))
- Recommend `--native-tls` on SSL errors ([#10605](https://github.com/astral-sh/uv/pull/10605))
- Show expected and available ABI tags in resolver errors ([#10527](https://github.com/astral-sh/uv/pull/10527))
- Show target Python version in error messages ([#10582](https://github.com/astral-sh/uv/pull/10582))
- Add `--output-format=json` support to `uv python list` ([#10596](https://github.com/astral-sh/uv/pull/10596))

### Python

The managed Python distributions have been updated, including:

- Python 3.14 support on Windows
- Python 3.14.0a4 support
- 64-bit RISC-V Linux support
- Bundled `libedit` updated from 20210910-3.1 -> 20240808-3.1
- Bundled `tcl/tk` updated from 8.6.12 -> 8.6.14 (for all Python versions on Unix, only for Python 3.14 on Windows)

See the [`python-build-standalone` release notes](https://github.com/astral-sh/python-build-standalone/releases/tag/20250115) for more details.

### Performance

- Avoid allocating when stripping source distribution extension ([#10625](https://github.com/astral-sh/uv/pull/10625))
- Reduce `WheelFilename` to 48 bytes ([#10583](https://github.com/astral-sh/uv/pull/10583))
- Reduce distribution size to 200 bytes ([#10601](https://github.com/astral-sh/uv/pull/10601))
- Remove `import re` from entrypoint wrapper scripts ([#10627](https://github.com/astral-sh/uv/pull/10627))
- Shrink size of platform tag enum ([#10546](https://github.com/astral-sh/uv/pull/10546))
- Use `ArcStr` in verbatim URL ([#10600](https://github.com/astral-sh/uv/pull/10600))
- Use `memchr` for wheel parsing ([#10620](https://github.com/astral-sh/uv/pull/10620))

### Bug fixes

- Avoid reading symlinks during `uv python install` on Windows ([#10639](https://github.com/astral-sh/uv/pull/10639))
- Correct Pyston tag format ([#10580](https://github.com/astral-sh/uv/pull/10580))
- Provide `pyproject.toml` path for parse errors in `uv venv` ([#10553](https://github.com/astral-sh/uv/pull/10553))
- Don't treat `setuptools` and `wheel` as seed packages in uv sync on Python 3.12 ([#10572](https://github.com/astral-sh/uv/pull/10572))
- Fix git-tag cache-key reader in case of slashes (#10467) ([#10500](https://github.com/astral-sh/uv/pull/10500))
- Include build tag in rendered wheel filenames ([#10599](https://github.com/astral-sh/uv/pull/10599))
- Patch embedded install path for Python dylib on macOS during `python install` ([#10629](https://github.com/astral-sh/uv/pull/10629))
- Read cached registry distributions when `--config-settings` are present ([#10578](https://github.com/astral-sh/uv/pull/10578))
- Show resolver hints for packages with markers ([#10607](https://github.com/astral-sh/uv/pull/10607))

### Documentation

- Add meta titles to documents in guides, excluding integration documents ([#10539](https://github.com/astral-sh/uv/pull/10539))
- Remove `build-system` from example workspace rot ([#10636](https://github.com/astral-sh/uv/pull/10636))

### Preview features

- Make build backend type annotations more generic ([#10549](https://github.com/astral-sh/uv/pull/10549))

## 0.5.18

### Bug fixes
Expand Down
5 changes: 3 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 13 additions & 4 deletions crates/uv-cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1184,6 +1184,9 @@ pub struct PipCompileArgs {
/// Represented as a "target triple", a string that describes the target platform in terms of
/// its CPU, vendor, and operating system name, like `x86_64-unknown-linux-gnu` or
/// `aarch64-apple-darwin`.
///
/// When targeting macOS (Darwin), the default minimum version is `12.0`. Use
/// `MACOSX_DEPLOYMENT_TARGET` to specify a different minimum version, e.g., `13.0`.
#[arg(long)]
pub python_platform: Option<TargetTriple>,

Expand Down Expand Up @@ -1472,6 +1475,9 @@ pub struct PipSyncArgs {
/// its CPU, vendor, and operating system name, like `x86_64-unknown-linux-gnu` or
/// `aarch64-apple-darwin`.
///
/// When targeting macOS (Darwin), the default minimum version is `12.0`. Use
/// `MACOSX_DEPLOYMENT_TARGET` to specify a different minimum version, e.g., `13.0`.
///
/// WARNING: When specified, uv will select wheels that are compatible with the _target_
/// platform; as a result, the installed distributions may not be compatible with the _current_
/// platform. Conversely, any distributions that are built from source may be incompatible with
Expand Down Expand Up @@ -1751,6 +1757,9 @@ pub struct PipInstallArgs {
/// its CPU, vendor, and operating system name, like `x86_64-unknown-linux-gnu` or
/// `aarch64-apple-darwin`.
///
/// When targeting macOS (Darwin), the default minimum version is `12.0`. Use
/// `MACOSX_DEPLOYMENT_TARGET` to specify a different minimum version, e.g., `13.0`.
///
/// WARNING: When specified, uv will select wheels that are compatible with the _target_
/// platform; as a result, the installed distributions may not be compatible with the _current_
/// platform. Conversely, any distributions that are built from source may be incompatible with
Expand Down Expand Up @@ -2365,8 +2374,8 @@ pub struct VenvArgs {

/// Install seed packages (one or more of: `pip`, `setuptools`, and `wheel`) into the virtual environment.
///
/// Note `setuptools` and `wheel` are not included in Python 3.12+ environments.
#[arg(long)]
/// Note that `setuptools` and `wheel` are not included in Python 3.12+ environments.
#[arg(long, value_parser = clap::builder::BoolishValueParser::new(), env = EnvVars::UV_VENV_SEED)]
pub seed: bool,

/// Preserve any existing files or directories at the target path.
Expand Down Expand Up @@ -2395,8 +2404,8 @@ pub struct VenvArgs {
/// the directory name. If not provided (`uv venv`), the prompt is set to
/// the current directory's name.
///
/// If "." is provided, the the current directory name will be used
/// regardless of whether a path was provided to `uv venv`.
/// If "." is provided, the current directory name will be used regardless
/// of whether a path was provided to `uv venv`.
#[arg(long, verbatim_doc_comment)]
pub prompt: Option<String>,

Expand Down
3 changes: 2 additions & 1 deletion crates/uv-distribution-filename/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@ pub use build_tag::{BuildTag, BuildTagError};
pub use egg::{EggInfoFilename, EggInfoFilenameError};
pub use extension::{DistExtension, ExtensionError, SourceDistExtension};
pub use source_dist::{SourceDistFilename, SourceDistFilenameError};
pub use wheel::{TagSet, WheelFilename, WheelFilenameError};
pub use wheel::{WheelFilename, WheelFilenameError};

mod build_tag;
mod egg;
mod extension;
mod source_dist;
mod splitter;
mod wheel;
mod wheel_tag;

#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord)]
pub enum DistFilename {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Ok(
platform_tag: [
Any,
],
repr: "202206090410-py3-none-any",
},
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ Ok(
arch: X86_64,
},
],
repr: "cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64",
},
},
},
Expand Down
Loading

0 comments on commit 84599c1

Please sign in to comment.