[3.13] gh-154144: Fix false positive from the stdbool.h guard in _testcapimodule.c (GH-154145) (GH-154159)

serhiy-storchaka <[email protected]>
Newsgroups gmane.comp.python.cvs
Message-ID <[email protected]>
https://github.com/python/cpython/commit/6a9c478cceb4762187c9b5b488169272bb4a4cbb
commit: 6a9c478cceb4762187c9b5b488169272bb4a4cbb
branch: 3.13
author: Miss Islington (bot) <[email protected]>
committer: serhiy-storchaka <[email protected]>
date: 2026-07-19T15:31:04Z
summary:

[3.13] gh-154144: Fix false positive from the stdbool.h guard in _testcapimodule.c (GH-154145) (GH-154159)

(cherry picked from commit 8d11eb0c31efcfd1d504650a564d9a4b45cba721)

Co-authored-by: Serhiy Storchaka <[email protected]>
Co-authored-by: Claude Fable 5 <[email protected]>

files:
A Misc/NEWS.d/next/Tests/2026-07-19-18-20-00.gh-issue-154144.tcbool.rst
M Modules/_testcapimodule.c

diff --git a/Misc/NEWS.d/next/Tests/2026-07-19-18-20-00.gh-issue-154144.tcbool.rst b/Misc/NEWS.d/next/Tests/2026-07-19-18-20-00.gh-issue-154144.tcbool.rst
new file mode 100644
index 000000000000000..dc1ac8b4035153c
--- /dev/null
+++ b/Misc/NEWS.d/next/Tests/2026-07-19-18-20-00.gh-issue-154144.tcbool.rst
@@ -0,0 +1 @@
+Fix building the :mod:`!_testcapi` module on NetBSD.
diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c
index 8bd662bc2944cee..e13a3def14ce381 100644
--- a/Modules/_testcapimodule.c
+++ b/Modules/_testcapimodule.c
@@ -15,6 +15,10 @@
 #include "frameobject.h"          // PyFrame_New()
 #include "marshal.h"              // PyMarshal_WriteLongToFile()
 
+#ifdef bool
+#  error "The public headers should not include <stdbool.h>, see gh-90904"
+#endif
+
 #include <float.h>                // FLT_MAX
 #include <signal.h>
 #include <stddef.h>               // offsetof()
@@ -26,10 +30,6 @@
 #  include <sys/sysctl.h>         // sysctlbyname()
 #endif
 
-#ifdef bool
-#  error "The public headers should not include <stdbool.h>, see gh-48924"
-#endif
-
 #include "_testcapi/util.h"
 
 

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.