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
cleanup: push ibis check down (#7848)
Myles Scolnick422fd932311b
diff --git a/marimo/_sql/engines/adbc.py b/marimo/_sql/engines/adbc.pyindex 385bb7c8de..b94b22b6d2 100644--- a/marimo/_sql/engines/adbc.py+++ b/marimo/_sql/engines/adbc.py@@ -401,6 +401,12 @@ class AdbcDBAPIEngine(SQLConnection[AdbcDbApiConnection]):if isinstance(var, ModuleType):return False+ # Ibis Deferred expression object should not be handled as datasource #7791+ var_type = type(var)+ var_type_name = f"{var_type.__module__}.{var_type.__qualname__}"+ if var_type_name == "ibis.common.deferred.Deferred":+ return False+try:# First, validate the connection-level surface area to avoid# accidentally classifying regular DB-API connections as ADBC.diff --git a/marimo/_sql/engines/dbapi.py b/marimo/_sql/engines/dbapi.pyindex a686440c24..63ea941da8 100644--- a/marimo/_sql/engines/dbapi.py+++ b/marimo/_sql/engines/dbapi.py@@ -106,6 +106,12 @@ class DBAPIEngine(QueryEngine[DBAPIConnection]):if isinstance(var, ModuleType):return False+ # Ibis Deferred expression object should not be handled as datasource #7791+ var_type = type(var)+ var_type_name = f"{var_type.__module__}.{var_type.__qualname__}"+ if var_type_name == "ibis.common.deferred.Deferred":+ return False+try:required_methods = ["cursor", "commit", "rollback", "close"]has_required_methods = all(diff --git a/marimo/_sql/get_engines.py b/marimo/_sql/get_engines.pyindex 586cf456c9..7ddcdb23e9 100644--- a/marimo/_sql/get_engines.py+++ b/marimo/_sql/get_engines.py@@ -51,12 +51,6 @@ def get_engines_from_variables(engines: list[tuple[VariableName, BaseEngine[Any]]] = []for variable_name, value in variables:- # Ibis Deferred expression object should not be handled as datasource #7791- var_type = type(value)- var_type_name = f"{var_type.__module__}.{var_type.__qualname__}"- if var_type_name == "ibis.common.deferred.Deferred":- continue-for sql_engine in SUPPORTED_ENGINES:if sql_engine.is_compatible(value):engines.append(