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
fix: patch bokeh.io.show (#4327)
Myles Scolnick3d0a21fdd60a
diff --git a/marimo/_output/formatters/bokeh_formatters.py b/marimo/_output/formatters/bokeh_formatters.pyindex f6f0bcc965..94bbc20b6b 100644--- a/marimo/_output/formatters/bokeh_formatters.py+++ b/marimo/_output/formatters/bokeh_formatters.py@@ -18,6 +18,7 @@ class BokehFormatter(FormatterFactory):return "bokeh"def register(self) -> Callable[[], None]:+ import bokeh.io # type: ignore[import-not-found,import-untyped,unused-ignore] # noqa: E501import bokeh.models # type: ignore[import-not-found,import-untyped,unused-ignore] # noqa: E501import bokeh.plotting # type: ignore[import-not-found,import-untyped,unused-ignore] # noqa: E501@@ -25,6 +26,7 @@ class BokehFormatter(FormatterFactory):from marimo._runtime.output import _outputold_show = bokeh.plotting.show+ old_io_show = bokeh.io.show# bokeh always starts with output_notebook() in Jupyter, but this# brings in a dependency on IPython, which we don't need.old_output_notebook = bokeh.plotting.output_notebook@@ -49,10 +51,12 @@ class BokehFormatter(FormatterFactory):bokeh.plotting.show = showbokeh.plotting.output_notebook = output_notebook+ bokeh.io.show = showdef unpatch() -> None:bokeh.plotting.show = old_showbokeh.plotting.output_notebook = old_output_notebook+ bokeh.io.show = old_io_show@formatting.formatter(bokeh.models.Model)@formatting.formatter(bokeh.document.Document)