summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_importlib/test_api.py
Commit message (Collapse)AuthorAgeFilesLines
* bpo-33169: Remove values of `None` from sys.path_importer_cache when ↵Brett Cannon2018-04-061-1/+1
| | | | | invalidating caches (GH-6402) An entry of None in sys.path_importer_cache represents a negative/missing finder for a path, so clearing it out makes sense.
* bpo-32303 - Consistency fixes for namespace loaders (#5481)Barry Warsaw2018-02-021-2/+4
| | | | | | | * Make sure ``__spec__.loader`` matches ``__loader__`` for namespace packages. * Make sure ``__spec__.origin` matches ``__file__`` for namespace packages. https://bugs.python.org/issue32303 https://bugs.python.org/issue32305
* bpo-29851: Have importlib.reload() raise ImportError if the module's spec is ↵Garvit Khatri2017-05-241-2/+12
| | | | not found (GH-972)
* Issue #21099: Switch applicable importlib tests to use PEP 451 API.Eric Snow2016-05-101-6/+25
|
* Issue #21503: Use test_both() consistently in test_importlib.Eric Snow2014-05-161-53/+46
|
* Issue #21499: Ignore __builtins__ in several test_importlib.test_api tests.Eric Snow2014-05-131-7/+8
|
* Issue 19944: Fix importlib.find_spec() so it imports parents as needed.Eric Snow2014-01-251-149/+2
| | | | The function is also moved to importlib.util.
* Issue 19713: Add PEP 451-related deprecations.Eric Snow2014-01-071-7/+20
|
* Issue #19927: Add __eq__ to path-based loaders in importlib.Eric Snow2014-01-041-2/+1
|
* Issue 19851: Fix a regression in reloading submodules.Eric Snow2013-12-101-0/+68
|
* Implement PEP 451 (ModuleSpec).Eric Snow2013-11-221-11/+125
|
* Issue #19413: Disregard duplicate namespace portions during reload tests.Eric Snow2013-11-011-2/+2
|
* Issue #19413: Restore pre-3.3 reload() semantics of re-finding modules.Eric Snow2013-11-011-0/+120
|
* Issue #16803: test.test_importlib.test_api now runs under frozen andBrett Cannon2013-10-181-37/+69
| | | | source.
* Closes issue #18698: ensure importlib.reload() returns the module out of ↵Eric Snow2013-08-151-0/+16
| | | | sys.modules.
* Issue #17177: stop using imp in test_importlibBrett Cannon2013-06-151-5/+5
|
* Issue #18193: Add importlib.reload(), documenting (but notBrett Cannon2013-06-141-0/+12
| | | | | | implementing in code) the deprecation of imp.reload(). Thanks to Berker Peksag for the patch.
* #17115,17116: Have modules initialize the __package__ and __loader__Brett Cannon2013-05-041-8/+6
| | | | | | | | | | | | | | | | | attributes to None. The long-term goal is for people to be able to rely on these attributes existing and checking for None to see if they have been set. Since import itself sets these attributes when a loader does not the only instances when the attributes are None are from someone overloading __import__() and not using a loader or someone creating a module from scratch. This patch also unifies module initialization. Before you could have different attributes with default values depending on how the module object was created. Now the only way to not get the same default set of attributes is to circumvent initialization by calling ModuleType.__new__() directly.
* Issue #17099: Have importlib.find_loader() raise ValueError whenBrett Cannon2013-03-131-0/+14
| | | | | | __loader__ is not set on a module. This brings the exception in line with when __loader__ is None (which is equivalent to not having the attribute defined).
* merge w/ 3.3Brett Cannon2013-02-031-6/+0
|\
| * Way too many places create modules temporarily that never setBrett Cannon2013-02-031-6/+0
| | | | | | | | | | | | __loader__ for this test to succeed without a major changes. It also doesn't test the original issue of modules imported by Py_Initialize() having __loader__ set (the rest of the test covers that).
* | mergeBrett Cannon2013-02-031-0/+4
|\ \ | |/
| * pyexpat/xml.parsers.expat create their errors and model modules fromBrett Cannon2013-02-031-0/+4
| | | | | | | | | | | | scratch. This means they do not set __loader__ by default. This is acceptable under importlib/PEP 302 definitions, so relax the test that was trying to apply this universally.
* | Merge w/ 3.3 more fixes thanks to issue #17098Brett Cannon2013-02-011-0/+9
|\ \ | |/
| * Issue #17098: Be more stringent of setting __loader__ on early importedBrett Cannon2013-02-011-0/+6
| | | | | | | | modules. Also made test more rigorous.
* | merge with 3.3Brett Cannon2013-02-011-7/+10
|\ \ | |/
| * Add a test for fix of issue #17098Brett Cannon2013-02-011-1/+12
|/
* Issue #15502: Finish bringing importlib.abc in line with the currentBrett Cannon2012-08-101-3/+7
| | | | | | | | | state of the import system. Also make importlib.invalidate_caches() work with sys.meta_path instead of sys.path_importer_cache to completely separate the path-based import system from the overall import system. Patch by Eric Snow.
* Issue #15168: Move importlb.test to test.test_importlib.Brett Cannon2012-07-201-0/+183
This should make the Linux distros happy as it is now easier to leave importlib's tests out of their base Python distribution.