summaryrefslogtreecommitdiffstats
path: root/Lib/importlib
Commit message (Collapse)AuthorAgeFilesLines
* [3.8] bpo-46474: Avoid REDoS in EntryPoint.pattern (sync with ↵Jason R. Coombs2022-02-141-2/+2
| | | | | | | importlib_metadata 4.10.1) (GH-30803). (#30829) (cherry picked from commit 51c3e28c8a163e58dc753765e3cc51d5a717e70d) Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
* bpo-44070: No longer eagerly makes import filenames absolute, except for ↵Steve Dower2021-05-121-5/+5
| | | | extension modules (GH-26025) (#26028)
* bpo-43105: Importlib now resolves relative paths when creating module spec ↵Steve Dower2021-04-091-19/+89
| | | | objects from file locations (GH-25121)
* [3.8] bpo-42531: Teach importlib.resources.path to handle packages without ↵William Schwartz2021-01-161-3/+5
| | | | | | | | | __file__ (GH-23611) Fixes [bpo-42531]() for Python 3.8. The issue also applies to 3.7. If this PR looks like it'll be accepted, I can cherry-pick it to the 3.7 branch and submit a follow-up PR. Automerge-Triggered-By: GH:jaraco
* [3.8] bpo-41855: Fix duplicate results in FastPath.zip_children() (#22404)Jason R. Coombs2020-10-151-3/+2
| | | | | | | * bpo-41855: Backport fixes from importlib_metadata 1.5.2. * Add blurb. * Add anchor for finders and loaders
* bpo-39595: Improve zipfile.Path performance (GH-18406) (GH-18472)Miss Islington (bot)2020-02-121-5/+7
| | | | | | | | | | | | | | | | | | | | | | | * Improve zipfile.Path performance on zipfiles with a large number of entries. * 📜🤖 Added by blurb_it. * Add bpo to blurb * Sync with importlib_metadata 1.5 (6fe70ca) * Update blurb. * Remove compatibility code * Add stubs module, omitted from earlier commit Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> (cherry picked from commit e5bd73632e77dc5ab0cab77e48e94ca5e354be8a) Co-authored-by: Jason R. Coombs <jaraco@jaraco.com> Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
* bpo-39297: Update for importlib_metadata 1.4. (GH-17947) (GH-17952)Miss Islington (bot)2020-01-111-36/+72
| | | | | | | | | | | | | | | * bpo-39297: Update for importlib_metadata 1.4. Includes performance updates. * 📜🤖 Added by blurb_it. * Update blurb Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> (cherry picked from commit 136735c1a2efb320e4cbb64b40f1191228745b39) Co-authored-by: Jason R. Coombs <jaraco@jaraco.com> Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
* bpo-39022, bpo-38594: Sync with importlib_metadata 1.3 (GH-17568) (GH-17569)Miss Islington (bot)2019-12-111-1/+22
| | | | | | | | | | * bpo-39022, bpo-38594: Sync with importlib_metadata 1.3 including improved docs for custom finders and better serialization support in EntryPoints. * 📜🤖 Added by blurb_it. * Correct module reference (cherry picked from commit b7a0109cd2bafaa21a4d50aad307e901c68f9156) Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
* [3.8] bpo-38121: Sync importlib.metadata with 0.22 backport (GH-15993) ↵Jason R. Coombs2019-09-122-65/+78
| | | | | | | | | | (GH-16064) * bpo-38121: Sync importlib.metadata with 0.22 backport * 📜🤖 Added by blurb_it.. (cherry picked from commit 8ed6503eca4e3ea4949479d8d7fd9ffd54f81038) Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
* [3.8] bpo-38086: Sync importlib.metadata with importlib_metadata 0.21. ↵Jason R. Coombs2019-09-102-22/+59
| | | | | | | | (GH-15840) (#15861) https://gitlab.com/python-devs/importlib_metadata/-/tags/0.21. (cherry picked from commit 17499d82702432955d8e442a1871ff276ca64bc5) Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
* bpo-38010 Sync importlib.metadata with importlib_metadata 0.20. (GH-15646) ↵Miss Islington (bot)2019-09-021-3/+15
| | | | | | | | (GH-15648) Sync importlib.metadata with importlib_metadata 0.20. (cherry picked from commit 102e9b40ff6ee45086a5f0d34d9c60c581a1e5e5) Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
* [3.8] bpo-37830: Fix compilation of break and continue in finally. ↵Serhiy Storchaka2019-08-241-1/+2
| | | | | | | | | (GH-15320) (GH-15456) Fix compilation of "break" and "continue" in the "finally" block when the corresponding "try" block contains "return" with a non-constant value. (cherry picked from commit ef61c524ddeeb56da3858b86e349e7288d68178e)
* Make importlib.metadata a simple module (GH-15153) (GH-15154)Miss Islington (bot)2019-08-071-0/+0
| | | | | (cherry picked from commit 3a5c433fce7312748859290b9d8db5b6507660f9) Co-authored-by: Barry Warsaw <barry@python.org>
* bpo-37697: Sync with importlib_metadata 0.19 (GH-14993) (GH-14995)Miss Islington (bot)2019-07-282-11/+20
| | | | | | | | | | * bpo-37697: Sync with importlib_metadata 0.19 * Run make regen-importlib * 📜🤖 Added by blurb_it. (cherry picked from commit 049460da9c7b5f51732e2966195c44713af9dc4c) Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
* [3.8] Fix typos in docs, comments and test assert messages (GH-14872). (#14900)Kyle Stanley2019-07-221-1/+1
| | | | | (cherry picked from commit 96e12d5f4f3c5a20986566038ee763dff3c228a1) Co-authored-by: Min ho Kim <minho42@gmail.com>
* bpo-37593: Swap the positions of posonlyargs and args in the constructor of ↵Miss Islington (bot)2019-07-141-1/+3
| | | | | | | | ast.parameters nodes (GH-14778) https://bugs.python.org/issue37593 (cherry picked from commit cd6e83b4810549c308ab2d7315dbab526e35ccf6) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* bpo-35224: Bump the pyc magic number by 1 instead of by 10 in last ↵Miss Islington (bot)2019-06-231-2/+2
| | | | | | | modification (GH-14320) (cherry picked from commit b3ca7972c8d8c6479b6542ce28e0f7a6ebd5b8fe) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* bpo-35224: Bump the pyc magic number after the change in MAP_ADD (GH-14313)Miss Islington (bot)2019-06-221-1/+3
| | | | | (cherry picked from commit 663131a6e2c6c8b83e9f982d8c6ca38fc7c238b4) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* cross port importlib-metadata PR GH-76 (GH-13903)Miss Islington (bot)2019-06-071-0/+2
| | | | | | https://gitlab.com/python-devs/importlib_metadata/merge_requests/76 (cherry picked from commit 65e5860fcc8ffe66f3c325d5484112f3b6540e8c) Co-authored-by: Anthony Sottile <asottile@umich.edu>
* 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
|