[Python-checkins] bpo-36763, _testembed: enable assert() in release mode (GH-13857)

Victor Stinner webhook-mailer at python.org
Thu Jun 6 08:25:35 EDT 2019


https://github.com/python/cpython/commit/013a18a65167725f140c0395211050ae03501b12
commit: 013a18a65167725f140c0395211050ae03501b12
branch: master
author: Victor Stinner <vstinner at redhat.com>
committer: GitHub <noreply at github.com>
date: 2019-06-06T14:25:18+02:00
summary:

bpo-36763, _testembed: enable assert() in release mode (GH-13857)

files:
M Programs/_testembed.c

diff --git a/Programs/_testembed.c b/Programs/_testembed.c
index 3e1210e04d82..9633f4610b54 100644
--- a/Programs/_testembed.c
+++ b/Programs/_testembed.c
@@ -1,10 +1,13 @@
-/* FIXME: PEP 587 makes these functions public */
 #ifndef Py_BUILD_CORE_MODULE
 #  define Py_BUILD_CORE_MODULE
 #endif
 
+/* Always enable assertion (even in release mode) */
+#undef NDEBUG
+
 #include <Python.h>
-#include "pycore_initconfig.h"   /* FIXME: PEP 587 makes these functions public */
+#include "pycore_initconfig.h"   /* _PyConfig_InitCompatConfig() */
+#include "pycore_pystate.h"      /* _PyRuntime */
 #include <Python.h>
 #include "pythread.h"
 #include <inttypes.h>



More information about the Python-checkins mailing list