summaryrefslogtreecommitdiff
path: root/Lib/test/test_importlib/test_util.py
Commit message (Collapse)AuthorAgeFilesLines
* Issue #28026: Raise ImportError when exec_module() exists but ↵Eric Snow2016-09-081-7/+1
| | | | create_module() is missing.
* Issue #26667: Add path-like object support to importlib.util.Brett Cannon2016-09-071-0/+19
|
* Issue #27895: Spelling fixes (Contributed by Ville Skytt?).Martin Panter2016-09-071-1/+1
|
* Issue #23731: Implement PEP 488.Brett Cannon2015-04-131-18/+96
| | | | | | The concept of .pyo files no longer exists. Now .pyc files have an optional `opt-` tag which specifies if any extra optimizations beyond the peepholer were applied.
* Remove a dead test for a never-launched APIBrett Cannon2015-03-271-9/+0
|
* Issue #23014: Make importlib.abc.Loader.create_module() required whenBrett Cannon2015-01-091-3/+9
| | | | | | | | | importlib.abc.Loader.exec_module() is also defined. Before this change, create_module() was optional **and** could return None to trigger default semantics. This change now reduces the options for choosing default semantics to one and in the most backporting-friendly way (define create_module() to return None).
* Issue #20383: Introduce importlib.util.module_from_spec().Brett Cannon2014-05-301-37/+115
| | | | | | Along the way, dismantle importlib._bootstrap._SpecMethods as it was no longer relevant and constructing the new function required partially dismantling the class anyway.
* Issue #21503: Use test_both() consistently in test_importlib.Eric Snow2014-05-161-41/+44
|
* Issue 19944: Fix importlib.find_spec() so it imports parents as needed.Eric Snow2014-01-251-0/+147
| | | | The function is also moved to importlib.util.
* Issue 19713: Add PEP 451-related deprecations.Eric Snow2014-01-061-8/+18
|
* Implement PEP 451 (ModuleSpec).Eric Snow2013-11-221-65/+0
|
* Issue #16803: Move test_importlib.test_util to use both frozen andBrett Cannon2013-10-181-50/+85
| | | | source code.
* Issue #18076: Introduce imoportlib.util.decode_source().Brett Cannon2013-06-161-0/+21
| | | | | | | 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 #17177: stop using imp in test_importlibBrett Cannon2013-06-151-15/+15
|
* Issue #17907: touch up the code for imp.new_module().Brett Cannon2013-06-141-0/+116
|
* Issue #18192: Introduce importlib.util.MAGIC_NUMBER and document theBrett Cannon2013-06-141-0/+11
| | | | deprecation of imp.get_magic().
* Issues #18088, 18089: IntroduceBrett Cannon2013-05-311-5/+19
| | | | | | | | | | | | | | | | | | | | | 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.
* Add a reset_name argument to importlib.util.module_to_load in order toBrett Cannon2013-05-311-0/+12
| | | | | control whether to reset the module's __name__ attribute in case a reload is being done.
* Rename importlib.util.ModuleManager to module_to_load so that the nameBrett Cannon2013-05-301-7/+7
| | | | explains better what the context manager is providing.
* Issue #18070: importlib.util.module_for_loader() now sets __loader__Brett Cannon2013-05-281-1/+12
| | | | | and __package__ unconditionally in order to do the right thing for reloading.
* Introduce importlib.util.ModuleManager which is a context manager toBrett Cannon2013-05-281-0/+50
| | | | | | | | 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.
* Issue #17117: Have both import itself and importlib.util.set_loader()Brett Cannon2013-03-131-10/+32
| | | | | | set __loader__ on a module when set to None. Thanks to G?kcen Eraslan for the fix.
* Issue #15168: Move importlb.test to test.test_importlib.Brett Cannon2012-07-201-0/+208
This should make the Linux distros happy as it is now easier to leave importlib's tests out of their base Python distribution.