summaryrefslogtreecommitdiffstats
path: root/Python/importlib_zipimport.h
Commit message (Collapse)AuthorAgeFilesLines
* bpo-39791 native hooks for importlib.resources.files (GH-20576)Jason R. Coombs2020-06-081-1051/+933
| | | | | | | | | | | | | | | | | | | | | | | | | * Provide native .files support on SourceFileLoader. * Add native importlib.resources.files() support to zipimporter. Remove fallback support. * make regen-all * 📜🤖 Added by blurb_it. * Move 'files' into the ResourceReader so it can carry the relevant module name context. * Create 'importlib.readers' module and add FileReader to it. * Add zip reader and rely on it for a TraversableResources object on zipimporter. * Remove TraversableAdapter, no longer needed. * Update blurb. * Replace backslashes with forward slashes. * Incorporate changes from importlib_metadata 2.0, finalizing the interface for extension via get_resource_reader. Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
* bpo-39987: Simplify setting lineno in the compiler. (GH-19037)Serhiy Storchaka2020-03-171-353/+352
|
* bpo-39156: Break up COMPARE_OP into four logically distinct opcodes. (GH-17754)Mark Shannon2020-01-141-917/+914
| | | | | | | | Break up COMPARE_OP into four logically distinct opcodes: * COMPARE_OP for rich comparisons * IS_OP for 'is' and 'is not' tests * CONTAINS_OP for 'in' and 'is not' tests * JUMP_IF_NOT_EXC_MATCH for checking exceptions in 'try-except' statements.
* bpo-39033: Fix NameError in zipimport during hash validation (GH-17588)Xtreak2019-12-151-268/+267
| | | | Patch by Karthikeyan Singaravelan.
* Produce cleaner bytecode for 'with' and 'async with' by generating separate ↵Mark Shannon2019-11-211-491/+494
| | | | | | code for normal and exceptional paths. (#6641) Remove BEGIN_FINALLY, END_FINALLY, CALL_FINALLY and POP_FINALLY bytecodes. Implement finally blocks by code duplication. Reimplement frame.lineno setter using line numbers rather than bytecode offsets.
* bpo-34880: Add the LOAD_ASSERTION_ERROR opcode. (GH-15073)Zackery Spytz2019-08-251-183/+181
| | | | Fix assert statement misbehavior if AssertionError is shadowed.
* bpo-37830: Fix compilation of break and continue in finally. (GH-15320)Serhiy Storchaka2019-08-241-5/+5
| | | | | | Fix compilation of "break" and "continue" in the "finally" block when the corresponding "try" block contains "return" with a non-constant value.
* bpo-37213: Handle negative line deltas correctly in the peephole optimizer ↵Pablo Galindo2019-06-131-296/+296
| | | | | (GH-13969) The peephole optimizer was not optimizing correctly bytecode after negative deltas were introduced. This is due to the fact that some special values (255) were being searched for in both instruction pointer delta and line number deltas.
* bpo-36842: Implement PEP 578 (GH-12613)Steve Dower2019-05-231-559/+558
| | | Adds sys.audit, sys.addaudithook, io.open_code, and associated C APIs.
* bpo-36540: PEP 570 -- Implementation (GH-12701)Pablo Galindo2019-04-291-819/+828
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-16806: Fix `lineno` and `col_offset` for multi-line string tokens (GH-10021)Anthony Sottile2019-01-131-4/+4
|
* bpo-31241: Fix AST node position for list and generator comprehensions. ↵Serhiy Storchaka2018-11-271-201/+201
| | | | | | | | (GH-10633) The lineno and col_offset attributes of AST nodes for list comprehensions, generator expressions and tuples are now point to the opening parenthesis or square brace. For tuples without parenthesis they point to the position of the first item.
* bpo-34100: Merge constants recursively (GH-8341)INADA Naoki2018-11-261-785/+775
| | | | | | | There are some same consts in a module. This commit merges them into single instance. It reduces number of objects in memory after loading modules. https://bugs.python.org/issue34100
* bpo-34726: Fix handling of hash-based pycs in zipimport. (GH-10327)Elvis Pranskevichus2018-11-071-1018/+1055
| | | | | | | | Current support for hash-based bytecode files in `zipimport` is rather sparse, which leads to test failures when the test suite is ran with the ``SOURCE_DATE_EPOCH`` environment variable set. This teaches zipimport to handle hash-based pycs properly.
* bpo-5950: Support reading zips with comments in zipimport (#9548)Zackery Spytz2018-09-251-1006/+1034
| | | * bpo-5950: Support reading zips with comments in zipimport
* bpo-25711: Move _ZipImportResourceReader from importlib to zipimport. (GH-9406)Serhiy Storchaka2018-09-191-866/+986
|
* bpo-25711: Rewrite zipimport in pure Python. (GH-6809)Serhiy Storchaka2018-09-181-0/+900