Where wheelgap differs from pip and uv¶
wheelgap's goal is to predict whether pip or uv will install a prebuilt wheel, build from source, or fail. In most cases, wheelgap's answer matches the installer exactly. However, there are known scenarios where wheelgap's model is intentionally simpler than a full installer or package resolver, or where behavior is tracked for a future release.
This page summarizes each difference, what wheelgap assumes, what installers do, and when it affects the reported verdict. Installer behavior is as checked in the linked issue (pip 26.3 and uv 0.13.1 unless it says otherwise) or as stated in the linked docs section.
Version ranges¶
- What wheelgap assumes: A version range or bare name in a requirements file is evaluated at the newest matching release published on the index, picked by pip's rule (see Version ranges). With
--deps, wheelgap's small resolver doesn't backtrack: where pip would go back to an older release, it stops with an error rather than guess (see--deps). With--dockerfile-inputs --deps, each-rfile of apip install -r a.txt -r b.txtline is resolved on its own (with the line's options and constraints), where pip resolves the files together, so one file's requirements can't move the release picked for a dependency of the other. - What pip and uv do: Their resolvers solve the whole set of requirements together and backtrack when two requirements conflict, so another requirement's bound can make them pick an older release than the newest one that matches.
- When it changes the answer: When a resolver settles on an older release, its files can differ from the newest release's in either direction: an older release without the wheel the newest has (wheelgap says
wheel, the install builds or fails), or the reverse. Pin the versions you install to check exactly those. - Tracking: Backtracking is by design; documented in How it works. uv's rule for picking a release for one range also differs from pip's (it ignores a
Requires-Pythonupper bound, for example), which is why--dockerfile-inputsrefuses an unpinned requirement underuv pip install; reading those ranges the way uv does is #643.
Python patch releases¶
- What wheelgap assumes: Passing
-p 3.13evaluatesRequires-Pythonmetadata assuming the newest patch level of that Python series (3.13.99).--dockerfiledoes the same for an image pinned to a patch release:FROM python:3.9.1-slimis checked as 3.9. - What pip and uv do: Installers compare
Requires-Pythonagainst the exact runtime Python version in the active environment (e.g.,3.13.0or3.13.2). - When it changes the answer: A package requiring
Requires-Python: >=3.13.2is accepted by wheelgap for-p 3.13, but an installation running on Python3.13.0or3.13.1refuses it. In an image pinned to an early patch release it's the same: cryptography 44.0.0 hasRequires-Python: !=3.9.0,!=3.9.1,>=3.7, so pip inpython:3.9.1-slimrefuses it, while wheelgap counts it for 3.9. - Tracking: Tracked in #638.
Pre-installed packages¶
- What wheelgap assumes: Under
--dockerfile-inputs, each requirement file is evaluated as a clean, fresh install into the target image. - What pip and uv do: Without
--upgrade,pip installanduv pip installleave a package already installed in the image (from the base image or an earlierRUN) untouched if it satisfies the requirement. - When it changes the answer: Only for unpinned requirements on a line without
--upgrade: a pre-installed dependency whose newest release on the index lacks wheels is flagged as a source build or gap by wheelgap, whereas pip skips installing or compiling it. - Tracking: Tracked in #636.
Requirements file hashes¶
- What wheelgap assumes: A requirement's
--hash=sha256:…options limit which of its release's files are checked, by thesha256digests PyPI's JSON API gives, and a range takes the newest release that has a listed file. A file the index gives nosha256for (some mirrors behindWHEELGAP_INDEX_URL) is kept. Not read yet, so the answer is the one without them:sha384andsha512hashes,--hashon a line of a constraints file, and the lookups of--index-url. - What pip and uv do: They install only a file whose hash is listed: with only the sdist's hash, they build from source even when a matching wheel exists on PyPI. A file whose hash the index doesn't give is downloaded and refused if its hash isn't listed. pip also hash-checks the whole install once any requirement has a
--hash, and refuses it when another requirement has none. - When it changes the answer: With only
sha384/sha512hashes, a--hashin a constraints file, or--index-url, wheelgap can saywheelwhere pip and uv build the sdist or refuse the download. On an index without digests it can saywheelwhere pip downloads a wheel whose hash isn't listed and stops. wheelgap doesn't refuse a file in which one requirement has a--hashand another has none, which pip refuses. - Tracking: #633 made
--hash=sha256count; the cases above aren't tracked yet.
Additional index URLs¶
- What wheelgap assumes:
--index-url,--extra-index-url,--find-linksand--no-indexoptions inside requirements files are not read; packages are checked against PyPI (or the--index-urlpassed to wheelgap). A note on stderr says so for each requirements file that has one (requirements.txt sets --extra-index-url, which wheelgap doesn't read: its packages were checked on PyPI only, …); the statuses don't change. - What pip and uv do:
pipanduvquery the indexes and find-links locations the file names, finding prebuilt wheels published on external or private repositories (such as PyTorch or CUDA package indexes). - When it changes the answer: A package's files on the other index can differ from PyPI's: a wheel published only there is not seen, and a private package with a namesake on PyPI is judged by the PyPI project's files.
- Tracking: #632 added the note; reading the other index isn't tracked yet.
Pre-releases and prefer-binary¶
- What wheelgap assumes:
--pre,--all-releasesand--only-finallines in requirements files are read as pip reads them, so an unpinned requirement is checked at the release pip picks, pre-releases included where they're allowed.--prefer-binaryis read but not followed: an unpinned requirement is still checked at the newest matching release, with a note on stderr that says so.--depsrefuses a file with any of these options. - What pip does: With
--prefer-binary, pip takes an older release that has a wheel over a newer one that only has an sdist. uv ignores--preand--prefer-binarylines with a warning (auv pip installline in a Dockerfile that reads such a file is an error). - When it changes the answer: Under
--prefer-binary, for an unpinned requirement whose newest release has no wheel for a target, wheelgap sayssourcewhere pip installs an older release's wheel. Pinned requirements aren't affected. - Tracking: #634 made
--precount and added the--prefer-binarynote; picking the release--prefer-binarypicks isn't tracked yet.
User and system configuration¶
- What wheelgap assumes: User and system configuration files (
pip.conforpip.ini,~/.config/uv/uv.toml,/etc/uv/uv.toml) are not read, andPIP_*andUV_*environment variables never change which files are checked. Some of those variables are read only to refuse or skip a feature whose answer they would make wrong, such as--depsunderPIP_INDEX_URL, to say they're set (UV_EXCLUDE_NEWERfor apyproject.tomlor script), and to decide which package names may be sent to PyPI (see Which package names leave the run). - What pip and uv do: Installers load configuration from user and system configuration paths and respect environment variables that set index URLs and other options.
- When it changes the answer: If the installing machine's configuration points pip or uv at another index or changes how files are picked, wheelgap's answer is still PyPI's (or that of the
--index-urlpassed to wheelgap). - Tracking: Documented in Which package names leave the run.
uv.lock Requires-Python bounds¶
- What wheelgap assumes:
uv.lockis evaluated followinguv sync, with and without--online(0.13.0 followed pip with--online), which checks only the lower bound ofRequires-Python. A file excluded only by an upper bound (such as<3.15or!=3.15.*) still counts. With--online, the report also says where pip would refuse such a file; without it the lock doesn't record each file'sRequires-Python, so wheelgap can't tell. - What pip and uv do:
uv syncinstalls the locked release ignoring upper bounds;pip install(from a requirements file exported from the lock, for example) enforces both lower and upper bounds ofRequires-Python. - When it changes the answer: A locked package whose
Requires-Pythonspecifies<3.15will install underuv syncon Python 3.15, but pip would refuse to install it. - Tracking: Documented in uv.lock; the rule was settled in #544.
File-name casing¶
- What wheelgap assumes: A file a requirements file names with
-ror-cis found as the host's file system finds it.--dockerfile-inputsmatchesCOPYpaths, and the-rand-cfiles the copied files name, with exact case on every host. - What pip and uv do: On a case-sensitive file system (such as Linux, and a Linux Docker build), a name that differs only in case (
Base.txtvsbase.txt) is not found. - When it changes the answer: Running
wheelgap requirements.txton macOS or Windows can follow-r Base.txttobase.txt, where pip on Linux stops with an error. - Tracking: Not tracked yet; #635 fixed the
--dockerfile-inputscase.
Source builds¶
- What wheelgap assumes: A
sourcestatus indicates that the index publishes an sdist for that version, meaning an installer will attempt a source build. - What pip and uv do:
pipanduvinvoke PEP 517 build backends, which compile C, C++, or Rust extensions using host compilers and system header libraries (e.g.gcc,libpq-dev). - When it changes the answer: wheelgap reports whether a source build will be attempted, not whether the build will succeed on the target machine.
- Tracking: None; this is by design.
Constraints files¶
- What wheelgap assumes: A requirement is checked against the constraints in its
-cfiles, with versions matched as pip matches them (==1.9and==1.9.0agree,==1.0with==1.0+cpuis1.0+cpu), and a conflict is an error that makes the packageunknown: a pin that a constraint leaves out (idna==3.6withidna==3.7oridna>=3.7), or an exact constraint that the requirement's range or another constraint leaves out (idna>=3.8withidna==3.7). Not followed yet: a constraint with an environment marker that leaves out a pinned requirement makes the packageunknownon every target; two ranges with nothing in common (idna>=3.8withidna<3) are reported asno release matchesrather than as a conflict; a constraint with extras (idna[socks]==3.7) is read asidna==3.7; and a URL or path constraint makes the packageunknown. - What pip and uv do:
pip installanduv pip installapply the constraints to the requirement and refuse the install when they conflict, and a constraint with a marker counts only where its marker holds. pip refuses any constraint with extras ("Constraints cannot have extras"), which uv accepts. Both install from a URL constraint whose version the requirement allows. - When it changes the answer: wheelgap says
unknownwhere pip installs (a marked constraint whose marker doesn't hold on the target, a URL or path constraint that fits the requirement), and checks a constraint with extras that pip refuses. - Tracking: Conflicts were #631; the cases above aren't tracked yet.