Python lock files have officially been standardized

by ofekon 3/31/2025, 2:54 PMwith 17 comments

by ofekon 3/31/2025, 2:54 PM

PEP 751: https://peps.python.org/pep-0751/

by isjustintimeon 3/31/2025, 6:49 PM

This is great. pip-tools` is so valuable right now in helping mitigate these dependency tree issues. I'd love to see some form of support in core Python. I really hope this becomes pushed out, similar to how `pip` actually has a dependency resolver now. Relying on running `pip freeze` to create a quasi-lock is a horrible pattern for enterprise environments and for packages. I'm really looking forward to how this turns out, even though it's still in a proposal-type phase. `

by westurneron 3/31/2025, 5:07 PM

What does this mean for pip-tools' requirements.in, Pipfile.lock, pip constraints.txt, Poetry.lock, pyroject.toml, and uv.lock?

by zahlmanon 4/1/2025, 4:13 AM

A more direct link (should also work for people viewing the Discourse forum in "infinite scroll" mode rather than with pagination): https://discuss.python.org/t/_/77293/150

by kh_hkon 3/31/2025, 6:51 PM

Very personal nitpick, but I don't like prefixing things with py, it makes no sense to me. A lock is a lock, so why a pylock.toml and not a lock.toml? You do what you want with it. Same with pyproject.toml

by detectdon 3/31/2025, 4:22 PM

It's still a draft, so not officially standardized yet.