8000 gh-134160: Block multiple module initialization by encukou · Pull Request #134773 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-134160: Block multiple module initialization #134773

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 28, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update Doc/extending/extending.rst
Co-authored-by: Petr Viktorin <encukou@gmail.com>
  • Loading branch information
AA-Turner and encukou authored May 27, 2025
commit e961facf469d8c4fffa5c090f7e112904f4184b1
2 changes: 1 addition & 1 deletion Doc/extending/extending.rst
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ and initialize it by calling :c:func:`PyErr_NewException` in the module's

Since :c:data:`!SpamError` is a global variable, each call to the
:c:data:`Py_mod_exec` function would overwrite it.
It is not very common to load multiple copies of a module, so for now,
For now, let's avoid the issue:
we will block repeated initialization by raising an
:py:exc:`ImportError`::

Expand Down
Loading
0