A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.
Python artificial-intelligencedagdata-sciencedata-visualizationdataflowdeveloper-toolsmachine-learningnotebookspipelinepythonreactivesqlweb-app
compat: interrupt using KeyboardInterrupt (#3703)
Akshay Agrawal7d68f208a912
diff --git a/marimo/_runtime/control_flow.py b/marimo/_runtime/control_flow.pyindex 19920b3f84..1d92bee78e 100644--- a/marimo/_runtime/control_flow.py+++ b/marimo/_runtime/control_flow.py@@ -3,15 +3,10 @@ from typing import Optionalfrom marimo._output.rich_help import mddoc--class MarimoInterrupt(BaseException):- """Raised when user stops execution of entire program with interrupt.-- Inherits from `BaseException` to prevent accidental capture with- `except Exception` (similar to `KeyboardInterrupt`)- """-- pass+# We used to define a custom MarimoInterrupt BaseException to interrupt the+# kernel; however, some third-party libraries like databricks-connect have+# special case handling of KeyboardInterrupt.+MarimoInterrupt = KeyboardInterruptclass MarimoStopError(BaseException):