]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-105927: PyImport_AddModule() uses _PyWeakref_GET_REF() (#106001)
authorVictor Stinner <vstinner@python.org>
Thu, 22 Jun 2023 23:23:08 +0000 (01:23 +0200)
committerGitHub <noreply@github.com>
Thu, 22 Jun 2023 23:23:08 +0000 (01:23 +0200)
commitee52158f209835d6d4ca27f44218466f266f4afb
tree52f39ccad2c75bbcc512c277d10ed453e8fbd369
parent193a2b2eaab9890f2cb16128c95bb63cb49307f1
gh-105927: PyImport_AddModule() uses _PyWeakref_GET_REF() (#106001)

It now raises an exception if sys.modules doesn't hold a strong
reference to the module.

Elaborate the comment explaining why a weak reference is used to
create a borrowed reference.
Python/import.c