Menu

Pip 26.3 - Extended Pylock Support, Build Backend Warnings, and a caution on wheel installation

Python·zurtex·28 days ago
#DMGHJpft
#python#redditpython#v26#install#file
Long article (597 words) — no AI summary yet.
Reading 0:00
15s threshold

Today I got to be the release manager for pip 26.3! There are two big features, and one documentation update, that I think worth talking about:

Extended Pylock Support

You can now install extras and non-default groups from a pylock file, e.g. pip install -r "pylock.toml[extra1,extra2]" and pip install --group pylock.toml:dev

This supports the installation part of a workflow that generates a single lock file for multiple situations. For example, using a universal pylock file generator, such as a tool I built called nab , you might want to specify "I want a lock file with two mutually exclusive extras for different versions of SqlAlchemy and a dev dependency group", e.g.:

[project.optional-dependencies] sa14 = ["sqlalchemy==1.4.*"] sa20 = ["sqlalchemy==2.0.*"] [dependency-groups] dev = ["pytest"] [tool.nab] conflicts = [[{ extra = "sa14" }, { extra = "sa20" }]]

And now pip can pick which extra and group it wants to install from the output lock file, e.g. pip install --group 'pylock.toml[sa14]:dev' .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.