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
starlette compat (#1535)
Akshay Agrawal686201289e3b
diff --git a/marimo/_server/api/auth.py b/marimo/_server/api/auth.pyindex 4325659ed7..da701fecc6 100644--- a/marimo/_server/api/auth.py+++ b/marimo/_server/api/auth.py@@ -6,7 +6,9 @@ import secretsimport typingfrom typing import TYPE_CHECKING, Any, Dict, Optional+import starletteimport starlette.status as status+from packaging import versionfrom starlette.datastructures import Secretfrom starlette.exceptions import HTTPExceptionfrom starlette.middleware.sessions import SessionMiddleware@@ -170,16 +172,28 @@ class CustomSessionMiddleware(SessionMiddleware):self.original_session_cookie = session_cookie- super().__init__(- app,- secret_key,- session_cookie,- max_age,- path,- same_site,- https_only,- domain,- )+ if version.parse(starlette.__version__) >= version.parse("0.32.0"):+ # Domain was added in 0.32.0; we currently don't use it.+ super().__init__(+ app,+ secret_key,+ session_cookie,+ max_age,+ path,+ same_site,+ https_only,+ domain,+ )+ else:+ super().__init__(+ app,+ secret_key,+ session_cookie,+ max_age,+ path,+ same_site,+ https_only,+ )async def __call__(self, scope: Scope, receive: Receive, send: Send