Serhiy Storchaka
92f7965cf6
[3.13] gh-139640: Fix swallowing syntax warnings in different modules (GH-139755) (GH-140119)
...
Revert GH-131993.
Fix swallowing some syntax warnings in different modules if they accidentally
have the same message and are emitted from the same line.
Fix duplicated warnings in the "finally" block.
(cherry picked from commit 279db6bede
)
2025-10-14 15:46:11 +00:00
Kumar Aditya
dac827cb98
[3.13] gh-139748: fix leaks in AC error paths when using unicode FS-b… ( #139792 )
...
* [3.13] gh-139748: fix leaks in AC error paths when using unicode FS-based converters (GH-139765)
(cherry picked from commit b04a57deef
)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-10-08 22:21:49 +05:30
Tomas R.
5f1eaff5b5
[3.13] gh-132435: Test syntax warnings in a finally block (GH-132436) (GH-132503)
...
(cherry picked from commit 887eabc5a7
)
2025-04-14 10:21:36 +03:00
Tomas R.
4ff5d88fb1
[3.13] gh-131927: Prevent emitting compiler warnings twice (GH-131993) (GH-132463)
...
(cherry picked from commit 3d08c8ad20
)
2025-04-13 08:42:04 +00:00
Miss Islington (bot)
b87aea6b0d
[3.13] gh-124871: fix 'visited' tracking in compiler's reachability analysis (GH-124952) ( #124977 )
...
gh-124871: fix 'visited' tracking in compiler's reachability analysis (GH-124952)
(cherry picked from commit f474391b26
)
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2024-10-04 15:34:20 -07:00
Jelle Zijlstra
b99c6620b2
[3.13] gh-124442: make __static_attributes__
deterministic by sorting (GH-124492) ( #124738 )
...
* [3.13] gh-124442: make `__static_attributes__` deterministic by sorting (GH-124492)
(cherry picked from commit 04c837d9d8
)
Co-authored-by: Kira <kp2pml30@gmail.com>
Signed-off-by: kp2pml30 <kp2pml30@gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-09-30 18:53:17 -07:00
Miss Islington (bot)
793cb77f55
[3.13] gh-123942: add missing test for docstring-handling code in ast_opt.c (GH-123943) ( #123955 )
...
gh-123942: add missing test for docstring-handling code in ast_opt.c (GH-123943)
(cherry picked from commit 6e23c89fcd
)
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2024-09-29 18:21:57 -07:00
Miss Islington (bot)
80e0326b53
[3.13] gh-98442: fix locations of with statement's cleanup instructions (GH-120763) ( #120786 )
...
gh-98442: fix locations of with statement's cleanup instructions (GH-120763)
(cherry picked from commit 55596ae044
)
gh-98442: fix location of with statement's cleanup instructions
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2024-09-02 15:46:41 +00:00
Irit Katriel
e4b91b7256
[3.13] gh-123142: Fix too wide source locations in tracebacks of exceptions from broken iterables in comprehensions (GH-123173). ( #123209 )
...
(cherry picked from commit ec89620e5e
)
2024-08-22 10:22:39 +01:00
Irit Katriel
545a328eae
[3.13] gh-122445: populate only modified fields in __static_attributes__ ( #122446 ) ( #122621 )
...
gh-122445: populate only modified fields in __static_attributes__ (#122446 )
(cherry picked from commit 498376d7a7
)
2024-08-02 19:26:57 +01:00
Miss Islington (bot)
4ce1246a99
[3.13] gh-120722: Set position on RETURN_VALUE in lambda (GH-120724) ( #120738 )
...
(cherry picked from commit d8f27cb114
)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-06-19 13:22:21 +00:00
Miss Islington (bot)
50fa775e68
[3.13] gh-120367: fix bug where compiler detects redundant jump after pseudo op replacement (GH-120714) ( #120716 )
2024-06-18 22:34:07 +00:00
Miss Islington (bot)
61a2229005
[3.13] gh-120367: fix removal of redundant NOPs and jumps after reordering hot-cold blocks (GH-120425) ( #120621 )
...
gh-120367: fix removal of redundant NOPs and jumps after reordering hot-cold blocks (GH-120425)
(cherry picked from commit 21866c8ed2
)
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2024-06-17 16:07:20 +01:00
Miss Islington (bot)
3be7e91d03
[3.13] gh-120225: fix crash in compiler on empty block at end of exception handler (GH-120235) ( #120249 )
...
gh-120225: fix crash in compiler on empty block at end of exception handler (GH-120235)
(cherry picked from commit 4fc82b6d3b
)
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2024-06-07 22:01:20 +00:00
Serhiy Storchaka
153b3f7530
gh-118465: Add __firstlineno__ attribute to class (GH-118475)
...
It is set by compiler with the line number of the first line of
the class definition.
2024-05-06 12:02:37 +03:00
Irit Katriel
c179c0e6cb
gh-117680: make _PyInstructionSequence a PyObject and use it in tests ( #117629 )
2024-04-17 16:42:04 +01:00
Erlend E. Aasland
ca62ffd1a5
gh-116303: Skip tests if C recursion limit is unavailable (GH-117368)
...
The test suite fetches the C recursion limit from the _testcapi
extension module. Test extension modules can be disabled using the
--disable-test-modules configure option.
2024-04-08 14:45:25 +02:00
Irit Katriel
79be75735c
gh-115775: Compiler adds __static_attributes__ field to classes ( #115913 )
2024-03-26 15:18:17 +00:00
Kirill Podoprigora
6a86030bc2
gh-116100: Add test
arg to ast.If
and op
arg to ast.BoolOp
calls ( #116101 )
2024-02-29 06:59:24 -08:00
Serhiy Storchaka
7b25a82e83
Fix test_compile with -O mode (GH-115346)
2024-02-19 19:02:29 +02:00
Irit Katriel
732faf17a6
gh-115347: avoid emitting redundant NOP for the docstring with -OO ( #115494 )
2024-02-15 14:20:19 +00:00
Irit Katriel
2091fb2a85
gh-107901: make compiler inline basic blocks with no line number and no fallthrough ( #114750 )
2024-02-02 11:26:31 +00:00
Irit Katriel
ed30a3c337
gh-114083: apply optimization of LOAD_CONST instructions to the whole CFG before optimize_basic_block. ( #114408 )
2024-01-22 17:12:06 +00:00
Mark Shannon
17b73ab99e
GH-113655: Lower the C recursion limit on various platforms (GH-113944)
2024-01-16 09:32:01 +00:00
Irit Katriel
8aa0088ea2
gh-107901: duplicate blocks with no lineno that have an eval break and multiple predecessors ( #113950 )
2024-01-12 15:38:09 +00:00
Kirill Podoprigora
9f088336b2
gh-113932: assert `SyntaxWarning
` in test_compile.TestSpecifics.test_… ( #113933 )
2024-01-11 11:25:07 +00:00
Irit Katriel
7d01fb4808
gh-113603: Compiler no longer tries to maintain the no-empty-block invariant ( #113636 )
2024-01-03 16:57:48 +00:00
Irit Katriel
e51b400945
gh-113054: Compiler no longer replaces a redundant jump with no line number by a NOP ( #113139 )
2023-12-19 11:04:44 +00:00
Irit Katriel
428c9812cb
gh-112962: in dis module, put cache information in the Instruction instead of creating fake Instructions to represent it ( #113016 )
2023-12-13 12:00:21 +00:00
Irit Katriel
b578e51f02
gh-111123: symtable should visit exception handlers before the else block ( #111142 )
2023-10-21 13:38:29 +01:00
Irit Katriel
f580edcc6a
gh-109889: fix compiler's redundant NOP detection to look past NOPs with no lineno when looking for the next instruction's lineno ( #109987 )
2023-09-28 20:33:28 +01:00
Irit Katriel
d73c12b88c
gh-109823: Adjust labels in compiler when removing an empty basic block which is a jump target ( #109839 )
2023-09-25 18:25:05 +00:00
Irit Katriel
7c55399172
gh-109719: Fix missing jump target labels when compiler reorders cold/warm blocks ( #109734 )
2023-09-22 16:59:35 +00:00
Irit Katriel
9ccf0545ef
gh-109627: duplicated smalll exit blocks need to be assigned jump target labels ( #109630 )
2023-09-20 23:08:06 +00:00
Jelle Zijlstra
987b4bc087
gh-109341: Fix crash on compiling invalid AST including TypeAlias ( #109349 )
2023-09-13 09:00:39 -07:00
Jelle Zijlstra
79101edb03
gh-109351: Fix crash when compiling AST with invalid NamedExpr ( #109352 )
2023-09-13 09:00:15 -07:00
Carl Meyer
ceeb4173ae
gh-109195: fix source location for super load before LOAD_SUPER_ATTR ( #109289 )
2023-09-11 17:35:49 -06:00
Victor Stinner
b0edf3b98e
GH-91079: Rename C_RECURSION_LIMIT to Py_C_RECURSION_LIMIT ( #108507 )
...
Symbols of the C API should be prefixed by "Py_" to avoid conflict
with existing names in 3rd party C extensions on "#include <Python.h>".
test.pythoninfo now logs Py_C_RECURSION_LIMIT constant and other
_testcapi and _testinternalcapi constants.
2023-09-08 09:48:28 +00:00
Serhiy Storchaka
f3ba0a74cd
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.
2023-09-02 07:45:34 +03:00
Irit Katriel
a1cc74c4ee
gh-107901: Fix missing line number on BACKWARD_JUMP at the end of a for loop ( #108242 )
2023-08-21 23:44:31 +01:00
Nikita Sobolev
bdd8ddfda1
gh-105724: Add location information to assert
errors (GH-105935)
2023-08-16 11:35:38 +01:00
Mark Shannon
fa45958450
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.
2023-08-04 10:10:29 +01:00
Dong-hee Na
115df8491a
gh-104635: Add a test case for variables that have a dependency. (gh-106583)
2023-07-11 10:14:53 +09:00
Carl Meyer
0589c6a4d3
gh-104615: don't make unsafe swaps in apply_static_swaps ( #104620 )
2023-05-18 21:22:03 +00:00
Carl Meyer
c3b595e73e
gh-97933: (PEP 709) inline list/dict/set comprehensions ( #101441 )
...
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2023-05-09 11:02:14 -06:00
Brandt Bucher
0444ae2487
GH-100982: Break up COMPARE_AND_BRANCH (GH-102801)
2023-03-23 15:25:09 -07:00
Irit Katriel
36b139af63
gh-101951: use textwrap.dedent in compiler tests to make them more readable (GH-101950)
...
Fixes #101951 .
Automerge-Triggered-By: GH:iritkatriel
2023-02-16 04:31:59 -08:00
penguin_wwy
df7ccf6138
gh-101928: fix crash in compiler on multi-line lambda in function call ( #101933 )
2023-02-16 11:31:41 +00:00
penguin_wwy
753fc8a5d6
gh-101632: Add the new RETURN_CONST opcode ( #101633 )
2023-02-07 22:32:21 +00:00
Irit Katriel
e9ccfe4a63
gh-100712: make it possible to disable specialization (for debugging) ( #100713 )
2023-01-19 18:14:55 +00:00