)]}'
{
  "commit": "4d7d02a8e528f3d3ba14d9b10b813557b2e9d0e2",
  "tree": "9845d0479c76404bc80a3727b3ef92e9de51b3dd",
  "parents": [
    "e7754de037fe6bc9910e1b09691c7d0ca2ee3057"
  ],
  "author": {
    "name": "Sam Gross",
    "email": "colesbury@gmail.com",
    "time": "Mon Feb 02 01:02:50 2026 -0500"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Sun Feb 01 22:02:50 2026 -0800"
  },
  "message": "Fix race condition with py::make_key_iterator in free threading (#5971)\n\n* Fix race condition with py::make_key_iterator in free threading\n\nThe creation of the iterator class needs to be synchronized.\n\n* style: pre-commit fixes\n\n* Use PyCriticalSection_BeginMutex instead of recursive mutex\n\n* style: pre-commit fixes\n\n* Make pycritical_section non-copyable and non-movable\n\nThe pycritical_section class is a RAII wrapper that manages a Python\ncritical section lifecycle:\n- Acquires the critical section in the constructor via\n  PyCriticalSection_BeginMutex\n- Releases it in the destructor via PyCriticalSection_End\n- Holds a reference to a pymutex\n\nAllowing copy or move operations would be dangerous:\n\n1. Copy: Both the original and copied objects would call\n   PyCriticalSection_End on the same PyCriticalSection object in their\n   destructors, leading to double-unlock and undefined behavior.\n\n2. Move: The moved-from object\u0027s destructor would still run and attempt\n   to end the critical section, while the moved-to object would also try\n   to end it, again causing double-unlock.\n\nThis follows the same pattern used by other RAII lock guards in the\ncodebase, such as gil_scoped_acquire and gil_scoped_release, which also\nexplicitly delete copy/move operations to prevent similar issues.\n\nBy explicitly deleting these operations, we prevent accidental misuse\nand ensure the critical section is properly managed by a single RAII\nobject throughout its lifetime.\n\n* Drop Python 3.13t support from CI\n\nPython 3.13t was experimental, while Python 3.14t is not. This PR\nuses PyCriticalSection_BeginMutex which is only available in Python\n3.14+, making Python 3.13t incompatible with the changes.\n\nRemoved all Python 3.13t CI jobs:\n- ubuntu-latest, 3.13t (standard-large matrix)\n- macos-15-intel, 3.13t (standard-large matrix)\n- windows-latest, 3.13t (standard-large matrix)\n- manylinux job testing 3.13t\n\nThis aligns with the decision to drop Python 3.13t support as\ndiscussed in PR #5971.\n\n* Add Python 3.13 (default) replacement jobs for removed 3.13t jobs\n\nAfter removing Python 3.13t support (incompatible with PyCriticalSection_BeginMutex\nwhich requires Python 3.14+), we\u0027re adding replacement jobs using Python 3.13\n(default) to maintain test coverage in key dimensions:\n\n1. ubuntu-latest, Python 3.13: C++20 + DISABLE_HANDLE_TYPE_NAME_DEFAULT_IMPLEMENTATION\n   - Replaces: ubuntu-latest, 3.13t with same config\n   - Maintains coverage for this specific configuration combination\n\n2. macos-15-intel, Python 3.13: C++11\n   - Replaces: macos-15-intel, 3.13t with same config\n   - Maintains macOS coverage for Python 3.13\n\n3. manylinux (musllinux), Python 3.13: GIL testing\n   - Replaces: manylinux, 3.13t job\n   - Maintains manylinux/musllinux container testing coverage\n\nThese additions are proposed to get feedback on which jobs should be kept\nto maintain appropriate test coverage without the experimental 3.13t builds.\n\n* ci: run in free-threading mode a bit more on 3.14\n\n* Revert \"ci: run in free-threading mode a bit more on 3.14\"\n\nThis reverts commit 91189c9242e787922d26ca467710dcc494871b82.\n\nReason: https://github.com/pybind/pybind11/pull/5971#issuecomment-3831321903\n\n* Reapply \"ci: run in free-threading mode a bit more on 3.14\"\n\nThis reverts commit f3197de97557a86a9a73df7890be1c227a7c4c59.\n\nAfter #5972 is/was merged, tests should pass (already tested under #5980).\n\nSee also https://github.com/pybind/pybind11/pull/5972#discussion_r2752674989\n\n---------\n\nCo-authored-by: pre-commit-ci[bot] \u003c66853113+pre-commit-ci[bot]@users.noreply.github.com\u003e\nCo-authored-by: Ralf W. Grosse-Kunstleve \u003crgrossekunst@nvidia.com\u003e\nCo-authored-by: Henry Schreiner \u003cHenrySchreinerIII@gmail.com\u003e\nCo-authored-by: Ralf W. Grosse-Kunstleve \u003crwgkio@gmail.com\u003e",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "cda2c214dc18479b2cd007828ac508abf8b27c5d",
      "old_mode": 33188,
      "old_path": ".github/workflows/ci.yml",
      "new_id": "a0965fa813ea972a40845bebb2e88bfcd8f4098e",
      "new_mode": 33188,
      "new_path": ".github/workflows/ci.yml"
    },
    {
      "type": "modify",
      "old_id": "7cfa5da92124b91e437e23bd10cc503a75f9e216",
      "old_mode": 33188,
      "old_path": "include/pybind11/detail/internals.h",
      "new_id": "b9b0f08f2761a008a33d93fca8c8af21f718c6f3",
      "new_mode": 33188,
      "new_path": "include/pybind11/detail/internals.h"
    },
    {
      "type": "modify",
      "old_id": "02d2e72c2ceb0ea2f4347613b83e9cd574c55ced",
      "old_mode": 33188,
      "old_path": "include/pybind11/pybind11.h",
      "new_id": "f88fc202724418ed09f74062fe908d303022943e",
      "new_mode": 33188,
      "new_path": "include/pybind11/pybind11.h"
    }
  ]
}
