]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-28401: prevent Py_DEBUG builds from trying to import limited ABI modules (GH...
authorStefano Rivera <github@rivera.za.net>
Fri, 16 Nov 2018 23:52:52 +0000 (15:52 -0800)
committerMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 16 Nov 2018 23:52:52 +0000 (15:52 -0800)
[Issue 28401](https://bugs.python.org/issue28401): Don't attempt to import the stable API extensions, they are not supported in PyDEBUG builds (which don't implement that ABI).

https://bugs.python.org/issue28401

Misc/NEWS.d/next/Core and Builtins/2018-11-03-10-37-29.bpo-28401.RprDIg.rst [new file with mode: 0644]
Python/dynload_shlib.c

diff --git a/Misc/NEWS.d/next/Core and Builtins/2018-11-03-10-37-29.bpo-28401.RprDIg.rst b/Misc/NEWS.d/next/Core and Builtins/2018-11-03-10-37-29.bpo-28401.RprDIg.rst
new file mode 100644 (file)
index 0000000..8fbba78
--- /dev/null
@@ -0,0 +1,3 @@
+Debug builds will no longer to attempt to import extension modules built
+for the ABI as they were never compatible to begin with.
+Patch by Stefano Rivera.
index feebd8976d0adb14ec19d6ba475ef6e62d435b9a..e5bddaab6caa0694fea760524cb31e8e5f47c869 100644 (file)
@@ -38,7 +38,9 @@ const char *_PyImport_DynLoadFiletab[] = {
     ".dll",
 #else  /* !__CYGWIN__ */
     "." SOABI ".so",
+#ifndef Py_DEBUG
     ".abi" PYTHON_ABI_STRING ".so",
+#endif /* ! Py_DEBUG */
     ".so",
 #endif  /* __CYGWIN__ */
     NULL,