cpython/Programs
Miss Islington (bot) d652323494
[3.15] gh-157384: Document and test PyImport_CreateModuleFromInitfunc() semantics (GH-157389) (#159791)
gh-157384: Document and test PyImport_CreateModuleFromInitfunc() semantics (GH-157389)

Document that single-phase init modules are added to sys.modules by
the call itself (unlike multi-phase init modules), and that the spec
name identifies the module, so a later call with the same name and a
different init function reuses the cached module without calling the
new init function.  Add regression tests for both behaviors.

(cherry picked from commit 0c4ca17441)

Co-authored-by: Itamar Oren <itamarost@gmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2026-10-19 22:54:26 +00:00
..
_bootstrap_python.c Remove more remnants of deepfreeze (#118159) 2024-04-22 12:17:57 -07:00
_freeze_module.c gh-141510: Change marshal version to 6 (#145551) 2026-03-06 10:23:11 +01:00
_freeze_module.py gh-135801: Add the module parameter to compile() etc (GH-139652) 2025-11-13 13:21:32 +02:00
_testembed.c [3.15] gh-157384: Document and test PyImport_CreateModuleFromInitfunc() semantics (GH-157389) (#159791) 2026-10-19 22:54:26 +00:00
freeze_test_frozenmain.py gh-135801: Add the module parameter to compile() etc (GH-139652) 2025-11-13 13:21:32 +02:00
python.c bpo-40268: Remove unused imports in pylifecycle.c (GH-19533) 2020-04-15 04:01:58 +02:00
README Issue #18093: Factor out the programs that embed the runtime 2014-07-25 21:52:14 +10:00
test_frozenmain.h gh-148871: extend and improve LOAD_COMMON_CONSTANT (GH-148971) 2026-05-02 19:59:51 +01:00
test_frozenmain.py bpo-44131: Py_FrozenMain() uses PyConfig_SetBytesArgv() (GH-26201) 2021-05-20 12:08:05 +02:00

Source files for binary executables (as opposed to shared modules)