)]}'
{
  "commit": "227889984da1b14f7a94efbb85bea2818d95cb88",
  "tree": "d44839b06deb4b7f42e3b249d23e6ab6e1fcf38e",
  "parents": [
    "a0f65fd06b495e9fc7cfcd8e988668f98c0836d1"
  ],
  "author": {
    "name": "Ignas Anikevicius",
    "email": "240938+aignas@users.noreply.github.com",
    "time": "Sun Nov 22 05:56:53 2026 +0000"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Sun Nov 22 05:56:53 2026 +0000"
  },
  "message": "feat(pypi): add pip.configure to select the exposed packages of a hub (#4395)\n\nBefore this change a hub exposed all of the packages from its\nrequirements files or `uv.lock` file, including the transitive\ndependencies, and there was no way to limit them to the direct\ndependencies of a project.\n\nThis adds the `pip.configure` tag class, which limits the packages that\na hub exposes to the ones listed in the dependency groups of a\n`pyproject.toml` file, i.e. the `[project] dependencies`,\n`[project.optional-dependencies]` and PEP 735 `[dependency-groups]`\ntables:\n\n```starlark\npip.parse(\n    hub_name \u003d \"pypi_hub\",\n    pyproject_toml \u003d \"//:pyproject.toml\",\n    requirements_lock \u003d \"//:requirements_lock.txt\",\n)\npip.configure(\n    hub_name \u003d \"pypi_hub\",\n    dependency_groups \u003d [\"default\", \"group:dev\"],\n)\n```\n\nThe other packages of the hub are still used by the wheels that need\nthem, but their aliases are only visible to the wheel repositories, and\nthey are left out of the `all_requirements` lists and the unified\n`@pypi` hub. The transitive dependencies of selected groups are not\nsupported, the only exception is `[\"*\", \"transitive\"]`, which exposes\nall of the packages of the hub. Only the root module and the module that\ncreated the hub can configure it, and the root module wins if both do.\nThe hubs that are not configured are unchanged.\n\nThe `pip.configure` tags work like a builder: the tags of a hub are\napplied in order and combined, and a `pyproject_toml` set on one tag is\nused by the later tags of the same module and hub. The\n`dependency_groups` default to `[]`, so a tag only needs a\n`pyproject.toml` when it selects dependency groups, which leaves room\nfor the tags that configure other parts of the hub.\n\nThis is only supported with bzlmod; the `WORKSPACE` code is unchanged.\n\nWork towards #3413\n\n---------\n\nCo-authored-by: Richard Levasseur \u003crichardlev@gmail.com\u003e",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "cc8b7890aa746d1b665a70057c9a811360f85dd6",
      "old_mode": 33188,
      "old_path": "docs/pypi/download.md",
      "new_id": "ad8b40e70d5e36c438b62de050e5cbc5d58ba959",
      "new_mode": 33188,
      "new_path": "docs/pypi/download.md"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "3e633cc997a4edbb00dc817861b42932fc0f731c",
      "new_mode": 33188,
      "new_path": "news/4395.added.md"
    },
    {
      "type": "modify",
      "old_id": "1754c1787ae8e824592027bfc3ce39b05d46fb9f",
      "old_mode": 33188,
      "old_path": "python/private/pypi/BUILD.bazel",
      "new_id": "e867cd9163e9d304c39a6dc34e618bf9b3ada6a0",
      "new_mode": 33188,
      "new_path": "python/private/pypi/BUILD.bazel"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "13b164c2b4a31eca36e6a4df114704adff92d580",
      "new_mode": 33188,
      "new_path": "python/private/pypi/dependency_groups.bzl"
    },
    {
      "type": "modify",
      "old_id": "21d5ba509c8cbc472ab0a8e5d7ba559c3d05f77c",
      "old_mode": 33188,
      "old_path": "python/private/pypi/extension.bzl",
      "new_id": "753e34e54112c8caa2b20950c89973962a3bf79a",
      "new_mode": 33188,
      "new_path": "python/private/pypi/extension.bzl"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "7393c28fbe1a48f8484c68824611cac537689cb3",
      "new_mode": 33188,
      "new_path": "python/private/pypi/hub_exposure.bzl"
    },
    {
      "type": "modify",
      "old_id": "f915aa1c77c7d1dd887e5bbb3d617dcefc280aa0",
      "old_mode": 33188,
      "old_path": "python/private/pypi/hub_repository.bzl",
      "new_id": "c401168873fef0bbc73aa12f1b9467aa9cb87a3f",
      "new_mode": 33188,
      "new_path": "python/private/pypi/hub_repository.bzl"
    },
    {
      "type": "modify",
      "old_id": "0a1c32849180e5248cb6c94e99376045c7590d29",
      "old_mode": 33188,
      "old_path": "python/private/pypi/render_pkg_aliases.bzl",
      "new_id": "f03c33355e23d4ae577b8f9e91534eb02b707096",
      "new_mode": 33188,
      "new_path": "python/private/pypi/render_pkg_aliases.bzl"
    },
    {
      "type": "modify",
      "old_id": "e96ffd2023324ec17a0c2cf32c88c8ce50d28535",
      "old_mode": 33188,
      "old_path": "python/private/pyproject_utils.bzl",
      "new_id": "c65157df8373f902b9986199ff171e2fbf472c2f",
      "new_mode": 33188,
      "new_path": "python/private/pyproject_utils.bzl"
    },
    {
      "type": "modify",
      "old_id": "13d188d087f2a7d5eed5cce9129ccdb8b3d70d24",
      "old_mode": 33188,
      "old_path": "tests/integration/unified_pypi/BUILD.bazel",
      "new_id": "78f9a857eec0cd5b68955fe54cb5f738d52d02fc",
      "new_mode": 33188,
      "new_path": "tests/integration/unified_pypi/BUILD.bazel"
    },
    {
      "type": "modify",
      "old_id": "ee8f622cb4349cee55ca32047673d7535a8087ed",
      "old_mode": 33188,
      "old_path": "tests/integration/unified_pypi/MODULE.bazel",
      "new_id": "70e01ccdac210f7ba2b20712f739237d28560958",
      "new_mode": 33188,
      "new_path": "tests/integration/unified_pypi/MODULE.bazel"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "632f72fe22ec2d3c6e57ba25393e333788a3a02c",
      "new_mode": 33188,
      "new_path": "tests/integration/unified_pypi/pyproject_filtered.toml"
    },
    {
      "type": "modify",
      "old_id": "9ce41fafb752dd0e38478b83e88b68808081fbd1",
      "old_mode": 33188,
      "old_path": "tests/integration/unified_pypi_test.py",
      "new_id": "f59a19fb4226dd0fb2b57264ca23579ca2a8c854",
      "new_mode": 33188,
      "new_path": "tests/integration/unified_pypi_test.py"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "ba6877e12417ea067f0d781d0e04495ae954c568",
      "new_mode": 33188,
      "new_path": "tests/pypi/dependency_groups/BUILD.bazel"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "a53905bb041057bbd1937ebde2f703274f2c9cd6",
      "new_mode": 33188,
      "new_path": "tests/pypi/dependency_groups/dependency_groups_tests.bzl"
    },
    {
      "type": "modify",
      "old_id": "91bf3c76d1b3a2a9eb19714da28554fded86b79f",
      "old_mode": 33188,
      "old_path": "tests/pypi/extension/extension_tests.bzl",
      "new_id": "f1974cf88caaaac73b1b646fabfea16e3fb5d2e0",
      "new_mode": 33188,
      "new_path": "tests/pypi/extension/extension_tests.bzl"
    },
    {
      "type": "modify",
      "old_id": "638836e588f45e1b3b57d298e15c651c3843a875",
      "old_mode": 33188,
      "old_path": "tests/pypi/extension/pip_parse.bzl",
      "new_id": "d048f99bd094758bc4dc2db5f431732d6ae19d88",
      "new_mode": 33188,
      "new_path": "tests/pypi/extension/pip_parse.bzl"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "187361e1cea6c6b10d152f8292c437ffe1e1047d",
      "new_mode": 33188,
      "new_path": "tests/pypi/hub_exposure/BUILD.bazel"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "1f2b13622c74b3e8ab0401e34868c0c82c8e536e",
      "new_mode": 33188,
      "new_path": "tests/pypi/hub_exposure/hub_exposure_tests.bzl"
    },
    {
      "type": "modify",
      "old_id": "9114f5927934ed57b15fccf0b901fc3c36f77aa8",
      "old_mode": 33188,
      "old_path": "tests/pypi/render_pkg_aliases/render_pkg_aliases_test.bzl",
      "new_id": "13bee38ff5d820f67c85eb0511b5f2f24df39bae",
      "new_mode": 33188,
      "new_path": "tests/pypi/render_pkg_aliases/render_pkg_aliases_test.bzl"
    }
  ]
}
