summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_compile.py
Commit message (Collapse)AuthorAgeFilesLines
* [3.12] gh-98442: fix locations of with statement's cleanup instructions ↵Miss Islington (bot)2024-09-151-0/+33
| | | | | | | | | | | (GH-120763) (#120787) gh-98442: fix locations of with statement's cleanup instructions (GH-120763) (cherry picked from commit 55596ae0446e40f47e2a28b8897fe9530c32a19a) gh-98442: fix location of with statement's cleanup instructions Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
* [3.12] gh-123142: Fix too wide source locations in tracebacks of exceptions ↵Irit Katriel2024-08-221-2/+2
| | | | | from broken iterables in comprehensions (GH-123173). (#123210) (cherry picked from commit ec89620e5e147ba028a46dd695ef073a72000b84)
* [3.12] gh-120722: Set position on RETURN_VALUE in lambda (GH-120724) (#120739)Jelle Zijlstra2024-06-191-1/+28
| | | (cherry picked from commit d8f27cb1141fd3575de816438ed80a916c0560ed)
* [3.12] gh-116034: fix location info on the error of a failed assertion (#116054)Irit Katriel2024-02-291-1/+1
|
* [3.12] Fix test_compile with -O mode (GH-115346) (GH-115668)Miss Islington (bot)2024-02-191-2/+5
| | | | | (cherry picked from commit 7b25a82e83ad8fe15e4302bb7655309573affa83) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] GH-112215: Backport C recursion changes (GH-115083)Mark Shannon2024-02-131-2/+2
|
* [3.12] gh-109889: fix compiler's redundant NOP detection to look past NOPs ↵Miss Islington (bot)2023-10-021-0/+5
| | | | | | | | with no lineno when looking for the next instruction's lineno (GH-109987) (#110048) gh-109889: fix compiler's redundant NOP detection to look past NOPs with no lineno when looking for the next instruction's lineno (GH-109987) (cherry picked from commit f580edcc6a4c528020afe46c753db713474acad6) Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
* [3.12] gh-109351: Fix crash when compiling AST with invalid NamedExpr ↵Miss Islington (bot)2023-10-021-0/+27
| | | | | | | | (GH-109352) (#109379) gh-109351: Fix crash when compiling AST with invalid NamedExpr (GH-109352) (cherry picked from commit 79101edb03b7381b514126c68acabfcbbba2f842) Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* [3.12] gh-109823: Adjust labels in compiler when removing an empty basic ↵Miss Islington (bot)2023-09-261-0/+5
| | | | | | | | block which is a jump target (GH-109839) (#109865) gh-109823: Adjust labels in compiler when removing an empty basic block which is a jump target (GH-109839) (cherry picked from commit d73c12b88c2275fd44e27c91c24f3ac85419d2b8) Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
* [3.12] gh-109719: Fix missing jump target labels when compiler reorders ↵Miss Islington (bot)2023-09-241-0/+11
| | | | | | | | cold/warm blocks (GH-109734) (#109749) gh-109719: Fix missing jump target labels when compiler reorders cold/warm blocks (GH-109734) (cherry picked from commit 7c553991724d8d537f8444db73f016008753d77a) Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
* [3.12] gh-109627: duplicated small exit blocks need to be assigned jump ↵Irit Katriel2023-09-221-0/+9
| | | | | | | target labels (#109630) (#109632) gh-109627: duplicated smalll exit blocks need to be assigned jump target labels (#109630) (cherry picked from commit 9ccf0545efd5bc5af5aa51774030c471d49a972b)
* [3.12] gh-109341: Fix crash on compiling invalid AST including TypeAlias ↵Miss Islington (bot)2023-09-141-0/+20
| | | | | | | | (GH-109349) (#109381) gh-109341: Fix crash on compiling invalid AST including TypeAlias (GH-109349) (cherry picked from commit 987b4bc0870e1e29a88275dc3fa39bf2c3dcc763) Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* [3.12] gh-109195: fix source location for super load before LOAD_SUPER_ATTR ↵Miss Islington (bot)2023-09-121-0/+7
| | | | | | | | (GH-109289) (#109291) gh-109195: fix source location for super load before LOAD_SUPER_ATTR (GH-109289) (cherry picked from commit ceeb4173aee7b835f553a8286feaa48b98c16124) Co-authored-by: Carl Meyer <carl@oddbird.net>
* [3.12] gh-108416: Mark slow test methods with @requires_resource('cpu') ↵Miss Islington (bot)2023-09-021-0/+1
| | | | | | | | | | | | (GH-108421) (#108798) gh-108416: Mark slow test methods with @requires_resource('cpu') (GH-108421) Only mark tests which spend significant system or user time, by itself or in subprocesses. (cherry picked from commit f3ba0a74cd50274acdcd592d4ce8395b92492b7c) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] gh-107901: Fix missing line number on BACKWARD_JUMP at the end of a ↵Miss Islington (bot)2023-08-221-0/+14
| | | | | | | | for loop (GH-108242) (#108275) gh-107901: Fix missing line number on BACKWARD_JUMP at the end of a for loop (GH-108242) (cherry picked from commit a1cc74c4eebc55795877eb3be019a1bec34402f8) Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
* [3.12] GH-107263: Increase C stack limit for most functions, except ↵Miss Islington (bot)2023-08-041-13/+8
| | | | | | | | | | `_PyEval_EvalFrameDefault()` (GH-107535) (#107618) GH-107263: Increase C stack limit for most functions, except `_PyEval_EvalFrameDefault()` (GH-107535) * Set C recursion limit to 1500, set cost of eval loop to 2 frames, and compiler mutliply to 2. (cherry picked from commit fa45958450aa3489607daf9855ca0474a2a20878) Co-authored-by: Mark Shannon <mark@hotpy.org>
* gh-104615: don't make unsafe swaps in apply_static_swaps (#104620)Carl Meyer2023-05-181-0/+18
|
* gh-97933: (PEP 709) inline list/dict/set comprehensions (#101441)Carl Meyer2023-05-091-18/+6
| | | | Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com> Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* GH-100982: Break up COMPARE_AND_BRANCH (GH-102801)Brandt Bucher2023-03-231-1/+1
|
* gh-101951: use textwrap.dedent in compiler tests to make them more readable ↵Irit Katriel2023-02-161-143/+145
| | | | | | | (GH-101950) Fixes #101951. Automerge-Triggered-By: GH:iritkatriel
* gh-101928: fix crash in compiler on multi-line lambda in function call (#101933)penguin_wwy2023-02-161-0/+11
|
* gh-101632: Add the new RETURN_CONST opcode (#101633)penguin_wwy2023-02-071-10/+8
|
* gh-100712: make it possible to disable specialization (for debugging) (#100713)Irit Katriel2023-01-191-1/+3
|
* GH-100982: Add `COMPARE_AND_BRANCH` instruction (GH-100983)Mark Shannon2023-01-161-7/+7
|
* GH-100117: Make `co_lines` more efficient (GH-100447)Brandt Bucher2023-01-101-5/+4
|
* gh-99708: fix bug where compiler crashes on if expression with an empty body ↵Irit Katriel2022-11-241-0/+11
| | | | block (GH-99732)
* gh-98762: Fix locations of match sub-patterns (GH-98775)Irit Katriel2022-11-121-1/+95
|
* gh-99254: remove all unused consts from code objects (GH-99255)Irit Katriel2022-11-111-2/+36
|
* gh-94445: add compiler test for another case of excessive stack use (GH-99237)Carl Meyer2022-11-081-0/+7
|
* gh-98461: Fix location of RETURN_VALUE in async generator bytecode. ↵Irit Katriel2022-10-251-1/+1
| | | | compiler_jump_if no longer needs a pointer to the loc. (GH-98494)
* gh-98461: Fix source location in comprehensions bytecode (GH-98464)Irit Katriel2022-10-201-0/+159
|
* gh-98398: Fix source locations for 'assert' bytecode (GH-98405)Irit Katriel2022-10-191-1/+17
|
* gh-98390: Fix source locations of boolean sub-expressions (GH-98396)Irit Katriel2022-10-181-0/+26
|
* gh-98393: os module reject bytes-like, only accept bytes (#98394)Victor Stinner2022-10-181-3/+2
| | | | | The os module and the PyUnicode_FSDecoder() function no longer accept bytes-like paths, like bytearray and memoryview types: only the exact bytes type is accepted for bytes strings.
* gh-87092: bring compiler code closer to a preprocessing-opt-assembler ↵Irit Katriel2022-10-051-1/+13
| | | | organisation (GH-97644)
* GH-91079: Decouple C stack overflow checks from Python recursion checks. ↵Mark Shannon2022-10-051-2/+1
| | | | (GH-96510)
* gh-96670: Raise SyntaxError when parsing NULL bytes (#97594)Pablo Galindo Salgado2022-09-271-4/+4
|
* GH-95921: Fix positions for some chained comparisons (GH-96968)Brandt Bucher2022-09-201-0/+25
|
* gh-95778: CVE-2020-10735: Prevent DoS by very large int() (#96499)Gregory P. Smith2022-09-021-0/+13
| | | | | | | | | | | | | | | | Integer to and from text conversions via CPython's bignum `int` type is not safe against denial of service attacks due to malicious input. Very large input strings with hundred thousands of digits can consume several CPU seconds. This PR comes fresh from a pile of work done in our private PSRT security response team repo. Signed-off-by: Christian Heimes [Red Hat] <christian@python.org> Tons-of-polishing-up-by: Gregory P. Smith [Google] <greg@krypto.org> Reviews via the private PSRT repo via many others (see the NEWS entry in the PR). <!-- gh-issue-number: gh-95778 --> * Issue: gh-95778 <!-- /gh-issue-number --> I wrote up [a one pager for the release managers](https://docs.google.com/document/d/1KjuF_aXlzPUxTK4BMgezGJ2Pn7uevfX7g0_mvgHlL7Y/edit#). Much of that text wound up in the Issue. Backports PRs already exist. See the issue for links.
* gh-96276: suppress SyntaxWarning in test_compile (GH-96277)Irit Katriel2022-08-251-1/+4
|
* GH-95150: Use position and exception tables for code hashing and equality ↵Brandt Bucher2022-08-011-3/+24
| | | | (GH-95509)
* gh-93678: Address stack exhaustion on WASI (GH-95296)Christian Heimes2022-07-261-0/+2
|
* GH-94036: Fix more attribute location quirks (GH-95028)Brandt Bucher2022-07-221-0/+60
|
* GH-91409: Don't overwrite valid locations with NOP locations (GH-95067)Brandt Bucher2022-07-201-0/+38
|
* GH-94694: Fix column offsets for multi-line method lookups (GH-94697)Brandt Bucher2022-07-101-0/+21
|
* gh-94485: Set line number of module's RESUME instruction to 0, as specified ↵Irit Katriel2022-07-051-3/+5
| | | | | by PEP 626 (GH-94552) Co-authored-by: Mark Shannon <mark@hotpy.org>
* GH-94329: Don't raise on excessive stack consumption (GH-94421)Mark Shannon2022-06-301-0/+6
|
* GH-94163: Add BINARY_SLICE and STORE_SLICE instructions. (GH-94168)Mark Shannon2022-06-271-0/+36
|
* gh-90473: Decrease recursion limit and skip tests on WASI (GH-92803)Christian Heimes2022-05-191-1/+3
|
* GH-90690: Remove `PRECALL` instruction (GH-92925)Mark Shannon2022-05-191-1/+1
|