Commit message (Collapse) | Author | Age | ||
---|---|---|---|---|
... | ||||
* | GH-87849: Simplify stack effect of SEND and specialize it for generators and ↵ | Mark Shannon | 2023-02-13 | |
| | | | | coroutines. (GH-101788) | |||
* | gh-101632: Add the new RETURN_CONST opcode (#101633) | penguin_wwy | 2023-02-07 | |
| | ||||
* | Fix incorrect versions in magic number comments (GH-101301) | Brandt Bucher | 2023-01-25 | |
| | ||||
* | GH-100762: Don't call `gen.throw()` in `gen.close()`, unless necessary. ↵ | Mark Shannon | 2023-01-24 | |
| | | | | | | (GH-101013) * Store exception stack depth in YIELD_VALUE's oparg and use it avoid expensive gen.throw() in gen.close() where possible. | |||
* | GH-100982: Add `COMPARE_AND_BRANCH` instruction (GH-100983) | Mark Shannon | 2023-01-16 | |
| | ||||
* | GH-100923: Embed jump mask in `COMPARE_OP` oparg (GH-100924) | Mark Shannon | 2023-01-11 | |
| | ||||
* | GH-99005: More intrinsics (GH-100774) | Mark Shannon | 2023-01-06 | |
| | | | * Remove UNARY_POSITIVE, LIST_TO_TUPLE and ASYNC_GEN_WRAP, replacing them with intrinsics. | |||
* | GH-99005: Add `CALL_INTRINSIC_1` instruction (GH-100771) | Mark Shannon | 2023-01-05 | |
| | | | | | | | | * Remove PRINT_EXPR instruction * Remove STOPITERATION_ERROR instruction * Remove IMPORT_STAR instruction | |||
* | closes gh-99508: fix `TypeError` in `Lib/importlib/_bootstrap_external.py` ↵ | Nikita Sobolev | 2022-11-23 | |
| | | | | (GH-99635) | |||
* | gh-99254: remove all unused consts from code objects (GH-99255) | Irit Katriel | 2022-11-11 | |
| | ||||
* | GH-96793: Implement PEP 479 in bytecode. (GH-99006) | Mark Shannon | 2022-11-03 | |
| | | | | | * Handle converting StopIteration to RuntimeError in bytecode. * Add custom instruction for converting StopIteration into RuntimeError. | |||
* | GH-96793: Change `FOR_ITER` to not pop the iterator on exhaustion. (GH-96801) | Mark Shannon | 2022-10-27 | |
| | | | | Change FOR_ITER to have the same stack effect regardless of whether it branches or not. Performance is unchanged as FOR_ITER (and specialized forms jump over the cleanup code). | |||
* | gh-86298: Ensure that __loader__ and __spec__.loader agree in ↵ | Barry Warsaw | 2022-10-06 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | warnings.warn_explicit() (GH-97803) In `_warnings.c`, in the C equivalent of `warnings.warn_explicit()`, if the module globals are given (and not None), the warning will attempt to get the source line for the issued warning. To do this, it needs the module's loader. Previously, it would only look up `__loader__` in the module globals. In https://github.com/python/cpython/issues/86298 we want to defer to the `__spec__.loader` if available. The first step on this journey is to check that `loader == __spec__.loader` and issue another warning if it is not. This commit does that. Since this is a PoC, only manual testing for now. ```python # /tmp/foo.py import warnings import bar warnings.warn_explicit( 'warning!', RuntimeWarning, 'bar.py', 2, module='bar knee', module_globals=bar.__dict__, ) ``` ```python # /tmp/bar.py import sys import os import pathlib # __loader__ = pathlib.Path() ``` Then running this: `./python.exe -Wdefault /tmp/foo.py` Produces: ``` bar.py:2: RuntimeWarning: warning! import os ``` Uncomment the `__loader__ = ` line in `bar.py` and try it again: ``` sys:1: ImportWarning: Module bar; __loader__ != __spec__.loader (<_frozen_importlib_external.SourceFileLoader object at 0x109f7dfa0> != PosixPath('.')) bar.py:2: RuntimeWarning: warning! import os ``` Automerge-Triggered-By: GH:warsaw | |||
* | gh-82874: Convert remaining importlib format uses to f-str. (#98005) | Gregory P. Smith | 2022-10-06 | |
| | | | f-yes | |||
* | gh-65961: Do not rely solely on `__cached__` (GH-97990) | Brett Cannon | 2022-10-06 | |
| | | | Make sure `__spec__.cached` (at minimum) can be used. | |||
* | gh-93554: Conditional jump opcodes only jump forward (GH-96318) | Irit Katriel | 2022-09-01 | |
| | ||||
* | GH-90997: Wrap yield from/await in a virtual try/except StopIteration (GH-96010) | Brandt Bucher | 2022-08-19 | |
| | ||||
* | gh-94619: Remove long deprecated methods module_repr() and load_module() ↵ | Barry Warsaw | 2022-08-04 | |
| | | | | | | | | | | | | | | | (#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-91181: drop support for bytes on sys.path (GH-31934) | Thomas Grainger | 2022-07-16 | |
| | | | | | | Support for bytes broke sometime between Python 3.2 and 3.6 and has been broken ever since. Trying to bring back supports is surprisingly difficult in the face of -b and checking for keys in sys.path_importer_cache. Since the support was broken for so long, trying to overcome the difficulty of bringing back the support has been deemed not worth it. Co-authored-by: Eryk Sun <eryksun@gmail.com> Co-authored-by: Brett Cannon <brett@python.org> | |||
* | gh-94485: Set line number of module's RESUME instruction to 0, as specified ↵ | Irit Katriel | 2022-07-05 | |
| | | | | | by PEP 626 (GH-94552) Co-authored-by: Mark Shannon <mark@hotpy.org> | |||
* | GH-94163: Add BINARY_SLICE and STORE_SLICE instructions. (GH-94168) | Mark Shannon | 2022-06-27 | |
| | ||||
* | GH-91432: Specialize FOR_ITER (GH-91713) | Dennis Sweeney | 2022-06-21 | |
| | | | | | * Adds FOR_ITER_LIST and FOR_ITER_RANGE specializations. * Adds _PyLong_AssignValue() internal function to avoid temporary boxing of ints. | |||
* | GH-93429: Merge `LOAD_METHOD` back into `LOAD_ATTR` (GH-93430) | Ken Jin | 2022-06-14 | |
| | ||||
* | gh-93461: Invalidate sys.path_importer_cache entries with relative paths ↵ | Christian Heimes | 2022-06-10 | |
| | | | | (GH-93653) | |||
* | Shrink the LOAD_METHOD cache by one codeunit. (#93537) | Mark Shannon | 2022-06-07 | |
| | ||||
* | gh-93143: Avoid NULL check in LOAD_FAST based on analysis in the compiler ↵ | Dennis Sweeney | 2022-05-31 | |
| | | | | (GH-93144) | |||
* | GH-89914: Make the oparg of the YIELD_VALUE instruction equal the stack ↵ | Mark Shannon | 2022-05-19 | |
| | | | | depth. (GH-92960) | |||
* | GH-90690: Remove `PRECALL` instruction (GH-92925) | Mark Shannon | 2022-05-19 | |
| | ||||
* | gh-91869: Fix tracing of specialized instructions with extended args (GH-91945) | Dennis Sweeney | 2022-04-27 | |
| | ||||
* | GH-88116: Use a compact format to represent end line and column offsets. ↵ | Mark Shannon | 2022-04-21 | |
| | | | | | | | | | | | | (GH-91666) * Stores all location info in linetable to conform to PEP 626. * Remove column table from code objects. * Remove end-line table from code objects. * Document new location table format | |||
* | gh-91276: Make JUMP_IF_TRUE_OR_POP/JUMP_IF_FALSE_OR_POP relative (GH-32215) | Irit Katriel | 2022-04-15 | |
| | ||||
* | bpo-47120: make POP_JUMP_IF_TRUE/FALSE/NONE/NOT_NONE relative (GH-32400) | Irit Katriel | 2022-04-11 | |
| | ||||
* | bpo-47120: make JUMP_NO_INTERRUPT relative (GH-32221) | Irit Katriel | 2022-04-05 | |
| | ||||
* | bpo-47186: Replace JUMP_IF_NOT_EG_MATCH by CHECK_EG_MATCH + jump (GH-32309) | Irit Katriel | 2022-04-05 | |
| | ||||
* | bpo-47186: Replace JUMP_IF_NOT_EXC_MATCH by CHECK_EXC_MATCH + jump (GH-32231) | Irit Katriel | 2022-04-01 | |
| | ||||
* | bpo-47120: Replace the JUMP_ABSOLUTE opcode by the relative JUMP_BACKWARD ↵ | Irit Katriel | 2022-03-31 | |
| | | | | (GH-32115) | |||
* | Use low bit of LOAD_GLOBAL's oparg to indicate whether it should push an ↵ | Mark Shannon | 2022-03-17 | |
| | | | | additional NULL. (GH-31933) | |||
* | bpo-46841: Don't use an oparg counter for `STORE_SUBSCR` (GH-31742) | Brandt Bucher | 2022-03-08 | |
| | ||||
* | bpo-46841: Use inline caching for calls (GH-31709) | Brandt Bucher | 2022-03-07 | |
| | ||||
* | Remove trailing spaces (GH-31695) | Serhiy Storchaka | 2022-03-05 | |
| | ||||
* | bpo-46841: Fix error message hacks in `GET_AWAITABLE` (GH-31664) | Brandt Bucher | 2022-03-04 | |
| | ||||
* | bpo-46841: Use inline caching for attribute accesses (GH-31640) | Brandt Bucher | 2022-03-03 | |
| | ||||
* | bpo-46841: Use inline cache for `BINARY_SUBSCR`. (GH-31618) | Mark Shannon | 2022-03-01 | |
| | ||||
* | bpo-46841: Use inline caching for `COMPARE_OP` (GH-31622) | Brandt Bucher | 2022-03-01 | |
| | ||||
* | bpo-46841: Move the cache for `LOAD_GLOBAL` inline. (GH-31575) | Mark Shannon | 2022-02-28 | |
| | ||||
* | bpo-46841: Use inline caching for `UNPACK_SEQUENCE` (GH-31591) | Brandt Bucher | 2022-02-28 | |
| | ||||
* | bpo-46841: Use *inline* caching for `BINARY_OP` (GH-31543) | Brandt Bucher | 2022-02-25 | |
| | ||||
* | bpo-46329: Streamline calling sequence a bit. (GH-31465) | Mark Shannon | 2022-02-21 | |
| | | | | | | | | | | | | | | * Move handling of bound-methods to PRECALL. * Remove call_shape.postcall_shrink * Remove call_shape.callable * Remove call_shape.callable. Change CALL oparg to match PRECALL oparg. * Move KW_NAMES before PRECALL. * Update opcode docs in dis.rst | |||
* | bpo-46329: Change calling sequence (again) (GH-31373) | Mark Shannon | 2022-02-18 | |
| | | | | * Change calling sequence: Add PUSH_NULL. Merge PRECALL_FUNCTION and PRECALL_METHOD into PRECALL. | |||
* | bpo-46329: Split calls into precall and call instructions. (GH-30855) | Mark Shannon | 2022-01-28 | |
| | | | | | | | | | | | | | | * Add PRECALL_FUNCTION opcode. * Move 'call shape' varaibles into struct. * Replace CALL_NO_KW and CALL_KW with KW_NAMES and CALL instructions. * Specialize for builtin methods taking using the METH_FASTCALL | METH_KEYWORDS protocol. * Allow kwnames for specialized calls to builtin types. * Specialize calls to tuple(arg) and str(arg). |