You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 24b32f8
Browse filesBrowse the repository at this point in the historyBrowse files
relocatable.py test: check that every stdlib extension module loads from the moved tree (#38)
The `stdlib.*` checks import seven modules and use each one briefly, but they don't check where the extension module came from, and most extension modules (`_zstd`, `_decimal`, `readline`, ...) aren't covered at all.
This adds a `stdlib.extensions` check. It imports every stdlib extension module (found through `sys.stdlib_module_names`, so there's no list to maintain), first with the build directory's interpreter and then with the moved one. It fails if a module that imports in the build directory is missing after the move, fails to import, or is loaded from outside the moved tree. Modules that already fail in the build directory are left out, like the existing `stdlib.*` checks do.
Which shared libraries those modules link against is a separate question, covered by `loader.paths` in #36.
Tested on macOS 14 arm64 against today's CPython `main`, with both `--strategy patch` and `--strategy origin`: `PASS stdlib.extensions: 57 extension modules load from the relocated tree`.
0 commit comments