Skip to content

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.

feat: support python 3.15 (#11128)

Dylan Madisettibd3be52d1d7e
diff --git a/.github/workflows/test_be.yaml b/.github/workflows/test_be.yaml
index 44947f6c6b..96cf19d64f 100644
--- a/.github/workflows/test_be.yaml
+++ b/.github/workflows/test_be.yaml
@@ -128,13 +128,15 @@ jobs:
dependencies: "core"
- python-version: "3.14"
dependencies: "core"
+ - python-version: "3.15"
+ dependencies: "core"
- python-version: "3.11"
dependencies: "core,optional"
- python-version: "3.12"
dependencies: "core,optional"
- python-version: "3.13"
dependencies: "core,optional"
- # TODO: Add in 3.14 optional once there is broader wheel support
+ # TODO: Add in 3.14 and 3.15 optional once there is broader wheel support
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
diff --git a/pyproject.toml b/pyproject.toml
index 6291c1b090..2289e2bed0 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -39,8 +39,9 @@ dependencies = [
"python-multipart>=0.0.18",
# websockets for use with starlette, and for lsp
"websockets >= 14.2.0; sys_platform != 'emscripten'",
- # loro for collaborative editing (native extension; server-only)
- "loro>=1.10.0; sys_platform != 'emscripten' and sys_platform != 'android'",
+ # loro for collaborative editing (native extension; server-only).
+ # No cp315 wheels as of 2026-10; drop the python_version marker when published.
+ "loro>=1.10.0; python_version < '3.15' and sys_platform != 'emscripten' and sys_platform != 'android'",
# python <=3.10 compatibility
"typing_extensions>=4.4.0; python_version < '3.12'",
# for rst parsing; lowerbound determined by awscli requiring < 0.17,
@@ -55,7 +56,7 @@ dependencies = [
"packaging",
"msgspec>=0.22.0",
# for IPC, required for marimo edit --sandbox, marimo run <multiple notebooks>
- "pyzmq>=27.1.0; python_version < '3.15' and sys_platform != 'emscripten'",
+ "pyzmq>=27.1.0; sys_platform != 'emscripten'",
]
readme = "README.md"
license = "Apache-2.0"
@@ -74,6 +75,7 @@ classifiers = [
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
+ "Programming Language :: Python :: 3.15",
"Programming Language :: Python :: 3 :: Only",
]
@@ -139,8 +141,9 @@ dev = [
"opentelemetry-sdk~=1.28.0",
"opentelemetry-exporter-otlp-proto-http~=1.28.0",
"opentelemetry-exporter-otlp-proto-grpc~=1.28.0",
- # For SQL
- "duckdb>=1.0.0",
+ # For SQL. duckdb has no cp315 wheels as of 2026-10; drop the marker when
+ # published.
+ "duckdb>=1.0.0; python_version < '3.15'",
"sqlglot[c]>=26.8.0",
# Stubs for optional dataframe backends
"pyarrow-stubs",
@@ -167,10 +170,14 @@ test = [
"inline-snapshot~=0.29.0",
"hypothesis~=6.102.1",
"dirty-equals~=0.9.0",
+ # No cp315 wheels as of 2026-10 for matplotlib 3.10 and zstandard; drop the
+ # python_version markers when published. numpy is listed on its own because
+ # tests used to get it only through matplotlib.
# Forced for modern matplotlib.
- "matplotlib~=3.10.7",
+ "matplotlib~=3.10.7; python_version < '3.15'",
+ "numpy",
"pillow>=9",
- "zstandard>=0.21.0",
+ "zstandard>=0.21.0; python_version < '3.15'",
"cffi>=1.16.0",
]
@@ -207,7 +214,8 @@ test-optional = [
"duckdb>=1.0.0",
"ibis-framework[duckdb]>=10.3.0",
# For testing mo.image
- "pillow~=12.0.0",
+ # 12.3 is the first release with cp315 wheels.
+ "pillow~=12.0,>=12.3",
"anywidget~=0.9.21",
"ipython~=8.12.3",
# testing gen ai
@@ -311,7 +319,7 @@ docs = [
# For packages without eligible source distributions, require wheels
# for these targets so resolution can backtrack past incomplete uploads.
required-environments = [
- "sys_platform == 'linux' and platform_machine == 'x86_64' and python_version >= '3.10' and python_version < '3.15'",
+ "sys_platform == 'linux' and platform_machine == 'x86_64' and python_version >= '3.10' and python_version < '3.16'",
"sys_platform == 'darwin' and platform_machine == 'arm64' and python_version == '3.10'",
"sys_platform == 'win32' and platform_machine == 'AMD64' and python_version == '3.10'",
]
diff --git a/tests/_cli/test_sandbox.py b/tests/_cli/test_sandbox.py
index f0b93e2d15..244a78a5f2 100644
--- a/tests/_cli/test_sandbox.py
+++ b/tests/_cli/test_sandbox.py
@@ -708,6 +708,11 @@ def test_run_in_sandbox_from_script_environment(
@pytest.mark.skipif(
os.name == "nt", reason="signal forwarding differs on Windows"
)
+ "sys.version_info >= (3, 15)",
+ reason="the published marimo pulls loro, which has no cp315 wheel; "
+ "drop once a release carries the loro marker",
+)
@pytest.mark.usefixtures("_restore_signal_handlers")
def test_run_in_sandbox_without_a_manifest() -> None:
"""No target means no manifest: marimo runs ephemerally."""
diff --git a/tests/_environments/test_sandbox_interface.py b/tests/_environments/test_sandbox_interface.py
index 35d1ff6432..65f4bc95e8 100644
--- a/tests/_environments/test_sandbox_interface.py
+++ b/tests/_environments/test_sandbox_interface.py
@@ -507,6 +507,11 @@ def test_close_cleans_unnamed_manifest() -> None:
assert not temporary_source.exists()
+ "sys.version_info >= (3, 15)",
+ reason="the published marimo pulls loro, which has no cp315 wheel; "
+ "drop once a release carries the loro marker",
+)
@pytest.mark.network
def test_add_after_rename_updates_the_running_environment(
tmp_path: Path,
diff --git a/tests/_runtime/test_sandbox_lifecycle.py b/tests/_runtime/test_sandbox_lifecycle.py
index 6d0d30cdeb..9f3b03e71a 100644
--- a/tests/_runtime/test_sandbox_lifecycle.py
+++ b/tests/_runtime/test_sandbox_lifecycle.py
@@ -27,6 +27,11 @@ if TYPE_CHECKING:
from pathlib import Path
+ "sys.version_info >= (3, 15)",
+ reason="the published marimo pulls loro, which has no cp315 wheel; "
+ "drop once a release carries the loro marker",
+)
@pytest.mark.network
@pytest.mark.skipif(not is_uv_available(), reason="uv is required")
@pytest.mark.parametrize("suffix", [".py", ".md"])
@@ -192,6 +197,11 @@ async def test_rename_rebinds_packages_before_rerunning_cells(
assert "obstore" in renamed.read_text()
+ "sys.version_info >= (3, 15)",
+ reason="the published marimo pulls loro, which has no cp315 wheel; "
+ "drop once a release carries the loro marker",
+)
async def test_unnamed_sandbox_keeps_manifest_and_manager_on_save(
tmp_path: Path, monkeypatch: pytest.MonkeyPatch
) -> None:
diff --git a/tests/_server/host/test_host_analysis.py b/tests/_server/host/test_host_analysis.py
index e5e502f967..7ba2eb2494 100644
--- a/tests/_server/host/test_host_analysis.py
+++ b/tests/_server/host/test_host_analysis.py
@@ -13,6 +13,7 @@ from marimo._ast.cell import CellImpl
from marimo._ast.compiler import compile_cell
from marimo._core import protocol
from marimo._core.document import Document, DocumentCell
+from marimo._dependencies.dependencies import DependencyManager
from marimo._server.host.analysis import CellAnalyzer, HostAnalyzer
from marimo._types.ids import CellId_t
@@ -198,6 +199,9 @@ def test_compilation_cache_uses_identity_and_code_hash(
assert compiler.call_count == 6
+ not DependencyManager.duckdb.has(), reason="Requires duckdb"
+)
@pytest.mark.parametrize("reverse", [False, True])
@pytest.mark.parametrize(
("provider", "consumer", "refs"),
diff --git a/tests/snapshots/dependencies.txt b/tests/snapshots/dependencies.txt
index ccd65e715c..f7cd7beb8e 100644
--- a/tests/snapshots/dependencies.txt
+++ b/tests/snapshots/dependencies.txt
@@ -2,7 +2,7 @@ click>=8.0,<9; sys_platform != 'emscripten'
docutils>=0.16.0
itsdangerous>=2.0.0
jedi>=0.18.0,<0.21.0
-loro>=1.10.0; sys_platform != 'emscripten' and sys_platform != 'android'
+loro>=1.10.0; python_version < '3.15' and sys_platform != 'emscripten' and sys_platform != 'android'
markdown>=3.6,<4
msgspec>=0.22.0
narwhals>=2.0.0
@@ -12,7 +12,7 @@ pygments>=2.19,<3
pymdown-extensions>=10.21.2,<12
python-multipart>=0.0.18
pyyaml>=6.0.1
-pyzmq>=27.1.0; python_version < '3.15' and sys_platform != 'emscripten'
+pyzmq>=27.1.0; sys_platform != 'emscripten'
starlette>=0.37.2; sys_platform != 'emscripten'
tomlkit>=0.12.0
typing_extensions>=4.4.0; python_version < '3.12'