From 9642ffbe848901113456f100b76aab5ce3f19dd7 Mon Sep 17 00:00:00 2001 From: Zachary Ware Date: Thu, 24 Jul 2025 15:50:01 -0500 Subject: [PATCH] Exclude _testclinic_depr.c.h from c-analyzer (GH-137086) _testclinic.c mocks out PY_VERSION_HEX to 3.8 before including _testclinic_depr.c.h to avoid the errors the preprocessor would otherwise throw due to the deprecation feature it is testing. Also partially revert 74e2acddf68b31ce16e8e0067b1df8c7b67bd6c8: this restores Modules/_testclinic.c to match the same file in the 3.14 branch. (cherry picked from commit d5e75c07682864e9d265e11f5e4730147e7d4842) Co-authored-by: Zachary Ware --- Tools/c-analyzer/cpython/_parser.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Tools/c-analyzer/cpython/_parser.py b/Tools/c-analyzer/cpython/_parser.py index cfbf0d14348499..1e754040eaf1cc 100644 --- a/Tools/c-analyzer/cpython/_parser.py +++ b/Tools/c-analyzer/cpython/_parser.py @@ -83,6 +83,8 @@ def clean_lines(text): Python/generated_cases.c.h Python/executor_cases.c.h Python/optimizer_cases.c.h +# XXX: Throws errors if PY_VERSION_HEX is not mocked out +Modules/clinic/_testclinic_depr.c.h # not actually source Python/bytecodes.c