Pip 26.1 Introduces Dependency Cooldowns and Experimental Lockfile Support to Harden Python Supply Chains
#Python

Pip 26.1 Introduces Dependency Cooldowns and Experimental Lockfile Support to Harden Python Supply Chains

Cloud Reporter
5 min read

Pip 26.1 adds a cooldown flag that blocks newly‑published packages for a configurable period and experimental support for PEP 751 pylock.toml lockfiles. The release also patches two critical CVEs and drops Python 3.9. The changes give teams a defensive lever against fast‑moving supply‑chain attacks, while positioning pip against competing installers such as uv.

What changed in Pip 26.1

Pip 26.1 landed on May 20 2026 with three headline improvements:

  1. Dependency cooldowns – the new --uploaded-prior-to flag lets you require that a package has been on PyPI for a minimum number of days before it can be installed. The default example in the release notes is --uploaded-prior-to=P7D (seven days).
  2. Experimental lockfile support – pip now accepts a pylock.toml file (PEP 751) via the -r option, making pip install -r pylock.toml functional out of the box.
  3. Security patches – CVE‑2026‑3219 (archive‑type confusion) and CVE‑2026‑6357 (deferred‑import code execution) are fixed; the bundled urllib3 is upgraded to 2.6.3, and support for Python 3.9 is removed.

The cooldown mechanic is deliberately simple: when a CI job runs pip install --uploaded-prior-to=P7D somepkg, pip queries the upload timestamp on PyPI and refuses any version published within the last seven days. The option accepts ISO‑8601 durations, so teams can tune the window to four, seven, or fourteen days (P4D, P14D).

Lockfile handling is still marked experimental. Pip parses a pylock.toml generated by tools such as uv lock or pip-tools, resolves the pinned versions, and installs them. A future pip sync command is slated to become the primary lockfile workflow.


Featured image


Provider comparison – pip vs. uv and other installers

Feature pip 26.1 uv 0.4 (latest) Poetry 1.8
Default on all Python installs ✔ (bundled) ✖ (needs separate install) ✖ (needs separate install)
Dependency cooldown flag --uploaded-prior-to (new) No built‑in cooldown, but can be scripted via --exclude‑pre and custom index filters No native support; requires external tooling
PEP 751 lockfile -r pylock.toml (experimental) Native uv lock and uv sync support Uses poetry.lock (different format)
Speed of install Moderate; still Python‑based resolver Very fast; written in Rust, parallel download Slower than uv, comparable to pip
Enterprise‑ready governance Widely available on python:*-slim images, no extra licensing Open‑source, but corporate ownership (Astral) raises policy questions for some firms Open‑source, but adds a separate toolchain
Pricing Free, part of CPython distribution Free, open‑source (MIT) Free, open‑source (MIT)
Future roadmap Planned pip sync, lockfile stability improvements Continuous performance work, lockfile format alignment with PEP 751 Focus on dependency groups, lockfile hygiene

Key takeaways

  • Ubiquity matters for compliance – many enterprises lock down base images to the official python:*-slim series. Pip’s presence in those images means the cooldown flag can be enabled without adding a new binary to the image, a clear advantage over uv for regulated environments.
  • Performance vs. control – uv delivers faster installs and already supports lockfiles, but its rapid adoption has sparked governance debates (e.g., concerns about Astral’s recent acquisition by OpenAI). Pip’s slower install speed is less of a barrier for CI pipelines that already spend time on security scans.
  • Feature maturity – pip’s lockfile support is experimental; uv’s implementation is production‑ready. Teams that need a stable lockfile workflow may still prefer uv or Poetry until pip stabilizes the API.

Business impact and migration considerations

Immediate defensive benefit

The cooldown flag directly addresses the time‑to‑exploit window that most recent supply‑chain attacks exploit. William Woodruff’s analysis of ten high‑profile incidents showed that eight of them could have been stopped with a seven‑day cooldown, and only one required a longer window. By configuring pip install --uploaded-prior-to=P7D in CI pipelines, organizations buy themselves a buffer to run automated scans (e.g., with Dependabot, pip‑audit, or GitHub Advanced Security) before a potentially malicious release reaches production.

Balancing security patches

A known trade‑off is that legitimate security fixes are also delayed. The recommended mitigation is a dual‑track approach:

  1. Enable cooldowns globally for routine dependencies.
  2. Create an exception list for critical packages (e.g., openssl, cryptography) that bypass the cooldown via --no-deps or a separate install step that pulls the latest version regardless of age.

Automation can be built into the pipeline: a nightly job queries the PyPI JSON API for newly released versions of high‑risk packages and, if a CVE is disclosed, pushes a fast‑track install that overrides the cooldown.

Migration path from uv or Poetry to pip 26.1

Enterprises that have standardized on uv for its speed may want to evaluate whether the new cooldown feature justifies a shift back to pip. A pragmatic migration plan could look like this:

  1. Run a side‑by‑side test – add pip install -r pylock.toml to a staging pipeline while keeping the existing uv workflow. Measure install time and lockfile fidelity.
  2. Validate lockfile compatibility – generate a pylock.toml with uv lock --output pylock.toml and confirm that pip resolves the same versions.
  3. Introduce cooldowns – add --uploaded-prior-to=P7D to the pip command in the CI configuration. Observe any increase in build duration caused by waiting for older package versions.
  4. Gradual cut‑over – once confidence is established, replace uv calls with pip in non‑time‑critical jobs (e.g., nightly builds, development environments). Keep uv for performance‑critical production builds until pip’s pip sync stabilizes.

Cost implications

Because both pip and uv are free, the primary cost drivers are operational overhead (pipeline changes, testing) and potential delay in receiving critical patches. Organizations should quantify the average time saved by uv’s parallel downloads against the risk reduction gained from cooldowns. In many regulated sectors, the risk mitigation value outweighs a modest increase in CI runtime.


Bottom line

Pip 26.1 equips Python teams with a practical lever—dependency cooldowns—to slow the spread of malicious packages, while the experimental lockfile support signals a move toward reproducible builds that can compete with uv’s early‑adopter advantage. Enterprises that prioritize compliance, image immutability, and a single‑toolchain footprint will find the new features compelling, especially when paired with existing vulnerability‑scanning solutions. The trade‑off is a slight slowdown in install speed and the need to manage an exception list for urgent security patches. Companies should run a controlled pilot, measure impact, and decide whether the security posture gains justify the migration effort.


Author photo

Comments

Loading comments...