Skip to content

Nondeterministic behavior of uv pip #13435

@yjsongamz

Description

@yjsongamz

Summary

Minimal reproducible example: https://github.com/yjsongamz/uv-mre
Expected behavior: when I run run.sh, I expect it to always succeed (or at least be deterministic), but it sometimes fail randomly.
When I run diff -r on the .venv of the successful run and unsuccessful run, I found this diff:

> from .z3 import *
>
> from . import z3num
> from . import z3poly
> from . import z3printer
> from . import z3rcf
> from . import z3types
> from . import z3util
>
> # generated files
> from . import z3core
> from . import z3consts

(successful run has 9 more SLOC in .venv)

OS version:

~/mre$ sw_vers
ProductName:		macOS
ProductVersion:		15.3.1
BuildVersion:		24D70
~/mre$ uname -orsm
Darwin 24.3.0 arm64

I tested it also on linux virtual machine and was able to reproduce there.

UV version:

~/mre$ uv self version
uv 0.7.3 (Homebrew 2025-05-07)

Platform

macOS 15.3.1 arm64

Version

uv 0.7.3 (Homebrew 2025-05-07)

Python version

Python 3.8.20

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggreat writeupA wonderful example of a quality contribution 💜

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions