uv icon indicating copy to clipboard operation
uv copied to clipboard

`uv pip compile --format pylock.toml` includes a lot of wheels/sdits not allowed by compile command

Open notatallshaw-gts opened this issue 6 months ago • 1 comments

Summary

uv 0.7.3

I assume this is basically the same as https://github.com/astral-sh/uv/issues/3516, but I am looking at setting up a lock file as part of our workflow and I run a command like this:

cat requirements.in | uv pip compile --python-version 3.12 --constraint base-constraints.txt --prerelease explicit --annotation-style line --only-binary :all: --no-binary flupy --no-binary odfpy --no-binary mysqlclient --output-file pylock.toml -

Example

And I get a lot of output like:

[[packages]]
name = "bottleneck"
version = "1.4.2"
sdist = { url = "https://files.pythonhosted.org/packages/2e/61/9fb34409d58f04e1929da41666a055c36f9495903ff669b80c893bdee65f/bottleneck-1.4.2.tar.gz", upload-time = 2024-10-18T10:27:25Z, size = 103563, hashes = { sha256 = "fa8e8e1799dea5483ce6669462660f9d9a95649f6f98a80d315b84ec89f449f4" } }
wheels = [
    { url = "https://files.pythonhosted.org/packages/1a/f3/7e76090a8ab7f2d5f123ba6cad556c7c324bcef2320b1aa3e6a8f87c0f1d/Bottleneck-1.4.2-cp310-cp310-macosx_11_0_arm64.whl", upload-time = 2024-10-18T10:26:29Z, size = 98563, hashes = { sha256 = "125436df93751a226eab1732783aa8f6125e88e779587aa61be071fb66e41f9d" } },
    { url = "https://files.pythonhosted.org/packages/b7/db/5a600f6c071e93284e8480684b971a7cce334d9e6b6d57386cc391537d14/Bottleneck-1.4.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", upload-time = 2024-10-18T10:26:32Z, size = 360776, hashes = { sha256 = "4c6df9a60ec6ab88fec934ca864266ba95edd89c490af71dc9cd8afb2a54ebd9" } },
    { url = "https://files.pythonhosted.org/packages/e3/8f/8d0322287dd208bd35b2814152726d6f7ec9346c9ad2abae18e23e9ef15e/Bottleneck-1.4.2-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", upload-time = 2024-10-18T10:26:33Z, size = 356085, hashes = { sha256 = "2e2fe327dc2d0564e295a5857a252755103f8c6e05b07d3ff80a69afaa9f5065" } },
    { url = "https://files.pythonhosted.org/packages/20/1b/05dd0433052f62b416d3af4d58556f377518b1d35f76872c53e79bd7818f/Bottleneck-1.4.2-cp310-cp310-musllinux_1_2_i686.whl", upload-time = 2024-10-18T10:26:35Z, size = 365247, hashes = { sha256 = "6b7790ca8658cd69e3cc0d0e4ff0e9829d60849bf7945fbd7344fbce05b2bbb8" } },
    { url = "https://files.pythonhosted.org/packages/b6/6b/eb7a04afa8d4641a498b62a24db5a491ab3d6945890e9f5d5f852ba0aa8c/Bottleneck-1.4.2-cp310-cp310-musllinux_1_2_x86_64.whl", upload-time = 2024-10-18T10:26:37Z, size = 356080, hashes = { sha256 = "6282fa925ac3768f66e3547f89a512376d3f9de7ef53bdd37aa29232fd864054" } },
    { url = "https://files.pythonhosted.org/packages/4e/91/53353689ed860403f421900ec0ce67dfa763bd39d07d9da5b69c48b3941a/Bottleneck-1.4.2-cp310-cp310-win32.whl", upload-time = 2024-10-18T10:26:38Z, size = 106941, hashes = { sha256 = "e56a206fbf48e3b8054a964398bf1ed843e9625d3c6bdbeb7898cb48bf97441b" } },
    { url = "https://files.pythonhosted.org/packages/d7/25/32643c8e8646f30121e5c67a0c0579dbc910f3bf9e121683f28165c6d374/Bottleneck-1.4.2-cp310-cp310-win_amd64.whl", upload-time = 2024-10-18T10:26:40Z, size = 111622, hashes = { sha256 = "eb0c611d15b0fd8f511d288e8964e4725b4b3b0d9d310880cf0ff6b8dd03c859" } },
    { url = "https://files.pythonhosted.org/packages/88/b8/31a1cc8279bf11a60c04b844a42666927307a47bb48964cbd92ec9f40e3e/Bottleneck-1.4.2-cp311-cp311-macosx_11_0_arm64.whl", upload-time = 2024-10-18T10:26:41Z, size = 98565, hashes = { sha256 = "b6902ebf3e85315b481bc084f10c5770f8240275ad1e039ac69c7c8d2013b040" } },
    { url = "https://files.pythonhosted.org/packages/16/64/09d72babae7cc29341c52f2e9381066672743d4f797c86b1e735205d5fc8/Bottleneck-1.4.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", upload-time = 2024-10-18T10:26:43Z, size = 364986, hashes = { sha256 = "c2fd34b9b490204f95288f0dd35d37042486a95029617246c88c0f94a0ab49fe" } },
    { url = "https://files.pythonhosted.org/packages/7e/d6/39e957e9df9ab16df9c531e8ddf71594877063d27aa036dd105b66d3b3b3/Bottleneck-1.4.2-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", upload-time = 2024-10-18T10:26:45Z, size = 360256, hashes = { sha256 = "122845e3106c85465551d4a9a3777841347cfedfbebb3aa985cca110e07030b1" } },
    { url = "https://files.pythonhosted.org/packages/ff/cb/d287febe0e6504194ba94cf4a6d80df66a0031ca33a32b30f00c030238cc/Bottleneck-1.4.2-cp311-cp311-musllinux_1_2_i686.whl", upload-time = 2024-10-18T10:26:46Z, size = 369507, hashes = { sha256 = "1f61658ebdf5a178298544336b65020730bf86cc092dab5f6579a99a86bd888b" } },
    { url = "https://files.pythonhosted.org/packages/dc/1e/9310f058ddee71798a76ab15c5c1ad71f0a5c3c6348f7faab9b6da038484/Bottleneck-1.4.2-cp311-cp311-musllinux_1_2_x86_64.whl", upload-time = 2024-10-18T10:26:48Z, size = 360282, hashes = { sha256 = "7c7d29c044a3511b36fd744503c3e697e279c273a8477a6d91a2831d04fd19e0" } },
    { url = "https://files.pythonhosted.org/packages/96/cb/c1f2a37e86e9fa47845259f0a8f32d550f7f27b908432369de055be9f7c4/Bottleneck-1.4.2-cp311-cp311-win32.whl", upload-time = 2024-10-18T10:26:49Z, size = 106936, hashes = { sha256 = "c663cbba8f52011fd82ee08c6a85c93b34b19e0e7ebba322d2d67809f34e0597" } },
    { url = "https://files.pythonhosted.org/packages/d3/eb/3fd23404bbc612cf9e4883c3c2b359bd14528e234d5c40bb29bcfd591ef8/Bottleneck-1.4.2-cp311-cp311-win_amd64.whl", upload-time = 2024-10-18T10:26:51Z, size = 111617, hashes = { sha256 = "89651ef18c06616850203bf8875c958c5d316ea48d8ba60d9b450199d39ae391" } },
    { url = "https://files.pythonhosted.org/packages/d2/26/6f5124e31a67f75e2a3b9239cc382145326e91fc45e7d7bc9ebffa05fdfa/Bottleneck-1.4.2-cp312-cp312-macosx_11_0_arm64.whl", upload-time = 2024-10-18T10:26:53Z, size = 98681, hashes = { sha256 = "a74ddd0417f42eeaba37375f0fc065b28451e0fba45cb2f99e88880b10b3fa43" } },
    { url = "https://files.pythonhosted.org/packages/c4/93/e100b6eda77f2aecf5f16157b8c04dd3463913ba188b582650cd77ccf42b/Bottleneck-1.4.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", upload-time = 2024-10-18T10:26:55Z, size = 365422, hashes = { sha256 = "070d22f2f62ab81297380a89492cca931e4d9443fa4b84c2baeb52db09c3b1b4" } },
    { url = "https://files.pythonhosted.org/packages/82/2b/c6fea2bb048d04c13b8564052818a198d50ce58d5f439ec69c2b0c458703/Bottleneck-1.4.2-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", upload-time = 2024-10-18T10:26:57Z, size = 361844, hashes = { sha256 = "1fc4e7645bd425c05e05acd5541e9e09cb4179e71164e862f082561bf4509eac" } },
    { url = "https://files.pythonhosted.org/packages/8f/4c/811475885bd60cf0cb28822568d0c0c3c7d7de4fbccd2ebb66863e7dc726/Bottleneck-1.4.2-cp312-cp312-musllinux_1_2_i686.whl", upload-time = 2024-10-18T10:26:59Z, size = 370369, hashes = { sha256 = "037315c56605128a39f77d19af6a6019dc8c21a63694a4bfef3c026ed963be2e" } },
    { url = "https://files.pythonhosted.org/packages/fd/ee/0a8157e6bbd2168bf6171811534a5a73a35f54c453dd7d86a323773b5bd7/Bottleneck-1.4.2-cp312-cp312-musllinux_1_2_x86_64.whl", upload-time = 2024-10-18T10:27:01Z, size = 361786, hashes = { sha256 = "99778329331d5fae8df19772a019e8b73ba4d9d1650f110cd995ab7657114db0" } },
    { url = "https://files.pythonhosted.org/packages/fa/6b/e8fda0510b8fa0f3f9a3586efc941abe9d546198e95ae5690c3c83370b36/Bottleneck-1.4.2-cp312-cp312-win32.whl", upload-time = 2024-10-18T10:27:02Z, size = 107149, hashes = { sha256 = "7363b3c8ce6ca433779cd7e96bcb94c0e516dcacadff0011adcbf0b3ac86bc9d" } },
    { url = "https://files.pythonhosted.org/packages/22/25/908b75a329a05b82d717661aa95a1968d9dae0e68c654d5e16bfe0d6fbb6/Bottleneck-1.4.2-cp312-cp312-win_amd64.whl", upload-time = 2024-10-18T10:27:03Z, size = 111766, hashes = { sha256 = "48c6b9d9287c4102b803fcb01ae66ae7ef6b310b711b4b7b7e23bf952894dc05" } },
    { url = "https://files.pythonhosted.org/packages/2e/65/148e146ca8c16af9881a0db1d8d1849d49a5186fc9f065c79a8d25d6fc0c/Bottleneck-1.4.2-cp313-cp313-macosx_11_0_arm64.whl", upload-time = 2024-10-18T10:27:05Z, size = 98701, hashes = { sha256 = "c1c885ad02a6a8fa1f7ee9099f29b9d4c03eb1da2c7ab25839482d5cce739021" } },
    { url = "https://files.pythonhosted.org/packages/80/96/6540ac9a9943b0d6f0199eddbde55e878f970d2bdda31207dc3e7a195c2b/Bottleneck-1.4.2-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", upload-time = 2024-10-18T10:27:07Z, size = 365443, hashes = { sha256 = "e7a1b023de1de3d84b18826462718fba548fed41870df44354f9ab6a414ea82f" } },
    { url = "https://files.pythonhosted.org/packages/d0/aa/ccae264aac3b2621fa8a98c7afe033f22a352467cbf85fa2799d176ec31b/Bottleneck-1.4.2-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", upload-time = 2024-10-18T10:27:08Z, size = 361849, hashes = { sha256 = "2c9dbaf737b605b30c81611f2c1d197c2fd2e46c33f605876c1d332d3360c4fc" } },
    { url = "https://files.pythonhosted.org/packages/f3/b3/5f96d7bb23a291b835bf0a34eec359c55613f6c4262ad1bb161d897499c0/Bottleneck-1.4.2-cp313-cp313-musllinux_1_2_i686.whl", upload-time = 2024-10-18T10:27:09Z, size = 370654, hashes = { sha256 = "7ebbcbe5d4062e37507b9a81e2aacdb1fcccc6193f7feff124ef2b5a6a5eb740" } },
    { url = "https://files.pythonhosted.org/packages/51/05/9d1ababa3fd34014b708351270307320c0bc595d2d66c2ba2b9b92f0d618/Bottleneck-1.4.2-cp313-cp313-musllinux_1_2_x86_64.whl", upload-time = 2024-10-18T10:27:11Z, size = 362054, hashes = { sha256 = "964f6ac4118ddab3bbbac79d4f726b093459be751baba73ee0aa364666e8068e" } },
    { url = "https://files.pythonhosted.org/packages/92/e3/123488804830604432f84a2c43e611b8e1971e230b9466a7315850d22a58/Bottleneck-1.4.2-cp313-cp313-win32.whl", upload-time = 2024-10-18T10:27:13Z, size = 107160, hashes = { sha256 = "2db287f6ecdbb1c998085eca9b717fec2bfc48a4ab6ae070a9820ba8ab59c90b" } },
    { url = "https://files.pythonhosted.org/packages/54/f0/e1640ccd8468c61693092f38f835ef35a68a1ea72c3388683148b3800aa6/Bottleneck-1.4.2-cp313-cp313-win_amd64.whl", upload-time = 2024-10-18T10:27:14Z, size = 111774, hashes = { sha256 = "26b5f0531f7044befaad95c20365dd666372e66bdacbfaf009ff65d60285534d" } },
    { url = "https://files.pythonhosted.org/packages/ed/98/8827f1248dbbd23730a1894be6c5a70bebf57f6d20def7fc6e685f10a869/Bottleneck-1.4.2-cp39-cp39-macosx_11_0_arm64.whl", upload-time = 2024-10-18T10:27:15Z, size = 98543, hashes = { sha256 = "72d6aa95cdd782833d2589f81434fd865ba004b8938e07920b6ef02796ce8918" } },
    { url = "https://files.pythonhosted.org/packages/52/0a/18fb215a850ad413dd8f6602ba4d26dfddfbcae09b0af7b38e3803406b24/Bottleneck-1.4.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", upload-time = 2024-10-18T10:27:17Z, size = 359784, hashes = { sha256 = "b33e83665e7daf7f513fe1f7b04b13944d44b6635c45d5a9c89c9e5ed11811b6" } },
    { url = "https://files.pythonhosted.org/packages/cd/29/d0c02454677690a05a894b58904e9f2c07febc4f07d3a21b0779bfdfcfcc/Bottleneck-1.4.2-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", upload-time = 2024-10-18T10:27:18Z, size = 354977, hashes = { sha256 = "52248f3e0fead78c17912fb086a585c86f567019247d21c69e87645241b97b02" } },
    { url = "https://files.pythonhosted.org/packages/85/3b/6aa6476f93696ac8dc8eaad2a18a41c56d6afaa829abe3486dce4a135c56/Bottleneck-1.4.2-cp39-cp39-musllinux_1_2_i686.whl", upload-time = 2024-10-18T10:27:20Z, size = 364430, hashes = { sha256 = "dce1a3c5ff89a56fb2678c9bda17b89f60f710d6002ab7cd72b7661bc3fae64d" } },
    { url = "https://files.pythonhosted.org/packages/5a/8a/987aecb4cedd2f2c9a768579065bfd576ff2019afc945e1a63f7ebd86ecc/Bottleneck-1.4.2-cp39-cp39-musllinux_1_2_x86_64.whl", upload-time = 2024-10-18T10:27:21Z, size = 355345, hashes = { sha256 = "48d2e101d99a9d72aa86da1a048d2094f4e1db0cf77519d1c33239f9d62da162" } },
    { url = "https://files.pythonhosted.org/packages/0e/ea/681c32f0b3bc08262dd4b3ec96baa7cb87448110949af87390e2452953d6/Bottleneck-1.4.2-cp39-cp39-win32.whl", upload-time = 2024-10-18T10:27:23Z, size = 106964, hashes = { sha256 = "9d7b12936516f944e3d981a64038f99acb21f0e99f92fad16d9a468248c2b231" } },
    { url = "https://files.pythonhosted.org/packages/af/ae/bfeebdef6dcb775d44a2325b933a3f4ad2d37aff31ae9d94facd0eb42c1b/Bottleneck-1.4.2-cp39-cp39-win_amd64.whl", upload-time = 2024-10-18T10:27:24Z, size = 111637, hashes = { sha256 = "7b459d08f1f3e2da85db0a9e2d3e6e3541105f5866e9026dbca32dafc5106f2b" } },
]

As per my compile command I don't want the sdist for this package, I don't want any Python versions other than 3.12, although I've not explicitly stated it I don't want any windows or mac wheels either, but even if I explicitly add platform I don't think it would filter the wheels displayed.

I want to be able to manually validate the diff between lock files, and at the moment it's too large for me to be able to do that.

notatallshaw-gts avatar May 12 '25 16:05 notatallshaw-gts

Makes sense to filter these out.

charliermarsh avatar May 13 '25 02:05 charliermarsh

Has there perhaps been any consideration of the new 'pip lock' command that pip is now providing? Per requirement in the resultant pylock.toml is one URL and it's SHA, for the present environment. This is ideal for containerized environments. If uv pip compile could offer an option to do so, it would likely address several long-standing issues.

gary-wall-hpe avatar May 18 '25 20:05 gary-wall-hpe

What is the advantage of that output?

charliermarsh avatar May 18 '25 21:05 charliermarsh

@charliermarsh only the URL and SHA of the actual Python module dependency. In addition to locking to exactly the intended dependencies for the containerized Python environment, this makes dealing with pylock.toml diffs drastically easier to review, etc.

gary-wall-hpe avatar May 18 '25 21:05 gary-wall-hpe

How does the pylock.toml is resolved if different platform versions have different dependencies?

for example foo-manylinux_2_28_x86_64 depends on package bar-linux that is only available on linux and foo-win_amd64 depends on package bar-win that is only available on windows?

ZzEeKkAa avatar Aug 21 '25 21:08 ZzEeKkAa