You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Stabilize scratchpad snapshots across Python versions
Two traceback-formatting differences slipped past `_normalize` and broke
`test_ctx_create_cell_multiply_defined` on 3.10-3.12. First, the
existing pointer regex required at least one `~`, so PEP 657 pure-caret
underlines (`^^^^^^^^^^^^^^^^`, emitted by 3.11+ for expression spans)
were never stripped; the new alternation matches those while keeping
single-caret SyntaxError pointers intact (the classic ` ^`-style
marker is present on every version, including 3.10, and the
compile-error test asserts on it). Second, 3.13's collapsed-frames view
of a multi-line `raise Foo(...)` keeps the trailing `)` on its own line
after `_COLLAPSED_FRAMES_RE` elides the middle, whereas 3.10-3.12 don't
show that line at all; the new `_RAISE_CLOSING_PAREN_RE` drops the lone
closer so both worlds normalize to the same shape. The one affected
snapshot is rewritten to match.
'data: {"data": "Traceback (most recent call last):\\n File \\"<marimo>/marimo/_runtime/executor.py\\", line N, in execute_cell_async\\n await eval(cell.body, glbls)\\n File \\"<tmp>\\", line 2, in <module>\\n async with cm.get_context() as ctx:\\n File \\"<marimo>/marimo/_code_mode/_context.py\\", line N, in __aexit__\\n self._dry_run_compile(ops)\\n File \\"<marimo>/marimo/_code_mode/_context.py\\", line N, in _dry_run_compile\\n raise RuntimeError(\\n )\\nRuntimeError: Multiply-defined names:\\n - \'x\' is already defined in cell \'cell_a\' (cell_a)\\n\\nTo skip validation, use: async with cm.get_context(skip_validation=True) as ctx\\n"}',
657
+
'data: {"data": "Traceback (most recent call last):\\n File \\"<marimo>/marimo/_runtime/executor.py\\", line N, in execute_cell_async\\n await eval(cell.body, glbls)\\n File \\"<tmp>\\", line 2, in <module>\\n async with cm.get_context() as ctx:\\n File \\"<marimo>/marimo/_code_mode/_context.py\\", line N, in __aexit__\\n self._dry_run_compile(ops)\\n File \\"<marimo>/marimo/_code_mode/_context.py\\", line N, in _dry_run_compile\\n raise RuntimeError(\\nRuntimeError: Multiply-defined names:\\n - \'x\' is already defined in cell \'cell_a\' (cell_a)\\n\\nTo skip validation, use: async with cm.get_context(skip_validation=True) as ctx\\n"}',
0 commit comments