)]}'
{
  "commit": "de9a4fb5586cc9e60e8b75a3f69033c4a2d6c61b",
  "tree": "58eb37f25061e35841bafa9eb6d1d6eb73f5b4f7",
  "parents": [
    "4b79d90e935398442d65c59243f8015f062da0f8"
  ],
  "author": {
    "name": "Miro Hrončok",
    "email": "miro@hroncok.cz",
    "time": "Wed Nov 11 10:12:36 2026"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Wed Nov 11 10:12:36 2026"
  },
  "message": "gh-154643: Only use _Py_STDC_VERSION when defined (GH-154650)\n\n* gh-154643: Only use _Py_STDC_VERSION when defined\n\nThis fixes:\n\n    $ g++ -I/usr/include/python3.15 -c -Werror\u003dundef test.cpp\n    In file included from /usr/include/python3.15/Python.h:68,\n                     from test.cpp:1:\n    /usr/include/python3.15/pyport.h:494:9: error: ‘_Py_STDC_VERSION’ is not defined, evaluates to ‘0’ [-Werror\u003dundef]\n      494 | #  elif _Py_STDC_VERSION \u003e\u003d 201112L \u0026\u0026 !defined(__STDC_NO_THREADS__)\n          |         ^~~~~~~~~~~~~~~~\n    cc1plus: some warnings being treated as errors\n\nFor any test.cpp that has #include \u003cPython.h\u003e.\n\nFor locating the place for the added test, I used LLM.\n\nThe main issue I could reproduce was in Include/pyport.h.\nInclude/cpython/pyatomic.h was updated for completeness.\n\nInclude/internal/mimalloc/mimalloc/atomic.h also has this\nfor __STDC_VERSION__\nbut was left untouched as it is code from a bundled project\nand is likely not exposed publicly.\n\nAssisted-By: Claude Opus 4.6\n\n* Also add test for C\n\n* Add -Werror\u003dundef to PUBLIC_CFLAGS \u0026 PEDANTIC_CXXFLAGS in setup.py\n\n* Drop tests, we use PUBLIC_CFLAGS \u0026 PEDANTIC_CXXFLAGS instead",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "71a76bdc82ce475f0a6d180669fa07717424cbed",
      "old_mode": 33188,
      "old_path": "Include/cpython/pyatomic.h",
      "new_id": "0a11f7781f07e00db48d30d0f34ffb03da02ade8",
      "new_mode": 33188,
      "new_path": "Include/cpython/pyatomic.h"
    },
    {
      "type": "modify",
      "old_id": "718a9b50bae10394363a00f4f6617c98973fb261",
      "old_mode": 33188,
      "old_path": "Include/pyport.h",
      "new_id": "de1240be76b3dad8521ed1c479ab84569bb0b39e",
      "new_mode": 33188,
      "new_path": "Include/pyport.h"
    },
    {
      "type": "modify",
      "old_id": "10a3887931932ac1d35d3ecb6bb0e4277f1f70f8",
      "old_mode": 33188,
      "old_path": "Lib/test/test_cext/setup.py",
      "new_id": "3b613ee729f52c44f311a1fde23a854679734f73",
      "new_mode": 33188,
      "new_path": "Lib/test/test_cext/setup.py"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "17c2a58555e7ae91689ce878d73a64f139b16d67",
      "new_mode": 33188,
      "new_path": "Misc/NEWS.d/next/C_API/2026-07-24-22-30-40.gh-issue-154643.z-ZutK.rst"
    }
  ]
}
