cpython/Python
Brett Cannon 0dbb4c7f13 Issues #18088, 18089: Introduce
importlib.abc.Loader.init_module_attrs() and implement
importlib.abc.InspectLoader.load_module().

The importlib.abc.Loader.init_module_attrs() method sets the various
attributes on the module being loaded. It is done unconditionally to
support reloading. Typically people used
importlib.util.module_for_loader, but since that's a decorator there
was no way to override it's actions, so init_module_attrs() came into
existence to allow for overriding. This is also why module_for_loader
is now pending deprecation (having its other use replaced by
importlib.util.module_to_load).

All of this allowed for importlib.abc.InspectLoader.load_module() to
be implemented. At this point you can now implement a loader with
nothing more than get_code() (which only requires get_source();
package support requires is_package()). Thanks to init_module_attrs()
the implementation of load_module() is basically a context manager
containing 2 methods calls, a call to exec(), and a return statement.
2013-05-31 18:56:47 -04:00
..
Python-ast.c Issue #17917: Use PyModule_AddIntMacro() instead of PyModule_AddIntConstant() 2013-05-20 19:13:19 +02:00
_warnings.c Issue #1545463: At shutdown, defer finalization of codec modules so that stderr remains usable. 2013-05-08 13:23:25 +02:00
asdl.c
ast.c move declaration to top of block 2013-03-18 10:59:41 -07:00
bltinmodule.c rather than passing locals to the class body, just execute the class body in the proper environment 2013-05-16 14:37:25 -05:00
ceval.c Fix a compilater warning on Windows 64-bit 2013-05-16 23:48:01 +02:00
ceval_gil.h
codecs.c
compile.c fix compilation on Windows 2013-05-16 22:17:17 +02:00
condvar.h Issue #15038 : Fixing the condition broadcast and docs. 2013-03-19 20:18:37 -07:00
dtoa.c
dup2.c
dynamic_annotations.c
dynload_aix.c Issue #17173: Remove uses of locale-dependent C functions (isalpha() etc.) in the interpreter. 2013-02-09 23:14:42 +01:00
dynload_dl.c
dynload_hpux.c
dynload_next.c
dynload_shlib.c
dynload_stub.c
dynload_win.c Fixes issue4653 - Correctly specify the buffer size to FormatMessageW and 2013-03-23 16:05:36 -07:00
errors.c
fileutils.c Fix a compiler warning: in and out are unused in _Py_char2wchar() if 2013-05-07 23:48:56 +02:00
formatter_unicode.c Fix a compilater warning on Windows 64-bit 2013-05-17 00:04:56 +02:00
frozen.c make some freezing related stuff const 2013-03-13 14:06:39 -05:00
frozenmain.c
future.c C89 compliance 2013-03-16 15:38:28 -07:00
getargs.c Use PY_FORMAT_SIZE_T because Visual Studio does not understand %zd format. 2013-05-18 17:35:19 +01:00
getcompiler.c
getcopyright.c
getcwd.c
getopt.c
getplatform.c
getversion.c
graminit.c Backed out changeset 521232b05b97 2013-03-20 00:39:41 -05:00
import.c Issue #17937: Try harder to collect cyclic garbage at shutdown. 2013-05-19 01:11:58 +02:00
importdl.c
importdl.h
importlib.h Issues #18088, 18089: Introduce 2013-05-31 18:56:47 -04:00
makeopcodetargets.py
marshal.c Issue #15480: Remove the deprecated and unused TYPE_INT64 code from marshal. 2013-04-13 22:41:09 +02:00
modsupport.c
mysnprintf.c
mystrtoul.c Issue #17173: Remove uses of locale-dependent C functions (isalpha() etc.) in the interpreter. 2013-02-09 23:11:27 +01:00
opcode_targets.h rather than passing locals to the class body, just execute the class body in the proper environment 2013-05-16 14:37:25 -05:00
peephole.c
pyarena.c remove unnecessary clearing of list 2013-01-19 14:58:38 -05:00
pyctype.c
pyfpe.c
pymath.c
pystate.c Issue #17912: Use a doubly linked-list for thread states. 2013-05-08 21:09:52 +02:00
pystrcmp.c
pystrtod.c
pythonrun.c Issue #1545463: Global variables caught in reference cycles are now garbage-collected at shutdown. 2013-05-06 21:15:57 +02:00
pytime.c
random.c Drop support for Windows 2000; allow any XP API (but not Vista+). 2013-01-25 14:06:18 +01:00
sigcheck.c
strdup.c
structmember.c
symtable.c rather than passing locals to the class body, just execute the class body in the proper environment 2013-05-16 14:37:25 -05:00
sysmodule.c
thread.c
thread_foobar.h
thread_nt.h Replace WaitForSingleObject with WaitForSingleObjectEx, 2013-01-25 14:25:48 +01:00
thread_pth.h
thread_pthread.h
traceback.c Fix compilater warnings on Windows 64-bit 2013-05-17 00:12:04 +02:00