summaryrefslogtreecommitdiffstats
path: root/Lib/importlib/util.py
Commit message (Collapse)AuthorAgeFilesLines
* Issue 19944: Fix importlib.find_spec() so it imports parents as needed.Eric Snow2014-01-251-0/+72
| | | | The function is also moved to importlib.util.
* Issue 19713: Add PEP 451-related deprecations.Eric Snow2014-01-071-5/+15
|
* Implement PEP 451 (ModuleSpec).Eric Snow2013-11-221-7/+58
|
* Issue #18076: Introduce imoportlib.util.decode_source().Brett Cannon2013-06-161-0/+1
| | | | | | | The helper function makes it easier to implement imoprtlib.abc.InspectLoader.get_source() by making that function require just the raw bytes for source code and handling all other details.
* Issue #17907: touch up the code for imp.new_module().Brett Cannon2013-06-151-0/+2
|
* Issue #18192: Introduce importlib.util.MAGIC_NUMBER and document theBrett Cannon2013-06-141-0/+1
| | | | deprecation of imp.get_magic().
* fix whitespaceBrett Cannon2013-05-311-1/+1
|
* Issues #18088, 18089: IntroduceBrett Cannon2013-05-311-1/+44
| | | | | | | | | | | | | | | | | | | | | 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.
* Rename importlib.util.ModuleManager to module_to_load so that the nameBrett Cannon2013-05-301-1/+1
| | | | explains better what the context manager is providing.
* Introduce importlib.util.ModuleManager which is a context manager toBrett Cannon2013-05-281-0/+1
| | | | | | | | handle providing (and cleaning up if needed) the module to be loaded. A future commit will use the context manager in Lib/importlib/_bootstrap.py and thus why the code is placed there instead of in Lib/importlib/util.py.
* Add importlib.util.resolve_name().Brett Cannon2012-05-131-0/+16
|
* PEP 3147Barry Warsaw2010-04-171-0/+1
|
* Implement importlib.util.set_loader: a decorator to automatically setBrett Cannon2009-03-101-0/+1
| | | | __loader__ on modules.
* Rename importlib.util.set___package__ to set_package.Brett Cannon2009-03-041-1/+1
|
* Expose importlib.util.set___package__.Brett Cannon2009-03-021-0/+1
|
* Implement the more specific PEP 302 semantics for loaders and what happens uponBrett Cannon2009-02-171-0/+2
load failure in relation to reloads. Also expose importlib.util.module_for_loader to handle all of the details of this along with making sure all current loaders behave nicely.