)]}'
{
  "commit": "f4780f7b71dc224ea3b51b4ec8048b829e1f3375",
  "tree": "e6d2d05137530f2c9f88f6ef6fb89ddd3b2425a6",
  "parents": [
    "aaf8ce8adb43536f24ecfe38038351afafcbfa65"
  ],
  "author": {
    "name": "Richard Levasseur",
    "email": "rlevasseur@google.com",
    "time": "Mon Apr 21 15:35:13 2025 -0700"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Mon Apr 21 22:35:13 2025 +0000"
  },
  "message": "fix: fixes to prepare for making bootstrap\u003dscript the default for Linux (#2760)\n\nVarious cleanup and prep work to switch bootstrap\u003dscript to be the\ndefault.\n\n* Change `bootstrap_impl` to always be disabled for windows. This allows\nsetting it to\ntrue in a bazelrc without worrying about the target platform. This is\ndone by using\nFeatureFlagInfo to force the value to disabled for windows. This allows\nany downstream\nusages of the flag to Just Work and not have to add selects() for\nwindows themselves.\n* Switch pip_repository_annotations test to `import python.runfiles`.\nThe script bootstrap\ndoesn\u0027t add the runfiles root to sys.path, so `import rules_python`\nstops working.\n\n* Switch gazelle workspace to using the runtime-env toolchain. It was\npreviously\nimplicitly using the deprecated one built into bazel, which doesn\u0027t\nprovide various\n  necessary provider fields.\n* Make the local toolchain use `sys._base_executable` instead of\n`sys.executable`\nwhen finding the interpreter. Otherwise, it might find a venv\ninterpreter or not\n  properly handle wrapper scripts like pyenv.\n* Adds a toolchain attribute/field to indicate if the toolchain supports\na build-time\ncreated venv. This is due to the runtime_env toolchain. See PR comments\nfor details,\nbut in short: if we don\u0027t know the python interpreter path and version\nat\n  build time, the venv may not properly activate or find site-packages.\n\nIf it isn\u0027t supported, then the stage1 bootstrap creates a temporary\nvenv, similar\nto how the zip case is handled. Unfortunately, this requires invoking\nPython itself\nas part of program startup, but I don\u0027t see a way around that -- note\nthis is\n  only triggered by the runtime-env toolchain.\n\n* Make the runtime-env toolchain better support virtualenvs. Because\nit\u0027s a wrapper\nthat re-invokes Python, Python can\u0027t automatically detect its in a venv.\nTwo\ntricks are used (`exec -a` and PYTHONEXECUTABLE) to help address this\n(but they\n  aren\u0027t guaranteed to work, hence the \"recreate at runtime\" logic).\n* Fix a subtle issue where `sys._base_executable` isn\u0027t set correctly\ndue to `home`\nmissing in the pyvenv.cfg file. This mostly only affected the creation\nof venvs\n  from within the bazel-created venv.\n* Change the bazel site init to always add the build-time created\nsite-packages\n(if it exists) as a site directory. This matches the system_python\nbootstrap\nbehavior a bit better, which just shoved everything onto sys.path using\n  PYTHONPATH.\n* Skip running runtime_env_toolchains tests on RBE. RBE\u0027s system python\nis 3.6,\nbut the script bootstrap uses 3.9 features. (Running it on RBE is\nquestionable\n  anyways).\n\nAlong the way...\n\n* Ignore gazelle convenience symlinks\n* Switch pip_repository_annotations test to use\nnon-legacy_external_runfiles based\n  paths. The legacy behavior is disabled in Bazel 8+ by default.\n* Also document why the script bootstrap doesn\u0027t add the runfiles root\nto sys.path.\n\nWork towards https://github.com/bazel-contrib/rules_python/issues/2521\n\n---------\n\nCo-authored-by: Ignas Anikevicius \u003c240938+aignas@users.noreply.github.com\u003e",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "e10af2035db31cde21591a00c8f5d069776c3e5b",
      "old_mode": 33188,
      "old_path": ".bazelignore",
      "new_id": "fb999097f5becb7cfadfb33b0533787a6b162c66",
      "new_mode": 33188,
      "new_path": ".bazelignore"
    },
    {
      "type": "modify",
      "old_id": "154b66114bdb4e4a1cd83d7f289cb84627a32139",
      "old_mode": 33188,
      "old_path": "CHANGELOG.md",
      "new_id": "f696cefde2db5bf9c098f661365c95d223b18f52",
      "new_mode": 33188,
      "new_path": "CHANGELOG.md"
    },
    {
      "type": "modify",
      "old_id": "c16c5a24f2de63c0195032135178a876da8571f0",
      "old_mode": 33188,
      "old_path": "examples/pip_repository_annotations/.bazelrc",
      "new_id": "9397bd31b88e559722e948c65e3269c9d7546417",
      "new_mode": 33188,
      "new_path": "examples/pip_repository_annotations/.bazelrc"
    },
    {
      "type": "modify",
      "old_id": "e41dd4f0f6f40a09b88f3536c9be917cd2a8c405",
      "old_mode": 33188,
      "old_path": "examples/pip_repository_annotations/pip_repository_annotations_test.py",
      "new_id": "219be1ba03c93764df110e8a931cd26432da91d8",
      "new_mode": 33188,
      "new_path": "examples/pip_repository_annotations/pip_repository_annotations_test.py"
    },
    {
      "type": "modify",
      "old_id": "14a124d5f22aa05f4eed37ebf82063ce24d880a5",
      "old_mode": 33188,
      "old_path": "gazelle/WORKSPACE",
      "new_id": "ad428b10cd23d1d60fde56032a910ebf205e9669",
      "new_mode": 33188,
      "new_path": "gazelle/WORKSPACE"
    },
    {
      "type": "modify",
      "old_id": "45354e24d9ece44833673607258e9287cc428987",
      "old_mode": 33188,
      "old_path": "python/config_settings/BUILD.bazel",
      "new_id": "872d7d1bda0d79c3d8797c25ea57173c89377f0f",
      "new_mode": 33188,
      "new_path": "python/config_settings/BUILD.bazel"
    },
    {
      "type": "modify",
      "old_id": "b63f446be3c6ca91ad29dedc5b701a077e95af94",
      "old_mode": 33188,
      "old_path": "python/private/BUILD.bazel",
      "new_id": "9cc8ffc62cb45e4b5fbc47245e47ddb3b54167a1",
      "new_mode": 33188,
      "new_path": "python/private/BUILD.bazel"
    },
    {
      "type": "modify",
      "old_id": "e5f9d865d15b64031f7b1ee660a40a3140385eed",
      "old_mode": 33188,
      "old_path": "python/private/config_settings.bzl",
      "new_id": "2cf7968061600f990f889a0448790e5193ee8a64",
      "new_mode": 33188,
      "new_path": "python/private/config_settings.bzl"
    },
    {
      "type": "modify",
      "old_id": "c53e4610ff6302386169dc0070b128de28bd5777",
      "old_mode": 33188,
      "old_path": "python/private/flags.bzl",
      "new_id": "40ce63b3b07a887038458560b0991100c661b2e9",
      "new_mode": 33188,
      "new_path": "python/private/flags.bzl"
    },
    {
      "type": "modify",
      "old_id": "0207f56beff31447b2043876ae564192e0187ca6",
      "old_mode": 33188,
      "old_path": "python/private/get_local_runtime_info.py",
      "new_id": "19db3a293505c91aae53b956a3f1394d36e81194",
      "new_mode": 33188,
      "new_path": "python/private/get_local_runtime_info.py"
    },
    {
      "type": "modify",
      "old_id": "fb1a8e29ac57f8f0e1becee605d5dd5590b193dc",
      "old_mode": 33188,
      "old_path": "python/private/local_runtime_repo.bzl",
      "new_id": "ec0643e4970954f502aa990376ced530d01b7aae",
      "new_mode": 33188,
      "new_path": "python/private/local_runtime_repo.bzl"
    },
    {
      "type": "modify",
      "old_id": "b4cda21b1d977c6a7fab6b2bbcd2d3ef10cbef31",
      "old_mode": 33188,
      "old_path": "python/private/py_executable.bzl",
      "new_id": "a8c669afd957caa49ca2f7e24d733d791469783a",
      "new_mode": 33188,
      "new_path": "python/private/py_executable.bzl"
    },
    {
      "type": "modify",
      "old_id": "4297391068a124b84ac5583366e36d346b4cc1b6",
      "old_mode": 33188,
      "old_path": "python/private/py_runtime_info.bzl",
      "new_id": "d2ae17e360d532a401eb1b30c0f166592a9a2afe",
      "new_mode": 33188,
      "new_path": "python/private/py_runtime_info.bzl"
    },
    {
      "type": "modify",
      "old_id": "a85f5b25f201e194cfd84b3042948025eb81ef30",
      "old_mode": 33188,
      "old_path": "python/private/py_runtime_rule.bzl",
      "new_id": "6dadcfeac3162b0ac19fdcdeaf3321e1a270dcc7",
      "new_mode": 33188,
      "new_path": "python/private/py_runtime_rule.bzl"
    },
    {
      "type": "modify",
      "old_id": "2116012c03c1ffb05d62d8f924d68326b5d5f88f",
      "old_mode": 33188,
      "old_path": "python/private/runtime_env_toolchain.bzl",
      "new_id": "1956ad5e95e5f0a9d3c17313ac3382c9faad5693",
      "new_mode": 33188,
      "new_path": "python/private/runtime_env_toolchain.bzl"
    },
    {
      "type": "modify",
      "old_id": "b09bc53e5ccadb317c9b577ba17904f00b1e1f98",
      "old_mode": 33261,
      "old_path": "python/private/runtime_env_toolchain_interpreter.sh",
      "new_id": "6159d4f38cd8a22ca1060e005352b27acdf4c691",
      "new_mode": 33261,
      "new_path": "python/private/runtime_env_toolchain_interpreter.sh"
    },
    {
      "type": "modify",
      "old_id": "40fb4e41392e85e49835f936032263d7f91d215f",
      "old_mode": 33188,
      "old_path": "python/private/site_init_template.py",
      "new_id": "a87a0d2a8f88ccfdf5200bd777471d3c708d4e18",
      "new_mode": 33188,
      "new_path": "python/private/site_init_template.py"
    },
    {
      "type": "modify",
      "old_id": "c487624934c7c8376afef46486980f8bd0d93059",
      "old_mode": 33188,
      "old_path": "python/private/stage1_bootstrap_template.sh",
      "new_id": "d992b55caef028b5ab1b52a6bdbb918dc9947ab0",
      "new_mode": 33188,
      "new_path": "python/private/stage1_bootstrap_template.sh"
    },
    {
      "type": "modify",
      "old_id": "e8228edf3b8e19ebcc7b6e841b5fb9434630fbe5",
      "old_mode": 33188,
      "old_path": "python/private/stage2_bootstrap_template.py",
      "new_id": "fcc323e8ca9808d46af99bd729bdc8e8d0f1c1d5",
      "new_mode": 33188,
      "new_path": "python/private/stage2_bootstrap_template.py"
    },
    {
      "type": "modify",
      "old_id": "6fbf5489010e6f4f14da35b8c2f88be55061cb58",
      "old_mode": 33188,
      "old_path": "tests/integration/local_toolchains/BUILD.bazel",
      "new_id": "02b126b0ea4b1351acb5e1d60da4f39d8a3e8c23",
      "new_mode": 33188,
      "new_path": "tests/integration/local_toolchains/BUILD.bazel"
    },
    {
      "type": "modify",
      "old_id": "d85a4c386b006f3442cda109e947cd8ee14c9ae4",
      "old_mode": 33188,
      "old_path": "tests/integration/local_toolchains/test.py",
      "new_id": "8e37fff6527dae2590c91a38f44ca6c56ca4eaff",
      "new_mode": 33188,
      "new_path": "tests/integration/local_toolchains/test.py"
    },
    {
      "type": "modify",
      "old_id": "afc6b587f046377cf9d33a1e79659be5748d8491",
      "old_mode": 33188,
      "old_path": "tests/runtime_env_toolchain/BUILD.bazel",
      "new_id": "59ca93ba49791ec2edfc63771d3ab09a89fa838a",
      "new_mode": 33188,
      "new_path": "tests/runtime_env_toolchain/BUILD.bazel"
    }
  ]
}
