Skip to content

Commit 338d54f

Browse files
stefanormiss-islington
authored andcommitted
bpo-28401: prevent Py_DEBUG builds from trying to import limited ABI modules (GH-1766)
[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
1 parent ad65f15 commit 338d54f

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Debug builds will no longer to attempt to import extension modules built
2+
for the ABI as they were never compatible to begin with.
3+
Patch by Stefano Rivera.

Python/dynload_shlib.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ const char *_PyImport_DynLoadFiletab[] = {
3838
".dll",
3939
#else /* !__CYGWIN__ */
4040
"." SOABI ".so",
41+
#ifndef Py_DEBUG
4142
".abi" PYTHON_ABI_STRING ".so",
43+
#endif /* ! Py_DEBUG */
4244
".so",
4345
#endif /* __CYGWIN__ */
4446
NULL,

0 commit comments

Comments
 (0)