summaryrefslogtreecommitdiffstats
path: root/Lib/importlib
Commit message (Collapse)AuthorAgeFilesLines
* bpo-38121: Sync importlib.metadata with 0.22 backport (GH-15993)Jason R. Coombs2019-09-122-65/+78
| | | | | | * bpo-38121: Sync importlib.metadata with 0.22 backport * 📜🤖 Added by blurb_it.
* bpo-35923: Update the BuiltinImporter to use loader._ORIGIN instead of a ↵Dong-hee Na2019-09-111-2/+4
| | | | | | hard-coded value (GH-15651)
* bpo-38086: Sync importlib.metadata with importlib_metadata 0.21. (GH-15840)Jason R. Coombs2019-09-102-22/+59
| | | https://gitlab.com/python-devs/importlib_metadata/-/tags/0.21
* bpo-38010 Sync importlib.metadata with importlib_metadata 0.20. (GH-15646)Jason R. Coombs2019-09-021-3/+15
| | | Sync importlib.metadata with importlib_metadata 0.20.
* bpo-34880: Add the LOAD_ASSERTION_ERROR opcode. (GH-15073)Zackery Spytz2019-08-251-1/+2
| | | | Fix assert statement misbehavior if AssertionError is shadowed.
* bpo-37830: Fix compilation of break and continue in finally. (GH-15320)Serhiy Storchaka2019-08-241-1/+2
| | | | | | Fix compilation of "break" and "continue" in the "finally" block when the corresponding "try" block contains "return" with a non-constant value.
* bpo-37685: Fixed __eq__, __lt__ etc implementations in some classes. (GH-14952)Serhiy Storchaka2019-08-081-1/+1
| | | | They now return NotImplemented for unsupported type of the other operand.
* Make importlib.metadata a simple module (#15153)Barry Warsaw2019-08-061-0/+0
|
* bpo-37444: Update differing exception between builtins and importlib (GH-14869)Ngalim Siregar2019-08-032-3/+3
| | | | | | | | | | Imports now raise `TypeError` instead of `ValueError` for relative import failures. This makes things consistent between `builtins.__import__` and `importlib.__import__` as well as using a more natural import for the failure. https://bugs.python.org/issue37444 Automerge-Triggered-By: @brettcannon
* bpo-37697: Sync with importlib_metadata 0.19 (#14993)Jason R. Coombs2019-07-282-11/+20
| | | | | | | | * bpo-37697: Sync with importlib_metadata 0.19 * Run make regen-importlib * 📜🤖 Added by blurb_it.
* Fix typos in docs, comments and test assert messages (#14872)Min ho Kim2019-07-211-1/+1
|
* bpo-37593: Swap the positions of posonlyargs and args in the constructor of ↵Pablo Galindo2019-07-141-1/+3
| | | | | ast.parameters nodes (GH-14778) https://bugs.python.org/issue37593
* bpo-35224: Bump the pyc magic number by 1 instead of by 10 in last ↵Pablo Galindo2019-06-231-2/+2
| | | | modification (GH-14320)
* bpo-35224: Bump the pyc magic number after the change in MAP_ADD (GH-14313)Pablo Galindo2019-06-221-1/+3
|
* cross port importlib-metadata PR #76 (#13903)Anthony Sottile2019-06-071-0/+2
| | | https://gitlab.com/python-devs/importlib_metadata/merge_requests/76
* Don't crash if there exists an EGG-INFO directory on sys.path (#13667)Anthony Sottile2019-05-301-1/+2
| | | | | | | | * Don't crash if there exists an EGG-INFO directory on sys.path cross-port of https://gitlab.com/python-devs/importlib_metadata/merge_requests/72 * Also catch PermissionError for windows
* bpo-34632: Add importlib.metadata (GH-12547)Jason R. Coombs2019-05-242-0/+446
| | | Add importlib.metadata module as forward port of the standalone importlib_metadata.
* bpo-36842: Implement PEP 578 (GH-12613)Steve Dower2019-05-231-2/+6
| | | Adds sys.audit, sys.addaudithook, io.open_code, and associated C APIs.
* bpo-36540: PEP 570 -- Implementation (GH-12701)Pablo Galindo2019-04-291-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit contains the implementation of PEP570: Python positional-only parameters. * Update Grammar/Grammar with new typedarglist and varargslist * Regenerate grammar files * Update and regenerate AST related files * Update code object * Update marshal.c * Update compiler and symtable * Regenerate importlib files * Update callable objects * Implement positional-only args logic in ceval.c * Regenerate frozen data * Update standard library to account for positional-only args * Add test file for positional-only args * Update other test files to account for positional-only args * Add News entry * Update inspect module and related tests
* bpo-35843: Implement __getitem__ for _NamespacePath (GH-11690)Anthony Sottile2019-03-081-0/+3
|
* bpo-35887: Add make regen-importlib step to importlib._bootstrap docstring ↵Nina Zakharenko2019-02-131-3/+3
| | | | (GH-11777)
* bpo-35321: Set the spec origin to frozen in frozen modules (#11732)Nina Zakharenko2019-02-051-2/+4
| | | | | | | | | | * bpo-35321: Set the spec origin to frozen in frozen modules This fix correctly sets the spec origin to "frozen" for the _frozen_importlib module. Note that the origin was already correctly set in _frozen_importlib_external. * 📜🤖 Added by blurb_it.
* bpo-35133: Fix mistakes when concatenate string literals on different lines. ↵Serhiy Storchaka2018-11-051-1/+1
| | | | | | | | | | (GH-10284) Two kind of mistakes: 1. Missed space. After concatenating there is no space between words. 2. Missed comma. Causes unintentional concatenating in a list of strings.
* bpo-33331: Clean modules in the reversed order in PyImport_Cleanup(). (GH-6565)Serhiy Storchaka2018-10-291-56/+62
| | | | | | Modules imported last are now cleared first at interpreter shutdown. A newly imported module is moved to the end of sys.modules, behind modules on which it depends.
* bpo-35024: Remove redundant and possibly incorrect verbose message after ↵Quentin Agren2018-10-261-1/+0
| | | | | | | | | writing '.pyc' (GH-9998) Since `SourceFileLoader.set_data()` catches exceptions raised by `_write_atomic()` and logs an informative message consequently, always logging successful outcome in 'SourceLoader.get_code()' seems redundant. https://bugs.python.org/issue35024
* importlib: Fix typo in SourceLoader.path_stats docstring (GH-10052)Quentin2018-10-251-3/+4
|
* bpo-25711: Move _ZipImportResourceReader from importlib to zipimport. (GH-9406)Serhiy Storchaka2018-09-191-84/+0
|
* bpo-25711: Rewrite zipimport in pure Python. (GH-6809)Serhiy Storchaka2018-09-182-12/+18
|
* bpo-33499: Add PYTHONPYCACHEPREFIX env var for alt bytecode cache location. ↵Carl Meyer2018-06-161-10/+52
| | | | | | | | | | | | | | | (GH-6834) In some development setups it is inconvenient or impossible to write bytecode caches to the code tree, but the bytecode caches are still useful. The PYTHONPYCACHEPREFIX environment variable allows specifying an alternate location for cached bytecode files, within which a directory tree mirroring the code tree will be created. This cache tree is then used (for both reading and writing) instead of the local `__pycache__` subdirectory within each source directory. Exposed at runtime as sys.pycache_prefix (defaulting to None), and can be set from the CLI as "-X pycache_prefix=path". Patch by Carl Meyer.
* bpo-30436: Add missing space in importlib.util.find_spec() error message ↵Zackery Spytz2018-06-071-1/+1
| | | | (GH-7385)
* bpo-32911: Add the historical note about the magic number. (GH-7273)Serhiy Storchaka2018-05-311-0/+2
|
* bpo-33537: Add an __all__ to importlib.resources (#6920)Barry Warsaw2018-05-171-8/+20
|
* bpo-33254: do not return an empty list when asking for the contents of a ↵Brett Cannon2018-04-302-13/+12
| | | | namespace package (GH-6467)
* bpo-33169: Remove values of `None` from sys.path_importer_cache when ↵Brett Cannon2018-04-061-2/+4
| | | | | 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-33151: Handle submodule resources (GH-6268)Barry Warsaw2018-03-271-3/+5
|
* bpo-33041: Rework compiling an "async for" loop. (#6142)Serhiy Storchaka2018-03-231-1/+2
| | | | | | | | * Added new opcode END_ASYNC_FOR. * Setting global StopAsyncIteration no longer breaks "async for" loops. * Jumping into an "async for" loop is now disabled. * Jumping out of an "async for" loop no longer corrupts the stack. * Simplify the compiler.
* bpo-32946: Speed up "from ... import ..." from non-packages. (GH-5873)Serhiy Storchaka2018-03-111-26/+27
|
* bpo-17611. Move unwinding of stack for "pseudo exceptions" from interpreter ↵Serhiy Storchaka2018-02-221-1/+2
| | | | | | | | | to compiler. (GH-5006) Co-authored-by: Mark Shannon <mark@hotpy.org> Co-authored-by: Antoine Pitrou <antoine@python.org>
* bpo-32838: Fix Python versions in the table of magic numbers. (#5658)Serhiy Storchaka2018-02-221-32/+35
|
* bpo-32303 - Consistency fixes for namespace loaders (#5481)Barry Warsaw2018-02-023-6/+27
| | | | | | | * 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-32550. Remove the STORE_ANNOTATION bytecode. (GH-5181)Mark Shannon2018-01-301-1/+2
|
* bpo-32248 - Implement `ResourceReader` and `get_resource_reader()` for ↵Barry Warsaw2018-01-241-67/+83
| | | | zipimport (#5248)
* Implement the get_resource_reader() API for file system imports (#5168)Barry Warsaw2018-01-153-9/+40
|
* bpo-32248: Introduce the concept of Loader.get_resource_reader() (GH-5108)Brett Cannon2018-01-121-2/+7
|
* bpo-32248 - Implement importlib.resources (#4911)Barry Warsaw2017-12-301-0/+303
| | | | Port importlib_resources to importlib.resources
* bpo-32248: Implement importlib.abc.ResourceReader (GH-4892)Brett Cannon2017-12-161-0/+38
|
* closes bpo-31650: PEP 552 (Deterministic pycs) implementation (#4575)Benjamin Peterson2017-12-092-55/+149
| | | | | | | | | | | | | | | | | | | | | | | | | 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-21720: Restore the Python 2.7 logic in handling a fromlist. (#4118)Serhiy Storchaka2017-10-261-7/+13
| | | | | | BytesWarning no longer emitted when the fromlist argument of __import__() or the __all__ attribute of the module contain bytes instances.
* bpo-31642: Restore blocking "from" import by setting None in sys.modules. ↵Serhiy Storchaka2017-10-081-1/+2
| | | | (#3834)
* bpo-31709: Update importlib magic (#3906)Yury Selivanov2017-10-061-1/+2
|