]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-28411: Support other mappings in PyInterpreterState.modules. (#3593)
authorEric Snow <ericsnowcurrently@gmail.com>
Fri, 15 Sep 2017 22:35:20 +0000 (16:35 -0600)
committerGitHub <noreply@github.com>
Fri, 15 Sep 2017 22:35:20 +0000 (16:35 -0600)
commit3f9eee6eb4b25fe1926eaa5f00e02344b126f54d
treec749747e0b4ce492d05c34ad5578b81128be1156
parente82c034496512139e9ea3f68ceda86c04bc7baab
bpo-28411: Support other mappings in PyInterpreterState.modules. (#3593)

The concrete PyDict_* API is used to interact with PyInterpreterState.modules in a number of places. This isn't compatible with all dict subclasses, nor with other Mapping implementations. This patch switches the concrete API usage to the corresponding abstract API calls.

We also add a PyImport_GetModule() function (and some other helpers) to reduce a bunch of code duplication.
Doc/c-api/import.rst
Include/import.h
Misc/NEWS.d/next/Core and Builtins/2017-09-11-09-11-20.bpo-28411.Ax91lz.rst [new file with mode: 0644]
Modules/_pickle.c
Modules/pyexpat.c
Objects/typeobject.c
Python/_warnings.c
Python/ceval.c
Python/import.c
Python/pylifecycle.c
Python/sysmodule.c