Open
Description
Bug report
Bug description:
When CPython is built without HAVE_DYNAMIC_LOADING
set, we currently leave out a small handful of code in Python/import.c and Python/importdl.c. However, there is a bunch more that should probably be excluded (via #ifdef HAVE_DYNAMIC_LOADING
):
- some functions and constants in Python/importdl.c and Include/internal/pycore_importdl.h
- some functions, constants, and state in Python/import.c and Include/internal/pycore_import.h
- some code in Lib/importlib/_bootstrap_external.py
- maybe some code in Objects/moduleobject.c
- builds for Modules/Setup.stdlib
- checks in Tools/build/check_extension_modules.py
- modules listed by Tools/build/generate_stdlib_module_names.py
(Also see gh-122907.)
Getting this all correct would probably take a fair amount of effort. Perhaps the big question is would it be worth addressing all these cases?
CPython versions tested on:
CPython main branch
Operating systems tested on:
No response