Skip to content

Commit a0c765a

Browse files
committed
Skip the test for PyModule_Create2 & PyModule_FromDefAndSpec2
These aren't exported on some platforms. All the others should still be tested, though, to make sure they don't disappear.
1 parent b5f7f0f commit a0c765a

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Lib/test/test_stable_abi_ctypes.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -393,9 +393,7 @@ def test_available_symbols(self):
393393
"PyModule_AddObjectRef",
394394
"PyModule_AddStringConstant",
395395
"PyModule_AddType",
396-
"PyModule_Create2",
397396
"PyModule_ExecDef",
398-
"PyModule_FromDefAndSpec2",
399397
"PyModule_GetDef",
400398
"PyModule_GetDict",
401399
"PyModule_GetFilename",

Tools/scripts/stable_abi.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,12 @@ def test_available_symbols(self):
286286
include_abi_only=True,
287287
ifdef=set())
288288
for item in items:
289+
if item.name in (
290+
# Some symbols aren't exported on all platforms.
291+
# This is a bug: https://bugs.python.org/issue44133
292+
'PyModule_Create2', 'PyModule_FromDefAndSpec2',
293+
):
294+
continue
289295
write(f' "{item.name}",')
290296
write(")")
291297

0 commit comments

Comments
 (0)