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: remove starlette from top level import (#4826)
Myles Scolnick55136c813a0a
diff --git a/marimo/_server/asgi.py b/marimo/_server/asgi.pyindex 77ffa34f4b..b58b2cb7ec 100644--- a/marimo/_server/asgi.py+++ b/marimo/_server/asgi.py@@ -15,9 +15,6 @@ from typing import (Union,)-from marimo._server.registry import LIFESPAN_REGISTRY-from marimo._utils.lifespans import Lifespans-if TYPE_CHECKING:import sys@@ -389,9 +386,11 @@ def create_asgi_app(from marimo._server.lsp import NoopLspServerfrom marimo._server.main import create_starlette_appfrom marimo._server.model import SessionMode+ from marimo._server.registry import LIFESPAN_REGISTRYfrom marimo._server.sessions import SessionManagerfrom marimo._server.tokens import AuthTokenfrom marimo._server.utils import initialize_asyncio+ from marimo._utils.lifespans import Lifespansfrom marimo._utils.marimo_path import MarimoPathconfig_reader = get_default_config_manager(current_path=None)diff --git a/marimo/_server/registry.py b/marimo/_server/registry.pyindex 62141e8ac0..b8771cd828 100644--- a/marimo/_server/registry.py+++ b/marimo/_server/registry.py@@ -1,13 +1,17 @@-from starlette.applications import Starlette-from starlette.middleware import Middleware-from starlette.types import Lifespan+from typing import TYPE_CHECKINGfrom marimo._entrypoints.registry import EntryPointRegistry-MIDDLEWARE_REGISTRY = EntryPointRegistry[Middleware](+if TYPE_CHECKING:+ from starlette.applications import Starlette+ from starlette.middleware import Middleware+ from starlette.types import Lifespan+++MIDDLEWARE_REGISTRY: EntryPointRegistry["Middleware"] = EntryPointRegistry(entry_point_group="marimo.server.asgi.middleware")-LIFESPAN_REGISTRY = EntryPointRegistry[Lifespan[Starlette]](- entry_point_group="marimo.server.asgi.lifespan"+LIFESPAN_REGISTRY: EntryPointRegistry["Lifespan[Starlette]"] = (+ EntryPointRegistry(entry_point_group="marimo.server.asgi.lifespan"))