summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_importlib/test_abc.py
Commit message (Collapse)AuthorAgeFilesLines
* gh-97850: Remove deprecated functions from `importlib.utils` (#97898)Nikita Sobolev2022-10-071-7/+1
| | | | | * gh-97850: Remove deprecated functions from `importlib.utils` * Rebase and remove `set_package` from diff
* gh-97850: Remove all known instances of module_repr() (#97876)Barry Warsaw2022-10-051-3/+0
| | | Remove all known instances of module_repr()
* gh-93963: Remove ResourceReaderDefaultsTests (GH-96598)Jason R. Coombs2022-09-051-28/+0
| | | Automerge-Triggered-By: GH:jaraco
* gh-96280: suppress deprecation warning in test_importlib (GH-96281)Irit Katriel2022-08-261-1/+3
|
* gh-94619: Remove long deprecated methods module_repr() and load_module() ↵Barry Warsaw2022-08-051-2/+0
| | | | | | | | | | | | | | | (#94624) * gh-94619: Remove long deprecated methods module_repr() and load_module() Closes #94619 * Update Misc/NEWS.d/next/Library/2022-07-06-14-57-33.gh-issue-94619.PRqKVX.rst Fix typo Co-authored-by: Brett Cannon <brett@python.org> Co-authored-by: Brett Cannon <brett@python.org>
* gh-84623: Remove unused imports in tests (#93772)Victor Stinner2022-06-131-1/+0
|
* bpo-46425: fix direct invocation of `test_importlib` (GH-30682)Nikita Sobolev2022-01-221-1/+1
|
* bpo-42135: Deprecate implementations of find_module() and find_loader() ↵Brett Cannon2021-04-061-2/+2
| | | | (GH-25169)
* bpo-43672: raise ImportWarning when calling find_loader() (GH-25119)Brett Cannon2021-04-021-5/+5
|
* bpo-42136: Deprecate module_repr() as found in importlib (GH-25022)Brett Cannon2021-03-261-2/+4
|
* bpo-42129: Add support for resources in namespaces (GH-24670)Jason R. Coombs2021-03-041-1/+3
| | | | | * Unify behavior in ResourceReaderDefaultsTests and align with the behavior found in importlib_resources. * Equip NamespaceLoader with a NamespaceReader. * Apply changes from importlib_resources 5.0.4
* bpo-26131: Deprecate usage of load_module() (GH-23469)Brett Cannon2020-12-041-38/+46
| | | Raise an ImportWarning when the import system falls back on load_module(). As for implementations of load_module(), raise a DeprecationWarning.
* bpo-40275: Use new test.support helper submodules in tests (GH-21727)Hai Shi2020-08-041-2/+3
|
* Unmark files as executable that can't actually be executed. (GH-15353)Greg Price2019-08-211-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | There are plenty of legitimate scripts in the tree that begin with a `#!`, but also a few that seem to be marked executable by mistake. Found them with this command -- it gets executable files known to Git, filters to the ones that don't start with a `#!`, and then unmarks them as executable: $ git ls-files --stage \ | perl -lane 'print $F[3] if (!/^100644/)' \ | while read f; do head -c2 "$f" | grep -qxF '#!' \ || chmod a-x "$f"; \ done Looking at the list by hand confirms that we didn't sweep up any files that should have the executable bit after all. In particular * The `.psd` files are images from Photoshop. * The `.bat` files sure look like things that can be run. But we have lots of other `.bat` files, and they don't have this bit set, so it must not be needed for them. Automerge-Triggered-By: @benjaminp
* bpo-30202 : Update test.test_importlib.test_abc to test find_spec() (GH-12847)Joannah Nanjekye2019-06-211-4/+17
|
* bpo-25711: Rewrite zipimport in pure Python. (GH-6809)Serhiy Storchaka2018-09-181-6/+6
|
* bpo-32248: Implement importlib.abc.ResourceReader (GH-4892)Brett Cannon2017-12-161-0/+39
|
* closes bpo-31650: PEP 552 (Deterministic pycs) implementation (#4575)Benjamin Peterson2017-12-091-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Python now supports checking bytecode cache up-to-dateness with a hash of the source contents rather than volatile source metadata. See the PEP for details. While a fairly straightforward idea, quite a lot of code had to be modified due to the pervasiveness of pyc implementation details in the codebase. Changes in this commit include: - The core changes to importlib to understand how to read, validate, and regenerate hash-based pycs. - Support for generating hash-based pycs in py_compile and compileall. - Modifications to our siphash implementation to support passing a custom key. We then expose it to importlib through _imp. - Updates to all places in the interpreter, standard library, and tests that manually generate or parse pyc files to grok the new format. - Support in the interpreter command line code for long options like --check-hash-based-pycs. - Tests and documentation for all of the above.
* bpo-30158: Fix deprecation warnings in test_importlib introduced by ↵Serhiy Storchaka2017-04-291-13/+16
| | | | bpo-29576. (#1285)
* bpo-29576: add explicit deprecation for importlib.abc.find_loader() and ↵Matthias Bussonnier2017-02-161-0/+6
| | | | | | find_module() (GH-32)
* Remove unused imports.Serhiy Storchaka2016-12-161-2/+0
|
* Issue #21099: Switch applicable importlib tests to use PEP 451 API.Eric Snow2016-05-101-6/+16
|
* Issue #19593: Use specific asserts in importlib tests.Serhiy Storchaka2014-07-071-1/+1
|\
| * Issue #19593: Use specific asserts in importlib tests.Serhiy Storchaka2014-07-071-1/+1
| |
* | Issue #21503: Use test_both() consistently in test_importlib.Eric Snow2014-05-161-150/+142
|/
* Issue #19719: Update various finder and loader ABCs such that theirBrett Cannon2014-01-071-0/+132
| | | | | | | old methods now provide implementations when PEP 451 APIs are present. This should help with backwards-compatibility with code which has not been updated to work with PEP 451.
* Issue 19713: Add PEP 451-related deprecations.Eric Snow2014-01-071-3/+10
|
* Implement PEP 451 (ModuleSpec).Eric Snow2013-11-221-197/+0
|
* [issue 19152] Ensure we have actually registered ExtensionFileLoader as an ↵Eric Snow2013-10-051-0/+1
| | | | ExecutionLoader.
* Issue #16803: Run test.test_importlib.test_abc under bothBrett Cannon2013-10-041-120/+299
| | | | _frozen_importlib and source.
* Issue #17177: stop using imp in test_importlibBrett Cannon2013-06-151-24/+25
|
* Issues #18088, 18089: IntroduceBrett Cannon2013-05-311-0/+202
| | | | | | | | | | | | | | | | | | | | | 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.
* Issue #18072: Implement get_code() for importlib.abc.InspectLoader andBrett Cannon2013-05-281-8/+88
| | | | ExecutionLoader.
* Move importlib.abc.SourceLoader.source_to_code() to InspectLoader.Brett Cannon2013-05-261-3/+47
| | | | | | | While the previous location was fine, it makes more sense to have the method higher up in the inheritance chain, especially at a point where get_source() is defined which is the earliest source_to_code() could programmatically be used in the inheritance tree in importlib.abc.
* Issue #17093,17566,17567: Methods from classes in importlib.abc now raise/returnBrett Cannon2013-04-091-10/+425
| | | | | | | | | | the default exception/value when called instead of raising/returning NotimplementedError/NotImplemented (except where appropriate). This should allow for the ABCs to act as the bottom/end of the MRO with expected default results. As part of this work, also make importlib.abc.Loader.module_repr() optional instead of an abstractmethod.
* Issue #15641: Clean up deprecated classes from importlibAndrew Svetlov2012-11-051-17/+1
| | | | Patch by Taras Lyapun.
* Issue #15502: Finish bringing importlib.abc in line with the currentBrett Cannon2012-08-101-0/+2
| | | | | | | | | 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.
* Close #15519: Properly expose WindowsRegistryFinder in importlib and bring ↵Nick Coghlan2012-08-021-1/+1
| | | | the name into line with normal import terminology. Original patch by Eric Snow
* Issue #15502: Bring the importlib ABCs into line with the current state of ↵Nick Coghlan2012-08-021-1/+6
| | | | the import protocols given PEP 420. Original patch by Eric Snow.
* Issue #15168: Move importlb.test to test.test_importlib.Brett Cannon2012-07-201-0/+96
This should make the Linux distros happy as it is now easier to leave importlib's tests out of their base Python distribution.