FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[3.15] gh-157384: Document and test PyImport_CreateModuleFromInitfunc() semantics (GH-157389) by miss-islington · Pull Request #159791 · python/cpython · GitHub

Repository navigation

[3.15] gh-157384: Document and test PyImport_CreateModuleFromInitfunc() semantics (GH-157389) - #159791

Merged
itamaro merged 1 commit into
python:3.15from
miss-islington:backport-0c4ca17-3.15
Oct 19, 2026
Merged

itamaro merged 1 commit into
python:3.15from
miss-islington:backport-0c4ca17-3.15

Conversation

miss-islington commented Oct 19, 2026 •
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Contributor

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 0c4ca17)

Co-authored-by: Itamar Oren itamarost@gmail.com
Co-authored-by: Petr Viktorin encukou@gmail.com

…) semantics (pythonGH-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 0c4ca17)

Co-authored-by: Itamar Oren <itamarost@gmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>

Copy link
Copy Markdown

itamaro enabled auto-merge (squash) October 19, 2026 22:00
itamaro merged commit d652323 into python:3.15 Oct 19, 2026
64 checks passed
miss-islington deleted the backport-0c4ca17-3.15 branch October 19, 2026 22:54
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip news tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL