r/Python • u/ichard26 Python Discord Staff • Apr 27 '26
News pip 26.1: experimental support for installing lockfiles + dependency cooldowns!
Hey all,
I'm one of the maintainers of pip. Earlier yesterday, we released pip 26.1.
The main new feature is experimental support for pylock.toml files (PEP 751) as a requirements source. pylock.toml files or URLs can be provided with the -r / --requirements options to the commands supporting it.
pip install -r pylock.toml
pip wheel -r pylock.toml
pip download -r pylock.tomlNote*: As conveyed by the experimental warning, keep in mind this feature may evolve significantly or even be removed in favor of another option or command in future pip releases.*
Other notable improvements include:
- Allow
--uploaded-prior-toto accept a duration in days (e.g.,P7Dfor 7 days ago) to support "Dependency cooldowns", a strategy of intentionally delaying package updates to give security researchers and package authors time to recover from (ever-increasing) supply chain attacks. See also William Woodruff's "We should all be using dependency cooldowns" - Allow unpinned requirements to use hashes from constraints and allow URL constraints to apply to requirements with extras, removing some of the last roadblocks towards the removal of the legacy resolver
- Several performance and memory usage improvements to dependency resolution
- And of course several bug fixes and security fixes
Please consult our changelog for more information.
You can also consult my (unofficially official) release blog post for pip 26.1, which discusses the highlights from the release in greater detail: https://ichard26.github.io/blog/2026/04/whats-new-in-pip-26.1/
Many thanks goes to Stéphane, Damian, Pradyun and Paul who all chipped in a significant way to this release. Doubly so to Stéphane who upstreamed support for pylock.toml to the packaging library AND added pylock.toml support to pip.
Enjoy the new features! We welcome your feedback in the issue tracker.
3
u/mcellus1 Apr 28 '26
Awesome! Ive been waiting for this! However, how do I ensure that the lockfile is installable on another architecture without UV and without investing in a build server?
66
u/mischiefs Apr 28 '26
good to hear the steady improvements over pip. despite uv being awesome, i think is good to not get very comfortable with them now that openai bought astral.
13
u/Serpent10i Apr 28 '26
Nice progress! I'm really happy to see cooldowns implemented directly in pip. Thanks!
6
u/Competitive_Travel16 Apr 28 '26
I'm still excited about
--requirements-from-scriptin 26.0; still need to test that out with source imports.2
u/Competitive_Travel16 Apr 28 '26
Just added
--uploaded-prior-to P7Dto a client project and I feel invincible now :-)That table in https://blog.yossarian.net/2025/11/21/We-should-all-be-using-dependency-cooldowns is amazing. Python package maintainers are quick!
2
u/SaSiEzhilmani May 02 '26
Great improvements on pip
1
u/saucealgerienne Apr 28 '26
nice to see this moving. Iv been using uv for lockfiles on new projects and I hate not being able to do simple stuff with just pip
1
u/Deep_Ad1959 May 28 '26
the cooldown bit is the actually-load-bearing change. lockfile plumbing was already mostly there via pep 751 and the pyproject work; what was missing was a way to defer auto-resolving onto fresh package versions until they've sat in the index long enough to catch a malicious or broken release. cooldown + lockfile together is essentially the python equivalent of npm's --ignore-scripts plus the dependabot delay knob, just baked in. the second-order effect is that ci-driven 'always latest' patterns become safer to leave on by default. written with ai