)]}'
{
  "commit": "c314bc4f593dad09b4cf0d12cfe918fb996749d2",
  "tree": "9632dbcd96766be7100ee84a0d332a80bb48ac77",
  "parents": [
    "0126337e2f740216087876570bf641c3f5704b7f"
  ],
  "author": {
    "name": "charleysaintNV",
    "email": "csaint@nvidia.com",
    "time": "Sun Oct 25 23:33:23 2026 +0000"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Sun Oct 25 23:33:23 2026 +0000"
  },
  "message": "fix(pypi): fetch retained wheel archives lazily (#4316)\n\nURL-resolved wheels currently retain both the downloaded archive and\nextracted files even when a build only consumes the Python library.\nDownload the archive temporarily for extraction and remove it afterward,\nwhile preserving the existing `whl` and `whl_file` targets through a\nlazy sibling `\u003crepo\u003e_whl` repository. Ordinary Python builds do not\nfetch that sibling repository.\n\nApply matching patches in the separate wheel-file repository and extract\nfrom its patched archive. This keeps both original and patched archives\nout of the extracted repository. Preserve caller-owned wheel inputs,\nusing a distinct `_patched_whl` repository for their patched\nreplacements to avoid collisions with existing source repositories.\nSource-built wheels and direct `whl_archive` URL calls retain their\ncurrent archive behavior. Both download paths share checksum validation,\nauthentication, and URL/environment substitution.\n\nExtend the existing wheel-library integration test with a generated\nwheel served over HTTP. Separate Bazel invocations check archive\ncleanup, lazy repository creation, both wheel targets, matching and\nnonmatching patches, preservation of caller-owned inputs, and the full\n`pip.parse(uv_lock \u003d ...)` path. Retain the existing pip-backend,\nsource-distribution, direct `whl_archive`, and dependency-wiring\nassertions in the same integration target. Add analysis coverage for\narchive ownership and exclusion from runtime files.\n\nGazelle\u0027s module mapping still consumes wheel archives and therefore\nmaterializes their archive repositories. Changing that consumer to use\nextracted libraries is separate follow-up work.\n\nValidation:\n- All 31 bzlmod example tests pass, including an assertion that the\npublic wheel archive contains the same patched metadata as the extracted\nlibrary. Both `bazel vendor //...` and building all targets with the\nresulting vendor directory pass locally.\n- All 24 affected Bazel test targets pass with `--config\u003dfast-tests`,\nincluding the consolidated\n`//tests/integration:whl_library_test_bazel_self` target and its five\ntest methods. The nested integration target is run with tag filters\noverridden and local test concurrency limited to one.\n- The storage analysis suite passes under bzlmod. Under Bazel 7.4.1\nWORKSPACE mode, the bzlmod-specific ownership assertion is skipped and\nruntime archive exclusion passes.\n- All applicable pre-commit hooks pass, including buildifier, Ruff,\ndeleted-package generation, and Gazelle.\n- The NumPy 2.3.3 PoC imports successfully without materializing an\narchive repository; explicitly building its `whl` target materializes\nthe archive. Its extracted repository uses 57.74 MiB instead of 73.61\nMiB allocated on the test filesystem. Shared download caches are outside\nthat measurement.\n\nImplements the delete-by-default / optional-archive-access suggestion in\nhttps://github.com/bazel-contrib/rules_python/issues/3091#issuecomment-3074481951.\nPreserves the wheel-consumer functionality introduced in #364 and fixed\nin #458. Related to #3968 and complements the extraction-reuse work in\n#3856.",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "7c5ab5056eec32536d36864f7695acd34cec0439",
      "old_mode": 33188,
      "old_path": "examples/bzlmod/whl_mods/BUILD.bazel",
      "new_id": "d1415613388d9cd98dfcaa841474ac6a3592a18c",
      "new_mode": 33188,
      "new_path": "examples/bzlmod/whl_mods/BUILD.bazel"
    },
    {
      "type": "modify",
      "old_id": "0ca118d7b68e0833521f966684c9cf28d8ca8bb0",
      "old_mode": 33188,
      "old_path": "examples/bzlmod/whl_mods/appended_build_content.BUILD",
      "new_id": "e751dcbb305660306ad5ea7d52b2ee9fd33b80c8",
      "new_mode": 33188,
      "new_path": "examples/bzlmod/whl_mods/appended_build_content.BUILD"
    },
    {
      "type": "modify",
      "old_id": "8cd723224a6a8261865329b9b1492ce26d13b619",
      "old_mode": 33188,
      "old_path": "examples/bzlmod/whl_mods/pip_whl_mods_test.py",
      "new_id": "972a7df4117198396344af58e5c4720ce2e83110",
      "new_mode": 33188,
      "new_path": "examples/bzlmod/whl_mods/pip_whl_mods_test.py"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "08226ef0e5ab8c35e15c4a74c4106353b03c4029",
      "new_mode": 33188,
      "new_path": "news/lazy-wheel-archives.changed.md"
    },
    {
      "type": "modify",
      "old_id": "96b68e7796684cb11573e4f934f8fc04abf5877e",
      "old_mode": 33188,
      "old_path": "python/private/pypi/BUILD.bazel",
      "new_id": "149074dd3f79ebbb0de5eadeca6555311e81c7db",
      "new_mode": 33188,
      "new_path": "python/private/pypi/BUILD.bazel"
    },
    {
      "type": "modify",
      "old_id": "b4ecb2f5b52004c7c214e7c7e4318c8746832c7f",
      "old_mode": 33188,
      "old_path": "python/private/pypi/patch_and_extract_whl.bzl",
      "new_id": "37c90e322176e9672dc5f381e0e8435eb0fb7cb7",
      "new_mode": 33188,
      "new_path": "python/private/pypi/patch_and_extract_whl.bzl"
    },
    {
      "type": "modify",
      "old_id": "e8d76eeba5b67a6c43e5c5e16dcb6848db505633",
      "old_mode": 33188,
      "old_path": "python/private/pypi/patch_whl.bzl",
      "new_id": "b257f2b4fe9f9d24ebe493d37c04807ae094eca5",
      "new_mode": 33188,
      "new_path": "python/private/pypi/patch_whl.bzl"
    },
    {
      "type": "modify",
      "old_id": "242104f3c26665a0982bace2c3a01d70ed20153d",
      "old_mode": 33188,
      "old_path": "python/private/pypi/whl_archive.bzl",
      "new_id": "3ba32b1aa1bd2e384f17c4b2c14c0c38adf41db7",
      "new_mode": 33188,
      "new_path": "python/private/pypi/whl_archive.bzl"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "40d79ac10b8d0ae48a9544ff7ca0de8556ea1a48",
      "new_mode": 33188,
      "new_path": "python/private/pypi/whl_file_repo.bzl"
    },
    {
      "type": "modify",
      "old_id": "3f874b464b9d77e0bdc3b62e594d55a0c121f443",
      "old_mode": 33188,
      "old_path": "python/private/pypi/whl_library.bzl",
      "new_id": "3441a2c907710c37e447914b5ff47c3d1f9e7400",
      "new_mode": 33188,
      "new_path": "python/private/pypi/whl_library.bzl"
    },
    {
      "type": "modify",
      "old_id": "0556219c93611e025d95880fb405d4029ce035e3",
      "old_mode": 33188,
      "old_path": "python/private/pypi/whl_library_srcs.bzl",
      "new_id": "44d47eb25035068d2bfc1200b32bc05804adaf12",
      "new_mode": 33188,
      "new_path": "python/private/pypi/whl_library_srcs.bzl"
    },
    {
      "type": "modify",
      "old_id": "4f7bf8e98aa33fbc81a591cfd82147bdcdff7806",
      "old_mode": 33188,
      "old_path": "python/private/pypi/whl_library_targets.bzl",
      "new_id": "a1cc727460f6b7b257dd5939c50f86d16c92e167",
      "new_mode": 33188,
      "new_path": "python/private/pypi/whl_library_targets.bzl"
    },
    {
      "type": "modify",
      "old_id": "6c5d248202672ec6954278de5b66ebffb5bc3a16",
      "old_mode": 33188,
      "old_path": "tests/integration/BUILD.bazel",
      "new_id": "21ef8fad1609bbe7a512ae9f9e4fcd3008693aff",
      "new_mode": 33188,
      "new_path": "tests/integration/BUILD.bazel"
    },
    {
      "type": "modify",
      "old_id": "a53bcc7258c5dc83f4d1d3abb4603bae8bbff46e",
      "old_mode": 33188,
      "old_path": "tests/integration/whl_library/BUILD.bazel",
      "new_id": "0d2085b40714792ffe943b2ebe5747d590599305",
      "new_mode": 33188,
      "new_path": "tests/integration/whl_library/BUILD.bazel"
    },
    {
      "type": "modify",
      "old_id": "d3886d7650904999f6df23e52d6a335848c2600c",
      "old_mode": 33188,
      "old_path": "tests/integration/whl_library/MODULE.bazel",
      "new_id": "9059879187f6cf21753a63d55e2d2538257c3d49",
      "new_mode": 33188,
      "new_path": "tests/integration/whl_library/MODULE.bazel"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "ba557310169dcade2e96ad6cead9157acdcaa1e8",
      "new_mode": 33188,
      "new_path": "tests/integration/whl_library/main.py"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "61c310b57990aaddb37d415ac2453425aaa6ed5e",
      "new_mode": 33188,
      "new_path": "tests/integration/whl_library/modify_pkg.patch"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "b82f0c047961ebd83ad11f2b7f46061dc7239cdd",
      "new_mode": 33188,
      "new_path": "tests/integration/whl_library/wheels.bzl"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "f61ad215c8b4988eb361a49e35937d11ac7792c5",
      "new_mode": 33188,
      "new_path": "tests/integration/whl_library_test.py"
    },
    {
      "type": "modify",
      "old_id": "316abe82716b07e7dcf11c33e59273c02d7f6c82",
      "old_mode": 33188,
      "old_path": "tests/pypi/integration/BUILD.bazel",
      "new_id": "6a060cf7b06f09dd6ac4857b69cb4ba270317fac",
      "new_mode": 33188,
      "new_path": "tests/pypi/integration/BUILD.bazel"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "de469b10dff67c94cd21000c4399aad81f13cf7a",
      "new_mode": 33188,
      "new_path": "tests/pypi/integration/whl_storage_tests.bzl"
    },
    {
      "type": "modify",
      "old_id": "fe4342b564e5c0606fb2006ded28f7b141c13ba0",
      "old_mode": 33188,
      "old_path": "tests/pypi/whl_library_srcs/whl_library_srcs_tests.bzl",
      "new_id": "740d70e3fbbeba712ff3be7ba80e697253a787bc",
      "new_mode": 33188,
      "new_path": "tests/pypi/whl_library_srcs/whl_library_srcs_tests.bzl"
    }
  ]
}
