uv
85183c1c - Custom lock-file serialization (#3909)

Commit
1 year ago
Custom lock-file serialization (#3909) ## Summary This PR changes the lock-file format to use inline tables for wheels and source distributions, which currently use separate tables that make the file harder to follow. ```diff [[distribution]] name = "typing-extensions" version = "4.10.0" source = "registry+https://pypi.org/simple" - [distribution.sdist] - url = "https://files.pythonhosted.org/packages/16/3a/0d26ce356c7465a19c9ea8814b960f8a36c3b0d07c323176620b7b483e44/typing_extensions-4.10.0.tar.gz" - hash = "sha256:b0abd7c89e8fb96f98db18d86106ff1d90ab692004eb746cf6eda2682f91b3cb" - size = 77558 - - [[distribution.wheel]] - url = "https://files.pythonhosted.org/packages/f9/de/dc04a3ea60b22624b51c703a84bbe0184abcd1d0b9bc8074b5d6b7ab90bb/typing_extensions-4.10.0-py3-none-any.whl" - hash = "sha256:69b1a937c3a517342112fb4c6df7e72fc39a38e7891a5730ed4985b5214b5475" - size = 33926 + sdist = { url = "https://files.pythonhosted.org/packages/16/3a/0d26ce356c7465a19c9ea8814b960f8a36c3b0d07c323176620b7b483e44/typing_extensions-4.10.0.tar.gz", hash = "sha256:b0abd7c89e8fb96f98db18d86106ff1d90ab692004eb746cf6eda2682f91b3cb", size = 77558 } + wheel = [{ url = "https://files.pythonhosted.org/packages/f9/de/dc04a3ea60b22624b51c703a84bbe0184abcd1d0b9bc8074b5d6b7ab90bb/typing_extensions-4.10.0-py3-none-any.whl", hash = "sha256:69b1a937c3a517342112fb4c6df7e72fc39a38e7891a5730ed4985b5214b5475", size = 33926 }] ``` The downside is that the inline-tables end up quite long and TOML doesn't support line breaks in inline tables, yet. Part of https://github.com/astral-sh/uv/issues/3611.
Author
Parents
Loading