tessl install tessl/github-python--cpython@3.13.0CPython is the reference implementation of the Python programming language providing the core interpreter, runtime system, and comprehensive standard library.
Agent Success
Agent success rate when using this tile
96%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.07x
Baseline
Agent success rate without this tile
90%
A helper module that runs a callable under interpreter tracing and reports runtime activity plus garbage collector state.
run_with_probe on a callable returns events capturing "call", "line", "return", "exception" in order, each with function name, file path, and line number. @testcapture_lines is True and skipped when False. @testrun_with_probe(..., force_collection=True) triggers a collection before running the target and records updated collection counts in gc_after while preserving previous counts in gc_before. @testdisable_gc=True, garbage collection is disabled during target execution, then restored to its prior enabled/disabled state afterward. @testreturned is None and raised flag is True. @test@generates
from typing import Any, Callable, Dict, List, Optional, Sequence, TypedDict
class TraceEvent(TypedDict):
event: str # "call" | "line" | "return" | "exception"
function: str # function name
file: str # absolute file path
line: int # line number associated with the event
class RunReport(TypedDict, total=False):
events: List[TraceEvent]
gc_before: Dict[str, int] # collection counts per generation
gc_after: Dict[str, int]
gc_thresholds: Sequence[int] # thresholds snapshot before run
gc_forced: bool
gc_disabled_during_run: bool
returned: Any
raised: bool
exception_message: Optional[str]
def run_with_probe(
target: Callable[..., Any],
*,
args: Sequence[Any] = (),
kwargs: Optional[Dict[str, Any]] = None,
capture_lines: bool = True,
force_collection: bool = False,
disable_gc: bool = False,
) -> RunReport:
...Provides interpreter tracing hooks, profiling callbacks, and garbage collector controls required for runtime observation.