summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_sys_settrace.py
Commit message (Collapse)AuthorAgeFilesLines
* [3.12] gh-93691: fix too broad source locations of for statement iterators ↵Irit Katriel2024-06-131-3/+3
| | | | | | (GH-120330 (#120405) [3.12] gh-93691: fix too broad source locations of for statement iterators (GH-120330). (cherry picked from commit 97b69db167be28a33688db436551a6c3c3ea4662)
* [3.12] GH-112215: Backport C recursion changes (GH-115083)Mark Shannon2024-02-131-3/+5
|
* [3.12] GH-94438: Fix RuntimeWarning for jump tests in test_sys_settrace ↵Miss Islington (bot)2023-10-261-2/+6
| | | | | | (GH-111369) (cherry picked from commit a254120f2f1dd99fa64f12594d1ed19c67df7d64) Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
* [3.12] GH-94438: Restore ability to jump over None tests (GH-111243)Miss Islington (bot)2023-10-241-0/+34
| | | | (cherry picked from commit 6640f1d8d2462ca0877e1d2789e1721767e9caf2) Co-authored-by: Savannah Ostrowski <sostrowski@microsoft.com>
* [3.12] gh-105658: fix excess trace events for except block ending with a ↵Irit Katriel2023-09-141-1/+30
| | | | | | | conditional block (#109384) (#109411) gh-105658: fix excess trace events for except block ending with a conditional block (#109384) (cherry picked from commit 4a54074a0f5579d417445ec28427cd0ed5aa01f4)
* [3.12] gh-103186: Suppress RuntimeWarning about unclosed async iterator in ↵Miss Islington (bot)2023-09-081-4/+28
| | | | | | | | test_sys_settrace (GH-109075) (#109138) gh-103186: Suppress RuntimeWarning about unclosed async iterator in test_sys_settrace (GH-109075) (cherry picked from commit d485551c9d1792ff3539eef1d6374bd4c01dcd5d) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] gh-103186: Remove debug print in test_sys_settrace (GH-109077) (#109084)Miss Islington (bot)2023-09-081-1/+0
| | | | | | gh-103186: Remove debug print in test_sys_settrace (GH-109077) (cherry picked from commit e4bb0026b9a21d066e7a5c4716ea4d755b95d2d5) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] gh-103186: Suppress and assert expected RuntimeWarnings in ↵Miss Islington (bot)2023-09-081-32/+42
| | | | | | | | | | test_sys_settrace (GH-103244) (#109066) gh-103186: Suppress and assert expected RuntimeWarnings in test_sys_settrace (GH-103244) Caused as a result of frame manipulation where locals are never assigned / initialised. (cherry picked from commit 3e53ac99038920550358c1ea0212c3907a8cb385) Co-authored-by: Ijtaba Hussain <ijtabahussain@live.com>
* [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>
* gh-104686: Fix tracing for decorated classes (#104708)Jelle Zijlstra2023-05-211-0/+46
|
* GH-102818: Do not call `PyTraceBack_Here` in sys.settrace trampoline. ↵Mark Shannon2023-05-191-0/+56
| | | | (GH-104579)
* GH-103082: Filter LINE events in VM, to simplify tool implementation. ↵Mark Shannon2023-05-121-1/+0
| | | | | | | | (GH-104387) When monitoring LINE events, instrument all instructions that can have a predecessor on a different line. Then check that the a new line has been hit in the instrumentation code. This brings the behavior closer to that of 3.11, simplifying implementation and porting of tools.
* GH-103082: Implementation of PEP 669: Low Impact Monitoring for CPython ↵Mark Shannon2023-04-121-0/+60
| | | | | | | | | | (GH-103083) * The majority of the monitoring code is in instrumentation.c * The new instrumentation bytecodes are in bytecodes.c * legacy_tracing.c adapts the new API to the old sys.setrace and sys.setprofile APIs
* gh-102515: Remove unused imports in the `Lib/` directory (#102516)Alex Waygood2023-03-081-1/+0
|
* GH-96793: Implement PEP 479 in bytecode. (GH-99006)Mark Shannon2022-11-031-1/+1
| | | | | * Handle converting StopIteration to RuntimeError in bytecode. * Add custom instruction for converting StopIteration into RuntimeError.
* gh-98257: Make _PyEval_SetTrace() reentrant (#98258)Victor Stinner2022-10-191-6/+2
| | | | | | | | | | Make sys.setprofile() and sys.settrace() functions reentrant. They can no long fail with: RuntimeError("Cannot install a trace function while another trace function is being installed"). Make _PyEval_SetTrace() and _PyEval_SetProfile() functions reentrant, rather than detecting and rejecting reentrant calls. Only delete the reference to function arguments once the new function is fully set, when a reentrant call is safe. Call also _PySys_Audit() earlier.
* gh-92886: Fixing tests that fail when running with optimizations (`-O`) in ↵Jack Hindmarch2022-10-181-6/+4
| | | | `test_sys_settrace.py` (GH-93234)
* GH-96864: Check for error between line and opcode events (GH-96880)Brandt Bucher2022-09-191-0/+14
|
* GH-94438: Handle extended arguments and conditional pops in mark_stacks ↵Brandt Bucher2022-07-221-0/+36
| | | | (GH-95110)
* GH-94739: Mark stacks of exception handling blocks for setting ↵Mark Shannon2022-07-181-18/+29
| | | | frame.f_lineno in the debugger. (GH-94958)
* gh-94814: Improve coverage of _PyCode_CreateLineArray (GH-94852)Michael Droettboom2022-07-151-0/+22
| | | | | | | The case where there are more than (1 << 15) lines was not covered. I don't know if increasing test coverage requires a blurb -- let me know if it does. Automerge-Triggered-By: GH:brandtbucher
* gh-92228: disable the compiler's 'small exit block inlining' optimization ↵Irit Katriel2022-07-071-0/+9
| | | | | | | for blocks that have a line number (GH-94592) Inlining of code that corresponds to source code lines, can make it hard to distinguish later between code which is only reachable from except handlers, and that which is reachable in normal control flow. This caused problems with the debugger's jump feature. This PR turns off the inlining optimisation for code which has line numbers. We still inline things like the implicit "return None".
* gh-94510: Raise on re-entrant calls to sys.setprofile and sys.settrace ↵Pablo Galindo Salgado2022-07-051-0/+39
| | | | | (GH-94511) Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* GH-94438: Account for NULLs on evaluation stack when jumping lines. (GH-94444)Mark Shannon2022-07-011-4/+61
|
* gh-93061: Mark as artificial: backwards jump after async for (GH-93062)Dennis Sweeney2022-05-231-0/+52
|
* GH-92236: Remove spurious "line" event when starting coroutine or generator. ↵Mark Shannon2022-05-131-0/+53
| | | | (GH-92722)
* gh-92311: Add tests for frame_setlineno jumping over listcomps (#92741)Dennis Sweeney2022-05-121-0/+48
|
* gh-91869: Fix tracing of specialized instructions with extended args (GH-91945)Dennis Sweeney2022-04-281-0/+42
|
* bpo-40280: Skip socket, fork, subprocess tests on Emscripten (GH-31986)Christian Heimes2022-03-221-0/+1
| | | | | | | | | | | - Add requires_fork and requires_subprocess to more tests - Skip extension import tests if dlopen is not available - Don't assume that _testcapi is a shared extension - Skip a lot of socket tests that don't work on Emscripten - Skip mmap tests, mmap emulation is incomplete - venv does not work yet - Cannot get libc from executable The "entire" test suite is now passing on Emscripten with EMSDK from git head (91 suites are skipped).
* bpo-46458: emit code for else of a try block immediately after the try body ↵Irit Katriel2022-01-271-0/+32
| | | | (GH-30751)
* bpo-46344: Fix trace bug in else of try and try-star blocks (GH-30544)Irit Katriel2022-01-131-6/+24
|
* bpo-46331: Do not set line number of instruction storing doc-string. (GH-30518)Mark Shannon2022-01-111-0/+19
|
* bpo-46314: Remove extra RESUME when compiling a lamdba. (GH-30513)Mark Shannon2022-01-101-0/+15
|
* bpo-45292: [PEP-654] add except* (GH-29581)Irit Katriel2021-12-141-0/+175
|
* bpo-45890: Add tests for tracing try-except-finally blocks (GH-29746)Irit Katriel2021-12-071-2/+46
|
* bpo-45709: Fix tracing when exception is handled. (GH-29638)Mark Shannon2021-11-191-0/+32
|
* bpo-44840: Compiler: Move duplication of exit blocks with no line numbers to ↵Mark Shannon2021-08-091-0/+23
| | | | after CFG optimization. (GH-27656)
* bpo-44626: Merge basic blocks earlier to enable better handling of exit ↵Mark Shannon2021-07-151-3/+18
| | | | blocks without line numbers (GH-27138)
* bpo-44616: Mark all clean up instructions at end of named exception block as ↵Mark Shannon2021-07-141-0/+23
| | | | artificial (GH-27109)
* bpo-44570: Fix line tracing for forwards jumps to duplicated tails (GH-27068)Mark Shannon2021-07-081-0/+35
|
* bpo-44298: Fix line numbers for early exits in with statements. (GH-26513)Mark Shannon2021-06-031-0/+46
|
* bpo-43933: Force RETURN_VALUE bytecodes to have line numbers (GH-26054)Mark Shannon2021-05-121-0/+21
|
* bpo-40222: "Zero cost" exception handling (GH-25729)Mark Shannon2021-05-071-28/+28
| | | | | | | | "Zero cost" exception handling. * Uses a lookup table to determine how to handle exceptions. * Removes SETUP_FINALLY and POP_TOP block instructions, eliminating (most of) the runtime overhead of try statements. * Reduces the size of the frame object by about 60%.
* bpo-43933: Set frame.f_lineno during call to __exit__ (GH-25719)Mark Shannon2021-04-301-1/+2
| | | * Set line number of __exit__ call in a with statement to be that of the with keyword.
* Mark instructions at end of class scope as artificial. (GH-24222)Mark Shannon2021-01-151-0/+18
|
* bpo-42908: Mark cleanup code at end of try-except and with artificial (#24202)Mark Shannon2021-01-131-0/+40
| | | | | | | | | * Mark bytecodes at end of try-except as artificial. * Make sure that the CFG is consistent throughout optimiization. * Extend line-number propagation logic so that implicit returns after 'try-except' or 'with' have the correct line numbers. * Update importlib
* bpo-42810: Mark jumps at end of if and try statements as artificial. (GH-24091)Mark Shannon2021-01-041-0/+42
| | | | | | | * Mark jumps at end of if and try statements as artificial. * Update importlib * Add comment explaining the purpose of ADDOP_JUMP_NOLINE.
* bpo-42246: Don't eliminate jumps to jumps, if it will break PEP 626. (GH-23896)Mark Shannon2020-12-231-0/+64
|
* bpo-42634: Mark reraise after except blocks as artificial. (GH-23877)Mark Shannon2020-12-211-0/+19
| | | | | | | * Mark reraise after except blocks as artificial. * Update importlib * Update dis test.
* bpo-42645: Make sure that return/break/continue are only traced once when ↵Mark Shannon2020-12-161-0/+113
| | | | | | | | | exiting via a finally block. (GH-23780) * Make sure that return/break/continue are only traced once when exiting via a finally block. * Add test for return in try-finally. * Update importlib