)]}'
{
  "commit": "ae2eb7075fe12585c55d6bd6522cc688d20db94c",
  "tree": "596015b6294e37dd3d6ffe034706b553cef1a5d1",
  "parents": [
    "ecad092ffa97ac236fb9a6b33ff7f5af4af80eb6"
  ],
  "author": {
    "name": "Richard Levasseur",
    "email": "rlevasseur@google.com",
    "time": "Fri Jul 19 15:20:46 2024 -0700"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Fri Jul 19 22:20:46 2024 +0000"
  },
  "message": "fix: insert user imports before runtime site-packages (#2073)\n\nPreviously, all the user import paths were put at the end of sys.path.\nThis was done so that\nuser import paths didn\u0027t hide stdlib modules. However, a side-effect is\nthat user import\npaths came after the runtime\u0027s site-packages directory. This prevented\nuser imports from\noverriding non-stdlib modules included in a runtime (e.g. pip).\n\nTo fix, we look for the runtime site-packages directory, then insert the\nuser import paths\nbefore it. A test is used to ensure that the ordering is `[stdlib, user,\nruntime site-packages]`\n\nAlso fixes a bug introduced by #2076: safe path was being disabled by\ndefault\n\nFixes https://github.com/bazelbuild/rules_python/issues/2064",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "9ccff79aa7ea15997269a98f14e17296d13ef1b1",
      "old_mode": 33188,
      "old_path": "CHANGELOG.md",
      "new_id": "8a0792d3a57435ac64c0b9e3051aeddae466fcf4",
      "new_mode": 33188,
      "new_path": "CHANGELOG.md"
    },
    {
      "type": "modify",
      "old_id": "895793b41ff787d373452df709e784bbe77ccef2",
      "old_mode": 33188,
      "old_path": "python/private/stage1_bootstrap_template.sh",
      "new_id": "959e7babe6067c1016767d27099920ed48657d6a",
      "new_mode": 33188,
      "new_path": "python/private/stage1_bootstrap_template.sh"
    },
    {
      "type": "modify",
      "old_id": "69c0dec0e587508b2ad0a032ca271e10fa6eb161",
      "old_mode": 33188,
      "old_path": "python/private/stage2_bootstrap_template.py",
      "new_id": "29f59d2195cb77da775e0b7314addd755ea4600c",
      "new_mode": 33188,
      "new_path": "python/private/stage2_bootstrap_template.py"
    },
    {
      "type": "modify",
      "old_id": "e04d3147fd80915d89d2e99ba11a2c57e6be0575",
      "old_mode": 33188,
      "old_path": "tests/base_rules/BUILD.bazel",
      "new_id": "cd5771533d30138bd539e4cddf23a8cd5a2694b7",
      "new_mode": 33188,
      "new_path": "tests/base_rules/BUILD.bazel"
    },
    {
      "type": "modify",
      "old_id": "bf85d26ad25cb71a7af9bae6ae686a895d3fc43b",
      "old_mode": 33261,
      "old_path": "tests/base_rules/inherit_pythonsafepath_env_test.sh",
      "new_id": "bc6e2d53f33c9ee829e8500b340ac85370ceb696",
      "new_mode": 33261,
      "new_path": "tests/base_rules/inherit_pythonsafepath_env_test.sh"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "2e334641556aa4ae81b2fcad076753832f4fc358",
      "new_mode": 33188,
      "new_path": "tests/base_rules/sys_path_order_test.py"
    },
    {
      "type": "modify",
      "old_id": "4b3d22d5bb30627ad795af53e1823cd41ed91386",
      "old_mode": 33188,
      "old_path": "tests/support/sh_py_run_test.bzl",
      "new_id": "35be484b0d13e626c8a4d41f2c4228972120ab2f",
      "new_mode": 33188,
      "new_path": "tests/support/sh_py_run_test.bzl"
    }
  ]
}
