Skip to content

Commit 85d5fd8

Browse files
committed
unix: don't compile most test modules as builtins on macOS
Previously, we were compiling these and annotating them as extensions in our PYTHON.json file. These extensions are only used to facilitate tests. Furthermore, the presence of these extensions as built-ins prevents some tests from working, since they assume they are standalone .so's. Let's mass disable static compilation of most test extensions. With this change, there are no more test failures on macOS!
1 parent 4b7e98f commit 85d5fd8

File tree

4 files changed

+2
-16
lines changed

4 files changed

+2
-16
lines changed

cpython-unix/static-modules.3.7.macos

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,7 @@ _queue _queuemodule.c
2323
_scproxy _scproxy.c -framework SystemConfiguration -framework CoreFoundation
2424
_sqlite3 _sqlite/cache.c _sqlite/connection.c _sqlite/cursor.c _sqlite/microprotocols.c _sqlite/module.c _sqlite/prepare_protocol.c _sqlite/row.c _sqlite/statement.c _sqlite/util.c -IModules/_sqlite -DMODULE_NAME=\"sqlite3\" -DSQLITE_OMIT_LOAD_EXTENSION=1 -lsqlite3
2525
_ssl _ssl.c -lssl -lcrypto
26-
_testbuffer _testbuffer.c
27-
_testimportmultiple _testimportmultiple.c
28-
_testmultiphase _testmultiphase.c
2926
_tkinter _tkinter.c tkappinit.c -DWITH_APPINIT -framework AppKit -framework ApplicationServices -framework Carbon -framework CoreServices -framework CoreGraphics -framework IOKit -framework Tcl -framework Tk
3027
_uuid _uuidmodule.c -luuid
31-
_xxtestfuzz _xxtestfuzz/_xxtestfuzz.c _xxtestfuzz/fuzzer.c
3228
pyexpat pyexpat.c expat/xmlparse.c expat/xmlrole.c expat/xmltok.c -DHAVE_EXPAT_CONFIG_H=1 -DXML_POOR_ENTROPY=1 -DUSE_PYEXPAT_CAPI -IModules/expat
3329
readline readline.c -ledit -lncurses
34-
xxlimited xxlimited.c -DPy_LIMITED_API=0x03050000

cpython-unix/static-modules.3.8.macos

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ _crypt _cryptmodule.c
88
_curses _cursesmodule.c -lncurses
99
_curses_panel _curses_panel.c -lpanel -lncurses
1010
_ctypes _ctypes/_ctypes.c _ctypes/callbacks.c _ctypes/callproc.c _ctypes/darwin/dlfcn_simple.c _ctypes/malloc_closure.c _ctypes/stgdict.c _ctypes/cfield.c -DMACOSX -I_ctypes/darwin -lffi -ldl
11-
_ctypes_test _ctypes/_ctypes_test.c -lm
1211
_decimal _decimal/_decimal.c _decimal/libmpdec/basearith.c _decimal/libmpdec/constants.c _decimal/libmpdec/context.c _decimal/libmpdec/convolute.c _decimal/libmpdec/crt.c _decimal/libmpdec/difradix2.c _decimal/libmpdec/fnt.c _decimal/libmpdec/fourstep.c _decimal/libmpdec/io.c _decimal/libmpdec/memory.c _decimal/libmpdec/mpdecimal.c _decimal/libmpdec/numbertheory.c _decimal/libmpdec/sixstep.c _decimal/libmpdec/transpose.c -DUNIVERSAL=1 -IModules/_decimal/libmpdec
1312
_dbm _dbmmodule.c -DHAVE_BERKDB_H -DDB_DBM_HSEARCH -ldb
1413
_elementtree _elementtree.c -DHAVE_EXPAT_CONFIG_H=1 -DXML_POOR_ENTROPY=1 -DUSE_PYEXPAT_CAPI -IModules/expat
@@ -25,13 +24,7 @@ _queue _queuemodule.c
2524
_scproxy _scproxy.c -framework SystemConfiguration -framework CoreFoundation
2625
_sqlite3 _sqlite/cache.c _sqlite/connection.c _sqlite/cursor.c _sqlite/microprotocols.c _sqlite/module.c _sqlite/prepare_protocol.c _sqlite/row.c _sqlite/statement.c _sqlite/util.c -IModules/_sqlite -DMODULE_NAME=\"sqlite3\" -DSQLITE_OMIT_LOAD_EXTENSION=1 -lsqlite3
2726
_ssl _ssl.c -lssl -lcrypto
28-
_testbuffer _testbuffer.c
29-
_testimportmultiple _testimportmultiple.c
30-
_testmultiphase _testmultiphase.c
3127
_tkinter _tkinter.c tkappinit.c -DWITH_APPINIT -framework AppKit -framework ApplicationServices -framework Carbon -framework CoreServices -framework CoreGraphics -framework IOKit -framework Tcl -framework Tk
3228
_uuid _uuidmodule.c -luuid
33-
_xxsubinterpreters _xxsubinterpretersmodule.c
34-
_xxtestfuzz _xxtestfuzz/_xxtestfuzz.c _xxtestfuzz/fuzzer.c
3529
pyexpat pyexpat.c expat/xmlparse.c expat/xmlrole.c expat/xmltok.c -DHAVE_EXPAT_CONFIG_H=1 -DXML_POOR_ENTROPY=1 -DUSE_PYEXPAT_CAPI -IModules/expat
3630
readline readline.c -ledit -lncurses
37-
xxlimited xxlimited.c -DPy_LIMITED_API=0x03050000

docs/status.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ as it prevents tests from working.
4242
``test_imp``
4343
------------
4444

45-
Known Failing on: Linux, macOS
45+
Known Failing on: Linux
4646

4747
This fails in ``test_issue24748_load_module_skips_sys_modules_check``
4848
with a wonky traceback in the importer.
@@ -56,7 +56,7 @@ We should change how this extension is compiled.
5656
``test_importlib``
5757
------------------
5858

59-
Known Failing on: Linux, macOS
59+
Known Failing on: Linux
6060

6161
This fails due to
6262
``AttributeError: module '_testcapi' has no attribute '__file__'``.

pythonbuild/cpython.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
b"_struct",
4040
b"_testinternalcapi",
4141
b"_weakref",
42-
b"_xxtestfuzz",
4342
b"array",
4443
b"audioop",
4544
b"binascii",
@@ -56,7 +55,6 @@
5655
b"syslog",
5756
b"termios",
5857
b"unicodedata",
59-
b"xxlimited",
6058
b"zlib",
6159
}
6260

0 commit comments

Comments
 (0)