From 1738faf6aa07909718b3caeaabe9fab15b17fa36 Mon Sep 17 00:00:00 2001 From: Richard Levasseur Date: Wed, 13 Nov 2024 15:51:51 -0800 Subject: [PATCH 01/18] chore: change bcr presubmit to drop bazel 6, add last_rc (bazel 8) (#2404) This removes Bazel 6 and adds last_rc (Bazel 8) in our BCR presubmit config. Right now, BCR releases fail because they try to test with Bazel 6, which doesn't work. --- .bcr/gazelle/presubmit.yml | 3 ++- .bcr/presubmit.yml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.bcr/gazelle/presubmit.yml b/.bcr/gazelle/presubmit.yml index 659beab525..bceed4f9e1 100644 --- a/.bcr/gazelle/presubmit.yml +++ b/.bcr/gazelle/presubmit.yml @@ -16,7 +16,8 @@ bcr_test_module: module_path: "../examples/bzlmod_build_file_generation" matrix: platform: ["debian11", "macos", "ubuntu2004", "windows"] - bazel: [6.x, 7.x] + # last_rc is to get latest 8.x release. Replace with 8.x when available. + bazel: [7.x, last_rc] tasks: run_tests: name: "Run test module" diff --git a/.bcr/presubmit.yml b/.bcr/presubmit.yml index 875ea93043..e1ddb7a1aa 100644 --- a/.bcr/presubmit.yml +++ b/.bcr/presubmit.yml @@ -16,7 +16,8 @@ bcr_test_module: module_path: "examples/bzlmod" matrix: platform: ["debian11", "macos", "ubuntu2004", "windows"] - bazel: [6.x, 7.x] + # last_rc is to get latest 8.x release. Replace with 8.x when available. + bazel: [7.x, last_rc] tasks: run_tests: name: "Run test module" From 541bcba2fc47ee43defe25f09be10a05434fdf9d Mon Sep 17 00:00:00 2001 From: Richard Levasseur Date: Wed, 13 Nov 2024 15:53:26 -0800 Subject: [PATCH 02/18] deps: update to gazelle 0.40.0 (#2403) This allows us to drop the patch for removing native.sh_binary Work towards https://github.com/bazelbuild/rules_python/issues/2378 --- MODULE.bazel | 12 +----------- patches/gazelle_native_sh.patch | 32 -------------------------------- 2 files changed, 1 insertion(+), 43 deletions(-) delete mode 100644 patches/gazelle_native_sh.patch diff --git a/MODULE.bazel b/MODULE.bazel index bed1787fc6..f9f173d8f1 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -84,17 +84,7 @@ bazel_dep(name = "bazel_ci_rules", version = "1.0.0", dev_dependency = True) # We use `WORKSPACE.bzlmod` because it is impossible to have dev-only local overrides. bazel_dep(name = "rules_go", version = "0.41.0", dev_dependency = True, repo_name = "io_bazel_rules_go") bazel_dep(name = "rules_python_gazelle_plugin", version = "0", dev_dependency = True) -bazel_dep(name = "gazelle", version = "0.33.0", dev_dependency = True, repo_name = "bazel_gazelle") -single_version_override( - module_name = "gazelle", - patch_strip = 1, - patches = [ - # Can be removed once https://github.com/bazel-contrib/bazel-gazelle/issues/1959 - # is fixed and released. - "patches/gazelle_native_sh.patch", - ], - version = "0.33.0", -) +bazel_dep(name = "gazelle", version = "0.40.0", dev_dependency = True, repo_name = "bazel_gazelle") internal_dev_deps = use_extension( "//python/private:internal_dev_deps.bzl", diff --git a/patches/gazelle_native_sh.patch b/patches/gazelle_native_sh.patch deleted file mode 100644 index 836fe7ca8c..0000000000 --- a/patches/gazelle_native_sh.patch +++ /dev/null @@ -1,32 +0,0 @@ - -diff -u -r a/def.bzl b/def.bzl ---- a/def.bzl 2024-11-08 13:42:27.733022366 -0800 -+++ b/def.bzl 2024-11-08 13:44:45.089900166 -0800 -@@ -16,6 +16,7 @@ - "@bazel_skylib//lib:shell.bzl", - "shell", - ) -+load("@rules_shell//shell:sh_binary.bzl", "sh_binary") - load( - "@bazel_gazelle_is_bazel_module//:defs.bzl", - "GAZELLE_IS_BAZEL_MODULE", -@@ -185,7 +186,7 @@ - tags = tags, - **kwargs - ) -- native.sh_binary( -+ sh_binary( - name = name, - srcs = [runner_name], - tags = tags, -diff -u -r a/MODULE.bazel b/MODULE.bazel ---- a/MODULE.bazel 2024-11-08 13:42:23.860997684 -0800 -+++ b/MODULE.bazel 2024-11-08 13:43:46.961528172 -0800 -@@ -8,6 +8,7 @@ - bazel_dep(name = "protobuf", version = "3.19.6", repo_name = "com_google_protobuf") - bazel_dep(name = "rules_go", version = "0.41.0", repo_name = "io_bazel_rules_go") - bazel_dep(name = "rules_proto", version = "4.0.0") -+bazel_dep(name = "rules_shell", version = "0.2.0") - - go_sdk = use_extension("@io_bazel_rules_go//go:extensions.bzl", "go_sdk") - From c8ccd22069951cb7944dc9223981f20d50d61500 Mon Sep 17 00:00:00 2001 From: Ignas Anikevicius <240938+aignas@users.noreply.github.com> Date: Thu, 14 Nov 2024 09:40:28 +0900 Subject: [PATCH 03/18] chore!: remove requirements.txt for the twine publishing tool (#2401) `requirements_linux.txt` in the same folder should be used instead. Fixes #2242 --- CHANGELOG.md | 3 +- WORKSPACE | 2 +- private/BUILD.bazel | 1 - tools/publish/BUILD.bazel | 2 - tools/publish/requirements.txt | 339 --------------------------------- 5 files changed, 3 insertions(+), 344 deletions(-) delete mode 100644 tools/publish/requirements.txt diff --git a/CHANGELOG.md b/CHANGELOG.md index 143a20a8cd..c351487605 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -64,7 +64,8 @@ Unreleased changes template. {#v0-0-0-removed} ### Removed -* Nothing yet. +* (publish) Remove deprecated `requirements.txt` for the `twine` dependencies. + Please use `requirements_linux.txt` instead. {#v0-39-0} ## [0.39.0] - 2024-11-13 diff --git a/WORKSPACE b/WORKSPACE index 33ab37f292..b77918f5ef 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -98,7 +98,7 @@ pip_parse( name = "rules_python_publish_deps", python_interpreter_target = interpreter, requirements_darwin = "//tools/publish:requirements_darwin.txt", - requirements_lock = "//tools/publish:requirements.txt", + requirements_lock = "//tools/publish:requirements_linux.txt", requirements_windows = "//tools/publish:requirements_windows.txt", ) diff --git a/private/BUILD.bazel b/private/BUILD.bazel index c81dc94801..68fefe910f 100644 --- a/private/BUILD.bazel +++ b/private/BUILD.bazel @@ -8,7 +8,6 @@ multirun( "//tools/publish:{}.update".format(r) for r in [ "requirements_universal", - "requirements", "requirements_darwin", "requirements_windows", "requirements_linux", diff --git a/tools/publish/BUILD.bazel b/tools/publish/BUILD.bazel index 3fd891c837..1648ac85df 100644 --- a/tools/publish/BUILD.bazel +++ b/tools/publish/BUILD.bazel @@ -19,7 +19,6 @@ filegroup( name = "distribution", srcs = [ "BUILD.bazel", - "requirements.txt", "requirements_darwin.txt", "requirements_linux.txt", "requirements_universal.txt", @@ -33,7 +32,6 @@ publish_deps( name = "requirements", srcs = ["requirements.in"], outs = { - "requirements.txt": "linux", # TODO: maybe deprecate "requirements_darwin.txt": "macos", "requirements_linux.txt": "linux", "requirements_universal.txt": "", # universal diff --git a/tools/publish/requirements.txt b/tools/publish/requirements.txt deleted file mode 100644 index 8fb51b9458..0000000000 --- a/tools/publish/requirements.txt +++ /dev/null @@ -1,339 +0,0 @@ -# This file was autogenerated by uv via the following command: -# bazel run //tools/publish:requirements.update ---index-url https://pypi.org/simple - -backports-tarfile==1.2.0 \ - --hash=sha256:77e284d754527b01fb1e6fa8a1afe577858ebe4e9dad8919e34c862cb399bc34 \ - --hash=sha256:d75e02c268746e1b8144c278978b6e98e85de6ad16f8e4b0844a154557eca991 - # via jaraco-context -certifi==2024.8.30 \ - --hash=sha256:922820b53db7a7257ffbda3f597266d435245903d80737e34f8a45ff3e3230d8 \ - --hash=sha256:bec941d2aa8195e248a60b31ff9f0558284cf01a52591ceda73ea9afffd69fd9 - # via requests -cffi==1.17.1 \ - --hash=sha256:045d61c734659cc045141be4bae381a41d89b741f795af1dd018bfb532fd0df8 \ - --hash=sha256:0984a4925a435b1da406122d4d7968dd861c1385afe3b45ba82b750f229811e2 \ - --hash=sha256:0e2b1fac190ae3ebfe37b979cc1ce69c81f4e4fe5746bb401dca63a9062cdaf1 \ - --hash=sha256:0f048dcf80db46f0098ccac01132761580d28e28bc0f78ae0d58048063317e15 \ - --hash=sha256:1257bdabf294dceb59f5e70c64a3e2f462c30c7ad68092d01bbbfb1c16b1ba36 \ - --hash=sha256:1c39c6016c32bc48dd54561950ebd6836e1670f2ae46128f67cf49e789c52824 \ - --hash=sha256:1d599671f396c4723d016dbddb72fe8e0397082b0a77a4fab8028923bec050e8 \ - --hash=sha256:28b16024becceed8c6dfbc75629e27788d8a3f9030691a1dbf9821a128b22c36 \ - --hash=sha256:2bb1a08b8008b281856e5971307cc386a8e9c5b625ac297e853d36da6efe9c17 \ - --hash=sha256:30c5e0cb5ae493c04c8b42916e52ca38079f1b235c2f8ae5f4527b963c401caf \ - --hash=sha256:31000ec67d4221a71bd3f67df918b1f88f676f1c3b535a7eb473255fdc0b83fc \ - --hash=sha256:386c8bf53c502fff58903061338ce4f4950cbdcb23e2902d86c0f722b786bbe3 \ - --hash=sha256:3edc8d958eb099c634dace3c7e16560ae474aa3803a5df240542b305d14e14ed \ - --hash=sha256:45398b671ac6d70e67da8e4224a065cec6a93541bb7aebe1b198a61b58c7b702 \ - --hash=sha256:46bf43160c1a35f7ec506d254e5c890f3c03648a4dbac12d624e4490a7046cd1 \ - --hash=sha256:4ceb10419a9adf4460ea14cfd6bc43d08701f0835e979bf821052f1805850fe8 \ - --hash=sha256:51392eae71afec0d0c8fb1a53b204dbb3bcabcb3c9b807eedf3e1e6ccf2de903 \ - --hash=sha256:5da5719280082ac6bd9aa7becb3938dc9f9cbd57fac7d2871717b1feb0902ab6 \ - --hash=sha256:610faea79c43e44c71e1ec53a554553fa22321b65fae24889706c0a84d4ad86d \ - --hash=sha256:636062ea65bd0195bc012fea9321aca499c0504409f413dc88af450b57ffd03b \ - --hash=sha256:6883e737d7d9e4899a8a695e00ec36bd4e5e4f18fabe0aca0efe0a4b44cdb13e \ - --hash=sha256:6b8b4a92e1c65048ff98cfe1f735ef8f1ceb72e3d5f0c25fdb12087a23da22be \ - --hash=sha256:6f17be4345073b0a7b8ea599688f692ac3ef23ce28e5df79c04de519dbc4912c \ - --hash=sha256:706510fe141c86a69c8ddc029c7910003a17353970cff3b904ff0686a5927683 \ - --hash=sha256:72e72408cad3d5419375fc87d289076ee319835bdfa2caad331e377589aebba9 \ - --hash=sha256:733e99bc2df47476e3848417c5a4540522f234dfd4ef3ab7fafdf555b082ec0c \ - --hash=sha256:7596d6620d3fa590f677e9ee430df2958d2d6d6de2feeae5b20e82c00b76fbf8 \ - --hash=sha256:78122be759c3f8a014ce010908ae03364d00a1f81ab5c7f4a7a5120607ea56e1 \ - --hash=sha256:805b4371bf7197c329fcb3ead37e710d1bca9da5d583f5073b799d5c5bd1eee4 \ - --hash=sha256:85a950a4ac9c359340d5963966e3e0a94a676bd6245a4b55bc43949eee26a655 \ - --hash=sha256:8f2cdc858323644ab277e9bb925ad72ae0e67f69e804f4898c070998d50b1a67 \ - --hash=sha256:9755e4345d1ec879e3849e62222a18c7174d65a6a92d5b346b1863912168b595 \ - --hash=sha256:98e3969bcff97cae1b2def8ba499ea3d6f31ddfdb7635374834cf89a1a08ecf0 \ - --hash=sha256:a08d7e755f8ed21095a310a693525137cfe756ce62d066e53f502a83dc550f65 \ - --hash=sha256:a1ed2dd2972641495a3ec98445e09766f077aee98a1c896dcb4ad0d303628e41 \ - --hash=sha256:a24ed04c8ffd54b0729c07cee15a81d964e6fee0e3d4d342a27b020d22959dc6 \ - --hash=sha256:a45e3c6913c5b87b3ff120dcdc03f6131fa0065027d0ed7ee6190736a74cd401 \ - --hash=sha256:a9b15d491f3ad5d692e11f6b71f7857e7835eb677955c00cc0aefcd0669adaf6 \ - --hash=sha256:ad9413ccdeda48c5afdae7e4fa2192157e991ff761e7ab8fdd8926f40b160cc3 \ - --hash=sha256:b2ab587605f4ba0bf81dc0cb08a41bd1c0a5906bd59243d56bad7668a6fc6c16 \ - --hash=sha256:b62ce867176a75d03a665bad002af8e6d54644fad99a3c70905c543130e39d93 \ - --hash=sha256:c03e868a0b3bc35839ba98e74211ed2b05d2119be4e8a0f224fba9384f1fe02e \ - --hash=sha256:c59d6e989d07460165cc5ad3c61f9fd8f1b4796eacbd81cee78957842b834af4 \ - --hash=sha256:c7eac2ef9b63c79431bc4b25f1cd649d7f061a28808cbc6c47b534bd789ef964 \ - --hash=sha256:c9c3d058ebabb74db66e431095118094d06abf53284d9c81f27300d0e0d8bc7c \ - --hash=sha256:ca74b8dbe6e8e8263c0ffd60277de77dcee6c837a3d0881d8c1ead7268c9e576 \ - --hash=sha256:caaf0640ef5f5517f49bc275eca1406b0ffa6aa184892812030f04c2abf589a0 \ - --hash=sha256:cdf5ce3acdfd1661132f2a9c19cac174758dc2352bfe37d98aa7512c6b7178b3 \ - --hash=sha256:d016c76bdd850f3c626af19b0542c9677ba156e4ee4fccfdd7848803533ef662 \ - --hash=sha256:d01b12eeeb4427d3110de311e1774046ad344f5b1a7403101878976ecd7a10f3 \ - --hash=sha256:d63afe322132c194cf832bfec0dc69a99fb9bb6bbd550f161a49e9e855cc78ff \ - --hash=sha256:da95af8214998d77a98cc14e3a3bd00aa191526343078b530ceb0bd710fb48a5 \ - --hash=sha256:dd398dbc6773384a17fe0d3e7eeb8d1a21c2200473ee6806bb5e6a8e62bb73dd \ - --hash=sha256:de2ea4b5833625383e464549fec1bc395c1bdeeb5f25c4a3a82b5a8c756ec22f \ - --hash=sha256:de55b766c7aa2e2a3092c51e0483d700341182f08e67c63630d5b6f200bb28e5 \ - --hash=sha256:df8b1c11f177bc2313ec4b2d46baec87a5f3e71fc8b45dab2ee7cae86d9aba14 \ - --hash=sha256:e03eab0a8677fa80d646b5ddece1cbeaf556c313dcfac435ba11f107ba117b5d \ - --hash=sha256:e221cf152cff04059d011ee126477f0d9588303eb57e88923578ace7baad17f9 \ - --hash=sha256:e31ae45bc2e29f6b2abd0de1cc3b9d5205aa847cafaecb8af1476a609a2f6eb7 \ - --hash=sha256:edae79245293e15384b51f88b00613ba9f7198016a5948b5dddf4917d4d26382 \ - --hash=sha256:f1e22e8c4419538cb197e4dd60acc919d7696e5ef98ee4da4e01d3f8cfa4cc5a \ - --hash=sha256:f3a2b4222ce6b60e2e8b337bb9596923045681d71e5a082783484d845390938e \ - --hash=sha256:f6a16c31041f09ead72d69f583767292f750d24913dadacf5756b966aacb3f1a \ - --hash=sha256:f75c7ab1f9e4aca5414ed4d8e5c0e303a34f4421f8a0d47a4d019ceff0ab6af4 \ - --hash=sha256:f79fc4fc25f1c8698ff97788206bb3c2598949bfe0fef03d299eb1b5356ada99 \ - --hash=sha256:f7f5baafcc48261359e14bcd6d9bff6d4b28d9103847c9e136694cb0501aef87 \ - --hash=sha256:fc48c783f9c87e60831201f2cce7f3b2e4846bf4d8728eabe54d60700b318a0b - # via cryptography -charset-normalizer==3.4.0 \ - --hash=sha256:0099d79bdfcf5c1f0c2c72f91516702ebf8b0b8ddd8905f97a8aecf49712c621 \ - --hash=sha256:0713f3adb9d03d49d365b70b84775d0a0d18e4ab08d12bc46baa6132ba78aaf6 \ - --hash=sha256:07afec21bbbbf8a5cc3651aa96b980afe2526e7f048fdfb7f1014d84acc8b6d8 \ - --hash=sha256:0b309d1747110feb25d7ed6b01afdec269c647d382c857ef4663bbe6ad95a912 \ - --hash=sha256:0d99dd8ff461990f12d6e42c7347fd9ab2532fb70e9621ba520f9e8637161d7c \ - --hash=sha256:0de7b687289d3c1b3e8660d0741874abe7888100efe14bd0f9fd7141bcbda92b \ - --hash=sha256:1110e22af8ca26b90bd6364fe4c763329b0ebf1ee213ba32b68c73de5752323d \ - --hash=sha256:130272c698667a982a5d0e626851ceff662565379baf0ff2cc58067b81d4f11d \ - --hash=sha256:136815f06a3ae311fae551c3df1f998a1ebd01ddd424aa5603a4336997629e95 \ - --hash=sha256:14215b71a762336254351b00ec720a8e85cada43b987da5a042e4ce3e82bd68e \ - --hash=sha256:1db4e7fefefd0f548d73e2e2e041f9df5c59e178b4c72fbac4cc6f535cfb1565 \ - --hash=sha256:1ffd9493de4c922f2a38c2bf62b831dcec90ac673ed1ca182fe11b4d8e9f2a64 \ - --hash=sha256:2006769bd1640bdf4d5641c69a3d63b71b81445473cac5ded39740a226fa88ab \ - --hash=sha256:20587d20f557fe189b7947d8e7ec5afa110ccf72a3128d61a2a387c3313f46be \ - --hash=sha256:223217c3d4f82c3ac5e29032b3f1c2eb0fb591b72161f86d93f5719079dae93e \ - --hash=sha256:27623ba66c183eca01bf9ff833875b459cad267aeeb044477fedac35e19ba907 \ - --hash=sha256:285e96d9d53422efc0d7a17c60e59f37fbf3dfa942073f666db4ac71e8d726d0 \ - --hash=sha256:2de62e8801ddfff069cd5c504ce3bc9672b23266597d4e4f50eda28846c322f2 \ - --hash=sha256:2f6c34da58ea9c1a9515621f4d9ac379871a8f21168ba1b5e09d74250de5ad62 \ - --hash=sha256:309a7de0a0ff3040acaebb35ec45d18db4b28232f21998851cfa709eeff49d62 \ - --hash=sha256:35c404d74c2926d0287fbd63ed5d27eb911eb9e4a3bb2c6d294f3cfd4a9e0c23 \ - --hash=sha256:3710a9751938947e6327ea9f3ea6332a09bf0ba0c09cae9cb1f250bd1f1549bc \ - --hash=sha256:3d59d125ffbd6d552765510e3f31ed75ebac2c7470c7274195b9161a32350284 \ - --hash=sha256:40d3ff7fc90b98c637bda91c89d51264a3dcf210cade3a2c6f838c7268d7a4ca \ - --hash=sha256:425c5f215d0eecee9a56cdb703203dda90423247421bf0d67125add85d0c4455 \ - --hash=sha256:43193c5cda5d612f247172016c4bb71251c784d7a4d9314677186a838ad34858 \ - --hash=sha256:44aeb140295a2f0659e113b31cfe92c9061622cadbc9e2a2f7b8ef6b1e29ef4b \ - --hash=sha256:47334db71978b23ebcf3c0f9f5ee98b8d65992b65c9c4f2d34c2eaf5bcaf0594 \ - --hash=sha256:4796efc4faf6b53a18e3d46343535caed491776a22af773f366534056c4e1fbc \ - --hash=sha256:4a51b48f42d9358460b78725283f04bddaf44a9358197b889657deba38f329db \ - --hash=sha256:4b67fdab07fdd3c10bb21edab3cbfe8cf5696f453afce75d815d9d7223fbe88b \ - --hash=sha256:4ec9dd88a5b71abfc74e9df5ebe7921c35cbb3b641181a531ca65cdb5e8e4dea \ - --hash=sha256:4f9fc98dad6c2eaa32fc3af1417d95b5e3d08aff968df0cd320066def971f9a6 \ - --hash=sha256:54b6a92d009cbe2fb11054ba694bc9e284dad30a26757b1e372a1fdddaf21920 \ - --hash=sha256:55f56e2ebd4e3bc50442fbc0888c9d8c94e4e06a933804e2af3e89e2f9c1c749 \ - --hash=sha256:5726cf76c982532c1863fb64d8c6dd0e4c90b6ece9feb06c9f202417a31f7dd7 \ - --hash=sha256:5d447056e2ca60382d460a604b6302d8db69476fd2015c81e7c35417cfabe4cd \ - --hash=sha256:5ed2e36c3e9b4f21dd9422f6893dec0abf2cca553af509b10cd630f878d3eb99 \ - --hash=sha256:5ff2ed8194587faf56555927b3aa10e6fb69d931e33953943bc4f837dfee2242 \ - --hash=sha256:62f60aebecfc7f4b82e3f639a7d1433a20ec32824db2199a11ad4f5e146ef5ee \ - --hash=sha256:63bc5c4ae26e4bc6be6469943b8253c0fd4e4186c43ad46e713ea61a0ba49129 \ - --hash=sha256:6b40e8d38afe634559e398cc32b1472f376a4099c75fe6299ae607e404c033b2 \ - --hash=sha256:6b493a043635eb376e50eedf7818f2f322eabbaa974e948bd8bdd29eb7ef2a51 \ - --hash=sha256:6dba5d19c4dfab08e58d5b36304b3f92f3bd5d42c1a3fa37b5ba5cdf6dfcbcee \ - --hash=sha256:6fd30dc99682dc2c603c2b315bded2799019cea829f8bf57dc6b61efde6611c8 \ - --hash=sha256:707b82d19e65c9bd28b81dde95249b07bf9f5b90ebe1ef17d9b57473f8a64b7b \ - --hash=sha256:7706f5850360ac01d80c89bcef1640683cc12ed87f42579dab6c5d3ed6888613 \ - --hash=sha256:7782afc9b6b42200f7362858f9e73b1f8316afb276d316336c0ec3bd73312742 \ - --hash=sha256:79983512b108e4a164b9c8d34de3992f76d48cadc9554c9e60b43f308988aabe \ - --hash=sha256:7f683ddc7eedd742e2889d2bfb96d69573fde1d92fcb811979cdb7165bb9c7d3 \ - --hash=sha256:82357d85de703176b5587dbe6ade8ff67f9f69a41c0733cf2425378b49954de5 \ - --hash=sha256:84450ba661fb96e9fd67629b93d2941c871ca86fc38d835d19d4225ff946a631 \ - --hash=sha256:86f4e8cca779080f66ff4f191a685ced73d2f72d50216f7112185dc02b90b9b7 \ - --hash=sha256:8cda06946eac330cbe6598f77bb54e690b4ca93f593dee1568ad22b04f347c15 \ - --hash=sha256:8ce7fd6767a1cc5a92a639b391891bf1c268b03ec7e021c7d6d902285259685c \ - --hash=sha256:8ff4e7cdfdb1ab5698e675ca622e72d58a6fa2a8aa58195de0c0061288e6e3ea \ - --hash=sha256:9289fd5dddcf57bab41d044f1756550f9e7cf0c8e373b8cdf0ce8773dc4bd417 \ - --hash=sha256:92a7e36b000bf022ef3dbb9c46bfe2d52c047d5e3f3343f43204263c5addc250 \ - --hash=sha256:92db3c28b5b2a273346bebb24857fda45601aef6ae1c011c0a997106581e8a88 \ - --hash=sha256:95c3c157765b031331dd4db3c775e58deaee050a3042fcad72cbc4189d7c8dca \ - --hash=sha256:980b4f289d1d90ca5efcf07958d3eb38ed9c0b7676bf2831a54d4f66f9c27dfa \ - --hash=sha256:9ae4ef0b3f6b41bad6366fb0ea4fc1d7ed051528e113a60fa2a65a9abb5b1d99 \ - --hash=sha256:9c98230f5042f4945f957d006edccc2af1e03ed5e37ce7c373f00a5a4daa6149 \ - --hash=sha256:9fa2566ca27d67c86569e8c85297aaf413ffab85a8960500f12ea34ff98e4c41 \ - --hash=sha256:a14969b8691f7998e74663b77b4c36c0337cb1df552da83d5c9004a93afdb574 \ - --hash=sha256:a8aacce6e2e1edcb6ac625fb0f8c3a9570ccc7bfba1f63419b3769ccf6a00ed0 \ - --hash=sha256:a8e538f46104c815be19c975572d74afb53f29650ea2025bbfaef359d2de2f7f \ - --hash=sha256:aa41e526a5d4a9dfcfbab0716c7e8a1b215abd3f3df5a45cf18a12721d31cb5d \ - --hash=sha256:aa693779a8b50cd97570e5a0f343538a8dbd3e496fa5dcb87e29406ad0299654 \ - --hash=sha256:ab22fbd9765e6954bc0bcff24c25ff71dcbfdb185fcdaca49e81bac68fe724d3 \ - --hash=sha256:ab2e5bef076f5a235c3774b4f4028a680432cded7cad37bba0fd90d64b187d19 \ - --hash=sha256:ab973df98fc99ab39080bfb0eb3a925181454d7c3ac8a1e695fddfae696d9e90 \ - --hash=sha256:af73657b7a68211996527dbfeffbb0864e043d270580c5aef06dc4b659a4b578 \ - --hash=sha256:b197e7094f232959f8f20541ead1d9862ac5ebea1d58e9849c1bf979255dfac9 \ - --hash=sha256:b295729485b06c1a0683af02a9e42d2caa9db04a373dc38a6a58cdd1e8abddf1 \ - --hash=sha256:b8831399554b92b72af5932cdbbd4ddc55c55f631bb13ff8fe4e6536a06c5c51 \ - --hash=sha256:b8dcd239c743aa2f9c22ce674a145e0a25cb1566c495928440a181ca1ccf6719 \ - --hash=sha256:bcb4f8ea87d03bc51ad04add8ceaf9b0f085ac045ab4d74e73bbc2dc033f0236 \ - --hash=sha256:bd7af3717683bea4c87acd8c0d3d5b44d56120b26fd3f8a692bdd2d5260c620a \ - --hash=sha256:bf4475b82be41b07cc5e5ff94810e6a01f276e37c2d55571e3fe175e467a1a1c \ - --hash=sha256:c3e446d253bd88f6377260d07c895816ebf33ffffd56c1c792b13bff9c3e1ade \ - --hash=sha256:c57516e58fd17d03ebe67e181a4e4e2ccab1168f8c2976c6a334d4f819fe5944 \ - --hash=sha256:c94057af19bc953643a33581844649a7fdab902624d2eb739738a30e2b3e60fc \ - --hash=sha256:cab5d0b79d987c67f3b9e9c53f54a61360422a5a0bc075f43cab5621d530c3b6 \ - --hash=sha256:ce031db0408e487fd2775d745ce30a7cd2923667cf3b69d48d219f1d8f5ddeb6 \ - --hash=sha256:cee4373f4d3ad28f1ab6290684d8e2ebdb9e7a1b74fdc39e4c211995f77bec27 \ - --hash=sha256:d5b054862739d276e09928de37c79ddeec42a6e1bfc55863be96a36ba22926f6 \ - --hash=sha256:dbe03226baf438ac4fda9e2d0715022fd579cb641c4cf639fa40d53b2fe6f3e2 \ - --hash=sha256:dc15e99b2d8a656f8e666854404f1ba54765871104e50c8e9813af8a7db07f12 \ - --hash=sha256:dcaf7c1524c0542ee2fc82cc8ec337f7a9f7edee2532421ab200d2b920fc97cf \ - --hash=sha256:dd4eda173a9fcccb5f2e2bd2a9f423d180194b1bf17cf59e3269899235b2a114 \ - --hash=sha256:dd9a8bd8900e65504a305bf8ae6fa9fbc66de94178c420791d0293702fce2df7 \ - --hash=sha256:de7376c29d95d6719048c194a9cf1a1b0393fbe8488a22008610b0361d834ecf \ - --hash=sha256:e7fdd52961feb4c96507aa649550ec2a0d527c086d284749b2f582f2d40a2e0d \ - --hash=sha256:e91f541a85298cf35433bf66f3fab2a4a2cff05c127eeca4af174f6d497f0d4b \ - --hash=sha256:e9e3c4c9e1ed40ea53acf11e2a386383c3304212c965773704e4603d589343ed \ - --hash=sha256:ee803480535c44e7f5ad00788526da7d85525cfefaf8acf8ab9a310000be4b03 \ - --hash=sha256:f09cb5a7bbe1ecae6e87901a2eb23e0256bb524a79ccc53eb0b7629fbe7677c4 \ - --hash=sha256:f19c1585933c82098c2a520f8ec1227f20e339e33aca8fa6f956f6691b784e67 \ - --hash=sha256:f1a2f519ae173b5b6a2c9d5fa3116ce16e48b3462c8b96dfdded11055e3d6365 \ - --hash=sha256:f28f891ccd15c514a0981f3b9db9aa23d62fe1a99997512b0491d2ed323d229a \ - --hash=sha256:f3e73a4255342d4eb26ef6df01e3962e73aa29baa3124a8e824c5d3364a65748 \ - --hash=sha256:f606a1881d2663630ea5b8ce2efe2111740df4b687bd78b34a8131baa007f79b \ - --hash=sha256:fe9f97feb71aa9896b81973a7bbada8c49501dc73e58a10fcef6663af95e5079 \ - --hash=sha256:ffc519621dce0c767e96b9c53f09c5d215578e10b02c285809f76509a3931482 - # via requests -cryptography==43.0.3 \ - --hash=sha256:0c580952eef9bf68c4747774cde7ec1d85a6e61de97281f2dba83c7d2c806362 \ - --hash=sha256:0f996e7268af62598f2fc1204afa98a3b5712313a55c4c9d434aef49cadc91d4 \ - --hash=sha256:1ec0bcf7e17c0c5669d881b1cd38c4972fade441b27bda1051665faaa89bdcaa \ - --hash=sha256:281c945d0e28c92ca5e5930664c1cefd85efe80e5c0d2bc58dd63383fda29f83 \ - --hash=sha256:2ce6fae5bdad59577b44e4dfed356944fbf1d925269114c28be377692643b4ff \ - --hash=sha256:315b9001266a492a6ff443b61238f956b214dbec9910a081ba5b6646a055a805 \ - --hash=sha256:443c4a81bb10daed9a8f334365fe52542771f25aedaf889fd323a853ce7377d6 \ - --hash=sha256:4a02ded6cd4f0a5562a8887df8b3bd14e822a90f97ac5e544c162899bc467664 \ - --hash=sha256:53a583b6637ab4c4e3591a15bc9db855b8d9dee9a669b550f311480acab6eb08 \ - --hash=sha256:63efa177ff54aec6e1c0aefaa1a241232dcd37413835a9b674b6e3f0ae2bfd3e \ - --hash=sha256:74f57f24754fe349223792466a709f8e0c093205ff0dca557af51072ff47ab18 \ - --hash=sha256:7e1ce50266f4f70bf41a2c6dc4358afadae90e2a1e5342d3c08883df1675374f \ - --hash=sha256:81ef806b1fef6b06dcebad789f988d3b37ccaee225695cf3e07648eee0fc6b73 \ - --hash=sha256:846da004a5804145a5f441b8530b4bf35afbf7da70f82409f151695b127213d5 \ - --hash=sha256:8ac43ae87929a5982f5948ceda07001ee5e83227fd69cf55b109144938d96984 \ - --hash=sha256:9762ea51a8fc2a88b70cf2995e5675b38d93bf36bd67d91721c309df184f49bd \ - --hash=sha256:a2a431ee15799d6db9fe80c82b055bae5a752bef645bba795e8e52687c69efe3 \ - --hash=sha256:bf7a1932ac4176486eab36a19ed4c0492da5d97123f1406cf15e41b05e787d2e \ - --hash=sha256:c2e6fc39c4ab499049df3bdf567f768a723a5e8464816e8f009f121a5a9f4405 \ - --hash=sha256:cbeb489927bd7af4aa98d4b261af9a5bc025bd87f0e3547e11584be9e9427be2 \ - --hash=sha256:d03b5621a135bffecad2c73e9f4deb1a0f977b9a8ffe6f8e002bf6c9d07b918c \ - --hash=sha256:d56e96520b1020449bbace2b78b603442e7e378a9b3bd68de65c782db1507995 \ - --hash=sha256:df6b6c6d742395dd77a23ea3728ab62f98379eff8fb61be2744d4679ab678f73 \ - --hash=sha256:e1be4655c7ef6e1bbe6b5d0403526601323420bcf414598955968c9ef3eb7d16 \ - --hash=sha256:f18c716be16bc1fea8e95def49edf46b82fccaa88587a45f8dc0ff6ab5d8e0a7 \ - --hash=sha256:f46304d6f0c6ab8e52770addfa2fc41e6629495548862279641972b6215451cd \ - --hash=sha256:f7b178f11ed3664fd0e995a47ed2b5ff0a12d893e41dd0494f406d1cf555cab7 - # via secretstorage -docutils==0.21.2 \ - --hash=sha256:3a6b18732edf182daa3cd12775bbb338cf5691468f91eeeb109deff6ebfa986f \ - --hash=sha256:dafca5b9e384f0e419294eb4d2ff9fa826435bf15f15b7bd45723e8ad76811b2 - # via readme-renderer -idna==3.10 \ - --hash=sha256:12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9 \ - --hash=sha256:946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3 - # via requests -importlib-metadata==8.5.0 \ - --hash=sha256:45e54197d28b7a7f1559e60b95e7c567032b602131fbd588f1497f47880aa68b \ - --hash=sha256:71522656f0abace1d072b9e5481a48f07c138e00f079c38c8f883823f9c26bd7 - # via - # keyring - # twine -jaraco-classes==3.4.0 \ - --hash=sha256:47a024b51d0239c0dd8c8540c6c7f484be3b8fcf0b2d85c13825780d3b3f3acd \ - --hash=sha256:f662826b6bed8cace05e7ff873ce0f9283b5c924470fe664fff1c2f00f581790 - # via keyring -jaraco-context==6.0.1 \ - --hash=sha256:9bae4ea555cf0b14938dc0aee7c9f32ed303aa20a3b73e7dc80111628792d1b3 \ - --hash=sha256:f797fc481b490edb305122c9181830a3a5b76d84ef6d1aef2fb9b47ab956f9e4 - # via keyring -jaraco-functools==4.1.0 \ - --hash=sha256:70f7e0e2ae076498e212562325e805204fc092d7b4c17e0e86c959e249701a9d \ - --hash=sha256:ad159f13428bc4acbf5541ad6dec511f91573b90fba04df61dafa2a1231cf649 - # via keyring -jeepney==0.8.0 \ - --hash=sha256:5efe48d255973902f6badc3ce55e2aa6c5c3b3bc642059ef3a91247bcfcc5806 \ - --hash=sha256:c0a454ad016ca575060802ee4d590dd912e35c122fa04e70306de3d076cce755 - # via - # keyring - # secretstorage -keyring==25.4.1 \ - --hash=sha256:5426f817cf7f6f007ba5ec722b1bcad95a75b27d780343772ad76b17cb47b0bf \ - --hash=sha256:b07ebc55f3e8ed86ac81dd31ef14e81ace9dd9c3d4b5d77a6e9a2016d0d71a1b - # via twine -markdown-it-py==3.0.0 \ - --hash=sha256:355216845c60bd96232cd8d8c40e8f9765cc86f46880e43a8fd22dc1a1a8cab1 \ - --hash=sha256:e3f60a94fa066dc52ec76661e37c851cb232d92f9886b15cb560aaada2df8feb - # via rich -mdurl==0.1.2 \ - --hash=sha256:84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8 \ - --hash=sha256:bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba - # via markdown-it-py -more-itertools==10.5.0 \ - --hash=sha256:037b0d3203ce90cca8ab1defbbdac29d5f993fc20131f3664dc8d6acfa872aef \ - --hash=sha256:5482bfef7849c25dc3c6dd53a6173ae4795da2a41a80faea6700d9f5846c5da6 - # via - # jaraco-classes - # jaraco-functools -nh3==0.2.18 \ - --hash=sha256:0411beb0589eacb6734f28d5497ca2ed379eafab8ad8c84b31bb5c34072b7164 \ - --hash=sha256:14c5a72e9fe82aea5fe3072116ad4661af5cf8e8ff8fc5ad3450f123e4925e86 \ - --hash=sha256:19aaba96e0f795bd0a6c56291495ff59364f4300d4a39b29a0abc9cb3774a84b \ - --hash=sha256:34c03fa78e328c691f982b7c03d4423bdfd7da69cd707fe572f544cf74ac23ad \ - --hash=sha256:36c95d4b70530b320b365659bb5034341316e6a9b30f0b25fa9c9eff4c27a204 \ - --hash=sha256:3a157ab149e591bb638a55c8c6bcb8cdb559c8b12c13a8affaba6cedfe51713a \ - --hash=sha256:42c64511469005058cd17cc1537578eac40ae9f7200bedcfd1fc1a05f4f8c200 \ - --hash=sha256:5f36b271dae35c465ef5e9090e1fdaba4a60a56f0bb0ba03e0932a66f28b9189 \ - --hash=sha256:6955369e4d9f48f41e3f238a9e60f9410645db7e07435e62c6a9ea6135a4907f \ - --hash=sha256:7b7c2a3c9eb1a827d42539aa64091640bd275b81e097cd1d8d82ef91ffa2e811 \ - --hash=sha256:8ce0f819d2f1933953fca255db2471ad58184a60508f03e6285e5114b6254844 \ - --hash=sha256:94a166927e53972a9698af9542ace4e38b9de50c34352b962f4d9a7d4c927af4 \ - --hash=sha256:a7f1b5b2c15866f2db413a3649a8fe4fd7b428ae58be2c0f6bca5eefd53ca2be \ - --hash=sha256:c8b3a1cebcba9b3669ed1a84cc65bf005728d2f0bc1ed2a6594a992e817f3a50 \ - --hash=sha256:de3ceed6e661954871d6cd78b410213bdcb136f79aafe22aa7182e028b8c7307 \ - --hash=sha256:f0eca9ca8628dbb4e916ae2491d72957fdd35f7a5d326b7032a345f111ac07fe - # via readme-renderer -pkginfo==1.10.0 \ - --hash=sha256:5df73835398d10db79f8eecd5cd86b1f6d29317589ea70796994d49399af6297 \ - --hash=sha256:889a6da2ed7ffc58ab5b900d888ddce90bce912f2d2de1dc1c26f4cb9fe65097 - # via twine -pycparser==2.22 \ - --hash=sha256:491c8be9c040f5390f5bf44a5b07752bd07f56edf992381b05c701439eec10f6 \ - --hash=sha256:c3702b6d3dd8c7abc1afa565d7e63d53a1d0bd86cdc24edd75470f4de499cfcc - # via cffi -pygments==2.18.0 \ - --hash=sha256:786ff802f32e91311bff3889f6e9a86e81505fe99f2735bb6d60ae0c5004f199 \ - --hash=sha256:b8e6aca0523f3ab76fee51799c488e38782ac06eafcf95e7ba832985c8e7b13a - # via - # readme-renderer - # rich -readme-renderer==44.0 \ - --hash=sha256:2fbca89b81a08526aadf1357a8c2ae889ec05fb03f5da67f9769c9a592166151 \ - --hash=sha256:8712034eabbfa6805cacf1402b4eeb2a73028f72d1166d6f5cb7f9c047c5d1e1 - # via twine -requests==2.32.3 \ - --hash=sha256:55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760 \ - --hash=sha256:70761cfe03c773ceb22aa2f671b4757976145175cdfca038c02654d061d6dcc6 - # via - # requests-toolbelt - # twine -requests-toolbelt==1.0.0 \ - --hash=sha256:7681a0a3d047012b5bdc0ee37d7f8f07ebe76ab08caeccfc3921ce23c88d5bc6 \ - --hash=sha256:cccfdd665f0a24fcf4726e690f65639d272bb0637b9b92dfd91a5568ccf6bd06 - # via twine -rfc3986==2.0.0 \ - --hash=sha256:50b1502b60e289cb37883f3dfd34532b8873c7de9f49bb546641ce9cbd256ebd \ - --hash=sha256:97aacf9dbd4bfd829baad6e6309fa6573aaf1be3f6fa735c8ab05e46cecb261c - # via twine -rich==13.9.3 \ - --hash=sha256:9836f5096eb2172c9e77df411c1b009bace4193d6a481d534fea75ebba758283 \ - --hash=sha256:bc1e01b899537598cf02579d2b9f4a415104d3fc439313a7a2c165d76557a08e - # via twine -secretstorage==3.3.3 \ - --hash=sha256:2403533ef369eca6d2ba81718576c5e0f564d5cca1b58f73a8b23e7d4eeebd77 \ - --hash=sha256:f356e6628222568e3af06f2eba8df495efa13b3b63081dafd4f7d9a7b7bc9f99 - # via keyring -twine==5.1.1 \ - --hash=sha256:215dbe7b4b94c2c50a7315c0275d2258399280fbb7d04182c7e55e24b5f93997 \ - --hash=sha256:9aa0825139c02b3434d913545c7b847a21c835e11597f5255842d457da2322db - # via -r tools/publish/requirements.in -urllib3==2.2.3 \ - --hash=sha256:ca899ca043dcb1bafa3e262d73aa25c465bfb49e0bd9dd5d59f1d0acba2f8fac \ - --hash=sha256:e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9 - # via - # requests - # twine -zipp==3.20.2 \ - --hash=sha256:a817ac80d6cf4b23bf7f2828b7cabf326f15a001bea8b1f9b49631780ba28350 \ - --hash=sha256:bc9eb26f4506fda01b81bcde0ca78103b6e62f991b381fec825435c836edbc29 - # via importlib-metadata From 273cbd122a86895c155a8978b0abdc1e64f8cfcd Mon Sep 17 00:00:00 2001 From: Richard Levasseur Date: Wed, 13 Nov 2024 18:29:02 -0800 Subject: [PATCH 04/18] ci: add last_rc, remove extraneous pystar configs (#2405) Run the bzlmod example with last_rc to match the BCR config. This should help catch any issues before a BCR release occurs. Along the way, cleanup the extraneous pystar configs. The rules_python Starlark implementation is enabled by default, and disabling it is unsupported. --- .bazelci/presubmit.yml | 53 +++++++++++++++++++++++------------------- 1 file changed, 29 insertions(+), 24 deletions(-) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 3c383497b6..1808824109 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -34,6 +34,7 @@ buildifier: build_flags: - "--keep_going" - "--build_tag_filters=-integration-test" + - "--config=bazel7.x" test_targets: - "--" - "..." @@ -84,16 +85,6 @@ buildifier: - //tests:version_3_8_test - //tests:version_3_9_test - //tests:version_default_test -.pystar_base: &pystar_base - bazel: "7.x" - environment: - RULES_PYTHON_ENABLE_PYSTAR: "1" - build_flags: - - "--config=bazel7.x" - test_flags: - # The doc check tests fail because the Starlark implementation makes the - # PyInfo and PyRuntimeInfo symbols become documented. - - "--test_tag_filters=-integration-test,-doc_check_test" tasks: gazelle_extension_min: <<: *common_workspace_flags_min_bazel @@ -139,26 +130,18 @@ tasks: name: "Default: Ubuntu, upcoming Bazel" platform: ubuntu2004 bazel: last_rc - pystar_ubuntu_workspace: - <<: *reusable_config - <<: *pystar_base - name: "Default test: Ubuntu, Pystar, workspace" - platform: ubuntu2004 - pystar_ubuntu_bzlmod: + ubuntu_workspace: <<: *reusable_config - <<: *pystar_base - name: "Default test: Ubuntu, Pystar, bzlmod" + name: "Default: Ubuntu, workspace" platform: ubuntu2004 - pystar_mac_workspace: + mac_workspace: <<: *reusable_config <<: *common_workspace_flags - <<: *pystar_base - name: "Default test: Mac, Pystar, workspace" + name: "Default: Mac, workspace" platform: macos - pystar_windows_workspace: + windows_workspace: <<: *reusable_config - <<: *pystar_base - name: "Default test: Windows, Pystar, workspace" + name: "Default: Windows, workspace" platform: windows debian: @@ -250,6 +233,13 @@ tasks: working_directory: examples/bzlmod platform: ubuntu2004 bazel: 7.x + integration_test_bzlmod_ubuntu_upcoming: + <<: *reusable_build_test_all + <<: *coverage_targets_example_bzlmod + name: "examples/bzlmod: Ubuntu, upcoming Bazel" + working_directory: examples/bzlmod + platform: ubuntu2004 + bazel: last_rc integration_test_bzlmod_debian: <<: *reusable_build_test_all <<: *coverage_targets_example_bzlmod @@ -264,12 +254,27 @@ tasks: working_directory: examples/bzlmod platform: macos bazel: 7.x + integration_test_bzlmod_macos_upcoming: + <<: *reusable_build_test_all + <<: *coverage_targets_example_bzlmod + name: "examples/bzlmod: macOS, upcoming Bazel" + working_directory: examples/bzlmod + platform: macos + bazel: last_rc integration_test_bzlmod_windows: <<: *reusable_build_test_all # coverage is not supported on Windows name: "examples/bzlmod: Windows" working_directory: examples/bzlmod platform: windows + bazel: 7.x + integration_test_bzlmod_windows_upcoming: + <<: *reusable_build_test_all + # coverage is not supported on Windows + name: "examples/bzlmod: Windows, upcoming Bazel" + working_directory: examples/bzlmod + platform: windows + bazel: last_rc integration_test_bzlmod_ubuntu_lockfile: <<: *reusable_build_test_all <<: *coverage_targets_example_bzlmod From 155efce562f14d46530fb5bec698a11e2ee889f5 Mon Sep 17 00:00:00 2001 From: Richard Levasseur Date: Thu, 14 Nov 2024 01:28:33 -0800 Subject: [PATCH 05/18] fix: upgrade to rules_proto 7.0.2 to pickup fix for Bazel 9 (#2408) The ProtoInfo was removed in Bazel 9, but earlier versions of rules_proto still refer to it. This was fixed in rules_proto 7.0.0. Fixes https://github.com/bazelbuild/rules_python/issues/2400 --------- Co-authored-by: Ivo List --- MODULE.bazel | 2 +- examples/bzlmod/MODULE.bazel.lock | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/MODULE.bazel b/MODULE.bazel index f9f173d8f1..ef173bc83b 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -10,7 +10,7 @@ bazel_dep(name = "rules_cc", version = "0.0.14") bazel_dep(name = "platforms", version = "0.0.4") # Those are loaded only when using py_proto_library -bazel_dep(name = "rules_proto", version = "6.0.2") +bazel_dep(name = "rules_proto", version = "7.0.2") bazel_dep(name = "protobuf", version = "29.0-rc2", repo_name = "com_google_protobuf") internal_deps = use_extension("//python/private:internal_deps.bzl", "internal_deps") diff --git a/examples/bzlmod/MODULE.bazel.lock b/examples/bzlmod/MODULE.bazel.lock index ee745d56d2..5a546c2f7a 100644 --- a/examples/bzlmod/MODULE.bazel.lock +++ b/examples/bzlmod/MODULE.bazel.lock @@ -66,6 +66,7 @@ "https://bcr.bazel.build/modules/platforms/0.0.9/MODULE.bazel": "4a87a60c927b56ddd67db50c89acaa62f4ce2a1d2149ccb63ffd871d5ce29ebc", "https://bcr.bazel.build/modules/protobuf/21.7/MODULE.bazel": "a5a29bb89544f9b97edce05642fac225a808b5b7be74038ea3640fae2f8e66a7", "https://bcr.bazel.build/modules/protobuf/27.0/MODULE.bazel": "7873b60be88844a0a1d8f80b9d5d20cfbd8495a689b8763e76c6372998d3f64c", + "https://bcr.bazel.build/modules/protobuf/27.1/MODULE.bazel": "703a7b614728bb06647f965264967a8ef1c39e09e8f167b3ca0bb1fd80449c0d", "https://bcr.bazel.build/modules/protobuf/29.0-rc2/MODULE.bazel": "6241d35983510143049943fc0d57937937122baf1b287862f9dc8590fc4c37df", "https://bcr.bazel.build/modules/protobuf/29.0-rc2/source.json": "52101bfd37e38f0d159dee47b71ccbd1f22f7a32192cef5ef2533bb6212f410f", "https://bcr.bazel.build/modules/protobuf/3.19.0/MODULE.bazel": "6b5fbb433f760a99a22b18b6850ed5784ef0e9928a72668b66e4d7ccd47db9b0", @@ -83,7 +84,8 @@ "https://bcr.bazel.build/modules/rules_cc/0.0.10/MODULE.bazel": "ec1705118f7eaedd6e118508d3d26deba2a4e76476ada7e0e3965211be012002", "https://bcr.bazel.build/modules/rules_cc/0.0.13/MODULE.bazel": "0e8529ed7b323dad0775ff924d2ae5af7640b23553dfcd4d34344c7e7a867191", "https://bcr.bazel.build/modules/rules_cc/0.0.14/MODULE.bazel": "5e343a3aac88b8d7af3b1b6d2093b55c347b8eefc2e7d1442f7a02dc8fea48ac", - "https://bcr.bazel.build/modules/rules_cc/0.0.14/source.json": "d22ad7e0f2c271a583b463b81cea83fd8afbf0012cad955c129b0e85662ec207", + "https://bcr.bazel.build/modules/rules_cc/0.0.15/MODULE.bazel": "6704c35f7b4a72502ee81f61bf88706b54f06b3cbe5558ac17e2e14666cd5dcc", + "https://bcr.bazel.build/modules/rules_cc/0.0.15/source.json": "48e606af0e02a716974a8b74fba6988d9f0c93af9177e28cf474bfc5fa26ab10", "https://bcr.bazel.build/modules/rules_cc/0.0.2/MODULE.bazel": "6915987c90970493ab97393024c156ea8fb9f3bea953b2f3ec05c34f19b5695c", "https://bcr.bazel.build/modules/rules_cc/0.0.6/MODULE.bazel": "abf360251023dfe3efcef65ab9d56beefa8394d4176dd29529750e1c57eaa33f", "https://bcr.bazel.build/modules/rules_cc/0.0.8/MODULE.bazel": "964c85c82cfeb6f3855e6a07054fdb159aced38e99a5eecf7bce9d53990afa3e", @@ -132,7 +134,8 @@ "https://bcr.bazel.build/modules/rules_proto/5.3.0-21.7/MODULE.bazel": "e8dff86b0971688790ae75528fe1813f71809b5afd57facb44dad9e8eca631b7", "https://bcr.bazel.build/modules/rules_proto/6.0.0-rc1/MODULE.bazel": "1e5b502e2e1a9e825eef74476a5a1ee524a92297085015a052510b09a1a09483", "https://bcr.bazel.build/modules/rules_proto/6.0.2/MODULE.bazel": "ce916b775a62b90b61888052a416ccdda405212b6aaeb39522f7dc53431a5e73", - "https://bcr.bazel.build/modules/rules_proto/6.0.2/source.json": "17a2e195f56cb28d6bbf763e49973d13890487c6945311ed141e196fb660426d", + "https://bcr.bazel.build/modules/rules_proto/7.0.2/MODULE.bazel": "bf81793bd6d2ad89a37a40693e56c61b0ee30f7a7fdbaf3eabbf5f39de47dea2", + "https://bcr.bazel.build/modules/rules_proto/7.0.2/source.json": "1e5e7260ae32ef4f2b52fd1d0de8d03b606a44c91b694d2f1afb1d3b28a48ce1", "https://bcr.bazel.build/modules/rules_rust/0.54.1/MODULE.bazel": "388547bb0cd6a751437bb15c94c6725226f50100eec576e4354c3a8b48c754fb", "https://bcr.bazel.build/modules/rules_rust/0.54.1/source.json": "9c5481b1abe4943457e6b2a475592d2e504b6b4355df603f24f64cde0a7f0f2d", "https://bcr.bazel.build/modules/rules_shell/0.2.0/MODULE.bazel": "fda8a652ab3c7d8fee214de05e7a9916d8b28082234e8d2c0094505c5268ed3c", From b304fc66888b9a8266e31de928469d39dce55743 Mon Sep 17 00:00:00 2001 From: Richard Levasseur Date: Fri, 15 Nov 2024 18:35:01 -0800 Subject: [PATCH 06/18] fix: keep import path values if Bazel-builtin PyInfo is removed (#2415) The collect_imports() function added import strings from BuiltinPyInfo if it was non-None. However, operator precedence caused the `if-else` ternary to ignore both list comprehensions (one for PyInfo and one for BuiltinPyInfo) if BuiltinPyInfo was None. To fix, I rewrote the function as a regular for loop to eliminate the ambiguous looking ternary expression. Fixes: https://github.com/bazelbuild/rules_python/issues/2414 --- CHANGELOG.md | 3 ++- python/private/common.bzl | 25 ++++++++++++++++--------- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c351487605..1acb12fb4d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -56,7 +56,8 @@ Unreleased changes template. {#v0-0-0-fixed} ### Fixed -* Nothing yet. +* (rules) Don't drop custom import paths if Bazel-builtin PyInfo is removed. + ([2414](https://github.com/bazelbuild/rules_python/issues/2414)). {#v0-0-0-added} ### Added diff --git a/python/private/common.bzl b/python/private/common.bzl index 837cd19097..97fabcebcb 100644 --- a/python/private/common.bzl +++ b/python/private/common.bzl @@ -263,15 +263,22 @@ def filter_to_py_srcs(srcs): return [f for f in srcs if f.extension == "py"] def collect_imports(ctx, semantics): - return depset(direct = semantics.get_imports(ctx), transitive = [ - dep[PyInfo].imports - for dep in ctx.attr.deps - if PyInfo in dep - ] + [ - dep[BuiltinPyInfo].imports - for dep in ctx.attr.deps - if BuiltinPyInfo in dep - ] if BuiltinPyInfo != None else []) + """Collect the direct and transitive `imports` strings. + + Args: + ctx: {type}`ctx` the current target ctx + semantics: semantics object for fetching direct imports. + + Returns: + {type}`depset[str]` of import paths + """ + transitive = [] + for dep in ctx.attr.deps: + if PyInfo in dep: + transitive.append(dep[PyInfo].imports) + if BuiltinPyInfo != None and BuiltinPyInfo in dep: + transitive.append(dep[BuiltinPyInfo].imports) + return depset(direct = semantics.get_imports(ctx), transitive = transitive) def collect_runfiles(ctx, files = depset()): """Collects the necessary files from the rule's context. From 7467c6fccc8d48973ab403bd398bf4c158ceeddb Mon Sep 17 00:00:00 2001 From: Richard Levasseur Date: Sat, 16 Nov 2024 18:23:26 -0800 Subject: [PATCH 07/18] docs: tell how to do pyc-only builds (#2417) Someone one Slack asked if this was possible and how to do, so document it for better visibility. There's a lot of flags, so its easy to not see how to do this. --- docs/precompiling.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/docs/precompiling.md b/docs/precompiling.md index a6711f3b76..9b2e816ec4 100644 --- a/docs/precompiling.md +++ b/docs/precompiling.md @@ -39,6 +39,30 @@ can use an opt-in or opt-out approach by setting its value: * targets must opt-out: `--@rules_python//python/config_settings:precompile=enabled` * targets must opt-in: `--@rules_python//python/config_settings:precompile=disabled` +## Pyc-only builds + +A pyc-only build (aka "source less" builds) is when only `.pyc` files are +included; the source `.py` files are not included. + +To enable this, set +{obj}`--@rules_python//python/config_settings:precompile_source_retention=omit_source` +flag on the command line or the {attr}`precompile_source_retention=omit_source` +attribute on specific targets. + +The advantage of pyc-only builds are: +* Fewer total files in a binary. +* Imports _may_ be _slightly_ faster. + +The disadvantages are: +* Error messages will be less precise because the precise line and offset + information isn't in an pyc file. +* pyc files are Python major-version specific. + +:::{note} +pyc files are not a form of hiding source code. They are trivial to uncompile, +and uncompiling them can recover almost the original source. +::: + ## Advanced precompiler customization The default implementation of the precompiler is a persistent, multiplexed, From 1944874f6ba507f70d8c5e70df84622e0c783254 Mon Sep 17 00:00:00 2001 From: Richard Levasseur Date: Sat, 16 Nov 2024 20:03:31 -0800 Subject: [PATCH 08/18] chore: update changelog for 0.40.0 (#2416) Add new version links and headers --- CHANGELOG.md | 37 +++++++++++++++++++++++++++++-------- 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1acb12fb4d..65a7d992cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,19 +30,19 @@ Unreleased changes template. {#v0-0-0-changed} ### Changed -* Nothing yet. +* Nothing changed. {#v0-0-0-fixed} ### Fixed -* Nothing yet. +* Nothing fixed. {#v0-0-0-added} ### Added -* Nothing yet. +* Nothing added. {#v0-0-0-removed} ### Removed -* Nothing yet. +* Nothing removed. --> {#v0-0-0} @@ -52,19 +52,40 @@ Unreleased changes template. {#v0-0-0-changed} ### Changed -* Nothing yet. +* Nothing changed. {#v0-0-0-fixed} ### Fixed -* (rules) Don't drop custom import paths if Bazel-builtin PyInfo is removed. - ([2414](https://github.com/bazelbuild/rules_python/issues/2414)). +* Nothing fixed. {#v0-0-0-added} ### Added -* Nothing yet. +* Nothing added. {#v0-0-0-removed} ### Removed +* Nothing removed. + +{#v0-40-0} +## [0.40.0] - 2024-11-17 + +[0.40.0]: https://github.com/bazelbuild/rules_python/releases/tag/0.40.0 + +{#v0-40-changed} +### Changed +* Nothing changed. + +{#v0-40-fixed} +### Fixed +* (rules) Don't drop custom import paths if Bazel-builtin PyInfo is removed. + ([2414](https://github.com/bazelbuild/rules_python/issues/2414)). + +{#v0-40-added} +### Added +* Nothing added. + +{#v0-40-removed} +### Removed * (publish) Remove deprecated `requirements.txt` for the `twine` dependencies. Please use `requirements_linux.txt` instead. From 15e9b4ab1dd8ced4dc468a307417e2fdcbd47314 Mon Sep 17 00:00:00 2001 From: Richard Levasseur Date: Sun, 17 Nov 2024 16:26:04 -0800 Subject: [PATCH 09/18] docs: fix refs to precompile source retention flag/attr in precompiling docs (#2419) Regular md docs need the `bzl:` prefix. Without it, the string doesn't render at all. --- docs/precompiling.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/precompiling.md b/docs/precompiling.md index 9b2e816ec4..a46608f77e 100644 --- a/docs/precompiling.md +++ b/docs/precompiling.md @@ -45,8 +45,8 @@ A pyc-only build (aka "source less" builds) is when only `.pyc` files are included; the source `.py` files are not included. To enable this, set -{obj}`--@rules_python//python/config_settings:precompile_source_retention=omit_source` -flag on the command line or the {attr}`precompile_source_retention=omit_source` +{bzl:obj}`--@rules_python//python/config_settings:precompile_source_retention=omit_source` +flag on the command line or the {bzl:attr}`precompile_source_retention=omit_source` attribute on specific targets. The advantage of pyc-only builds are: From b28db698f50a82bf861b76e7ad6d75c31f1a820e Mon Sep 17 00:00:00 2001 From: Douglas Thor Date: Sun, 17 Nov 2024 16:38:57 -0800 Subject: [PATCH 10/18] refactor: Add GAZELLE_VERBOSE env and log parser failures (#2420) While investigating #2396 and why #2413 doesn't appear to be working for us, I realized that one of the things I was making heavy use of was additional parser logging that I had added. This adds some of that logging. I also throw in some documentation because I found it helpful. Users can (attempt to) get additional parse failure information by setting the `GAZELLE_VERBOSE` environment variable to `1`. Eg: ```console $ GAZELLE_VERBOSE=1 bazel run //:gazelle ``` Here are some example logs: ```console $ GAZELLE_VERBOSE=1 bazel run //:gazelle INFO: Invocation ID: a4e026d8-17df-426c-b1cc-d3980690dd53 ... INFO: Running command line: bazel-bin/gazelle INFO: Streaming build results to: https://btx.cloud.google.com/invocations/a4e026d8-17df-426c-b1cc-d3980690dd53 gazelle: WARNING: failed to parse "hello/get_deps.py". The resulting BUILD target may be incorrect. gazelle: Parse error at {Row:1 Column:0}: def search_one_more_level[T](): gazelle: The above was parsed as: (ERROR (identifier) (call function: (list (identifier)) arguments: (argument_list))) gazelle: ERROR: failed to generate target "//hello:get_deps" of kind "py_library": a target of kind "pyle_py_binary" with the same name already exists. Use the '# gazelle:python_library_naming_convention' directive to change the naming convention. $ $ bazel run //:gazelle INFO: Invocation ID: 726c9fd6-f566-4c30-95ef-c4781ad155de ... INFO: Running command line: bazel-bin/gazelle INFO: Streaming build results to: https://btx.cloud.google.com/invocations/726c9fd6-f566-4c30-95ef-c4781ad155de gazelle: WARNING: failed to parse "hello/get_deps.py". The resulting BUILD target may be incorrect. gazelle: ERROR: failed to generate target "//hello:get_deps" of kind "py_library": a target of kind "pyle_py_binary" with the same name already exists. Use the '# gazelle:python_library_naming_convention' directive to change the naming convention. ``` --------- Co-authored-by: Richard Levasseur Co-authored-by: Richard Levasseur --- CHANGELOG.md | 3 ++- gazelle/python/file_parser.go | 35 ++++++++++++++++++++++++++++++++--- 2 files changed, 34 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 65a7d992cb..dd1c2ff67e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -60,7 +60,8 @@ Unreleased changes template. {#v0-0-0-added} ### Added -* Nothing added. +* (gazelle): Parser failures will now be logged to the terminal. Additional + details can be logged by setting `GAZELLE_VERBOSE=1`. {#v0-0-0-removed} ### Removed diff --git a/gazelle/python/file_parser.go b/gazelle/python/file_parser.go index a2b22c2b8f..9101621639 100644 --- a/gazelle/python/file_parser.go +++ b/gazelle/python/file_parser.go @@ -17,6 +17,7 @@ package python import ( "context" "fmt" + "log" "os" "path/filepath" "strings" @@ -55,7 +56,10 @@ func NewFileParser() *FileParser { return &FileParser{} } -func ParseCode(code []byte) (*sitter.Node, error) { +// ParseCode instantiates a new tree-sitter Parser and parses the python code, returning +// the tree-sitter RootNode. +// It prints a warning if parsing fails. +func ParseCode(code []byte, path string) (*sitter.Node, error) { parser := sitter.NewParser() parser.SetLanguage(python.GetLanguage()) @@ -64,9 +68,27 @@ func ParseCode(code []byte) (*sitter.Node, error) { return nil, err } - return tree.RootNode(), nil + root := tree.RootNode() + if root.HasError() { + log.Printf("WARNING: failed to parse %q. The resulting BUILD target may be incorrect.", path) + + verbose, envExists := os.LookupEnv("GAZELLE_VERBOSE") + if envExists && verbose == "1" { + for i := 0; i < int(root.ChildCount()); i++ { + child := root.Child(i) + if child.IsError() { + log.Printf("Parse error at %+v:\n%+v", child.StartPoint(), child.Content(code)) + log.Printf("The above was parsed as: %v", child.String()) + } + } + } + } + + return root, nil } +// parseMain returns true if the python file has an `if __name__ == "__main__":` block, +// which is a common idiom for python scripts/binaries. func (p *FileParser) parseMain(ctx context.Context, node *sitter.Node) bool { for i := 0; i < int(node.ChildCount()); i++ { if err := ctx.Err(); err != nil { @@ -94,6 +116,8 @@ func (p *FileParser) parseMain(ctx context.Context, node *sitter.Node) bool { return false } +// parseImportStatement parses a node for an import statement, returning a `module` and a boolean +// representing if the parse was OK or not. func parseImportStatement(node *sitter.Node, code []byte) (module, bool) { switch node.Type() { case sitterNodeTypeDottedName: @@ -112,6 +136,9 @@ func parseImportStatement(node *sitter.Node, code []byte) (module, bool) { return module{}, false } +// parseImportStatements parses a node for import statements, returning true if the node is +// an import statement. It updates FileParser.output.Modules with the `module` that the +// import represents. func (p *FileParser) parseImportStatements(node *sitter.Node) bool { if node.Type() == sitterNodeTypeImportStatement { for j := 1; j < int(node.ChildCount()); j++ { @@ -146,6 +173,8 @@ func (p *FileParser) parseImportStatements(node *sitter.Node) bool { return true } +// parseComments parses a node for comments, returning true if the node is a comment. +// It updates FileParser.output.Comments with the parsed comment. func (p *FileParser) parseComments(node *sitter.Node) bool { if node.Type() == sitterNodeTypeComment { p.output.Comments = append(p.output.Comments, comment(node.Content(p.code))) @@ -180,7 +209,7 @@ func (p *FileParser) parse(ctx context.Context, node *sitter.Node) { } func (p *FileParser) Parse(ctx context.Context) (*ParserOutput, error) { - rootNode, err := ParseCode(p.code) + rootNode, err := ParseCode(p.code, p.relFilepath) if err != nil { return nil, err } From 79bd1f5f44e0dac4e9654a3007a69f4950469fa8 Mon Sep 17 00:00:00 2001 From: Ignas Anikevicius <240938+aignas@users.noreply.github.com> Date: Mon, 18 Nov 2024 10:17:24 +0900 Subject: [PATCH 11/18] refactor(toolchain): use bazel to extract `zstd` archives (#2412) Here we remove the dependence on the `zstd` archive downloaded from GH for extracting `zstd` toolchains because bazel now supports `zstd` extraction for a long time. This mainly cleans up the code which is again used a lot more due to #2386. Co-authored-by: Richard Levasseur --- CHANGELOG.md | 7 +++- python/private/python.bzl | 2 +- python/private/python_repository.bzl | 61 +++++----------------------- python/versions.bzl | 22 ++++++++-- 4 files changed, 36 insertions(+), 56 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dd1c2ff67e..5eaa3fadf8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -52,7 +52,7 @@ Unreleased changes template. {#v0-0-0-changed} ### Changed -* Nothing changed. +* (python_repository) Start honoring the `strip_prefix` field for `zstd` archives. {#v0-0-0-fixed} ### Fixed @@ -89,6 +89,11 @@ Unreleased changes template. ### Removed * (publish) Remove deprecated `requirements.txt` for the `twine` dependencies. Please use `requirements_linux.txt` instead. +* (python_repository) Use bazel's built in `zstd` support and remove attributes + for customizing the `zstd` binary to be used for `zstd` archives in the + {bzl:obj}`python_repository` repository_rule. This affects the + {bzl:obj}`python_register_toolchains` and + {bzl:obj}`python_register_multi_toolchains` callers in the `WORKSPACE`. {#v0-39-0} ## [0.39.0] - 2024-11-13 diff --git a/python/private/python.bzl b/python/private/python.bzl index 8632554c51..ec6f73e41f 100644 --- a/python/private/python.bzl +++ b/python/private/python.bzl @@ -462,7 +462,7 @@ def _get_toolchain_config(*, modules, _fail = fail): "strip_prefix": { platform: item["strip_prefix"] for platform in item["sha256"] - }, + } if type(item["strip_prefix"]) == type("") else item["strip_prefix"], "url": { platform: [item["url"]] for platform in item["sha256"] diff --git a/python/private/python_repository.bzl b/python/private/python_repository.bzl index 9ffa196a20..c7407c8f2c 100644 --- a/python/private/python_repository.bzl +++ b/python/private/python_repository.bzl @@ -15,7 +15,7 @@ """This file contains repository rules and macros to support toolchain registration. """ -load("//python:versions.bzl", "FREETHREADED", "PLATFORMS") +load("//python:versions.bzl", "FREETHREADED", "INSTALL_ONLY", "PLATFORMS") load(":auth.bzl", "get_auth") load(":repo_utils.bzl", "REPO_DEBUG_ENV_VAR", "repo_utils") load(":text_util.bzl", "render") @@ -72,51 +72,13 @@ def _python_repository_impl(rctx): urls = rctx.attr.urls or [rctx.attr.url] auth = get_auth(rctx, urls) - if release_filename.endswith(".zst"): - rctx.download( + if INSTALL_ONLY in release_filename: + rctx.download_and_extract( url = urls, sha256 = rctx.attr.sha256, - output = release_filename, + stripPrefix = rctx.attr.strip_prefix, auth = auth, ) - unzstd = rctx.which("unzstd") - if not unzstd: - url = rctx.attr.zstd_url.format(version = rctx.attr.zstd_version) - rctx.download_and_extract( - url = url, - sha256 = rctx.attr.zstd_sha256, - auth = auth, - ) - working_directory = "zstd-{version}".format(version = rctx.attr.zstd_version) - - repo_utils.execute_checked( - rctx, - op = "python_repository.MakeZstd", - arguments = [ - repo_utils.which_checked(rctx, "make"), - "--jobs=4", - ], - timeout = 600, - quiet = True, - working_directory = working_directory, - logger = logger, - ) - zstd = "{working_directory}/zstd".format(working_directory = working_directory) - unzstd = "./unzstd" - rctx.symlink(zstd, unzstd) - - repo_utils.execute_checked( - rctx, - op = "python_repository.ExtractRuntime", - arguments = [ - repo_utils.which_checked(rctx, "tar"), - "--extract", - "--strip-components=2", - "--use-compress-program={unzstd}".format(unzstd = unzstd), - "--file={}".format(release_filename), - ], - logger = logger, - ) else: rctx.download_and_extract( url = urls, @@ -125,6 +87,12 @@ def _python_repository_impl(rctx): auth = auth, ) + # Strip the things that are not present in the INSTALL_ONLY builds + # NOTE: if the dirs are not present, we will not fail here + rctx.delete("python/build") + rctx.delete("python/licenses") + rctx.delete("python/PYTHON.json") + patches = rctx.attr.patches if patches: for patch in patches: @@ -378,15 +346,6 @@ function defaults (e.g. `single_version_override` for `MODULE.bazel` files. "urls": attr.string_list( doc = "The URL of the interpreter to download. Exactly one of url and urls must be set.", ), - "zstd_sha256": attr.string( - default = "7c42d56fac126929a6a85dbc73ff1db2411d04f104fae9bdea51305663a83fd0", - ), - "zstd_url": attr.string( - default = "https://github.com/facebook/zstd/releases/download/v{version}/zstd-{version}.tar.gz", - ), - "zstd_version": attr.string( - default = "1.5.2", - ), "_rule_name": attr.string(default = "python_repository"), }, environ = [REPO_DEBUG_ENV_VAR], diff --git a/python/versions.bzl b/python/versions.bzl index 774c24d1b9..688c4e2ceb 100644 --- a/python/versions.bzl +++ b/python/versions.bzl @@ -20,6 +20,7 @@ MACOS_NAME = "mac os" LINUX_NAME = "linux" WINDOWS_NAME = "windows" FREETHREADED = "freethreaded" +INSTALL_ONLY = "install_only" DEFAULT_RELEASE_BASE_URL = "https://github.com/indygreg/python-build-standalone/releases/download" @@ -52,7 +53,7 @@ TOOL_VERSIONS = { "x86_64-apple-darwin": "8d06bec08db8cdd0f64f4f05ee892cf2fcbc58cfb1dd69da2caab78fac420238", "x86_64-unknown-linux-gnu": "aec8c4c53373b90be7e2131093caa26063be6d9d826f599c935c0e1042af3355", }, - "strip_prefix": "python", + "strip_prefix": "python/install", }, "3.8.12": { "url": "20220227/cpython-{python_version}+20220227-{platform}-{build}.tar.gz", @@ -579,7 +580,22 @@ TOOL_VERSIONS = { "x86_64-pc-windows-msvc-freethreaded": "bfd89f9acf866463bc4baf01733da5e767d13f5d0112175a4f57ba91f1541310", "x86_64-unknown-linux-gnu-freethreaded": "a73adeda301ad843cce05f31a2d3e76222b656984535a7b87696a24a098b216c", }, - "strip_prefix": "python", + "strip_prefix": { + "aarch64-apple-darwin": "python", + "aarch64-unknown-linux-gnu": "python", + "ppc64le-unknown-linux-gnu": "python", + "s390x-unknown-linux-gnu": "python", + "x86_64-apple-darwin": "python", + "x86_64-pc-windows-msvc": "python", + "x86_64-unknown-linux-gnu": "python", + "aarch64-apple-darwin-freethreaded": "python/install", + "aarch64-unknown-linux-gnu-freethreaded": "python/install", + "ppc64le-unknown-linux-gnu-freethreaded": "python/install", + "s390x-unknown-linux-gnu-freethreaded": "python/install", + "x86_64-apple-darwin-freethreaded": "python/install", + "x86_64-pc-windows-msvc-freethreaded": "python/install", + "x86_64-unknown-linux-gnu-freethreaded": "python/install", + }, }, } @@ -777,7 +793,7 @@ def get_release_info(platform, python_version, base_url = DEFAULT_RELEASE_BASE_U }[p], ) else: - build = "install_only" + build = INSTALL_ONLY if WINDOWS_NAME in platform: build = "shared-" + build From 68d1b4104f1d6f72ed0f3a8a5bf0a75d94cb74ec Mon Sep 17 00:00:00 2001 From: Ignas Anikevicius <240938+aignas@users.noreply.github.com> Date: Mon, 18 Nov 2024 11:01:19 +0900 Subject: [PATCH 12/18] refactor!(toolchain): remove uname dep in the repository_rule stage (#2406) Before this PR we would shell out to `uname` on UNIX systems to get the `arch` of the toolchain - on Windows we would not need to do it because there used to be only a single Windows platform. With this change we can correctly support the resolution of the python interpreter on various platforms and I have also added an env variable to customize the selection, so that users can use `musl` or a `freethreaded` interpreter if they wish. As part of this change, I have restricted visibility of the config settings used in the toolchain alias repo so that we are creating fewer targets. This is a very good time to do this before `1.0.0`. Fixes #2145 Work towards #2276 Work towards #2386 Work towards #1211 to unblock #2402 Work towards #1361 --------- Co-authored-by: Richard Levasseur --- CHANGELOG.md | 25 +++- WORKSPACE | 2 +- docs/environment-variables.md | 10 ++ examples/bzlmod/MODULE.bazel.lock | 4 +- python/private/python_register_toolchains.bzl | 6 +- python/private/repo_utils.bzl | 6 +- python/private/toolchain_aliases.bzl | 74 +++++++++ python/private/toolchains_repo.bzl | 141 +++++++----------- python/versions.bzl | 33 ++-- .../WORKSPACE | 3 +- 10 files changed, 195 insertions(+), 109 deletions(-) create mode 100644 python/private/toolchain_aliases.bzl diff --git a/CHANGELOG.md b/CHANGELOG.md index 5eaa3fadf8..16ea38b3ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -52,16 +52,39 @@ Unreleased changes template. {#v0-0-0-changed} ### Changed + +**Breaking**: +* (toolchains) stop exposing config settings in python toolchain alias repos. + Please consider depending on the flags defined in + `//python/config_setting/...` and the `@platforms` package instead. +* (toolchains) consumers who were depending on the `MACOS_NAME` and the `arch` + attribute in the `PLATFORMS` list, please update your code to respect the new + values. The values now correspond to the values available in the + `@platforms//` package constraint values. +* (toolchains) `host_platform` and `interpreter` constants are no longer created + in the `toolchain` generated alias `.bzl` files. If you need to access the + host interpreter during the `repository_rule` evaluation, please use the + `@python_{version}_host//:python` targets created by + {bzl:obj}`python_register_toolchains` and + {bzl:obj}`python_register_multi_toolchains` macros or the {bzl:obj}`python` + bzlmod extension. + +Other changes: * (python_repository) Start honoring the `strip_prefix` field for `zstd` archives. {#v0-0-0-fixed} ### Fixed -* Nothing fixed. +* (toolchains) stop depending on `uname` to get the value of the host platform. {#v0-0-0-added} ### Added * (gazelle): Parser failures will now be logged to the terminal. Additional details can be logged by setting `GAZELLE_VERBOSE=1`. +* (toolchains) allow users to select which variant of the support host toolchain + they would like to use through + `RULES_PYTHON_REPO_TOOLCHAIN_{VERSION}_{OS}_{ARCH}` env variable setting. For + example, this allows one to use `freethreaded` python interpreter in the + `repository_rule` to build a wheel from `sdist`. {#v0-0-0-removed} ### Removed diff --git a/WORKSPACE b/WORKSPACE index b77918f5ef..46ebbc8cde 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -86,7 +86,7 @@ load("@rules_python_gazelle_plugin//:deps.bzl", _py_gazelle_deps = "gazelle_deps _py_gazelle_deps() # This interpreter is used for various rules_python dev-time tools -load("@python//3.11.9:defs.bzl", "interpreter") +interpreter = "@python_3_11_9_host//:python" ##################### # Install twine for our own runfiles wheel publishing. diff --git a/docs/environment-variables.md b/docs/environment-variables.md index 2a0052923c..906281d56f 100644 --- a/docs/environment-variables.md +++ b/docs/environment-variables.md @@ -15,6 +15,16 @@ Determines the verbosity of logging output for repo rules. Valid values: * `TRACE` ::: +:::{envvar} RULES_PYTHON_REPO_TOOLCHAIN_VERSION_OS_ARCH + +Determines the python interpreter platform to be used for a particular +interpreter `(version, os, arch)` triple to be used in repository rules. +Replace the `VERSION_OS_ARCH` part with actual values when using, e.g. +`3_13_0_linux_x86_64`. The version values must have `_` instead of `.` and the +os, arch values are the same as the ones mentioned in the +`//python:versions.bzl` file. +::: + :::{envvar} RULES_PYTHON_PIP_ISOLATED Determines if `--isolated` is used with pip. diff --git a/examples/bzlmod/MODULE.bazel.lock b/examples/bzlmod/MODULE.bazel.lock index 5a546c2f7a..8bad32a07b 100644 --- a/examples/bzlmod/MODULE.bazel.lock +++ b/examples/bzlmod/MODULE.bazel.lock @@ -1562,7 +1562,7 @@ }, "@@rules_python~//python/extensions:pip.bzl%pip": { "general": { - "bzlTransitiveDigest": "MwmpiMn2qoAVC+3E9MF3E98fB8v1utYBfMa0frXyi7g=", + "bzlTransitiveDigest": "mCwiXbsZmReVgs884fZHYfxaZaL9mFG+prEnH/lpE9g=", "usagesDigest": "VmrNvB/4EhzsYieLDka9584M+pYKPpjNLl3Wcb5rx/c=", "recordedFileInputs": { "@@//requirements_lock_3_10.txt": "5e7083982a7e60f34998579a0ae83b520d46ab8f2552cc51337217f024e6def5", @@ -7035,7 +7035,7 @@ }, "@@rules_python~//python/private/pypi:pip.bzl%pip_internal": { "general": { - "bzlTransitiveDigest": "Kx383BMHUpAHEjRiU5aWU4QTRQVg+Uu+Mgi7jVxuz0c=", + "bzlTransitiveDigest": "Xu1N6572iHVqGChH12PpMhprC21k3CpjRZVpm3FmE2c=", "usagesDigest": "/lZXl/ZgP+u5PE8WkeWTyYBsvX9XQWFn1antj5qrBzQ=", "recordedFileInputs": { "@@rules_python~//tools/publish/requirements_linux.txt": "8175b4c8df50ae2f22d1706961884beeb54e7da27bd2447018314a175981997d", diff --git a/python/private/python_register_toolchains.bzl b/python/private/python_register_toolchains.bzl index 98c8e5bfc3..cd3e9cbed7 100644 --- a/python/private/python_register_toolchains.bzl +++ b/python/private/python_register_toolchains.bzl @@ -160,7 +160,11 @@ def python_register_toolchains( platform = platform, )) - host_toolchain(name = name + "_host") + host_toolchain( + name = name + "_host", + platforms = loaded_platforms, + python_version = python_version, + ) toolchain_aliases( name = name, diff --git a/python/private/repo_utils.bzl b/python/private/repo_utils.bzl index e0bf69acac..0e3f7b024b 100644 --- a/python/private/repo_utils.bzl +++ b/python/private/repo_utils.bzl @@ -41,6 +41,10 @@ def _logger(mrctx, name = None): Returns: A struct with attributes logging: trace, debug, info, warn, fail. + Please use `return logger.fail` when using the `fail` method, because + it makes `buildifier` happy and ensures that other implementation of + the logger injected into the function work as expected by terminating + on the given line. """ if _is_repo_debug_enabled(mrctx): verbosity_level = "DEBUG" @@ -140,7 +144,7 @@ def _execute_internal( result = mrctx.execute(arguments, environment = environment, **kwargs) if fail_on_error and result.return_code != 0: - logger.fail(( + return logger.fail(( "repo.execute: {op}: end: failure:\n" + " command: {cmd}\n" + " return code: {return_code}\n" + diff --git a/python/private/toolchain_aliases.bzl b/python/private/toolchain_aliases.bzl new file mode 100644 index 0000000000..31ac4a8fdf --- /dev/null +++ b/python/private/toolchain_aliases.bzl @@ -0,0 +1,74 @@ +# Copyright 2024 The Bazel Authors. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""Create toolchain alias targets.""" + +load("@rules_python//python:versions.bzl", "PLATFORMS") + +def toolchain_aliases(*, name, platforms, visibility = None, native = native): + """Create toolchain aliases for the python toolchains. + + Args: + name: {type}`str` The name of the current repository. + platforms: {type}`platforms` The list of platforms that are supported + for the current toolchain repository. + visibility: {type}`list[Target] | None` The visibility of the aliases. + native: The native struct used in the macro, useful for testing. + """ + for platform in PLATFORMS.keys(): + if platform not in platforms: + continue + + native.config_setting( + name = platform, + flag_values = PLATFORMS[platform].flag_values, + constraint_values = PLATFORMS[platform].compatible_with, + visibility = ["//visibility:private"], + ) + + prefix = name + for name in [ + "files", + "includes", + "libpython", + "py3_runtime", + "python_headers", + "python_runtimes", + ]: + native.alias( + name = name, + actual = select({ + ":" + platform: "@{}_{}//:{}".format(prefix, platform, name) + for platform in platforms + }), + visibility = visibility, + ) + + native.alias( + name = "python3", + actual = select({ + ":" + platform: "@{}_{}//:{}".format(prefix, platform, "python.exe" if "windows" in platform else "bin/python3") + for platform in platforms + }), + visibility = visibility, + ) + native.alias( + name = "pip", + actual = select({ + ":" + platform: "@{}_{}//:python_runtimes".format(prefix, platform) + for platform in platforms + if "windows" not in platform + }), + visibility = visibility, + ) diff --git a/python/private/toolchains_repo.bzl b/python/private/toolchains_repo.bzl index d21fb53a41..7e9a0c7ff9 100644 --- a/python/private/toolchains_repo.bzl +++ b/python/private/toolchains_repo.bzl @@ -25,8 +25,6 @@ platform-specific repositories. load( "//python:versions.bzl", - "LINUX_NAME", - "MACOS_NAME", "PLATFORMS", "WINDOWS_NAME", ) @@ -126,43 +124,26 @@ toolchains_repo = repository_rule( ) def _toolchain_aliases_impl(rctx): - logger = repo_utils.logger(rctx) - (os_name, arch) = _get_host_os_arch(rctx, logger) - - host_platform = _get_host_platform(os_name, arch) - - is_windows = (os_name == WINDOWS_NAME) - python3_binary_path = "python.exe" if is_windows else "bin/python3" - # Base BUILD file for this repository. build_contents = """\ # Generated by python/private/toolchains_repo.bzl +load("@rules_python//python/private:toolchain_aliases.bzl", "toolchain_aliases") + package(default_visibility = ["//visibility:public"]) -load("@rules_python//python:versions.bzl", "gen_python_config_settings") -gen_python_config_settings() + exports_files(["defs.bzl"]) PLATFORMS = [ {loaded_platforms} ] -alias(name = "files", actual = select({{":" + item: "@{py_repository}_" + item + "//:files" for item in PLATFORMS}})) -alias(name = "includes", actual = select({{":" + item: "@{py_repository}_" + item + "//:includes" for item in PLATFORMS}})) -alias(name = "libpython", actual = select({{":" + item: "@{py_repository}_" + item + "//:libpython" for item in PLATFORMS}})) -alias(name = "py3_runtime", actual = select({{":" + item: "@{py_repository}_" + item + "//:py3_runtime" for item in PLATFORMS}})) -alias(name = "python_headers", actual = select({{":" + item: "@{py_repository}_" + item + "//:python_headers" for item in PLATFORMS}})) -alias(name = "python_runtimes", actual = select({{":" + item: "@{py_repository}_" + item + "//:python_runtimes" for item in PLATFORMS}})) -alias(name = "python3", actual = select({{":" + item: "@{py_repository}_" + item + "//:" + ("python.exe" if "windows" in item else "bin/python3") for item in PLATFORMS}})) +toolchain_aliases( + name = "{py_repository}", + platforms = PLATFORMS, +) """.format( py_repository = rctx.attr.user_repository_name, loaded_platforms = "\n".join([" \"{}\",".format(p) for p in rctx.attr.platforms]), ) - if not is_windows: - build_contents += """\ -alias(name = "pip", actual = select({{":" + item: "@{py_repository}_" + item + "//:python_runtimes" for item in PLATFORMS if "windows" not in item}})) -""".format( - py_repository = rctx.attr.user_repository_name, - host_platform = host_platform, - ) rctx.file("BUILD.bazel", build_contents) # Expose a Starlark file so rules can know what host platform we used and where to find an interpreter @@ -181,9 +162,6 @@ load( ) load("{rules_python}//python:pip.bzl", _compile_pip_requirements = "compile_pip_requirements") -host_platform = "{host_platform}" -interpreter = "@{py_repository}_{host_platform}//:{python3_binary_path}" - def py_binary(name, **kwargs): return _py_binary( name = name, @@ -214,10 +192,7 @@ def compile_pip_requirements(name, **kwargs): ) """.format( - host_platform = host_platform, - py_repository = rctx.attr.user_repository_name, python_version = rctx.attr.python_version, - python3_binary_path = python3_binary_path, rules_python = get_repository_name(rctx.attr._rules_python_workspace), )) @@ -243,15 +218,21 @@ actions.""", ) def _host_toolchain_impl(rctx): - logger = repo_utils.logger(rctx) rctx.file("BUILD.bazel", """\ # Generated by python/private/toolchains_repo.bzl exports_files(["python"], visibility = ["//visibility:public"]) """) - (os_name, arch) = _get_host_os_arch(rctx, logger) - host_platform = _get_host_platform(os_name, arch) + os_name = repo_utils.get_platforms_os_name(rctx) + host_platform = _get_host_platform( + rctx = rctx, + logger = repo_utils.logger(rctx), + python_version = rctx.attr.python_version, + os_name = os_name, + cpu_name = repo_utils.get_platforms_cpu_name(rctx), + platforms = rctx.attr.platforms, + ) repo = "@@{py_repository}_{host_platform}".format( py_repository = rctx.attr.name[:-len("_host")], host_platform = host_platform, @@ -320,6 +301,8 @@ toolchain_aliases repo because referencing the `python` interpreter target from this repo causes an eager fetch of the toolchain for the host platform. """, attrs = { + "platforms": attr.string_list(mandatory = True), + "python_version": attr.string(mandatory = True), "_rule_name": attr.string(default = "host_toolchain"), "_rules_python_workspace": attr.label(default = Label("//:WORKSPACE")), }, @@ -336,16 +319,12 @@ def _multi_toolchain_aliases_impl(rctx): load( "@{repository_name}//:defs.bzl", _compile_pip_requirements = "compile_pip_requirements", - _host_platform = "host_platform", - _interpreter = "interpreter", _py_binary = "py_binary", _py_console_script_binary = "py_console_script_binary", _py_test = "py_test", ) compile_pip_requirements = _compile_pip_requirements -host_platform = _host_platform -interpreter = _interpreter py_binary = _py_binary py_console_script_binary = _py_console_script_binary py_test = _py_test @@ -388,57 +367,51 @@ multi_toolchain_aliases = repository_rule( def sanitize_platform_name(platform): return platform.replace("-", "_") -def _get_host_platform(os_name, arch): +def _get_host_platform(*, rctx, logger, python_version, os_name, cpu_name, platforms): """Gets the host platform. Args: - os_name: the host OS name. - arch: the host arch. + rctx: {type}`repository_ctx`. + logger: {type}`struct`. + python_version: {type}`string`. + os_name: {type}`str` the host OS name. + cpu_name: {type}`str` the host CPU name. + platforms: {type}`list[str]` the list of loaded platforms. Returns: The host platform. """ - host_platform = None - for platform, meta in PLATFORMS.items(): - if "freethreaded" in platform: - continue - - if meta.os_name == os_name and meta.arch == arch: - host_platform = platform - if not host_platform: - fail("No platform declared for host OS {} on arch {}".format(os_name, arch)) - return host_platform + candidates = [] + for platform in platforms: + meta = PLATFORMS[platform] -def _get_host_os_arch(rctx, logger): - """Infer the host OS name and arch from a repository context. + if meta.os_name == os_name and meta.arch == cpu_name: + candidates.append(platform) - Args: - rctx: Bazel's repository_ctx. - logger: Logger to use for operations. + if len(candidates) == 1: + return candidates[0] - Returns: - A tuple with the host OS name and arch. - """ - os_name = rctx.os.name - - # We assume the arch for Windows is always x86_64. - if "windows" in os_name.lower(): - arch = "x86_64" - - # Normalize the os_name. E.g. os_name could be "OS windows server 2019". - os_name = WINDOWS_NAME - else: - # This is not ideal, but bazel doesn't directly expose arch. - arch = repo_utils.execute_unchecked( - rctx, - op = "GetUname", - arguments = [repo_utils.which_checked(rctx, "uname"), "-m"], - logger = logger, - ).stdout.strip() - - # Normalize the os_name. - if "mac" in os_name.lower(): - os_name = MACOS_NAME - elif "linux" in os_name.lower(): - os_name = LINUX_NAME - - return (os_name, arch) + if candidates: + env_var = "RULES_PYTHON_REPO_TOOLCHAIN_{}_{}_{}".format( + python_version.replace(".", "_"), + os_name.upper(), + cpu_name.upper(), + ) + preference = repo_utils.getenv(rctx, env_var) + if preference == None: + logger.info("Consider using '{}' to select from one of the platforms: {}".format( + env_var, + candidates, + )) + elif preference not in candidates: + return logger.fail("Please choose a preferred interpreter out of the following platforms: {}".format(candidates)) + else: + candidates = [preference] + + if candidates: + return candidates[0] + + return logger.fail("Could not find a compatible 'host' python for '{os_name}', '{cpu_name}' from the loaded platforms: {platforms}".format( + os_name = os_name, + cpu_name = cpu_name, + platforms = platforms, + )) diff --git a/python/versions.bzl b/python/versions.bzl index 688c4e2ceb..d229b9d1db 100644 --- a/python/versions.bzl +++ b/python/versions.bzl @@ -15,8 +15,8 @@ """The Python versions we use for the toolchains. """ -# Values returned by https://bazel.build/rules/lib/repository_os. -MACOS_NAME = "mac os" +# Values present in the @platforms//os package +MACOS_NAME = "osx" LINUX_NAME = "linux" WINDOWS_NAME = "windows" FREETHREADED = "freethreaded" @@ -620,9 +620,8 @@ def _generate_platforms(): ], flag_values = {}, os_name = MACOS_NAME, - # Matches the value returned from: - # repository_ctx.execute(["uname", "-m"]).stdout.strip() - arch = "arm64", + # Matches the value in @platforms//cpu package + arch = "aarch64", ), "aarch64-unknown-linux-gnu": struct( compatible_with = [ @@ -633,9 +632,7 @@ def _generate_platforms(): libc: "glibc", }, os_name = LINUX_NAME, - # Note: this string differs between OSX and Linux - # Matches the value returned from: - # repository_ctx.execute(["uname", "-m"]).stdout.strip() + # Matches the value in @platforms//cpu package arch = "aarch64", ), "armv7-unknown-linux-gnu": struct( @@ -647,7 +644,8 @@ def _generate_platforms(): libc: "glibc", }, os_name = LINUX_NAME, - arch = "armv7", + # Matches the value in @platforms//cpu package + arch = "arm", ), "i386-unknown-linux-gnu": struct( compatible_with = [ @@ -658,7 +656,8 @@ def _generate_platforms(): libc: "glibc", }, os_name = LINUX_NAME, - arch = "i386", + # Matches the value in @platforms//cpu package + arch = "x86_32", ), "ppc64le-unknown-linux-gnu": struct( compatible_with = [ @@ -669,10 +668,8 @@ def _generate_platforms(): libc: "glibc", }, os_name = LINUX_NAME, - # Note: this string differs between OSX and Linux - # Matches the value returned from: - # repository_ctx.execute(["uname", "-m"]).stdout.strip() - arch = "ppc64le", + # Matches the value in @platforms//cpu package + arch = "ppc", ), "riscv64-unknown-linux-gnu": struct( compatible_with = [ @@ -683,6 +680,7 @@ def _generate_platforms(): Label("//python/config_settings:py_linux_libc"): "glibc", }, os_name = LINUX_NAME, + # Matches the value in @platforms//cpu package arch = "riscv64", ), "s390x-unknown-linux-gnu": struct( @@ -694,9 +692,7 @@ def _generate_platforms(): Label("//python/config_settings:py_linux_libc"): "glibc", }, os_name = LINUX_NAME, - # Note: this string differs between OSX and Linux - # Matches the value returned from: - # repository_ctx.execute(["uname", "-m"]).stdout.strip() + # Matches the value in @platforms//cpu package arch = "s390x", ), "x86_64-apple-darwin": struct( @@ -706,6 +702,7 @@ def _generate_platforms(): ], flag_values = {}, os_name = MACOS_NAME, + # Matches the value in @platforms//cpu package arch = "x86_64", ), "x86_64-pc-windows-msvc": struct( @@ -715,6 +712,7 @@ def _generate_platforms(): ], flag_values = {}, os_name = WINDOWS_NAME, + # Matches the value in @platforms//cpu package arch = "x86_64", ), "x86_64-unknown-linux-gnu": struct( @@ -726,6 +724,7 @@ def _generate_platforms(): libc: "glibc", }, os_name = LINUX_NAME, + # Matches the value in @platforms//cpu package arch = "x86_64", ), } diff --git a/tests/integration/compile_pip_requirements_test_from_external_repo/WORKSPACE b/tests/integration/compile_pip_requirements_test_from_external_repo/WORKSPACE index 48caeb442f..7834000854 100644 --- a/tests/integration/compile_pip_requirements_test_from_external_repo/WORKSPACE +++ b/tests/integration/compile_pip_requirements_test_from_external_repo/WORKSPACE @@ -12,7 +12,6 @@ python_register_toolchains( python_version = "3.9", ) -load("@python39//:defs.bzl", "interpreter") load("@rules_python//python:pip.bzl", "pip_parse") local_repository( @@ -22,7 +21,7 @@ local_repository( pip_parse( name = "pypi", - python_interpreter_target = interpreter, + python_interpreter_target = "@python39_host//:python", requirements_lock = "@compile_pip_requirements//:requirements_lock.txt", ) From f88e083e0f7659126d34d2249c7f89bea66db94b Mon Sep 17 00:00:00 2001 From: "Elvis M. Wianda" <7077790+ewianda@users.noreply.github.com> Date: Sun, 17 Nov 2024 22:10:40 -0500 Subject: [PATCH 13/18] fix(pypi): handle multiple versions of the same package when parsing requirements files (#2377) This change makes it possible to handle local versions of packages, which is extremely useful with PyTorch. With this change, it is possible to have different local versions of the same package in the `requirements.txt` file translated to valid `whl_library` repositories. Fixes #2337 --- .bazelrc | 4 +- CHANGELOG.md | 3 ++ examples/bzlmod/MODULE.bazel.lock | 4 +- python/private/pypi/parse_requirements.bzl | 16 ++++++- .../parse_requirements_tests.bzl | 46 +++++++++++++++++++ 5 files changed, 68 insertions(+), 5 deletions(-) diff --git a/.bazelrc b/.bazelrc index c44124d961..66a644e289 100644 --- a/.bazelrc +++ b/.bazelrc @@ -4,8 +4,8 @@ # (Note, we cannot use `common --deleted_packages` because the bazel version command doesn't support it) # To update these lines, execute # `bazel run @rules_bazel_integration_test//tools:update_deleted_packages` -build --deleted_packages=examples/build_file_generation,examples/build_file_generation/random_number_generator,examples/bzlmod,examples/bzlmod_build_file_generation,examples/bzlmod_build_file_generation/other_module/other_module/pkg,examples/bzlmod_build_file_generation/runfiles,examples/bzlmod/entry_points,examples/bzlmod/entry_points/tests,examples/bzlmod/libs/my_lib,examples/bzlmod/other_module,examples/bzlmod/other_module/other_module/pkg,examples/bzlmod/patches,examples/bzlmod/py_proto_library,examples/bzlmod/py_proto_library/example.com/another_proto,examples/bzlmod/py_proto_library/example.com/proto,examples/bzlmod/runfiles,examples/bzlmod/tests,examples/bzlmod/tests/other_module,examples/bzlmod/whl_mods,examples/multi_python_versions/libs/my_lib,examples/multi_python_versions/requirements,examples/multi_python_versions/tests,examples/pip_parse,examples/pip_parse_vendored,examples/pip_repository_annotations,examples/py_proto_library,examples/py_proto_library/example.com/another_proto,examples/py_proto_library/example.com/proto,gazelle,gazelle/manifest,gazelle/manifest/generate,gazelle/manifest/hasher,gazelle/manifest/test,gazelle/modules_mapping,gazelle/python,gazelle/pythonconfig,gazelle/python/private,tests/integration/compile_pip_requirements,tests/integration/compile_pip_requirements_test_from_external_repo,tests/integration/custom_commands,tests/integration/ignore_root_user_error,tests/integration/ignore_root_user_error/submodule,tests/integration/local_toolchains,tests/integration/pip_parse,tests/integration/pip_parse/empty,tests/integration/py_cc_toolchain_registered -query --deleted_packages=examples/build_file_generation,examples/build_file_generation/random_number_generator,examples/bzlmod,examples/bzlmod_build_file_generation,examples/bzlmod_build_file_generation/other_module/other_module/pkg,examples/bzlmod_build_file_generation/runfiles,examples/bzlmod/entry_points,examples/bzlmod/entry_points/tests,examples/bzlmod/libs/my_lib,examples/bzlmod/other_module,examples/bzlmod/other_module/other_module/pkg,examples/bzlmod/patches,examples/bzlmod/py_proto_library,examples/bzlmod/py_proto_library/example.com/another_proto,examples/bzlmod/py_proto_library/example.com/proto,examples/bzlmod/runfiles,examples/bzlmod/tests,examples/bzlmod/tests/other_module,examples/bzlmod/whl_mods,examples/multi_python_versions/libs/my_lib,examples/multi_python_versions/requirements,examples/multi_python_versions/tests,examples/pip_parse,examples/pip_parse_vendored,examples/pip_repository_annotations,examples/py_proto_library,examples/py_proto_library/example.com/another_proto,examples/py_proto_library/example.com/proto,gazelle,gazelle/manifest,gazelle/manifest/generate,gazelle/manifest/hasher,gazelle/manifest/test,gazelle/modules_mapping,gazelle/python,gazelle/pythonconfig,gazelle/python/private,tests/integration/compile_pip_requirements,tests/integration/compile_pip_requirements_test_from_external_repo,tests/integration/custom_commands,tests/integration/ignore_root_user_error,tests/integration/ignore_root_user_error/submodule,tests/integration/local_toolchains,tests/integration/pip_parse,tests/integration/pip_parse/empty,tests/integration/py_cc_toolchain_registered +build --deleted_packages=examples/build_file_generation,examples/build_file_generation/random_number_generator,examples/bzlmod,examples/bzlmod/entry_points,examples/bzlmod/entry_points/tests,examples/bzlmod/libs/my_lib,examples/bzlmod/other_module,examples/bzlmod/other_module/other_module/pkg,examples/bzlmod/patches,examples/bzlmod/py_proto_library,examples/bzlmod/py_proto_library/example.com/another_proto,examples/bzlmod/py_proto_library/example.com/proto,examples/bzlmod/runfiles,examples/bzlmod/tests,examples/bzlmod/tests/other_module,examples/bzlmod/whl_mods,examples/bzlmod_build_file_generation,examples/bzlmod_build_file_generation/other_module/other_module/pkg,examples/bzlmod_build_file_generation/runfiles,examples/multi_python_versions/libs/my_lib,examples/multi_python_versions/requirements,examples/multi_python_versions/tests,examples/pip_parse,examples/pip_parse_vendored,examples/pip_repository_annotations,examples/py_proto_library,examples/py_proto_library/example.com/another_proto,examples/py_proto_library/example.com/proto,gazelle,gazelle/manifest,gazelle/manifest/generate,gazelle/manifest/hasher,gazelle/manifest/test,gazelle/modules_mapping,gazelle/python,gazelle/python/private,gazelle/pythonconfig,tests/integration/compile_pip_requirements,tests/integration/compile_pip_requirements_test_from_external_repo,tests/integration/custom_commands,tests/integration/ignore_root_user_error,tests/integration/ignore_root_user_error/submodule,tests/integration/local_toolchains,tests/integration/pip_parse,tests/integration/pip_parse/empty,tests/integration/py_cc_toolchain_registered +query --deleted_packages=examples/build_file_generation,examples/build_file_generation/random_number_generator,examples/bzlmod,examples/bzlmod/entry_points,examples/bzlmod/entry_points/tests,examples/bzlmod/libs/my_lib,examples/bzlmod/other_module,examples/bzlmod/other_module/other_module/pkg,examples/bzlmod/patches,examples/bzlmod/py_proto_library,examples/bzlmod/py_proto_library/example.com/another_proto,examples/bzlmod/py_proto_library/example.com/proto,examples/bzlmod/runfiles,examples/bzlmod/tests,examples/bzlmod/tests/other_module,examples/bzlmod/whl_mods,examples/bzlmod_build_file_generation,examples/bzlmod_build_file_generation/other_module/other_module/pkg,examples/bzlmod_build_file_generation/runfiles,examples/multi_python_versions/libs/my_lib,examples/multi_python_versions/requirements,examples/multi_python_versions/tests,examples/pip_parse,examples/pip_parse_vendored,examples/pip_repository_annotations,examples/py_proto_library,examples/py_proto_library/example.com/another_proto,examples/py_proto_library/example.com/proto,gazelle,gazelle/manifest,gazelle/manifest/generate,gazelle/manifest/hasher,gazelle/manifest/test,gazelle/modules_mapping,gazelle/python,gazelle/python/private,gazelle/pythonconfig,tests/integration/compile_pip_requirements,tests/integration/compile_pip_requirements_test_from_external_repo,tests/integration/custom_commands,tests/integration/ignore_root_user_error,tests/integration/ignore_root_user_error/submodule,tests/integration/local_toolchains,tests/integration/pip_parse,tests/integration/pip_parse/empty,tests/integration/py_cc_toolchain_registered test --test_output=errors diff --git a/CHANGELOG.md b/CHANGELOG.md index 16ea38b3ca..65504b357b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -75,6 +75,9 @@ Other changes: {#v0-0-0-fixed} ### Fixed * (toolchains) stop depending on `uname` to get the value of the host platform. +* (pypi): Correctly handle multiple versions of the same package in the requirements + files which is useful when including different PyTorch builds (e.g. vs ) for different target platforms. + Fixes ([2337](https://github.com/bazelbuild/rules_python/issues/2337)). {#v0-0-0-added} ### Added diff --git a/examples/bzlmod/MODULE.bazel.lock b/examples/bzlmod/MODULE.bazel.lock index 8bad32a07b..51d23098f7 100644 --- a/examples/bzlmod/MODULE.bazel.lock +++ b/examples/bzlmod/MODULE.bazel.lock @@ -1562,7 +1562,7 @@ }, "@@rules_python~//python/extensions:pip.bzl%pip": { "general": { - "bzlTransitiveDigest": "mCwiXbsZmReVgs884fZHYfxaZaL9mFG+prEnH/lpE9g=", + "bzlTransitiveDigest": "pwyX8REqPzcGLCGxpBHKvPiXm+kZooA+w1EfP3jA0Dc=", "usagesDigest": "VmrNvB/4EhzsYieLDka9584M+pYKPpjNLl3Wcb5rx/c=", "recordedFileInputs": { "@@//requirements_lock_3_10.txt": "5e7083982a7e60f34998579a0ae83b520d46ab8f2552cc51337217f024e6def5", @@ -7035,7 +7035,7 @@ }, "@@rules_python~//python/private/pypi:pip.bzl%pip_internal": { "general": { - "bzlTransitiveDigest": "Xu1N6572iHVqGChH12PpMhprC21k3CpjRZVpm3FmE2c=", + "bzlTransitiveDigest": "XbkLEmpZ7PqBehe0QCZ4xvdtEesh5rpQLTvZg/+zWyI=", "usagesDigest": "/lZXl/ZgP+u5PE8WkeWTyYBsvX9XQWFn1antj5qrBzQ=", "recordedFileInputs": { "@@rules_python~//tools/publish/requirements_linux.txt": "8175b4c8df50ae2f22d1706961884beeb54e7da27bd2447018314a175981997d", diff --git a/python/private/pypi/parse_requirements.bzl b/python/private/pypi/parse_requirements.bzl index a43217dbc2..133ed18db8 100644 --- a/python/private/pypi/parse_requirements.bzl +++ b/python/private/pypi/parse_requirements.bzl @@ -32,6 +32,20 @@ load(":index_sources.bzl", "index_sources") load(":parse_requirements_txt.bzl", "parse_requirements_txt") load(":whl_target_platforms.bzl", "select_whls") +def _extract_version(entry): + """Extract the version part from the requirement string. + + + Args: + entry: {type}`str` The requirement string. + """ + version_start = entry.find("==") + if version_start != -1: + # Extract everything after '==' until the next space or end of the string + version, _, _ = entry[version_start + 2:].partition(" ") + return version + return None + def parse_requirements( ctx, *, @@ -92,7 +106,7 @@ def parse_requirements( # are returned as just the base package name. e.g., `foo[bar]` results # in an entry like `("foo", "foo[bar] == 1.0 ...")`. requirements_dict = { - normalize_name(entry[0]): entry + (normalize_name(entry[0]), _extract_version(entry[1])): entry for entry in sorted( parse_result.requirements, # Get the longest match and fallback to original WORKSPACE sorting, diff --git a/tests/pypi/parse_requirements/parse_requirements_tests.bzl b/tests/pypi/parse_requirements/parse_requirements_tests.bzl index a6e17bebec..dfa1fef5c3 100644 --- a/tests/pypi/parse_requirements/parse_requirements_tests.bzl +++ b/tests/pypi/parse_requirements/parse_requirements_tests.bzl @@ -19,6 +19,10 @@ load("//python/private/pypi:parse_requirements.bzl", "parse_requirements", "sele def _mock_ctx(): testdata = { + "requirements_different_package_version": """\ +foo==0.0.1+local --hash=sha256:deadbeef +foo==0.0.1 --hash=sha256:deadb00f +""", "requirements_direct": """\ foo[extra] @ https://some-url """, @@ -382,6 +386,48 @@ def _test_env_marker_resolution(env): _tests.append(_test_env_marker_resolution) +def _test_different_package_version(env): + got = parse_requirements( + ctx = _mock_ctx(), + requirements_by_platform = { + "requirements_different_package_version": ["linux_x86_64"], + }, + ) + env.expect.that_dict(got).contains_exactly({ + "foo": [ + struct( + distribution = "foo", + extra_pip_args = [], + requirement_line = "foo==0.0.1 --hash=sha256:deadb00f", + srcs = struct( + requirement = "foo==0.0.1", + shas = ["deadb00f"], + version = "0.0.1", + ), + target_platforms = ["linux_x86_64"], + whls = [], + sdist = None, + is_exposed = True, + ), + struct( + distribution = "foo", + extra_pip_args = [], + requirement_line = "foo==0.0.1+local --hash=sha256:deadbeef", + srcs = struct( + requirement = "foo==0.0.1+local", + shas = ["deadbeef"], + version = "0.0.1+local", + ), + target_platforms = ["linux_x86_64"], + whls = [], + sdist = None, + is_exposed = True, + ), + ], + }) + +_tests.append(_test_different_package_version) + def parse_requirements_test_suite(name): """Create the test suite. From 0e9f97dad945ef2a954d199a94516f30e18c036d Mon Sep 17 00:00:00 2001 From: Mark Schulte Date: Mon, 18 Nov 2024 00:01:56 -0800 Subject: [PATCH 14/18] fix(uv): Fix sha256 for uv binary for aarch64-apple-darwin (#2422) `uv` cannot be used on aarch64-apple-darwin computers because the sha256sum is incorrect. The correct version can be seen [here](https://github.com/astral-sh/uv/releases/download/0.4.25/uv-aarch64-apple-darwin.tar.gz.sha256). Fixes #2411 --- CHANGELOG.md | 2 ++ examples/bzlmod/MODULE.bazel.lock | 2 +- python/uv/private/versions.bzl | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 65504b357b..157be3e762 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -78,6 +78,8 @@ Other changes: * (pypi): Correctly handle multiple versions of the same package in the requirements files which is useful when including different PyTorch builds (e.g. vs ) for different target platforms. Fixes ([2337](https://github.com/bazelbuild/rules_python/issues/2337)). +* (uv): Correct the sha256sum for the `uv` binary for aarch64-apple-darwin. + Fixes ([2411](https://github.com/bazelbuild/rules_python/issues/2411)). {#v0-0-0-added} ### Added diff --git a/examples/bzlmod/MODULE.bazel.lock b/examples/bzlmod/MODULE.bazel.lock index 51d23098f7..59d04d8320 100644 --- a/examples/bzlmod/MODULE.bazel.lock +++ b/examples/bzlmod/MODULE.bazel.lock @@ -9623,7 +9623,7 @@ }, "@@rules_python~//python/uv:extensions.bzl%uv": { "general": { - "bzlTransitiveDigest": "umgu1yR4Wmqb1pJa+9hAcs9dPbeqBsPLceKiaEg3DdQ=", + "bzlTransitiveDigest": "wVkXn96Vi6Bn1BRJ4R0bOAbUFvh4k54kimcXSd11Y3g=", "usagesDigest": "wWx9DCrTsAgJQmDRUcO+EJrPKJEDsXpZbjzC0HVdde0=", "recordedFileInputs": {}, "recordedDirentsInputs": {}, diff --git a/python/uv/private/versions.bzl b/python/uv/private/versions.bzl index f13eae5cee..1d68302c74 100644 --- a/python/uv/private/versions.bzl +++ b/python/uv/private/versions.bzl @@ -70,7 +70,7 @@ UV_PLATFORMS = { UV_TOOL_VERSIONS = { "0.4.25": { "aarch64-apple-darwin": struct( - sha256 = "35786030f926e3d34d186edc0ea3989698e57755852af9ae4b39da5109abcbfa", + sha256 = "bb2ff4348114ef220ca52e44d5086640c4a1a18f797a5f1ab6f8559fc37b1230", ), "aarch64-unknown-linux-gnu": struct( sha256 = "4485852eb8013530c4275cd222c0056ce123f92742321f012610f1b241463f39", From e7c306de56860d5bd4693628c0f51d056698a82d Mon Sep 17 00:00:00 2001 From: Ignas Anikevicius <240938+aignas@users.noreply.github.com> Date: Mon, 18 Nov 2024 17:57:05 +0900 Subject: [PATCH 15/18] feat(musl): add musl toolchain (#2402) With this and the previously landed #2406 users can use this in `sdist` or `whl`-only setups alike. The PR itself is very simple and just adds `musl` toolchains. Whilst at it also move the `WhlLibc` flag out of the `pypi` namespace since it is also used for `toolchain` matching now. Fixes #1211 --- CHANGELOG.md | 4 ++++ docs/toolchains.md | 7 +++++++ python/config_settings/BUILD.bazel | 6 +++--- python/private/flags.bzl | 11 +++++++++++ python/private/pypi/config_settings.bzl | 13 +++++++------ python/private/pypi/flags.bzl | 10 ---------- python/versions.bzl | 17 +++++++++++++++++ 7 files changed, 49 insertions(+), 19 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 157be3e762..4a73766d7f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -90,6 +90,10 @@ Other changes: `RULES_PYTHON_REPO_TOOLCHAIN_{VERSION}_{OS}_{ARCH}` env variable setting. For example, this allows one to use `freethreaded` python interpreter in the `repository_rule` to build a wheel from `sdist`. +* (toolchain) The python interpreters targeting `muslc` libc have been added + for the latest toolchain versions for each minor Python version. You can control + the toolchain selection by using the + {bzl:obj}`//python/config_settings:py_linux_libc` build flag. {#v0-0-0-removed} ### Removed diff --git a/docs/toolchains.md b/docs/toolchains.md index 6df6f22a2a..d6c59544a8 100644 --- a/docs/toolchains.md +++ b/docs/toolchains.md @@ -451,3 +451,10 @@ The toolchain() calls should be in a separate BUILD file from everything else. This avoids Bazel having to perform unnecessary work when it discovers the list of available toolchains. ::: + +## Toolchain selection flags + +Currently the following flags are used to influence toolchain selection: +* {obj}`--@rules_python//python/config_settings:py_linux_libc` for selecting the Linux libc variant. +* {obj}`--@rules_python//python/config_settings:py_freethreaded` for selecting + the freethreaded experimental Python builds available from `3.13.0` onwards. diff --git a/python/config_settings/BUILD.bazel b/python/config_settings/BUILD.bazel index 6d34ee95c7..aa26e6e669 100644 --- a/python/config_settings/BUILD.bazel +++ b/python/config_settings/BUILD.bazel @@ -6,6 +6,7 @@ load( "BootstrapImplFlag", "ExecToolsToolchainFlag", "FreeThreadedFlag", + "LibcFlag", "PrecompileFlag", "PrecompileSourceRetentionFlag", ) @@ -13,7 +14,6 @@ load( "//python/private/pypi:flags.bzl", "UniversalWhlFlag", "UseWhlFlag", - "WhlLibcFlag", "define_pypi_internal_flags", ) load(":config_settings.bzl", "construct_config_settings") @@ -87,8 +87,8 @@ string_flag( # This is used for pip and hermetic toolchain resolution. string_flag( name = "py_linux_libc", - build_setting_default = WhlLibcFlag.GLIBC, - values = sorted(WhlLibcFlag.__members__.values()), + build_setting_default = LibcFlag.GLIBC, + values = LibcFlag.flag_values(), # NOTE: Only public because it is used in pip hub and toolchain repos. visibility = ["//visibility:public"], ) diff --git a/python/private/flags.bzl b/python/private/flags.bzl index 5239771d7e..9070f113ac 100644 --- a/python/private/flags.bzl +++ b/python/private/flags.bzl @@ -132,3 +132,14 @@ FreeThreadedFlag = enum( # Do not use freethreaded python toolchain and wheels. NO = "no", ) + +# Determines which libc flavor is preferred when selecting the toolchain and +# linux whl distributions. +# +# buildifier: disable=name-conventions +LibcFlag = FlagEnum( + # Prefer glibc wheels (e.g. manylinux_2_17_x86_64 or linux_x86_64) + GLIBC = "glibc", + # Prefer musl wheels (e.g. musllinux_2_17_x86_64) + MUSL = "musl", +) diff --git a/python/private/pypi/config_settings.bzl b/python/private/pypi/config_settings.bzl index 9f3f4d4e48..6f927f2a4c 100644 --- a/python/private/pypi/config_settings.bzl +++ b/python/private/pypi/config_settings.bzl @@ -39,7 +39,8 @@ Note, that here the specialization of musl vs manylinux wheels is the same in order to ensure that the matching fails if the user requests for `musl` and we don't have it or vice versa. """ -load(":flags.bzl", "INTERNAL_FLAGS", "UniversalWhlFlag", "WhlLibcFlag") +load("//python/private:flags.bzl", "LibcFlag") +load(":flags.bzl", "INTERNAL_FLAGS", "UniversalWhlFlag") FLAGS = struct( **{ @@ -251,14 +252,14 @@ def _plat_flag_values(os, cpu, osx_versions, glibc_versions, muslc_versions): elif os == "linux": for os_prefix, linux_libc in { - os: WhlLibcFlag.GLIBC, - "many" + os: WhlLibcFlag.GLIBC, - "musl" + os: WhlLibcFlag.MUSL, + os: LibcFlag.GLIBC, + "many" + os: LibcFlag.GLIBC, + "musl" + os: LibcFlag.MUSL, }.items(): - if linux_libc == WhlLibcFlag.GLIBC: + if linux_libc == LibcFlag.GLIBC: libc_versions = glibc_versions libc_flag = FLAGS.pip_whl_glibc_version - elif linux_libc == WhlLibcFlag.MUSL: + elif linux_libc == LibcFlag.MUSL: libc_versions = muslc_versions libc_flag = FLAGS.pip_whl_muslc_version else: diff --git a/python/private/pypi/flags.bzl b/python/private/pypi/flags.bzl index 1e380625ce..11727b5853 100644 --- a/python/private/pypi/flags.bzl +++ b/python/private/pypi/flags.bzl @@ -44,16 +44,6 @@ UniversalWhlFlag = enum( UNIVERSAL = "universal", ) -# Determines which libc flavor is preferred when selecting the linux whl distributions. -# -# buildifier: disable=name-conventions -WhlLibcFlag = enum( - # Prefer glibc wheels (e.g. manylinux_2_17_x86_64 or linux_x86_64) - GLIBC = "glibc", - # Prefer musl wheels (e.g. musllinux_2_17_x86_64) - MUSL = "musl", -) - INTERNAL_FLAGS = [ "dist", "whl_plat", diff --git a/python/versions.bzl b/python/versions.bzl index d229b9d1db..1fd0649f12 100644 --- a/python/versions.bzl +++ b/python/versions.bzl @@ -248,6 +248,7 @@ TOOL_VERSIONS = { "x86_64-apple-darwin": "193dc7f0284e4917d52b17a077924474882ee172872f2257cfe3375d6d468ed9", "x86_64-pc-windows-msvc": "5069008a237b90f6f7a86956903f2a0221b90d471daa6e4a94831eaa399e3993", "x86_64-unknown-linux-gnu": "c20ee831f7f46c58fa57919b75a40eb2b6a31e03fd29aaa4e8dab4b9c4b60d5d", + "x86_64-unknown-linux-musl": "5c1cc348e317fe7af1acd6a7f665b46eccb554b20d6533f0e76c53f44d4556cc", }, "strip_prefix": "python", }, @@ -367,6 +368,7 @@ TOOL_VERSIONS = { "x86_64-apple-darwin": "90b46dfb1abd98d45663c7a2a8c45d3047a59391d8586d71b459cec7b75f662b", "x86_64-pc-windows-msvc": "e48952619796c66ec9719867b87be97edca791c2ef7fbf87d42c417c3331609e", "x86_64-unknown-linux-gnu": "3db2171e03c1a7acdc599fba583c1b92306d3788b375c9323077367af1e9d9de", + "x86_64-unknown-linux-musl": "ed519c47d9620eb916a6f95ec2875396e7b1a9ab993ee40b2f31b837733f318c", }, "strip_prefix": "python", }, @@ -481,6 +483,7 @@ TOOL_VERSIONS = { "x86_64-apple-darwin": "1e23ffe5bc473e1323ab8f51464da62d77399afb423babf67f8e13c82b69c674", "x86_64-pc-windows-msvc": "647b66ff4552e70aec3bf634dd470891b4a2b291e8e8715b3bdb162f577d4c55", "x86_64-unknown-linux-gnu": "8b50a442b04724a24c1eebb65a36a0c0e833d35374dbdf9c9470d8a97b164cd9", + "x86_64-unknown-linux-musl": "d36fc77a8dd76155a7530f6235999a693b9e7c48aa11afeb5610a091cae5aa6f", }, "strip_prefix": "python", }, @@ -559,6 +562,7 @@ TOOL_VERSIONS = { "x86_64-apple-darwin": "60c5271e7edc3c2ab47440b7abf4ed50fbc693880b474f74f05768f5b657045a", "x86_64-pc-windows-msvc": "f05531bff16fa77b53be0776587b97b466070e768e6d5920894de988bdcd547a", "x86_64-unknown-linux-gnu": "43576f7db1033dd57b900307f09c2e86f371152ac8a2607133afa51cbfc36064", + "x86_64-unknown-linux-musl": "5ed4a4078db3cbac563af66403aaa156cd6e48831d90382a1820db2b120627b5", }, "strip_prefix": "python", }, @@ -572,6 +576,7 @@ TOOL_VERSIONS = { "x86_64-apple-darwin": "cff1b7e7cd26f2d47acac1ad6590e27d29829776f77e8afa067e9419f2f6ce77", "x86_64-pc-windows-msvc": "b25926e8ce4164cf103bacc4f4d154894ea53e07dd3fdd5ebb16fb1a82a7b1a0", "x86_64-unknown-linux-gnu": "2c8cb15c6a2caadaa98af51df6fe78a8155b8471cb3dd7b9836038e0d3657fb4", + "x86_64-unknown-linux-musl": "2f61ee3b628a56aceea63b46c7afe2df3e22a61da706606b0c8efda57f953cf4", "aarch64-apple-darwin-freethreaded": "efc2e71c0e05bc5bedb7a846e05f28dd26491b1744ded35ed82f8b49ccfa684b", "aarch64-unknown-linux-gnu-freethreaded": "59b50df9826475d24bb7eff781fa3949112b5e9c92adb29e96a09cdf1216d5bd", "ppc64le-unknown-linux-gnu-freethreaded": "1217efa5f4ce67fcc9f7eb64165b1bd0912b2a21bc25c1a7e2cb174a21a5df7e", @@ -588,6 +593,7 @@ TOOL_VERSIONS = { "x86_64-apple-darwin": "python", "x86_64-pc-windows-msvc": "python", "x86_64-unknown-linux-gnu": "python", + "x86_64-unknown-linux-musl": "python", "aarch64-apple-darwin-freethreaded": "python/install", "aarch64-unknown-linux-gnu-freethreaded": "python/install", "ppc64le-unknown-linux-gnu-freethreaded": "python/install", @@ -727,6 +733,17 @@ def _generate_platforms(): # Matches the value in @platforms//cpu package arch = "x86_64", ), + "x86_64-unknown-linux-musl": struct( + compatible_with = [ + "@platforms//os:linux", + "@platforms//cpu:x86_64", + ], + flag_values = { + libc: "musl", + }, + os_name = LINUX_NAME, + arch = "x86_64", + ), } freethreaded = Label("//python/config_settings:py_freethreaded") From 9766cb680e0645a9345facbcf08794a589f4aacc Mon Sep 17 00:00:00 2001 From: Ignas Anikevicius <240938+aignas@users.noreply.github.com> Date: Mon, 18 Nov 2024 17:58:58 +0900 Subject: [PATCH 16/18] chore: extra code removals before 1.0 (#2421) Alternatives have existed for a long time and we just ensure that we remove before the 1.0 release. Summary: - remove pip_install_dependencies - remove DEFAULT_PYTHON_VERSION from interpreters.bzl Work towards #1361 --- CHANGELOG.md | 5 ++++- examples/bzlmod/MODULE.bazel.lock | 4 ++-- python/pip_install/BUILD.bazel | 8 -------- python/pip_install/repositories.bzl | 19 ------------------- python/private/pythons_hub.bzl | 3 --- tests/integration/pip_parse/WORKSPACE | 9 --------- 6 files changed, 6 insertions(+), 42 deletions(-) delete mode 100644 python/pip_install/repositories.bzl diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a73766d7f..4c6a08db2c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -97,7 +97,10 @@ Other changes: {#v0-0-0-removed} ### Removed -* Nothing removed. +* (pypi): Remove `pypi_install_dependencies` macro that has been included in + {bzl:obj}`py_repositories` for a long time. +* (bzlmod): Remove `DEFAULT_PYTHON_VERSION` from `interpreters.bzl` file. If + you need the version, please use it from the `versions.bzl` file instead. {#v0-40-0} ## [0.40.0] - 2024-11-17 diff --git a/examples/bzlmod/MODULE.bazel.lock b/examples/bzlmod/MODULE.bazel.lock index 59d04d8320..9cad5952d7 100644 --- a/examples/bzlmod/MODULE.bazel.lock +++ b/examples/bzlmod/MODULE.bazel.lock @@ -1562,7 +1562,7 @@ }, "@@rules_python~//python/extensions:pip.bzl%pip": { "general": { - "bzlTransitiveDigest": "pwyX8REqPzcGLCGxpBHKvPiXm+kZooA+w1EfP3jA0Dc=", + "bzlTransitiveDigest": "i5dWUNj1rZ4NKXmzLiGceV+1gAsDWtpJED1w1tdB7WY=", "usagesDigest": "VmrNvB/4EhzsYieLDka9584M+pYKPpjNLl3Wcb5rx/c=", "recordedFileInputs": { "@@//requirements_lock_3_10.txt": "5e7083982a7e60f34998579a0ae83b520d46ab8f2552cc51337217f024e6def5", @@ -7035,7 +7035,7 @@ }, "@@rules_python~//python/private/pypi:pip.bzl%pip_internal": { "general": { - "bzlTransitiveDigest": "XbkLEmpZ7PqBehe0QCZ4xvdtEesh5rpQLTvZg/+zWyI=", + "bzlTransitiveDigest": "ltVKFX5LXgwSpZtjuyF02xZspYIWHEFmpxmzvnyMbQ8=", "usagesDigest": "/lZXl/ZgP+u5PE8WkeWTyYBsvX9XQWFn1antj5qrBzQ=", "recordedFileInputs": { "@@rules_python~//tools/publish/requirements_linux.txt": "8175b4c8df50ae2f22d1706961884beeb54e7da27bd2447018314a175981997d", diff --git a/python/pip_install/BUILD.bazel b/python/pip_install/BUILD.bazel index 683199f807..09bc46eea7 100644 --- a/python/pip_install/BUILD.bazel +++ b/python/pip_install/BUILD.bazel @@ -35,14 +35,6 @@ bzl_library( deps = ["//python/private/pypi:pip_compile_bzl"], ) -bzl_library( - name = "repositories_bzl", - srcs = ["repositories.bzl"], - deps = [ - "//python/private/pypi:deps_bzl", - ], -) - filegroup( name = "distribution", srcs = glob(["**"]), diff --git a/python/pip_install/repositories.bzl b/python/pip_install/repositories.bzl deleted file mode 100644 index 5231d1f0a1..0000000000 --- a/python/pip_install/repositories.bzl +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright 2023 The Bazel Authors. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"" - -load("//python/private/pypi:deps.bzl", "pypi_deps") - -pip_install_dependencies = pypi_deps diff --git a/python/private/pythons_hub.bzl b/python/private/pythons_hub.bzl index 8afee5af17..ac928ffc96 100644 --- a/python/private/pythons_hub.bzl +++ b/python/private/pythons_hub.bzl @@ -86,7 +86,6 @@ _interpreters_bzl_template = """ INTERPRETER_LABELS = {{ {interpreter_labels} }} -DEFAULT_PYTHON_VERSION = "{default_python_version}" """ _line_for_hub_template = """\ @@ -125,8 +124,6 @@ def _hub_repo_impl(rctx): rctx.file( "interpreters.bzl", _interpreters_bzl_template.format( - # TODO @aignas 2024-09-28: before 1.0 remove the value from here - default_python_version = rctx.attr.default_python_version, interpreter_labels = interpreter_labels, ), executable = False, diff --git a/tests/integration/pip_parse/WORKSPACE b/tests/integration/pip_parse/WORKSPACE index db0cd0c7c8..e31655dbe4 100644 --- a/tests/integration/pip_parse/WORKSPACE +++ b/tests/integration/pip_parse/WORKSPACE @@ -7,15 +7,6 @@ load("@rules_python//python:repositories.bzl", "py_repositories", "python_regist py_repositories() -# This call is included in `py_repositories` and we are calling -# `pip_install_dependencies` only to ensure that we are not breaking really old -# code. -# -# TODO @aignas 2024-06-23: remove this before 1.0.0 -load("@rules_python//python/pip_install:repositories.bzl", "pip_install_dependencies") - -pip_install_dependencies() - python_register_toolchains( name = "python39", python_version = "3.9", From d52b964e4cb11a9495643fd7da19b0d648705f28 Mon Sep 17 00:00:00 2001 From: Garrett Holmstrom Date: Mon, 18 Nov 2024 16:56:51 -0800 Subject: [PATCH 17/18] feat(pypi): Add extra_hub_aliases to pip_repository too (#2426) The extra_hub_aliases feature from #2369 has bindings in the pip extension for bzlmod users, but not pip_repository for WORKSPACE users. But it _can_ work for either, so this patch moves it to the list of attrs the two share and makes it work with the latter. --------- Co-authored-by: Ignas Anikevicius <240938+aignas@users.noreply.github.com> --- CHANGELOG.md | 1 + examples/bzlmod/MODULE.bazel.lock | 4 ++-- python/private/pypi/attrs.bzl | 10 ++++++++++ python/private/pypi/extension.bzl | 10 ---------- python/private/pypi/pip_repository.bzl | 1 + 5 files changed, 14 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c6a08db2c..f067b4f698 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -71,6 +71,7 @@ Unreleased changes template. Other changes: * (python_repository) Start honoring the `strip_prefix` field for `zstd` archives. +* (pypi) {bzl:obj}`pip_parse.extra_hub_aliases` now works in WORKSPACE files. {#v0-0-0-fixed} ### Fixed diff --git a/examples/bzlmod/MODULE.bazel.lock b/examples/bzlmod/MODULE.bazel.lock index 9cad5952d7..18538d929a 100644 --- a/examples/bzlmod/MODULE.bazel.lock +++ b/examples/bzlmod/MODULE.bazel.lock @@ -1562,7 +1562,7 @@ }, "@@rules_python~//python/extensions:pip.bzl%pip": { "general": { - "bzlTransitiveDigest": "i5dWUNj1rZ4NKXmzLiGceV+1gAsDWtpJED1w1tdB7WY=", + "bzlTransitiveDigest": "c3HURsyNEdAN0fRo5BXiCkhhZSPfl1zNBcQOQbpgJ64=", "usagesDigest": "VmrNvB/4EhzsYieLDka9584M+pYKPpjNLl3Wcb5rx/c=", "recordedFileInputs": { "@@//requirements_lock_3_10.txt": "5e7083982a7e60f34998579a0ae83b520d46ab8f2552cc51337217f024e6def5", @@ -7035,7 +7035,7 @@ }, "@@rules_python~//python/private/pypi:pip.bzl%pip_internal": { "general": { - "bzlTransitiveDigest": "ltVKFX5LXgwSpZtjuyF02xZspYIWHEFmpxmzvnyMbQ8=", + "bzlTransitiveDigest": "H9pnwH6wHRp4Xy2CN6NSo0mDMHFDvpqspLNW6Xbqnhc=", "usagesDigest": "/lZXl/ZgP+u5PE8WkeWTyYBsvX9XQWFn1antj5qrBzQ=", "recordedFileInputs": { "@@rules_python~//tools/publish/requirements_linux.txt": "8175b4c8df50ae2f22d1706961884beeb54e7da27bd2447018314a175981997d", diff --git a/python/private/pypi/attrs.bzl b/python/private/pypi/attrs.bzl index c6132cb6c1..c9b7ea66a9 100644 --- a/python/private/pypi/attrs.bzl +++ b/python/private/pypi/attrs.bzl @@ -141,6 +141,16 @@ Special values: `host` (for generating deps for the host platform only) and NOTE: this is not for cross-compiling Python wheels but rather for parsing the `whl` METADATA correctly. """, ), + "extra_hub_aliases": attr.string_list_dict( + doc = """\ +Extra aliases to make for specific wheels in the hub repo. This is useful when +paired with the {attr}`whl_modifications`. + +:::{versionadded} 0.38.0 +::: +""", + mandatory = False, + ), "extra_pip_args": attr.string_list( doc = """Extra arguments to pass on to pip. Must not contain spaces. diff --git a/python/private/pypi/extension.bzl b/python/private/pypi/extension.bzl index ea2bafdb77..3df7b52e8a 100644 --- a/python/private/pypi/extension.bzl +++ b/python/private/pypi/extension.bzl @@ -750,16 +750,6 @@ The indexes must support Simple API as described here: https://packaging.python.org/en/latest/specifications/simple-repository-api/ """, ), - "extra_hub_aliases": attr.string_list_dict( - doc = """\ -Extra aliases to make for specific wheels in the hub repo. This is useful when -paired with the {attr}`whl_modifications`. - -:::{versionadded} 0.38.0 -::: -""", - mandatory = False, - ), "hub_name": attr.string( mandatory = True, doc = """ diff --git a/python/private/pypi/pip_repository.bzl b/python/private/pypi/pip_repository.bzl index 90cda77465..597b37f52c 100644 --- a/python/private/pypi/pip_repository.bzl +++ b/python/private/pypi/pip_repository.bzl @@ -177,6 +177,7 @@ def _pip_repository_impl(rctx): pkg: [whl_alias(repo = rctx.attr.name + "_" + pkg)] for pkg in bzl_packages or [] }, + extra_hub_aliases = rctx.attr.extra_hub_aliases, ) for path, contents in aliases.items(): rctx.file(path, contents) From b9b0948234216cf43bb898eec078b1c71a37c1f9 Mon Sep 17 00:00:00 2001 From: Ignas Anikevicius <240938+aignas@users.noreply.github.com> Date: Tue, 19 Nov 2024 10:47:56 +0900 Subject: [PATCH 18/18] chore!(pip.parse): remove parse_all_requirements_files attribute (#2407) Remove the deprecated symbol and use the default `pip` extension in `rules_python` to pull `twine` as part of the dependencies. Work towards #1361 Fixes #2268 for all the users by default --- CHANGELOG.md | 4 +- MODULE.bazel | 2 +- examples/bzlmod/MODULE.bazel | 3 - examples/bzlmod/MODULE.bazel.lock | 519 +++++++++++------------------- python/private/pypi/extension.bzl | 103 +----- python/private/pypi/pip.bzl | 3 +- 6 files changed, 197 insertions(+), 437 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f067b4f698..1a1c17d8b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -68,6 +68,8 @@ Unreleased changes template. {bzl:obj}`python_register_toolchains` and {bzl:obj}`python_register_multi_toolchains` macros or the {bzl:obj}`python` bzlmod extension. +* (bzlmod) `pip.parse.parse_all_requirements_files` attribute has been removed. + See notes in the previous versions about what to do. Other changes: * (python_repository) Start honoring the `strip_prefix` field for `zstd` archives. @@ -214,7 +216,7 @@ Other changes: * (bzlmod) The extension evaluation has been adjusted to always generate the same lock file irrespective if `experimental_index_url` is set by any module or not. To opt into this behavior, set - {bzl:obj}`pip.parse.parse_all_requirements_files`, which will become the + `pip.parse.parse_all_requirements_files`, which will become the default in future releases leading up to `1.0.0`. Fixes [#2268](https://github.com/bazelbuild/rules_python/issues/2268). A known issue is that it may break `bazel query` and in these use cases it is diff --git a/MODULE.bazel b/MODULE.bazel index ef173bc83b..d3edb0356c 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -54,7 +54,7 @@ register_toolchains("@pythons_hub//:all") ##################### # Install twine for our own runfiles wheel publishing and allow bzlmod users to use it. -pip = use_extension("//python/private/pypi:pip.bzl", "pip_internal") +pip = use_extension("//python/extensions:pip.bzl", "pip") pip.parse( # NOTE @aignas 2024-10-26: We have an integration test that depends on us # being able to build sdists for this hub, so explicitly set this to False. diff --git a/examples/bzlmod/MODULE.bazel b/examples/bzlmod/MODULE.bazel index 2843575c31..27dd513762 100644 --- a/examples/bzlmod/MODULE.bazel +++ b/examples/bzlmod/MODULE.bazel @@ -231,9 +231,6 @@ pip.parse( "host", ], hub_name = "pip", - # Parse all requirements files for the same lock file on all OSes, this will - # become the default with 1.0 release - parse_all_requirements_files = True, python_version = "3.10", # The requirements files for each platform that we want to support. requirements_by_platform = { diff --git a/examples/bzlmod/MODULE.bazel.lock b/examples/bzlmod/MODULE.bazel.lock index 18538d929a..6e4d6e180b 100644 --- a/examples/bzlmod/MODULE.bazel.lock +++ b/examples/bzlmod/MODULE.bazel.lock @@ -1562,10 +1562,11 @@ }, "@@rules_python~//python/extensions:pip.bzl%pip": { "general": { - "bzlTransitiveDigest": "c3HURsyNEdAN0fRo5BXiCkhhZSPfl1zNBcQOQbpgJ64=", - "usagesDigest": "VmrNvB/4EhzsYieLDka9584M+pYKPpjNLl3Wcb5rx/c=", + "bzlTransitiveDigest": "qoC5CyCn6Cm4Ytk6NW1xqwmeHlT403IcVg6JXDuLjRU=", + "usagesDigest": "/LXEbF0D40bNgP95ES+IlHqvpiKbQBuGdNECrFAUXqk=", "recordedFileInputs": { "@@//requirements_lock_3_10.txt": "5e7083982a7e60f34998579a0ae83b520d46ab8f2552cc51337217f024e6def5", + "@@rules_python~//tools/publish/requirements_linux.txt": "8175b4c8df50ae2f22d1706961884beeb54e7da27bd2447018314a175981997d", "@@rules_python~~internal_deps~pypi__packaging//BUILD.bazel": "16cf02cdc6cd989d8a92b551d406abea3fe597b1524ba5fa88f0410010671d7f", "@@//whl_mods/appended_build_content.BUILD": "87745b00382c66e5efbd7cb44a08fc3edbf7fd5099cf593f87599188f1557a9e", "@@rules_python~//BUILD.bazel": "140002ce7e68de2fbf064bcdc37f854d4fa5b5d611a5fece6eb6cf19b8822bc4", @@ -1577,7 +1578,9 @@ "@@rules_python~~internal_deps~pypi__packaging//packaging-24.0.dist-info/RECORD": "be1aea790359b4c2c9ea83d153c1a57c407742a35b95ee36d00723509f5ed5dd", "@@//requirements_windows_3_10.txt": "c79f04bfaca147b8330275911a3328b81fc80828b9050a6bebdb15477627dabc", "@@rules_python~~python~python_3_9_host//BUILD.bazel": "cf97d5763b728ce5ba8fdc3243350b967658ba4e3879734504aee002cec0d2b3", - "@@protobuf~//python/requirements.txt": "983be60d3cec4b319dcab6d48aeb3f5b2f7c3350f26b3a9e97486c37967c73c5" + "@@rules_python~//tools/publish/requirements_windows.txt": "7673adc71dc1a81d3661b90924d7a7c0fc998cd508b3cb4174337cef3f2de556", + "@@protobuf~//python/requirements.txt": "983be60d3cec4b319dcab6d48aeb3f5b2f7c3350f26b3a9e97486c37967c73c5", + "@@rules_python~//tools/publish/requirements_darwin.txt": "2994136eab7e57b083c3de76faf46f70fad130bc8e7360a7fed2b288b69e79dc" }, "recordedDirentsInputs": {}, "envVariables": { @@ -6725,329 +6728,6 @@ "requirement": "six==1.16.0 --hash=sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254" } }, - "other_module_pip": { - "bzlFile": "@@rules_python~//python/private/pypi:hub_repository.bzl", - "ruleClassName": "hub_repository", - "attributes": { - "repo_name": "other_module_pip", - "extra_hub_aliases": {}, - "whl_map": { - "absl_py": "[{\"repo\":\"other_module_pip_311_absl_py\",\"version\":\"3.11\"}]" - }, - "packages": [ - "absl_py" - ], - "groups": {} - } - }, - "pip": { - "bzlFile": "@@rules_python~//python/private/pypi:hub_repository.bzl", - "ruleClassName": "hub_repository", - "attributes": { - "repo_name": "pip", - "extra_hub_aliases": { - "wheel": [ - "generated_file" - ] - }, - "whl_map": { - "alabaster": "[{\"repo\":\"pip_310_alabaster\",\"version\":\"3.10\"},{\"filename\":\"alabaster-0.7.13-py3-none-any.whl\",\"repo\":\"pip_39_alabaster_py3_none_any_1ee19aca\",\"version\":\"3.9\"},{\"filename\":\"alabaster-0.7.13.tar.gz\",\"repo\":\"pip_39_alabaster_sdist_a27a4a08\",\"version\":\"3.9\"}]", - "astroid": "[{\"repo\":\"pip_310_astroid\",\"version\":\"3.10\"},{\"filename\":\"astroid-2.12.13-py3-none-any.whl\",\"repo\":\"pip_39_astroid_py3_none_any_10e0ad5f\",\"version\":\"3.9\"},{\"filename\":\"astroid-2.12.13.tar.gz\",\"repo\":\"pip_39_astroid_sdist_1493fe8b\",\"version\":\"3.9\"}]", - "babel": "[{\"repo\":\"pip_310_babel\",\"version\":\"3.10\"},{\"filename\":\"Babel-2.13.1-py3-none-any.whl\",\"repo\":\"pip_39_babel_py3_none_any_7077a498\",\"version\":\"3.9\"},{\"filename\":\"Babel-2.13.1.tar.gz\",\"repo\":\"pip_39_babel_sdist_33e0952d\",\"version\":\"3.9\"}]", - "certifi": "[{\"repo\":\"pip_310_certifi\",\"version\":\"3.10\"},{\"filename\":\"certifi-2023.7.22-py3-none-any.whl\",\"repo\":\"pip_39_certifi_py3_none_any_92d60375\",\"version\":\"3.9\"},{\"filename\":\"certifi-2023.7.22.tar.gz\",\"repo\":\"pip_39_certifi_sdist_539cc1d1\",\"version\":\"3.9\"}]", - "chardet": "[{\"repo\":\"pip_310_chardet\",\"version\":\"3.10\"},{\"filename\":\"chardet-4.0.0-py2.py3-none-any.whl\",\"repo\":\"pip_39_chardet_py2_none_any_f864054d\",\"version\":\"3.9\"},{\"filename\":\"chardet-4.0.0.tar.gz\",\"repo\":\"pip_39_chardet_sdist_0d6f53a1\",\"version\":\"3.9\"}]", - "colorama": "[{\"repo\":\"pip_310_colorama\",\"version\":\"3.10\"},{\"filename\":\"colorama-0.4.6-py2.py3-none-any.whl\",\"repo\":\"pip_39_colorama_py2_none_any_4f1d9991\",\"version\":\"3.9\"},{\"filename\":\"colorama-0.4.6.tar.gz\",\"repo\":\"pip_39_colorama_sdist_08695f5c\",\"version\":\"3.9\"}]", - "dill": "[{\"repo\":\"pip_310_dill\",\"version\":\"3.10\"},{\"filename\":\"dill-0.3.6-py3-none-any.whl\",\"repo\":\"pip_39_dill_py3_none_any_a07ffd23\",\"version\":\"3.9\"},{\"filename\":\"dill-0.3.6.tar.gz\",\"repo\":\"pip_39_dill_sdist_e5db55f3\",\"version\":\"3.9\"}]", - "docutils": "[{\"repo\":\"pip_310_docutils\",\"version\":\"3.10\"},{\"filename\":\"docutils-0.20.1-py3-none-any.whl\",\"repo\":\"pip_39_docutils_py3_none_any_96f387a2\",\"version\":\"3.9\"},{\"filename\":\"docutils-0.20.1.tar.gz\",\"repo\":\"pip_39_docutils_sdist_f08a4e27\",\"version\":\"3.9\"}]", - "idna": "[{\"repo\":\"pip_310_idna\",\"version\":\"3.10\"},{\"filename\":\"idna-2.10-py2.py3-none-any.whl\",\"repo\":\"pip_39_idna_py2_none_any_b97d804b\",\"version\":\"3.9\"},{\"filename\":\"idna-2.10.tar.gz\",\"repo\":\"pip_39_idna_sdist_b307872f\",\"version\":\"3.9\"}]", - "imagesize": "[{\"repo\":\"pip_310_imagesize\",\"version\":\"3.10\"},{\"filename\":\"imagesize-1.4.1-py2.py3-none-any.whl\",\"repo\":\"pip_39_imagesize_py2_none_any_0d8d18d0\",\"version\":\"3.9\"},{\"filename\":\"imagesize-1.4.1.tar.gz\",\"repo\":\"pip_39_imagesize_sdist_69150444\",\"version\":\"3.9\"}]", - "importlib_metadata": "[{\"filename\":\"importlib_metadata-8.4.0-py3-none-any.whl\",\"repo\":\"pip_39_importlib_metadata_py3_none_any_66f342cc\",\"version\":\"3.9\"},{\"filename\":\"importlib_metadata-8.4.0.tar.gz\",\"repo\":\"pip_39_importlib_metadata_sdist_9a547d3b\",\"version\":\"3.9\"}]", - "isort": "[{\"repo\":\"pip_310_isort\",\"version\":\"3.10\"},{\"filename\":\"isort-5.11.4-py3-none-any.whl\",\"repo\":\"pip_39_isort_py3_none_any_c033fd0e\",\"version\":\"3.9\"},{\"filename\":\"isort-5.11.4.tar.gz\",\"repo\":\"pip_39_isort_sdist_6db30c5d\",\"version\":\"3.9\"}]", - "jinja2": "[{\"repo\":\"pip_310_jinja2\",\"version\":\"3.10\"},{\"filename\":\"jinja2-3.1.4-py3-none-any.whl\",\"repo\":\"pip_39_jinja2_py3_none_any_bc5dd2ab\",\"version\":\"3.9\"},{\"filename\":\"jinja2-3.1.4.tar.gz\",\"repo\":\"pip_39_jinja2_sdist_4a3aee7a\",\"version\":\"3.9\"}]", - "lazy_object_proxy": "[{\"repo\":\"pip_310_lazy_object_proxy\",\"version\":\"3.10\"},{\"filename\":\"lazy-object-proxy-1.10.0.tar.gz\",\"repo\":\"pip_39_lazy_object_proxy_sdist_78247b6d\",\"version\":\"3.9\"},{\"filename\":\"lazy_object_proxy-1.10.0-cp39-cp39-macosx_10_9_x86_64.whl\",\"repo\":\"pip_39_lazy_object_proxy_cp39_cp39_macosx_10_9_x86_64_366c32fe\",\"version\":\"3.9\"},{\"filename\":\"lazy_object_proxy-1.10.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\",\"repo\":\"pip_39_lazy_object_proxy_cp39_cp39_manylinux_2_17_aarch64_2297f08f\",\"version\":\"3.9\"},{\"filename\":\"lazy_object_proxy-1.10.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl\",\"repo\":\"pip_39_lazy_object_proxy_cp39_cp39_manylinux_2_5_x86_64_18dd842b\",\"version\":\"3.9\"},{\"filename\":\"lazy_object_proxy-1.10.0-cp39-cp39-musllinux_1_1_aarch64.whl\",\"repo\":\"pip_39_lazy_object_proxy_cp39_cp39_musllinux_1_1_aarch64_21713819\",\"version\":\"3.9\"},{\"filename\":\"lazy_object_proxy-1.10.0-cp39-cp39-musllinux_1_1_x86_64.whl\",\"repo\":\"pip_39_lazy_object_proxy_cp39_cp39_musllinux_1_1_x86_64_9a3a87cf\",\"version\":\"3.9\"},{\"filename\":\"lazy_object_proxy-1.10.0-cp39-cp39-win_amd64.whl\",\"repo\":\"pip_39_lazy_object_proxy_cp39_cp39_win_amd64_a899b10e\",\"version\":\"3.9\"}]", - "markupsafe": "[{\"repo\":\"pip_310_markupsafe\",\"version\":\"3.10\"},{\"filename\":\"MarkupSafe-2.1.3-cp39-cp39-macosx_10_9_universal2.whl\",\"repo\":\"pip_39_markupsafe_cp39_cp39_macosx_10_9_universal2_8023faf4\",\"version\":\"3.9\"},{\"filename\":\"MarkupSafe-2.1.3-cp39-cp39-macosx_10_9_x86_64.whl\",\"repo\":\"pip_39_markupsafe_cp39_cp39_macosx_10_9_x86_64_6b2b5695\",\"version\":\"3.9\"},{\"filename\":\"MarkupSafe-2.1.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\",\"repo\":\"pip_39_markupsafe_cp39_cp39_manylinux_2_17_aarch64_9dcdfd0e\",\"version\":\"3.9\"},{\"filename\":\"MarkupSafe-2.1.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\",\"repo\":\"pip_39_markupsafe_cp39_cp39_manylinux_2_17_x86_64_05fb2117\",\"version\":\"3.9\"},{\"filename\":\"MarkupSafe-2.1.3-cp39-cp39-musllinux_1_1_aarch64.whl\",\"repo\":\"pip_39_markupsafe_cp39_cp39_musllinux_1_1_aarch64_ab4a0df4\",\"version\":\"3.9\"},{\"filename\":\"MarkupSafe-2.1.3-cp39-cp39-musllinux_1_1_x86_64.whl\",\"repo\":\"pip_39_markupsafe_cp39_cp39_musllinux_1_1_x86_64_0a4e4a1a\",\"version\":\"3.9\"},{\"filename\":\"MarkupSafe-2.1.3-cp39-cp39-win_amd64.whl\",\"repo\":\"pip_39_markupsafe_cp39_cp39_win_amd64_3fd4abcb\",\"version\":\"3.9\"},{\"filename\":\"MarkupSafe-2.1.3.tar.gz\",\"repo\":\"pip_39_markupsafe_sdist_af598ed3\",\"version\":\"3.9\"}]", - "mccabe": "[{\"repo\":\"pip_310_mccabe\",\"version\":\"3.10\"},{\"filename\":\"mccabe-0.7.0-py2.py3-none-any.whl\",\"repo\":\"pip_39_mccabe_py2_none_any_6c2d30ab\",\"version\":\"3.9\"},{\"filename\":\"mccabe-0.7.0.tar.gz\",\"repo\":\"pip_39_mccabe_sdist_348e0240\",\"version\":\"3.9\"}]", - "packaging": "[{\"repo\":\"pip_310_packaging\",\"version\":\"3.10\"},{\"filename\":\"packaging-23.2-py3-none-any.whl\",\"repo\":\"pip_39_packaging_py3_none_any_8c491190\",\"version\":\"3.9\"},{\"filename\":\"packaging-23.2.tar.gz\",\"repo\":\"pip_39_packaging_sdist_048fb0e9\",\"version\":\"3.9\"}]", - "pathspec": "[{\"repo\":\"pip_310_pathspec\",\"version\":\"3.10\"},{\"filename\":\"pathspec-0.10.3-py3-none-any.whl\",\"repo\":\"pip_39_pathspec_py3_none_any_3c95343a\",\"version\":\"3.9\"},{\"filename\":\"pathspec-0.10.3.tar.gz\",\"repo\":\"pip_39_pathspec_sdist_56200de4\",\"version\":\"3.9\"}]", - "platformdirs": "[{\"repo\":\"pip_310_platformdirs\",\"version\":\"3.10\"},{\"filename\":\"platformdirs-2.6.0-py3-none-any.whl\",\"repo\":\"pip_39_platformdirs_py3_none_any_1a89a123\",\"version\":\"3.9\"},{\"filename\":\"platformdirs-2.6.0.tar.gz\",\"repo\":\"pip_39_platformdirs_sdist_b46ffafa\",\"version\":\"3.9\"}]", - "pygments": "[{\"repo\":\"pip_310_pygments\",\"version\":\"3.10\"},{\"filename\":\"Pygments-2.16.1-py3-none-any.whl\",\"repo\":\"pip_39_pygments_py3_none_any_13fc09fa\",\"version\":\"3.9\"},{\"filename\":\"Pygments-2.16.1.tar.gz\",\"repo\":\"pip_39_pygments_sdist_1daff049\",\"version\":\"3.9\"}]", - "pylint": "[{\"repo\":\"pip_310_pylint\",\"version\":\"3.10\"},{\"filename\":\"pylint-2.15.9-py3-none-any.whl\",\"repo\":\"pip_39_pylint_py3_none_any_349c8cd3\",\"version\":\"3.9\"},{\"filename\":\"pylint-2.15.9.tar.gz\",\"repo\":\"pip_39_pylint_sdist_18783cca\",\"version\":\"3.9\"}]", - "pylint_print": "[{\"repo\":\"pip_310_pylint_print\",\"version\":\"3.10\"},{\"filename\":\"pylint-print-1.0.1.tar.gz\",\"repo\":\"pip_39_pylint_print_sdist_30aa207e\",\"version\":\"3.9\"},{\"filename\":\"pylint_print-1.0.1-py3-none-any.whl\",\"repo\":\"pip_39_pylint_print_py3_none_any_a2b2599e\",\"version\":\"3.9\"}]", - "python_dateutil": "[{\"repo\":\"pip_310_python_dateutil\",\"version\":\"3.10\"},{\"filename\":\"python-dateutil-2.8.2.tar.gz\",\"repo\":\"pip_39_python_dateutil_sdist_0123cacc\",\"version\":\"3.9\"},{\"filename\":\"python_dateutil-2.8.2-py2.py3-none-any.whl\",\"repo\":\"pip_39_python_dateutil_py2_none_any_961d03dc\",\"version\":\"3.9\"}]", - "python_magic": "[{\"repo\":\"pip_310_python_magic\",\"version\":\"3.10\"},{\"filename\":\"python-magic-0.4.27.tar.gz\",\"repo\":\"pip_39_python_magic_sdist_c1ba14b0\",\"version\":\"3.9\"},{\"filename\":\"python_magic-0.4.27-py2.py3-none-any.whl\",\"repo\":\"pip_39_python_magic_py2_none_any_c212960a\",\"version\":\"3.9\"}]", - "pyyaml": "[{\"repo\":\"pip_310_pyyaml\",\"version\":\"3.10\"},{\"filename\":\"PyYAML-6.0.1-cp39-cp39-macosx_10_9_x86_64.whl\",\"repo\":\"pip_39_pyyaml_cp39_cp39_macosx_10_9_x86_64_9eb6caa9\",\"version\":\"3.9\"},{\"filename\":\"PyYAML-6.0.1-cp39-cp39-macosx_11_0_arm64.whl\",\"repo\":\"pip_39_pyyaml_cp39_cp39_macosx_11_0_arm64_c8098ddc\",\"version\":\"3.9\"},{\"filename\":\"PyYAML-6.0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\",\"repo\":\"pip_39_pyyaml_cp39_cp39_manylinux_2_17_aarch64_5773183b\",\"version\":\"3.9\"},{\"filename\":\"PyYAML-6.0.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl\",\"repo\":\"pip_39_pyyaml_cp39_cp39_manylinux_2_17_s390x_b786eecb\",\"version\":\"3.9\"},{\"filename\":\"PyYAML-6.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\",\"repo\":\"pip_39_pyyaml_cp39_cp39_manylinux_2_17_x86_64_bc1bf292\",\"version\":\"3.9\"},{\"filename\":\"PyYAML-6.0.1-cp39-cp39-musllinux_1_1_x86_64.whl\",\"repo\":\"pip_39_pyyaml_cp39_cp39_musllinux_1_1_x86_64_04ac92ad\",\"version\":\"3.9\"},{\"filename\":\"PyYAML-6.0.1-cp39-cp39-win_amd64.whl\",\"repo\":\"pip_39_pyyaml_cp39_cp39_win_amd64_510c9dee\",\"version\":\"3.9\"},{\"filename\":\"PyYAML-6.0.1.tar.gz\",\"repo\":\"pip_39_pyyaml_sdist_bfdf460b\",\"version\":\"3.9\"}]", - "requests": "[{\"repo\":\"pip_310_requests\",\"version\":\"3.10\"},{\"filename\":\"requests-2.25.1-py2.py3-none-any.whl\",\"repo\":\"pip_39_requests_py2_none_any_c210084e\",\"version\":\"3.9\"},{\"filename\":\"requests-2.25.1.tar.gz\",\"repo\":\"pip_39_requests_sdist_27973dd4\",\"version\":\"3.9\"}]", - "s3cmd": "[{\"repo\":\"pip_310_s3cmd\",\"version\":\"3.10\"},{\"filename\":\"s3cmd-2.1.0-py2.py3-none-any.whl\",\"repo\":\"pip_39_s3cmd_py2_none_any_49cd23d5\",\"version\":\"3.9\"},{\"filename\":\"s3cmd-2.1.0.tar.gz\",\"repo\":\"pip_39_s3cmd_sdist_966b0a49\",\"version\":\"3.9\"}]", - "setuptools": "[{\"filename\":\"setuptools-65.6.3-py3-none-any.whl\",\"repo\":\"pip_39_setuptools_py3_none_any_57f6f22b\",\"version\":\"3.9\"},{\"filename\":\"setuptools-65.6.3.tar.gz\",\"repo\":\"pip_39_setuptools_sdist_a7620757\",\"version\":\"3.9\"}]", - "six": "[{\"repo\":\"pip_310_six\",\"version\":\"3.10\"},{\"filename\":\"six-1.16.0-py2.py3-none-any.whl\",\"repo\":\"pip_39_six_py2_none_any_8abb2f1d\",\"version\":\"3.9\"},{\"filename\":\"six-1.16.0.tar.gz\",\"repo\":\"pip_39_six_sdist_1e61c374\",\"version\":\"3.9\"}]", - "snowballstemmer": "[{\"repo\":\"pip_310_snowballstemmer\",\"version\":\"3.10\"},{\"filename\":\"snowballstemmer-2.2.0-py2.py3-none-any.whl\",\"repo\":\"pip_39_snowballstemmer_py2_none_any_c8e1716e\",\"version\":\"3.9\"},{\"filename\":\"snowballstemmer-2.2.0.tar.gz\",\"repo\":\"pip_39_snowballstemmer_sdist_09b16deb\",\"version\":\"3.9\"}]", - "sphinx": "[{\"repo\":\"pip_310_sphinx\",\"version\":\"3.10\"},{\"filename\":\"sphinx-7.2.6-py3-none-any.whl\",\"repo\":\"pip_39_sphinx_py3_none_any_1e09160a\",\"version\":\"3.9\"},{\"filename\":\"sphinx-7.2.6.tar.gz\",\"repo\":\"pip_39_sphinx_sdist_9a5160e1\",\"version\":\"3.9\"}]", - "sphinxcontrib_applehelp": "[{\"repo\":\"pip_310_sphinxcontrib_applehelp\",\"version\":\"3.10\"},{\"filename\":\"sphinxcontrib_applehelp-1.0.7-py3-none-any.whl\",\"repo\":\"pip_39_sphinxcontrib_applehelp_py3_none_any_094c4d56\",\"version\":\"3.9\"},{\"filename\":\"sphinxcontrib_applehelp-1.0.7.tar.gz\",\"repo\":\"pip_39_sphinxcontrib_applehelp_sdist_39fdc8d7\",\"version\":\"3.9\"}]", - "sphinxcontrib_devhelp": "[{\"repo\":\"pip_310_sphinxcontrib_devhelp\",\"version\":\"3.10\"},{\"filename\":\"sphinxcontrib_devhelp-1.0.5-py3-none-any.whl\",\"repo\":\"pip_39_sphinxcontrib_devhelp_py3_none_any_fe8009ae\",\"version\":\"3.9\"},{\"filename\":\"sphinxcontrib_devhelp-1.0.5.tar.gz\",\"repo\":\"pip_39_sphinxcontrib_devhelp_sdist_63b41e0d\",\"version\":\"3.9\"}]", - "sphinxcontrib_htmlhelp": "[{\"repo\":\"pip_310_sphinxcontrib_htmlhelp\",\"version\":\"3.10\"},{\"filename\":\"sphinxcontrib_htmlhelp-2.0.4-py3-none-any.whl\",\"repo\":\"pip_39_sphinxcontrib_htmlhelp_py3_none_any_8001661c\",\"version\":\"3.9\"},{\"filename\":\"sphinxcontrib_htmlhelp-2.0.4.tar.gz\",\"repo\":\"pip_39_sphinxcontrib_htmlhelp_sdist_6c26a118\",\"version\":\"3.9\"}]", - "sphinxcontrib_jsmath": "[{\"repo\":\"pip_310_sphinxcontrib_jsmath\",\"version\":\"3.10\"},{\"filename\":\"sphinxcontrib-jsmath-1.0.1.tar.gz\",\"repo\":\"pip_39_sphinxcontrib_jsmath_sdist_a9925e4a\",\"version\":\"3.9\"},{\"filename\":\"sphinxcontrib_jsmath-1.0.1-py2.py3-none-any.whl\",\"repo\":\"pip_39_sphinxcontrib_jsmath_py2_none_any_2ec2eaeb\",\"version\":\"3.9\"}]", - "sphinxcontrib_qthelp": "[{\"repo\":\"pip_310_sphinxcontrib_qthelp\",\"version\":\"3.10\"},{\"filename\":\"sphinxcontrib_qthelp-1.0.6-py3-none-any.whl\",\"repo\":\"pip_39_sphinxcontrib_qthelp_py3_none_any_bf76886e\",\"version\":\"3.9\"},{\"filename\":\"sphinxcontrib_qthelp-1.0.6.tar.gz\",\"repo\":\"pip_39_sphinxcontrib_qthelp_sdist_62b9d1a1\",\"version\":\"3.9\"}]", - "sphinxcontrib_serializinghtml": "[{\"repo\":\"pip_310_sphinxcontrib_serializinghtml\",\"version\":\"3.10\"},{\"filename\":\"sphinxcontrib_serializinghtml-1.1.9-py3-none-any.whl\",\"repo\":\"pip_39_sphinxcontrib_serializinghtml_py3_none_any_9b36e503\",\"version\":\"3.9\"},{\"filename\":\"sphinxcontrib_serializinghtml-1.1.9.tar.gz\",\"repo\":\"pip_39_sphinxcontrib_serializinghtml_sdist_0c64ff89\",\"version\":\"3.9\"}]", - "tabulate": "[{\"repo\":\"pip_310_tabulate\",\"version\":\"3.10\"},{\"filename\":\"tabulate-0.9.0-py3-none-any.whl\",\"repo\":\"pip_39_tabulate_py3_none_any_024ca478\",\"version\":\"3.9\"},{\"filename\":\"tabulate-0.9.0.tar.gz\",\"repo\":\"pip_39_tabulate_sdist_0095b12b\",\"version\":\"3.9\"}]", - "tomli": "[{\"repo\":\"pip_310_tomli\",\"version\":\"3.10\"},{\"filename\":\"tomli-2.0.1-py3-none-any.whl\",\"repo\":\"pip_39_tomli_py3_none_any_939de3e7\",\"version\":\"3.9\"},{\"filename\":\"tomli-2.0.1.tar.gz\",\"repo\":\"pip_39_tomli_sdist_de526c12\",\"version\":\"3.9\"}]", - "tomlkit": "[{\"repo\":\"pip_310_tomlkit\",\"version\":\"3.10\"},{\"filename\":\"tomlkit-0.11.6-py3-none-any.whl\",\"repo\":\"pip_39_tomlkit_py3_none_any_07de26b0\",\"version\":\"3.9\"},{\"filename\":\"tomlkit-0.11.6.tar.gz\",\"repo\":\"pip_39_tomlkit_sdist_71b952e5\",\"version\":\"3.9\"}]", - "typing_extensions": "[{\"repo\":\"pip_310_typing_extensions\",\"version\":\"3.10\"},{\"filename\":\"typing_extensions-4.12.2-py3-none-any.whl\",\"repo\":\"pip_39_typing_extensions_py3_none_any_04e5ca03\",\"version\":\"3.9\"},{\"filename\":\"typing_extensions-4.12.2.tar.gz\",\"repo\":\"pip_39_typing_extensions_sdist_1a7ead55\",\"version\":\"3.9\"}]", - "urllib3": "[{\"repo\":\"pip_310_urllib3\",\"version\":\"3.10\"},{\"filename\":\"urllib3-1.26.18-py2.py3-none-any.whl\",\"repo\":\"pip_39_urllib3_py2_none_any_34b97092\",\"version\":\"3.9\"},{\"filename\":\"urllib3-1.26.18.tar.gz\",\"repo\":\"pip_39_urllib3_sdist_f8ecc1bb\",\"version\":\"3.9\"}]", - "websockets": "[{\"repo\":\"pip_310_websockets\",\"version\":\"3.10\"},{\"filename\":\"websockets-11.0.3-cp39-cp39-macosx_10_9_universal2.whl\",\"repo\":\"pip_39_websockets_cp39_cp39_macosx_10_9_universal2_777354ee\",\"version\":\"3.9\"},{\"filename\":\"websockets-11.0.3-cp39-cp39-macosx_10_9_x86_64.whl\",\"repo\":\"pip_39_websockets_cp39_cp39_macosx_10_9_x86_64_8c82f119\",\"version\":\"3.9\"},{\"filename\":\"websockets-11.0.3-cp39-cp39-macosx_11_0_arm64.whl\",\"repo\":\"pip_39_websockets_cp39_cp39_macosx_11_0_arm64_3580dd9c\",\"version\":\"3.9\"},{\"filename\":\"websockets-11.0.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\",\"repo\":\"pip_39_websockets_cp39_cp39_manylinux_2_17_aarch64_6f1a3f10\",\"version\":\"3.9\"},{\"filename\":\"websockets-11.0.3-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl\",\"repo\":\"pip_39_websockets_cp39_cp39_manylinux_2_5_x86_64_279e5de4\",\"version\":\"3.9\"},{\"filename\":\"websockets-11.0.3-cp39-cp39-musllinux_1_1_aarch64.whl\",\"repo\":\"pip_39_websockets_cp39_cp39_musllinux_1_1_aarch64_1fdf26fa\",\"version\":\"3.9\"},{\"filename\":\"websockets-11.0.3-cp39-cp39-musllinux_1_1_x86_64.whl\",\"repo\":\"pip_39_websockets_cp39_cp39_musllinux_1_1_x86_64_97b52894\",\"version\":\"3.9\"},{\"filename\":\"websockets-11.0.3-cp39-cp39-win_amd64.whl\",\"repo\":\"pip_39_websockets_cp39_cp39_win_amd64_c792ea4e\",\"version\":\"3.9\"},{\"filename\":\"websockets-11.0.3-py3-none-any.whl\",\"repo\":\"pip_39_websockets_py3_none_any_6681ba9e\",\"version\":\"3.9\"},{\"filename\":\"websockets-11.0.3.tar.gz\",\"repo\":\"pip_39_websockets_sdist_88fc51d9\",\"version\":\"3.9\"}]", - "wheel": "[{\"repo\":\"pip_310_wheel\",\"version\":\"3.10\"},{\"filename\":\"wheel-0.40.0-py3-none-any.whl\",\"repo\":\"pip_39_wheel_py3_none_any_d236b20e\",\"version\":\"3.9\"},{\"filename\":\"wheel-0.40.0.tar.gz\",\"repo\":\"pip_39_wheel_sdist_cd1196f3\",\"version\":\"3.9\"}]", - "wrapt": "[{\"repo\":\"pip_310_wrapt\",\"version\":\"3.10\"},{\"filename\":\"wrapt-1.14.1-cp39-cp39-macosx_10_9_x86_64.whl\",\"repo\":\"pip_39_wrapt_cp39_cp39_macosx_10_9_x86_64_3232822c\",\"version\":\"3.9\"},{\"filename\":\"wrapt-1.14.1-cp39-cp39-macosx_11_0_arm64.whl\",\"repo\":\"pip_39_wrapt_cp39_cp39_macosx_11_0_arm64_988635d1\",\"version\":\"3.9\"},{\"filename\":\"wrapt-1.14.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\",\"repo\":\"pip_39_wrapt_cp39_cp39_manylinux_2_17_aarch64_9cca3c2c\",\"version\":\"3.9\"},{\"filename\":\"wrapt-1.14.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl\",\"repo\":\"pip_39_wrapt_cp39_cp39_manylinux_2_5_x86_64_40e7bc81\",\"version\":\"3.9\"},{\"filename\":\"wrapt-1.14.1-cp39-cp39-musllinux_1_1_aarch64.whl\",\"repo\":\"pip_39_wrapt_cp39_cp39_musllinux_1_1_aarch64_b9b7a708\",\"version\":\"3.9\"},{\"filename\":\"wrapt-1.14.1-cp39-cp39-musllinux_1_1_x86_64.whl\",\"repo\":\"pip_39_wrapt_cp39_cp39_musllinux_1_1_x86_64_34aa51c4\",\"version\":\"3.9\"},{\"filename\":\"wrapt-1.14.1-cp39-cp39-win_amd64.whl\",\"repo\":\"pip_39_wrapt_cp39_cp39_win_amd64_dee60e1d\",\"version\":\"3.9\"},{\"filename\":\"wrapt-1.14.1.tar.gz\",\"repo\":\"pip_39_wrapt_sdist_380a85cf\",\"version\":\"3.9\"}]", - "yamllint": "[{\"repo\":\"pip_310_yamllint\",\"version\":\"3.10\"},{\"filename\":\"yamllint-1.28.0-py2.py3-none-any.whl\",\"repo\":\"pip_39_yamllint_py2_none_any_89bb5b5a\",\"version\":\"3.9\"},{\"filename\":\"yamllint-1.28.0.tar.gz\",\"repo\":\"pip_39_yamllint_sdist_9e3d8ddd\",\"version\":\"3.9\"}]", - "zipp": "[{\"filename\":\"zipp-3.20.0-py3-none-any.whl\",\"repo\":\"pip_39_zipp_py3_none_any_58da6168\",\"version\":\"3.9\"},{\"filename\":\"zipp-3.20.0.tar.gz\",\"repo\":\"pip_39_zipp_sdist_0145e43d\",\"version\":\"3.9\"}]" - }, - "packages": [ - "alabaster", - "astroid", - "babel", - "certifi", - "chardet", - "colorama", - "dill", - "docutils", - "idna", - "imagesize", - "importlib_metadata", - "isort", - "jinja2", - "lazy_object_proxy", - "markupsafe", - "mccabe", - "packaging", - "pathspec", - "platformdirs", - "pygments", - "pylint", - "pylint_print", - "python_dateutil", - "python_magic", - "pyyaml", - "requests", - "s3cmd", - "setuptools", - "six", - "snowballstemmer", - "sphinx", - "sphinxcontrib_applehelp", - "sphinxcontrib_devhelp", - "sphinxcontrib_htmlhelp", - "sphinxcontrib_jsmath", - "sphinxcontrib_qthelp", - "sphinxcontrib_serializinghtml", - "tabulate", - "tomli", - "tomlkit", - "typing_extensions", - "urllib3", - "websockets", - "wheel", - "wrapt", - "yamllint", - "zipp" - ], - "groups": { - "sphinx": [ - "sphinx", - "sphinxcontrib-applehelp", - "sphinxcontrib-devhelp", - "sphinxcontrib-htmlhelp", - "sphinxcontrib-qthelp", - "sphinxcontrib-serializinghtml" - ] - } - } - }, - "pip_deps": { - "bzlFile": "@@rules_python~//python/private/pypi:hub_repository.bzl", - "ruleClassName": "hub_repository", - "attributes": { - "repo_name": "pip_deps", - "extra_hub_aliases": {}, - "whl_map": { - "numpy": "[{\"repo\":\"pip_deps_310_numpy\",\"version\":\"3.10\"},{\"repo\":\"pip_deps_311_numpy\",\"version\":\"3.11\"},{\"repo\":\"pip_deps_312_numpy\",\"version\":\"3.12\"},{\"repo\":\"pip_deps_38_numpy\",\"version\":\"3.8\"},{\"repo\":\"pip_deps_39_numpy\",\"version\":\"3.9\"}]", - "setuptools": "[{\"repo\":\"pip_deps_310_setuptools\",\"version\":\"3.10\"},{\"repo\":\"pip_deps_311_setuptools\",\"version\":\"3.11\"},{\"repo\":\"pip_deps_312_setuptools\",\"version\":\"3.12\"},{\"repo\":\"pip_deps_38_setuptools\",\"version\":\"3.8\"},{\"repo\":\"pip_deps_39_setuptools\",\"version\":\"3.9\"}]" - }, - "packages": [ - "numpy", - "setuptools" - ], - "groups": {} - } - }, - "rules_fuzzing_py_deps": { - "bzlFile": "@@rules_python~//python/private/pypi:hub_repository.bzl", - "ruleClassName": "hub_repository", - "attributes": { - "repo_name": "rules_fuzzing_py_deps", - "extra_hub_aliases": {}, - "whl_map": { - "absl_py": "[{\"repo\":\"rules_fuzzing_py_deps_310_absl_py\",\"version\":\"3.10\"},{\"repo\":\"rules_fuzzing_py_deps_311_absl_py\",\"version\":\"3.11\"},{\"repo\":\"rules_fuzzing_py_deps_312_absl_py\",\"version\":\"3.12\"},{\"repo\":\"rules_fuzzing_py_deps_38_absl_py\",\"version\":\"3.8\"},{\"repo\":\"rules_fuzzing_py_deps_39_absl_py\",\"version\":\"3.9\"}]", - "six": "[{\"repo\":\"rules_fuzzing_py_deps_310_six\",\"version\":\"3.10\"},{\"repo\":\"rules_fuzzing_py_deps_311_six\",\"version\":\"3.11\"},{\"repo\":\"rules_fuzzing_py_deps_312_six\",\"version\":\"3.12\"},{\"repo\":\"rules_fuzzing_py_deps_38_six\",\"version\":\"3.8\"},{\"repo\":\"rules_fuzzing_py_deps_39_six\",\"version\":\"3.9\"}]" - }, - "packages": [ - "absl_py", - "six" - ], - "groups": {} - } - } - }, - "moduleExtensionMetadata": { - "useAllRepos": "NO", - "reproducible": false - }, - "recordedRepoMappingEntries": [ - [ - "bazel_features~", - "bazel_features_globals", - "bazel_features~~version_extension~bazel_features_globals" - ], - [ - "bazel_features~", - "bazel_features_version", - "bazel_features~~version_extension~bazel_features_version" - ], - [ - "rules_python~", - "bazel_features", - "bazel_features~" - ], - [ - "rules_python~", - "bazel_skylib", - "bazel_skylib~" - ], - [ - "rules_python~", - "bazel_tools", - "bazel_tools" - ], - [ - "rules_python~", - "pypi__build", - "rules_python~~internal_deps~pypi__build" - ], - [ - "rules_python~", - "pypi__click", - "rules_python~~internal_deps~pypi__click" - ], - [ - "rules_python~", - "pypi__colorama", - "rules_python~~internal_deps~pypi__colorama" - ], - [ - "rules_python~", - "pypi__importlib_metadata", - "rules_python~~internal_deps~pypi__importlib_metadata" - ], - [ - "rules_python~", - "pypi__installer", - "rules_python~~internal_deps~pypi__installer" - ], - [ - "rules_python~", - "pypi__more_itertools", - "rules_python~~internal_deps~pypi__more_itertools" - ], - [ - "rules_python~", - "pypi__packaging", - "rules_python~~internal_deps~pypi__packaging" - ], - [ - "rules_python~", - "pypi__pep517", - "rules_python~~internal_deps~pypi__pep517" - ], - [ - "rules_python~", - "pypi__pip", - "rules_python~~internal_deps~pypi__pip" - ], - [ - "rules_python~", - "pypi__pip_tools", - "rules_python~~internal_deps~pypi__pip_tools" - ], - [ - "rules_python~", - "pypi__pyproject_hooks", - "rules_python~~internal_deps~pypi__pyproject_hooks" - ], - [ - "rules_python~", - "pypi__setuptools", - "rules_python~~internal_deps~pypi__setuptools" - ], - [ - "rules_python~", - "pypi__tomli", - "rules_python~~internal_deps~pypi__tomli" - ], - [ - "rules_python~", - "pypi__wheel", - "rules_python~~internal_deps~pypi__wheel" - ], - [ - "rules_python~", - "pypi__zipp", - "rules_python~~internal_deps~pypi__zipp" - ], - [ - "rules_python~", - "pythons_hub", - "rules_python~~python~pythons_hub" - ], - [ - "rules_python~~python~pythons_hub", - "python_3_10_host", - "rules_python~~python~python_3_10_host" - ], - [ - "rules_python~~python~pythons_hub", - "python_3_11_host", - "rules_python~~python~python_3_11_host" - ], - [ - "rules_python~~python~pythons_hub", - "python_3_12_host", - "rules_python~~python~python_3_12_host" - ], - [ - "rules_python~~python~pythons_hub", - "python_3_8_host", - "rules_python~~python~python_3_8_host" - ], - [ - "rules_python~~python~pythons_hub", - "python_3_9_host", - "rules_python~~python~python_3_9_host" - ] - ] - } - }, - "@@rules_python~//python/private/pypi:pip.bzl%pip_internal": { - "general": { - "bzlTransitiveDigest": "H9pnwH6wHRp4Xy2CN6NSo0mDMHFDvpqspLNW6Xbqnhc=", - "usagesDigest": "/lZXl/ZgP+u5PE8WkeWTyYBsvX9XQWFn1antj5qrBzQ=", - "recordedFileInputs": { - "@@rules_python~//tools/publish/requirements_linux.txt": "8175b4c8df50ae2f22d1706961884beeb54e7da27bd2447018314a175981997d", - "@@rules_python~//tools/publish/requirements_windows.txt": "7673adc71dc1a81d3661b90924d7a7c0fc998cd508b3cb4174337cef3f2de556", - "@@rules_python~//tools/publish/requirements_darwin.txt": "2994136eab7e57b083c3de76faf46f70fad130bc8e7360a7fed2b288b69e79dc" - }, - "recordedDirentsInputs": {}, - "envVariables": { - "RULES_PYTHON_REPO_DEBUG": null, - "RULES_PYTHON_REPO_DEBUG_VERBOSITY": null - }, - "generatedRepoSpecs": { "rules_python_publish_deps_311_backports_tarfile_py3_none_any_77e284d7": { "bzlFile": "@@rules_python~//python/private/pypi:whl_library.bzl", "ruleClassName": "whl_library", @@ -9015,7 +8695,12 @@ "sha256": "70761cfe03c773ceb22aa2f671b4757976145175cdfca038c02654d061d6dcc6", "urls": [ "https://files.pythonhosted.org/packages/f9/9b/335f9764261e915ed497fcdeb11df5dfd6f7bf257d4a6a2a686d80da4d54/requests-2.32.3-py3-none-any.whl" - ] + ], + "whl_patches": { + "@@//patches:empty.patch": "{\"patch_strip\":1,\"whls\":[\"requests-2.25.1-py2.py3-none-any.whl\"]}", + "@@//patches:requests_metadata.patch": "{\"patch_strip\":1,\"whls\":[\"requests-2.25.1-py2.py3-none-any.whl\"]}", + "@@//patches:requests_record.patch": "{\"patch_strip\":1,\"whls\":[\"requests-2.25.1-py2.py3-none-any.whl\"]}" + } } }, "rules_python_publish_deps_311_requests_sdist_55365417": { @@ -9044,7 +8729,12 @@ "sha256": "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760", "urls": [ "https://files.pythonhosted.org/packages/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" - ] + ], + "whl_patches": { + "@@//patches:empty.patch": "{\"patch_strip\":1,\"whls\":[\"requests-2.25.1-py2.py3-none-any.whl\"]}", + "@@//patches:requests_metadata.patch": "{\"patch_strip\":1,\"whls\":[\"requests-2.25.1-py2.py3-none-any.whl\"]}", + "@@//patches:requests_record.patch": "{\"patch_strip\":1,\"whls\":[\"requests-2.25.1-py2.py3-none-any.whl\"]}" + } } }, "rules_python_publish_deps_311_requests_toolbelt_py2_none_any_cccfdd66": { @@ -9419,6 +9109,175 @@ ] } }, + "other_module_pip": { + "bzlFile": "@@rules_python~//python/private/pypi:hub_repository.bzl", + "ruleClassName": "hub_repository", + "attributes": { + "repo_name": "other_module_pip", + "extra_hub_aliases": {}, + "whl_map": { + "absl_py": "[{\"repo\":\"other_module_pip_311_absl_py\",\"version\":\"3.11\"}]" + }, + "packages": [ + "absl_py" + ], + "groups": {} + } + }, + "pip": { + "bzlFile": "@@rules_python~//python/private/pypi:hub_repository.bzl", + "ruleClassName": "hub_repository", + "attributes": { + "repo_name": "pip", + "extra_hub_aliases": { + "wheel": [ + "generated_file" + ] + }, + "whl_map": { + "alabaster": "[{\"repo\":\"pip_310_alabaster\",\"version\":\"3.10\"},{\"filename\":\"alabaster-0.7.13-py3-none-any.whl\",\"repo\":\"pip_39_alabaster_py3_none_any_1ee19aca\",\"version\":\"3.9\"},{\"filename\":\"alabaster-0.7.13.tar.gz\",\"repo\":\"pip_39_alabaster_sdist_a27a4a08\",\"version\":\"3.9\"}]", + "astroid": "[{\"repo\":\"pip_310_astroid\",\"version\":\"3.10\"},{\"filename\":\"astroid-2.12.13-py3-none-any.whl\",\"repo\":\"pip_39_astroid_py3_none_any_10e0ad5f\",\"version\":\"3.9\"},{\"filename\":\"astroid-2.12.13.tar.gz\",\"repo\":\"pip_39_astroid_sdist_1493fe8b\",\"version\":\"3.9\"}]", + "babel": "[{\"repo\":\"pip_310_babel\",\"version\":\"3.10\"},{\"filename\":\"Babel-2.13.1-py3-none-any.whl\",\"repo\":\"pip_39_babel_py3_none_any_7077a498\",\"version\":\"3.9\"},{\"filename\":\"Babel-2.13.1.tar.gz\",\"repo\":\"pip_39_babel_sdist_33e0952d\",\"version\":\"3.9\"}]", + "certifi": "[{\"repo\":\"pip_310_certifi\",\"version\":\"3.10\"},{\"filename\":\"certifi-2023.7.22-py3-none-any.whl\",\"repo\":\"pip_39_certifi_py3_none_any_92d60375\",\"version\":\"3.9\"},{\"filename\":\"certifi-2023.7.22.tar.gz\",\"repo\":\"pip_39_certifi_sdist_539cc1d1\",\"version\":\"3.9\"}]", + "chardet": "[{\"repo\":\"pip_310_chardet\",\"version\":\"3.10\"},{\"filename\":\"chardet-4.0.0-py2.py3-none-any.whl\",\"repo\":\"pip_39_chardet_py2_none_any_f864054d\",\"version\":\"3.9\"},{\"filename\":\"chardet-4.0.0.tar.gz\",\"repo\":\"pip_39_chardet_sdist_0d6f53a1\",\"version\":\"3.9\"}]", + "colorama": "[{\"repo\":\"pip_310_colorama\",\"version\":\"3.10\"},{\"filename\":\"colorama-0.4.6-py2.py3-none-any.whl\",\"repo\":\"pip_39_colorama_py2_none_any_4f1d9991\",\"version\":\"3.9\"},{\"filename\":\"colorama-0.4.6.tar.gz\",\"repo\":\"pip_39_colorama_sdist_08695f5c\",\"version\":\"3.9\"}]", + "dill": "[{\"repo\":\"pip_310_dill\",\"version\":\"3.10\"},{\"filename\":\"dill-0.3.6-py3-none-any.whl\",\"repo\":\"pip_39_dill_py3_none_any_a07ffd23\",\"version\":\"3.9\"},{\"filename\":\"dill-0.3.6.tar.gz\",\"repo\":\"pip_39_dill_sdist_e5db55f3\",\"version\":\"3.9\"}]", + "docutils": "[{\"repo\":\"pip_310_docutils\",\"version\":\"3.10\"},{\"filename\":\"docutils-0.20.1-py3-none-any.whl\",\"repo\":\"pip_39_docutils_py3_none_any_96f387a2\",\"version\":\"3.9\"},{\"filename\":\"docutils-0.20.1.tar.gz\",\"repo\":\"pip_39_docutils_sdist_f08a4e27\",\"version\":\"3.9\"}]", + "idna": "[{\"repo\":\"pip_310_idna\",\"version\":\"3.10\"},{\"filename\":\"idna-2.10-py2.py3-none-any.whl\",\"repo\":\"pip_39_idna_py2_none_any_b97d804b\",\"version\":\"3.9\"},{\"filename\":\"idna-2.10.tar.gz\",\"repo\":\"pip_39_idna_sdist_b307872f\",\"version\":\"3.9\"}]", + "imagesize": "[{\"repo\":\"pip_310_imagesize\",\"version\":\"3.10\"},{\"filename\":\"imagesize-1.4.1-py2.py3-none-any.whl\",\"repo\":\"pip_39_imagesize_py2_none_any_0d8d18d0\",\"version\":\"3.9\"},{\"filename\":\"imagesize-1.4.1.tar.gz\",\"repo\":\"pip_39_imagesize_sdist_69150444\",\"version\":\"3.9\"}]", + "importlib_metadata": "[{\"filename\":\"importlib_metadata-8.4.0-py3-none-any.whl\",\"repo\":\"pip_39_importlib_metadata_py3_none_any_66f342cc\",\"version\":\"3.9\"},{\"filename\":\"importlib_metadata-8.4.0.tar.gz\",\"repo\":\"pip_39_importlib_metadata_sdist_9a547d3b\",\"version\":\"3.9\"}]", + "isort": "[{\"repo\":\"pip_310_isort\",\"version\":\"3.10\"},{\"filename\":\"isort-5.11.4-py3-none-any.whl\",\"repo\":\"pip_39_isort_py3_none_any_c033fd0e\",\"version\":\"3.9\"},{\"filename\":\"isort-5.11.4.tar.gz\",\"repo\":\"pip_39_isort_sdist_6db30c5d\",\"version\":\"3.9\"}]", + "jinja2": "[{\"repo\":\"pip_310_jinja2\",\"version\":\"3.10\"},{\"filename\":\"jinja2-3.1.4-py3-none-any.whl\",\"repo\":\"pip_39_jinja2_py3_none_any_bc5dd2ab\",\"version\":\"3.9\"},{\"filename\":\"jinja2-3.1.4.tar.gz\",\"repo\":\"pip_39_jinja2_sdist_4a3aee7a\",\"version\":\"3.9\"}]", + "lazy_object_proxy": "[{\"repo\":\"pip_310_lazy_object_proxy\",\"version\":\"3.10\"},{\"filename\":\"lazy-object-proxy-1.10.0.tar.gz\",\"repo\":\"pip_39_lazy_object_proxy_sdist_78247b6d\",\"version\":\"3.9\"},{\"filename\":\"lazy_object_proxy-1.10.0-cp39-cp39-macosx_10_9_x86_64.whl\",\"repo\":\"pip_39_lazy_object_proxy_cp39_cp39_macosx_10_9_x86_64_366c32fe\",\"version\":\"3.9\"},{\"filename\":\"lazy_object_proxy-1.10.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\",\"repo\":\"pip_39_lazy_object_proxy_cp39_cp39_manylinux_2_17_aarch64_2297f08f\",\"version\":\"3.9\"},{\"filename\":\"lazy_object_proxy-1.10.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl\",\"repo\":\"pip_39_lazy_object_proxy_cp39_cp39_manylinux_2_5_x86_64_18dd842b\",\"version\":\"3.9\"},{\"filename\":\"lazy_object_proxy-1.10.0-cp39-cp39-musllinux_1_1_aarch64.whl\",\"repo\":\"pip_39_lazy_object_proxy_cp39_cp39_musllinux_1_1_aarch64_21713819\",\"version\":\"3.9\"},{\"filename\":\"lazy_object_proxy-1.10.0-cp39-cp39-musllinux_1_1_x86_64.whl\",\"repo\":\"pip_39_lazy_object_proxy_cp39_cp39_musllinux_1_1_x86_64_9a3a87cf\",\"version\":\"3.9\"},{\"filename\":\"lazy_object_proxy-1.10.0-cp39-cp39-win_amd64.whl\",\"repo\":\"pip_39_lazy_object_proxy_cp39_cp39_win_amd64_a899b10e\",\"version\":\"3.9\"}]", + "markupsafe": "[{\"repo\":\"pip_310_markupsafe\",\"version\":\"3.10\"},{\"filename\":\"MarkupSafe-2.1.3-cp39-cp39-macosx_10_9_universal2.whl\",\"repo\":\"pip_39_markupsafe_cp39_cp39_macosx_10_9_universal2_8023faf4\",\"version\":\"3.9\"},{\"filename\":\"MarkupSafe-2.1.3-cp39-cp39-macosx_10_9_x86_64.whl\",\"repo\":\"pip_39_markupsafe_cp39_cp39_macosx_10_9_x86_64_6b2b5695\",\"version\":\"3.9\"},{\"filename\":\"MarkupSafe-2.1.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\",\"repo\":\"pip_39_markupsafe_cp39_cp39_manylinux_2_17_aarch64_9dcdfd0e\",\"version\":\"3.9\"},{\"filename\":\"MarkupSafe-2.1.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\",\"repo\":\"pip_39_markupsafe_cp39_cp39_manylinux_2_17_x86_64_05fb2117\",\"version\":\"3.9\"},{\"filename\":\"MarkupSafe-2.1.3-cp39-cp39-musllinux_1_1_aarch64.whl\",\"repo\":\"pip_39_markupsafe_cp39_cp39_musllinux_1_1_aarch64_ab4a0df4\",\"version\":\"3.9\"},{\"filename\":\"MarkupSafe-2.1.3-cp39-cp39-musllinux_1_1_x86_64.whl\",\"repo\":\"pip_39_markupsafe_cp39_cp39_musllinux_1_1_x86_64_0a4e4a1a\",\"version\":\"3.9\"},{\"filename\":\"MarkupSafe-2.1.3-cp39-cp39-win_amd64.whl\",\"repo\":\"pip_39_markupsafe_cp39_cp39_win_amd64_3fd4abcb\",\"version\":\"3.9\"},{\"filename\":\"MarkupSafe-2.1.3.tar.gz\",\"repo\":\"pip_39_markupsafe_sdist_af598ed3\",\"version\":\"3.9\"}]", + "mccabe": "[{\"repo\":\"pip_310_mccabe\",\"version\":\"3.10\"},{\"filename\":\"mccabe-0.7.0-py2.py3-none-any.whl\",\"repo\":\"pip_39_mccabe_py2_none_any_6c2d30ab\",\"version\":\"3.9\"},{\"filename\":\"mccabe-0.7.0.tar.gz\",\"repo\":\"pip_39_mccabe_sdist_348e0240\",\"version\":\"3.9\"}]", + "packaging": "[{\"repo\":\"pip_310_packaging\",\"version\":\"3.10\"},{\"filename\":\"packaging-23.2-py3-none-any.whl\",\"repo\":\"pip_39_packaging_py3_none_any_8c491190\",\"version\":\"3.9\"},{\"filename\":\"packaging-23.2.tar.gz\",\"repo\":\"pip_39_packaging_sdist_048fb0e9\",\"version\":\"3.9\"}]", + "pathspec": "[{\"repo\":\"pip_310_pathspec\",\"version\":\"3.10\"},{\"filename\":\"pathspec-0.10.3-py3-none-any.whl\",\"repo\":\"pip_39_pathspec_py3_none_any_3c95343a\",\"version\":\"3.9\"},{\"filename\":\"pathspec-0.10.3.tar.gz\",\"repo\":\"pip_39_pathspec_sdist_56200de4\",\"version\":\"3.9\"}]", + "platformdirs": "[{\"repo\":\"pip_310_platformdirs\",\"version\":\"3.10\"},{\"filename\":\"platformdirs-2.6.0-py3-none-any.whl\",\"repo\":\"pip_39_platformdirs_py3_none_any_1a89a123\",\"version\":\"3.9\"},{\"filename\":\"platformdirs-2.6.0.tar.gz\",\"repo\":\"pip_39_platformdirs_sdist_b46ffafa\",\"version\":\"3.9\"}]", + "pygments": "[{\"repo\":\"pip_310_pygments\",\"version\":\"3.10\"},{\"filename\":\"Pygments-2.16.1-py3-none-any.whl\",\"repo\":\"pip_39_pygments_py3_none_any_13fc09fa\",\"version\":\"3.9\"},{\"filename\":\"Pygments-2.16.1.tar.gz\",\"repo\":\"pip_39_pygments_sdist_1daff049\",\"version\":\"3.9\"}]", + "pylint": "[{\"repo\":\"pip_310_pylint\",\"version\":\"3.10\"},{\"filename\":\"pylint-2.15.9-py3-none-any.whl\",\"repo\":\"pip_39_pylint_py3_none_any_349c8cd3\",\"version\":\"3.9\"},{\"filename\":\"pylint-2.15.9.tar.gz\",\"repo\":\"pip_39_pylint_sdist_18783cca\",\"version\":\"3.9\"}]", + "pylint_print": "[{\"repo\":\"pip_310_pylint_print\",\"version\":\"3.10\"},{\"filename\":\"pylint-print-1.0.1.tar.gz\",\"repo\":\"pip_39_pylint_print_sdist_30aa207e\",\"version\":\"3.9\"},{\"filename\":\"pylint_print-1.0.1-py3-none-any.whl\",\"repo\":\"pip_39_pylint_print_py3_none_any_a2b2599e\",\"version\":\"3.9\"}]", + "python_dateutil": "[{\"repo\":\"pip_310_python_dateutil\",\"version\":\"3.10\"},{\"filename\":\"python-dateutil-2.8.2.tar.gz\",\"repo\":\"pip_39_python_dateutil_sdist_0123cacc\",\"version\":\"3.9\"},{\"filename\":\"python_dateutil-2.8.2-py2.py3-none-any.whl\",\"repo\":\"pip_39_python_dateutil_py2_none_any_961d03dc\",\"version\":\"3.9\"}]", + "python_magic": "[{\"repo\":\"pip_310_python_magic\",\"version\":\"3.10\"},{\"filename\":\"python-magic-0.4.27.tar.gz\",\"repo\":\"pip_39_python_magic_sdist_c1ba14b0\",\"version\":\"3.9\"},{\"filename\":\"python_magic-0.4.27-py2.py3-none-any.whl\",\"repo\":\"pip_39_python_magic_py2_none_any_c212960a\",\"version\":\"3.9\"}]", + "pyyaml": "[{\"repo\":\"pip_310_pyyaml\",\"version\":\"3.10\"},{\"filename\":\"PyYAML-6.0.1-cp39-cp39-macosx_10_9_x86_64.whl\",\"repo\":\"pip_39_pyyaml_cp39_cp39_macosx_10_9_x86_64_9eb6caa9\",\"version\":\"3.9\"},{\"filename\":\"PyYAML-6.0.1-cp39-cp39-macosx_11_0_arm64.whl\",\"repo\":\"pip_39_pyyaml_cp39_cp39_macosx_11_0_arm64_c8098ddc\",\"version\":\"3.9\"},{\"filename\":\"PyYAML-6.0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\",\"repo\":\"pip_39_pyyaml_cp39_cp39_manylinux_2_17_aarch64_5773183b\",\"version\":\"3.9\"},{\"filename\":\"PyYAML-6.0.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl\",\"repo\":\"pip_39_pyyaml_cp39_cp39_manylinux_2_17_s390x_b786eecb\",\"version\":\"3.9\"},{\"filename\":\"PyYAML-6.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\",\"repo\":\"pip_39_pyyaml_cp39_cp39_manylinux_2_17_x86_64_bc1bf292\",\"version\":\"3.9\"},{\"filename\":\"PyYAML-6.0.1-cp39-cp39-musllinux_1_1_x86_64.whl\",\"repo\":\"pip_39_pyyaml_cp39_cp39_musllinux_1_1_x86_64_04ac92ad\",\"version\":\"3.9\"},{\"filename\":\"PyYAML-6.0.1-cp39-cp39-win_amd64.whl\",\"repo\":\"pip_39_pyyaml_cp39_cp39_win_amd64_510c9dee\",\"version\":\"3.9\"},{\"filename\":\"PyYAML-6.0.1.tar.gz\",\"repo\":\"pip_39_pyyaml_sdist_bfdf460b\",\"version\":\"3.9\"}]", + "requests": "[{\"repo\":\"pip_310_requests\",\"version\":\"3.10\"},{\"filename\":\"requests-2.25.1-py2.py3-none-any.whl\",\"repo\":\"pip_39_requests_py2_none_any_c210084e\",\"version\":\"3.9\"},{\"filename\":\"requests-2.25.1.tar.gz\",\"repo\":\"pip_39_requests_sdist_27973dd4\",\"version\":\"3.9\"}]", + "s3cmd": "[{\"repo\":\"pip_310_s3cmd\",\"version\":\"3.10\"},{\"filename\":\"s3cmd-2.1.0-py2.py3-none-any.whl\",\"repo\":\"pip_39_s3cmd_py2_none_any_49cd23d5\",\"version\":\"3.9\"},{\"filename\":\"s3cmd-2.1.0.tar.gz\",\"repo\":\"pip_39_s3cmd_sdist_966b0a49\",\"version\":\"3.9\"}]", + "setuptools": "[{\"filename\":\"setuptools-65.6.3-py3-none-any.whl\",\"repo\":\"pip_39_setuptools_py3_none_any_57f6f22b\",\"version\":\"3.9\"},{\"filename\":\"setuptools-65.6.3.tar.gz\",\"repo\":\"pip_39_setuptools_sdist_a7620757\",\"version\":\"3.9\"}]", + "six": "[{\"repo\":\"pip_310_six\",\"version\":\"3.10\"},{\"filename\":\"six-1.16.0-py2.py3-none-any.whl\",\"repo\":\"pip_39_six_py2_none_any_8abb2f1d\",\"version\":\"3.9\"},{\"filename\":\"six-1.16.0.tar.gz\",\"repo\":\"pip_39_six_sdist_1e61c374\",\"version\":\"3.9\"}]", + "snowballstemmer": "[{\"repo\":\"pip_310_snowballstemmer\",\"version\":\"3.10\"},{\"filename\":\"snowballstemmer-2.2.0-py2.py3-none-any.whl\",\"repo\":\"pip_39_snowballstemmer_py2_none_any_c8e1716e\",\"version\":\"3.9\"},{\"filename\":\"snowballstemmer-2.2.0.tar.gz\",\"repo\":\"pip_39_snowballstemmer_sdist_09b16deb\",\"version\":\"3.9\"}]", + "sphinx": "[{\"repo\":\"pip_310_sphinx\",\"version\":\"3.10\"},{\"filename\":\"sphinx-7.2.6-py3-none-any.whl\",\"repo\":\"pip_39_sphinx_py3_none_any_1e09160a\",\"version\":\"3.9\"},{\"filename\":\"sphinx-7.2.6.tar.gz\",\"repo\":\"pip_39_sphinx_sdist_9a5160e1\",\"version\":\"3.9\"}]", + "sphinxcontrib_applehelp": "[{\"repo\":\"pip_310_sphinxcontrib_applehelp\",\"version\":\"3.10\"},{\"filename\":\"sphinxcontrib_applehelp-1.0.7-py3-none-any.whl\",\"repo\":\"pip_39_sphinxcontrib_applehelp_py3_none_any_094c4d56\",\"version\":\"3.9\"},{\"filename\":\"sphinxcontrib_applehelp-1.0.7.tar.gz\",\"repo\":\"pip_39_sphinxcontrib_applehelp_sdist_39fdc8d7\",\"version\":\"3.9\"}]", + "sphinxcontrib_devhelp": "[{\"repo\":\"pip_310_sphinxcontrib_devhelp\",\"version\":\"3.10\"},{\"filename\":\"sphinxcontrib_devhelp-1.0.5-py3-none-any.whl\",\"repo\":\"pip_39_sphinxcontrib_devhelp_py3_none_any_fe8009ae\",\"version\":\"3.9\"},{\"filename\":\"sphinxcontrib_devhelp-1.0.5.tar.gz\",\"repo\":\"pip_39_sphinxcontrib_devhelp_sdist_63b41e0d\",\"version\":\"3.9\"}]", + "sphinxcontrib_htmlhelp": "[{\"repo\":\"pip_310_sphinxcontrib_htmlhelp\",\"version\":\"3.10\"},{\"filename\":\"sphinxcontrib_htmlhelp-2.0.4-py3-none-any.whl\",\"repo\":\"pip_39_sphinxcontrib_htmlhelp_py3_none_any_8001661c\",\"version\":\"3.9\"},{\"filename\":\"sphinxcontrib_htmlhelp-2.0.4.tar.gz\",\"repo\":\"pip_39_sphinxcontrib_htmlhelp_sdist_6c26a118\",\"version\":\"3.9\"}]", + "sphinxcontrib_jsmath": "[{\"repo\":\"pip_310_sphinxcontrib_jsmath\",\"version\":\"3.10\"},{\"filename\":\"sphinxcontrib-jsmath-1.0.1.tar.gz\",\"repo\":\"pip_39_sphinxcontrib_jsmath_sdist_a9925e4a\",\"version\":\"3.9\"},{\"filename\":\"sphinxcontrib_jsmath-1.0.1-py2.py3-none-any.whl\",\"repo\":\"pip_39_sphinxcontrib_jsmath_py2_none_any_2ec2eaeb\",\"version\":\"3.9\"}]", + "sphinxcontrib_qthelp": "[{\"repo\":\"pip_310_sphinxcontrib_qthelp\",\"version\":\"3.10\"},{\"filename\":\"sphinxcontrib_qthelp-1.0.6-py3-none-any.whl\",\"repo\":\"pip_39_sphinxcontrib_qthelp_py3_none_any_bf76886e\",\"version\":\"3.9\"},{\"filename\":\"sphinxcontrib_qthelp-1.0.6.tar.gz\",\"repo\":\"pip_39_sphinxcontrib_qthelp_sdist_62b9d1a1\",\"version\":\"3.9\"}]", + "sphinxcontrib_serializinghtml": "[{\"repo\":\"pip_310_sphinxcontrib_serializinghtml\",\"version\":\"3.10\"},{\"filename\":\"sphinxcontrib_serializinghtml-1.1.9-py3-none-any.whl\",\"repo\":\"pip_39_sphinxcontrib_serializinghtml_py3_none_any_9b36e503\",\"version\":\"3.9\"},{\"filename\":\"sphinxcontrib_serializinghtml-1.1.9.tar.gz\",\"repo\":\"pip_39_sphinxcontrib_serializinghtml_sdist_0c64ff89\",\"version\":\"3.9\"}]", + "tabulate": "[{\"repo\":\"pip_310_tabulate\",\"version\":\"3.10\"},{\"filename\":\"tabulate-0.9.0-py3-none-any.whl\",\"repo\":\"pip_39_tabulate_py3_none_any_024ca478\",\"version\":\"3.9\"},{\"filename\":\"tabulate-0.9.0.tar.gz\",\"repo\":\"pip_39_tabulate_sdist_0095b12b\",\"version\":\"3.9\"}]", + "tomli": "[{\"repo\":\"pip_310_tomli\",\"version\":\"3.10\"},{\"filename\":\"tomli-2.0.1-py3-none-any.whl\",\"repo\":\"pip_39_tomli_py3_none_any_939de3e7\",\"version\":\"3.9\"},{\"filename\":\"tomli-2.0.1.tar.gz\",\"repo\":\"pip_39_tomli_sdist_de526c12\",\"version\":\"3.9\"}]", + "tomlkit": "[{\"repo\":\"pip_310_tomlkit\",\"version\":\"3.10\"},{\"filename\":\"tomlkit-0.11.6-py3-none-any.whl\",\"repo\":\"pip_39_tomlkit_py3_none_any_07de26b0\",\"version\":\"3.9\"},{\"filename\":\"tomlkit-0.11.6.tar.gz\",\"repo\":\"pip_39_tomlkit_sdist_71b952e5\",\"version\":\"3.9\"}]", + "typing_extensions": "[{\"repo\":\"pip_310_typing_extensions\",\"version\":\"3.10\"},{\"filename\":\"typing_extensions-4.12.2-py3-none-any.whl\",\"repo\":\"pip_39_typing_extensions_py3_none_any_04e5ca03\",\"version\":\"3.9\"},{\"filename\":\"typing_extensions-4.12.2.tar.gz\",\"repo\":\"pip_39_typing_extensions_sdist_1a7ead55\",\"version\":\"3.9\"}]", + "urllib3": "[{\"repo\":\"pip_310_urllib3\",\"version\":\"3.10\"},{\"filename\":\"urllib3-1.26.18-py2.py3-none-any.whl\",\"repo\":\"pip_39_urllib3_py2_none_any_34b97092\",\"version\":\"3.9\"},{\"filename\":\"urllib3-1.26.18.tar.gz\",\"repo\":\"pip_39_urllib3_sdist_f8ecc1bb\",\"version\":\"3.9\"}]", + "websockets": "[{\"repo\":\"pip_310_websockets\",\"version\":\"3.10\"},{\"filename\":\"websockets-11.0.3-cp39-cp39-macosx_10_9_universal2.whl\",\"repo\":\"pip_39_websockets_cp39_cp39_macosx_10_9_universal2_777354ee\",\"version\":\"3.9\"},{\"filename\":\"websockets-11.0.3-cp39-cp39-macosx_10_9_x86_64.whl\",\"repo\":\"pip_39_websockets_cp39_cp39_macosx_10_9_x86_64_8c82f119\",\"version\":\"3.9\"},{\"filename\":\"websockets-11.0.3-cp39-cp39-macosx_11_0_arm64.whl\",\"repo\":\"pip_39_websockets_cp39_cp39_macosx_11_0_arm64_3580dd9c\",\"version\":\"3.9\"},{\"filename\":\"websockets-11.0.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\",\"repo\":\"pip_39_websockets_cp39_cp39_manylinux_2_17_aarch64_6f1a3f10\",\"version\":\"3.9\"},{\"filename\":\"websockets-11.0.3-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl\",\"repo\":\"pip_39_websockets_cp39_cp39_manylinux_2_5_x86_64_279e5de4\",\"version\":\"3.9\"},{\"filename\":\"websockets-11.0.3-cp39-cp39-musllinux_1_1_aarch64.whl\",\"repo\":\"pip_39_websockets_cp39_cp39_musllinux_1_1_aarch64_1fdf26fa\",\"version\":\"3.9\"},{\"filename\":\"websockets-11.0.3-cp39-cp39-musllinux_1_1_x86_64.whl\",\"repo\":\"pip_39_websockets_cp39_cp39_musllinux_1_1_x86_64_97b52894\",\"version\":\"3.9\"},{\"filename\":\"websockets-11.0.3-cp39-cp39-win_amd64.whl\",\"repo\":\"pip_39_websockets_cp39_cp39_win_amd64_c792ea4e\",\"version\":\"3.9\"},{\"filename\":\"websockets-11.0.3-py3-none-any.whl\",\"repo\":\"pip_39_websockets_py3_none_any_6681ba9e\",\"version\":\"3.9\"},{\"filename\":\"websockets-11.0.3.tar.gz\",\"repo\":\"pip_39_websockets_sdist_88fc51d9\",\"version\":\"3.9\"}]", + "wheel": "[{\"repo\":\"pip_310_wheel\",\"version\":\"3.10\"},{\"filename\":\"wheel-0.40.0-py3-none-any.whl\",\"repo\":\"pip_39_wheel_py3_none_any_d236b20e\",\"version\":\"3.9\"},{\"filename\":\"wheel-0.40.0.tar.gz\",\"repo\":\"pip_39_wheel_sdist_cd1196f3\",\"version\":\"3.9\"}]", + "wrapt": "[{\"repo\":\"pip_310_wrapt\",\"version\":\"3.10\"},{\"filename\":\"wrapt-1.14.1-cp39-cp39-macosx_10_9_x86_64.whl\",\"repo\":\"pip_39_wrapt_cp39_cp39_macosx_10_9_x86_64_3232822c\",\"version\":\"3.9\"},{\"filename\":\"wrapt-1.14.1-cp39-cp39-macosx_11_0_arm64.whl\",\"repo\":\"pip_39_wrapt_cp39_cp39_macosx_11_0_arm64_988635d1\",\"version\":\"3.9\"},{\"filename\":\"wrapt-1.14.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl\",\"repo\":\"pip_39_wrapt_cp39_cp39_manylinux_2_17_aarch64_9cca3c2c\",\"version\":\"3.9\"},{\"filename\":\"wrapt-1.14.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl\",\"repo\":\"pip_39_wrapt_cp39_cp39_manylinux_2_5_x86_64_40e7bc81\",\"version\":\"3.9\"},{\"filename\":\"wrapt-1.14.1-cp39-cp39-musllinux_1_1_aarch64.whl\",\"repo\":\"pip_39_wrapt_cp39_cp39_musllinux_1_1_aarch64_b9b7a708\",\"version\":\"3.9\"},{\"filename\":\"wrapt-1.14.1-cp39-cp39-musllinux_1_1_x86_64.whl\",\"repo\":\"pip_39_wrapt_cp39_cp39_musllinux_1_1_x86_64_34aa51c4\",\"version\":\"3.9\"},{\"filename\":\"wrapt-1.14.1-cp39-cp39-win_amd64.whl\",\"repo\":\"pip_39_wrapt_cp39_cp39_win_amd64_dee60e1d\",\"version\":\"3.9\"},{\"filename\":\"wrapt-1.14.1.tar.gz\",\"repo\":\"pip_39_wrapt_sdist_380a85cf\",\"version\":\"3.9\"}]", + "yamllint": "[{\"repo\":\"pip_310_yamllint\",\"version\":\"3.10\"},{\"filename\":\"yamllint-1.28.0-py2.py3-none-any.whl\",\"repo\":\"pip_39_yamllint_py2_none_any_89bb5b5a\",\"version\":\"3.9\"},{\"filename\":\"yamllint-1.28.0.tar.gz\",\"repo\":\"pip_39_yamllint_sdist_9e3d8ddd\",\"version\":\"3.9\"}]", + "zipp": "[{\"filename\":\"zipp-3.20.0-py3-none-any.whl\",\"repo\":\"pip_39_zipp_py3_none_any_58da6168\",\"version\":\"3.9\"},{\"filename\":\"zipp-3.20.0.tar.gz\",\"repo\":\"pip_39_zipp_sdist_0145e43d\",\"version\":\"3.9\"}]" + }, + "packages": [ + "alabaster", + "astroid", + "babel", + "certifi", + "chardet", + "colorama", + "dill", + "docutils", + "idna", + "imagesize", + "importlib_metadata", + "isort", + "jinja2", + "lazy_object_proxy", + "markupsafe", + "mccabe", + "packaging", + "pathspec", + "platformdirs", + "pygments", + "pylint", + "pylint_print", + "python_dateutil", + "python_magic", + "pyyaml", + "requests", + "s3cmd", + "setuptools", + "six", + "snowballstemmer", + "sphinx", + "sphinxcontrib_applehelp", + "sphinxcontrib_devhelp", + "sphinxcontrib_htmlhelp", + "sphinxcontrib_jsmath", + "sphinxcontrib_qthelp", + "sphinxcontrib_serializinghtml", + "tabulate", + "tomli", + "tomlkit", + "typing_extensions", + "urllib3", + "websockets", + "wheel", + "wrapt", + "yamllint", + "zipp" + ], + "groups": { + "sphinx": [ + "sphinx", + "sphinxcontrib-applehelp", + "sphinxcontrib-devhelp", + "sphinxcontrib-htmlhelp", + "sphinxcontrib-qthelp", + "sphinxcontrib-serializinghtml" + ] + } + } + }, + "pip_deps": { + "bzlFile": "@@rules_python~//python/private/pypi:hub_repository.bzl", + "ruleClassName": "hub_repository", + "attributes": { + "repo_name": "pip_deps", + "extra_hub_aliases": {}, + "whl_map": { + "numpy": "[{\"repo\":\"pip_deps_310_numpy\",\"version\":\"3.10\"},{\"repo\":\"pip_deps_311_numpy\",\"version\":\"3.11\"},{\"repo\":\"pip_deps_312_numpy\",\"version\":\"3.12\"},{\"repo\":\"pip_deps_38_numpy\",\"version\":\"3.8\"},{\"repo\":\"pip_deps_39_numpy\",\"version\":\"3.9\"}]", + "setuptools": "[{\"repo\":\"pip_deps_310_setuptools\",\"version\":\"3.10\"},{\"repo\":\"pip_deps_311_setuptools\",\"version\":\"3.11\"},{\"repo\":\"pip_deps_312_setuptools\",\"version\":\"3.12\"},{\"repo\":\"pip_deps_38_setuptools\",\"version\":\"3.8\"},{\"repo\":\"pip_deps_39_setuptools\",\"version\":\"3.9\"}]" + }, + "packages": [ + "numpy", + "setuptools" + ], + "groups": {} + } + }, + "rules_fuzzing_py_deps": { + "bzlFile": "@@rules_python~//python/private/pypi:hub_repository.bzl", + "ruleClassName": "hub_repository", + "attributes": { + "repo_name": "rules_fuzzing_py_deps", + "extra_hub_aliases": {}, + "whl_map": { + "absl_py": "[{\"repo\":\"rules_fuzzing_py_deps_310_absl_py\",\"version\":\"3.10\"},{\"repo\":\"rules_fuzzing_py_deps_311_absl_py\",\"version\":\"3.11\"},{\"repo\":\"rules_fuzzing_py_deps_312_absl_py\",\"version\":\"3.12\"},{\"repo\":\"rules_fuzzing_py_deps_38_absl_py\",\"version\":\"3.8\"},{\"repo\":\"rules_fuzzing_py_deps_39_absl_py\",\"version\":\"3.9\"}]", + "six": "[{\"repo\":\"rules_fuzzing_py_deps_310_six\",\"version\":\"3.10\"},{\"repo\":\"rules_fuzzing_py_deps_311_six\",\"version\":\"3.11\"},{\"repo\":\"rules_fuzzing_py_deps_312_six\",\"version\":\"3.12\"},{\"repo\":\"rules_fuzzing_py_deps_38_six\",\"version\":\"3.8\"},{\"repo\":\"rules_fuzzing_py_deps_39_six\",\"version\":\"3.9\"}]" + }, + "packages": [ + "absl_py", + "six" + ], + "groups": {} + } + }, "rules_python_publish_deps": { "bzlFile": "@@rules_python~//python/private/pypi:hub_repository.bzl", "ruleClassName": "hub_repository", @@ -9487,6 +9346,10 @@ } } }, + "moduleExtensionMetadata": { + "useAllRepos": "NO", + "reproducible": false + }, "recordedRepoMappingEntries": [ [ "bazel_features~", diff --git a/python/private/pypi/extension.bzl b/python/private/pypi/extension.bzl index 3df7b52e8a..2ed946fbca 100644 --- a/python/private/pypi/extension.bzl +++ b/python/private/pypi/extension.bzl @@ -24,7 +24,7 @@ load("//python/private:version_label.bzl", "version_label") load(":attrs.bzl", "use_isolated") load(":evaluate_markers.bzl", "evaluate_markers", EVALUATE_MARKERS_SRCS = "SRCS") load(":hub_repository.bzl", "hub_repository") -load(":parse_requirements.bzl", "host_platform", "parse_requirements", "select_requirement") +load(":parse_requirements.bzl", "parse_requirements") load(":parse_whl_name.bzl", "parse_whl_name") load(":pip_repository_attrs.bzl", "ATTRS") load(":render_pkg_aliases.bzl", "whl_alias") @@ -216,7 +216,6 @@ def _create_whl_repos( logger = logger, ) - repository_platform = host_platform(module_ctx) for whl_name, requirements in requirements_by_platform.items(): whl_name = normalize_name(whl_name) @@ -319,38 +318,6 @@ def _create_whl_repos( exposed_packages[whl_name] = None continue - if not pip_attr.parse_all_requirements_files: - requirement = select_requirement( - requirements, - platform = None if pip_attr.download_only else repository_platform, - ) - if not requirement: - # Sometimes the package is not present for host platform if there - # are whls specified only in particular requirements files, in that - # case just continue, however, if the download_only flag is set up, - # then the user can also specify the target platform of the wheel - # packages they want to download, in that case there will be always - # a requirement here, so we will not be in this code branch. - continue - elif get_index_urls: - logger.warn(lambda: "falling back to pip for installing the right file for {}".format(requirement.requirement_line)) - - whl_library_args["requirement"] = requirement.requirement_line - if requirement.extra_pip_args: - whl_library_args["extra_pip_args"] = requirement.extra_pip_args - - # We sort so that the lock-file remains the same no matter the order of how the - # args are manipulated in the code going before. - repo_name = "{}_{}".format(pip_name, whl_name) - whl_libraries[repo_name] = dict(whl_library_args.items()) - whl_map.setdefault(whl_name, []).append( - whl_alias( - repo = repo_name, - version = major_minor, - ), - ) - continue - is_exposed = False for requirement in requirements: is_exposed = is_exposed or requirement.is_exposed @@ -683,13 +650,6 @@ def _pip_impl(module_ctx): else: return None -def _pip_non_reproducible(module_ctx): - _pip_impl(module_ctx) - - # We default to calling the PyPI index and that will go into the - # MODULE.bazel.lock file, hence return nothing here. - return None - def _pip_parse_ext_attrs(**kwargs): """Get the attributes for the pip extension. @@ -789,20 +749,6 @@ find in case extra indexes are specified. """, default = True, ), - "parse_all_requirements_files": attr.bool( - default = True, - doc = """\ -A temporary flag to enable users to make `pip` extension result always -the same independent of the whether transitive dependencies use {bzl:attr}`experimental_index_url` or not. - -This enables users to migrate to a solution that fixes -[#2268](https://github.com/bazelbuild/rules_python/issues/2268). - -::::{deprecated} 0.38.0 -This is a transition flag and will be removed in a subsequent release. -:::: -""", - ), "python_version": attr.string( mandatory = True, doc = """ @@ -961,53 +907,6 @@ extension. }, ) -pypi_internal = module_extension( - doc = """\ -This extension is used to make dependencies from pypi available. -For now this is intended to be used internally so that usage of the `pip` -extension in `rules_python` does not affect the evaluations of the extension -for the consumers. -pip.parse: -To use, call `pip.parse()` and specify `hub_name` and your requirements file. -Dependencies will be downloaded and made available in a repo named after the -`hub_name` argument. -Each `pip.parse()` call configures a particular Python version. Multiple calls -can be made to configure different Python versions, and will be grouped by -the `hub_name` argument. This allows the same logical name, e.g. `@pypi//numpy` -to automatically resolve to different, Python version-specific, libraries. -pip.whl_mods: -This tag class is used to help create JSON files to describe modifications to -the BUILD files for wheels. - -TODO: will be removed before 1.0. -""", - implementation = _pip_non_reproducible, - tag_classes = { - "override": _override_tag, - "parse": tag_class( - attrs = _pip_parse_ext_attrs( - experimental_index_url = "https://pypi.org/simple", - ), - doc = """\ -This tag class is used to create a pypi hub and all of the spokes that are part of that hub. -This tag class reuses most of the attributes found in {bzl:obj}`pip_parse`. -The exception is it does not use the arg 'repo_prefix'. We set the repository -prefix for the user and the alias arg is always True in bzlmod. -""", - ), - "whl_mods": tag_class( - attrs = _whl_mod_attrs(), - doc = """\ -This tag class is used to create JSON file that are used when calling wheel_builder.py. These -JSON files contain instructions on how to modify a wheel's project. Each of the attributes -create different modifications based on the type of attribute. Previously to bzlmod these -JSON files where referred to as annotations, and were renamed to whl_modifications in this -extension. -""", - ), - }, -) - def _whl_mods_repo_impl(rctx): rctx.file("BUILD.bazel", "") for whl_name, mods in rctx.attr.whl_mods.items(): diff --git a/python/private/pypi/pip.bzl b/python/private/pypi/pip.bzl index cb8e111e0e..3ff6b0f51f 100644 --- a/python/private/pypi/pip.bzl +++ b/python/private/pypi/pip.bzl @@ -14,7 +14,6 @@ "pip module extensions for use with bzlmod." -load("//python/private/pypi:extension.bzl", "pypi", "pypi_internal") +load("//python/private/pypi:extension.bzl", "pypi") pip = pypi -pip_internal = pypi_internal