π The fast, Pythonic way to build MCP servers and clients.
Revert "Support Python 3.15" (#5389)
Jeremiah Lowin1f2d286c7c1c
diff --git a/.github/scripts/test-ci-workflows.mjs b/.github/scripts/test-ci-workflows.mjsindex 2340524b7..3c9e10ea0 100644--- a/.github/scripts/test-ci-workflows.mjs+++ b/.github/scripts/test-ci-workflows.mjs@@ -192,10 +192,7 @@ test("required matrix checks retain names even when editorial steps skip", () =>assert.deepEqual(matrix.strategy.matrix, {os: ["ubuntu-latest"],"python-version": ["3.10"],- include: [- { os: "ubuntu-latest", "python-version": "3.13" },- { os: "ubuntu-latest", "python-version": "3.14" },- ],+ include: [{ os: "ubuntu-latest", "python-version": "3.13" }],});assert.equal(matrix.if, "${{ !cancelled() }}");assert.equal(matrix.steps[0].uses, "actions/checkout@v7");@@ -256,10 +253,6 @@ test("upgrade coverage remains nightly and manually dispatchable", () => {schedule: [{ cron: "0 2 * * *" }],workflow_dispatch: "",});- assert.deepEqual(- workflows["run-upgrade-checks"].jobs.run_tests.strategy.matrix.include,- workflow.jobs.run_tests.strategy.matrix.include,- );assert.ok(workflows["run-upgrade-checks"].jobs.notify);assert.ok(workflows["run-upgrade-checks"].jobs["close-on-success"]);});diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.ymlindex 484507165..a459e2c6e 100644--- a/.github/workflows/run-tests.yml+++ b/.github/workflows/run-tests.yml@@ -77,8 +77,6 @@ jobs:include:- os: ubuntu-latestpython-version: "3.13"- - os: ubuntu-latest- python-version: "3.14"fail-fast: falsetimeout-minutes: 10@@ -282,14 +280,6 @@ jobs:raise AssertionError(f"client-only slim unexpectedly imported {FastMCP!r}")PY- # The full suite can't run on 3.15 until pydantic-monty ships cp315- # wheels; its source build alone exceeds the job timeout.- - name: Import client on Python 3.15- run: |- SLIM_WHEEL=$(ls /tmp/fastmcp-dist/fastmcp_slim-*.whl)- uv run --isolated --no-project --python 3.15 --with "${SLIM_WHEEL}[client]" \- python -c "from fastmcp import Client"-- name: Install server slim wheelrun: |uv venv /tmp/fastmcp-slim-server-smokediff --git a/.github/workflows/run-upgrade-checks.yml b/.github/workflows/run-upgrade-checks.ymlindex 84114e353..f7decf9f1 100644--- a/.github/workflows/run-upgrade-checks.yml+++ b/.github/workflows/run-upgrade-checks.yml@@ -43,8 +43,6 @@ jobs:include:- os: ubuntu-latestpython-version: "3.13"- - os: ubuntu-latest- python-version: "3.14"fail-fast: falsetimeout-minutes: 10diff --git a/fastmcp_remote/pyproject.toml b/fastmcp_remote/pyproject.tomlindex 7665e5702..b75259529 100644--- a/fastmcp_remote/pyproject.toml+++ b/fastmcp_remote/pyproject.toml@@ -25,8 +25,6 @@ classifiers = ["Programming Language :: Python :: 3.11","Programming Language :: Python :: 3.12","Programming Language :: Python :: 3.13",- "Programming Language :: Python :: 3.14",- "Programming Language :: Python :: 3.15","Typing :: Typed",]diff --git a/fastmcp_slim/pyproject.toml b/fastmcp_slim/pyproject.tomlindex 0b25bdbac..8c6ec6a45 100644--- a/fastmcp_slim/pyproject.toml+++ b/fastmcp_slim/pyproject.toml@@ -34,8 +34,6 @@ classifiers = ["Programming Language :: Python :: 3.11","Programming Language :: Python :: 3.12","Programming Language :: Python :: 3.13",- "Programming Language :: Python :: 3.14",- "Programming Language :: Python :: 3.15","Typing :: Typed",]@@ -74,7 +72,6 @@ azure = ["azure-identity>=1.16.0", "PyJWT>=2.12.0"]client = ["fastmcp-slim[mcp]=={{ version }}","authlib>=1.6.11",- "beartype>=0.23.0rc2; python_version >= '3.15'","py-key-value-aio[filetree,keyring,memory]>=0.4.4,<0.5.0",]code-mode = ["pydantic-monty==0.0.21"]@@ -96,7 +93,6 @@ openai = ["openai>=1.102.0"]server = ["fastmcp-slim[mcp]=={{ version }}","authlib>=1.6.11",- "beartype>=0.23.0rc2; python_version >= '3.15'","cyclopts>=4.0.0","griffelib>=2.0.0","jsonref>=1.1.0",diff --git a/fastmcp_tasks/pyproject.toml b/fastmcp_tasks/pyproject.tomlindex d71fb874f..a7ee1f146 100644--- a/fastmcp_tasks/pyproject.toml+++ b/fastmcp_tasks/pyproject.toml@@ -23,8 +23,6 @@ classifiers = ["Programming Language :: Python :: 3.11","Programming Language :: Python :: 3.12","Programming Language :: Python :: 3.13",- "Programming Language :: Python :: 3.14",- "Programming Language :: Python :: 3.15","Typing :: Typed",]diff --git a/pyproject.toml b/pyproject.tomlindex 839e8ddb3..a9f34463a 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -23,8 +23,6 @@ classifiers = ["Programming Language :: Python :: 3.11","Programming Language :: Python :: 3.12","Programming Language :: Python :: 3.13",- "Programming Language :: Python :: 3.14",- "Programming Language :: Python :: 3.15","Typing :: Typed",]@@ -79,8 +77,8 @@ exclude-newer = "1 week"# first-party packages, whose fresh releases we install deliberately, the# MCP SDK, where a new major is the only version satisfying our floor and so# has nothing older to fall back to, and uncalled-for, the DI engine whose-# releases we adopt deliberately, and beartype, whose 3.15 fix is a prerelease.-exclude-newer-package = { fastmcp = false, fastmcp-slim = false, fastmcp-remote = false, prefab-ui = false, mcp = false, mcp-types = false, uncalled-for = false, pydocket = false, beartype = false }+# releases we adopt deliberately.+exclude-newer-package = { fastmcp = false, fastmcp-slim = false, fastmcp-remote = false, prefab-ui = false, mcp = false, mcp-types = false, uncalled-for = false, pydocket = false }[dependency-groups]dev = [diff --git a/tests/utilities/json_schema_type/test_real_world_schemas.py b/tests/utilities/json_schema_type/test_real_world_schemas.pyindex d5122088f..9d2b975c1 100644--- a/tests/utilities/json_schema_type/test_real_world_schemas.py+++ b/tests/utilities/json_schema_type/test_real_world_schemas.py@@ -65,12 +65,7 @@ from pathlib import Pathimport pytestimport yamlfrom pydantic import TypeAdapter-from yaml import SafeLoader--try:- from yaml import CSafeLoader # ty: ignore[possibly-missing-import]-except ImportError:- CSafeLoader = SafeLoader+from yaml import CSafeLoader # ty: ignore[possibly-missing-import]from fastmcp.utilities.json_schema_type import json_schema_to_typediff --git a/uv.lock b/uv.lockindex 881795659..8d89eaa8e 100644--- a/uv.lock+++ b/uv.lock@@ -2,10 +2,8 @@ version = 1revision = 3requires-python = ">=3.10"resolution-markers = [- "python_full_version >= '3.15' and sys_platform == 'win32'",- "python_full_version == '3.14.*' and sys_platform == 'win32'",- "python_full_version >= '3.15' and sys_platform != 'win32'",- "python_full_version == '3.14.*' and sys_platform != 'win32'",+ "python_full_version >= '3.14' and sys_platform == 'win32'",+ "python_full_version >= '3.14' and sys_platform != 'win32'","python_full_version == '3.13.*' and sys_platform == 'win32'","python_full_version == '3.13.*' and sys_platform != 'win32'","python_full_version == '3.12.*' and sys_platform == 'emscripten'",@@ -27,7 +25,6 @@ mcp = falsemcp-types = falseprefab-ui = falsepydocket = false-beartype = falseuncalled-for = false[manifest]@@ -59,10 +56,8 @@ name = "aiofile"version = "3.11.1"source = { registry = "https://pypi.org/simple" }resolution-markers = [- "python_full_version >= '3.15' and sys_platform == 'win32'",- "python_full_version == '3.14.*' and sys_platform == 'win32'",- "python_full_version >= '3.15' and sys_platform != 'win32'",- "python_full_version == '3.14.*' and sys_platform != 'win32'",+ "python_full_version >= '3.14' and sys_platform == 'win32'",+ "python_full_version >= '3.14' and sys_platform != 'win32'","python_full_version == '3.13.*' and sys_platform == 'win32'","python_full_version == '3.13.*' and sys_platform != 'win32'","python_full_version == '3.12.*' and sys_platform == 'emscripten'",@@ -218,35 +213,11 @@ wheels = [name = "beartype"version = "0.22.9"source = { registry = "https://pypi.org/simple" }-resolution-markers = [- "python_full_version == '3.14.*' and sys_platform == 'win32'",- "python_full_version == '3.14.*' and sys_platform != 'win32'",- "python_full_version == '3.13.*' and sys_platform == 'win32'",- "python_full_version == '3.13.*' and sys_platform != 'win32'",- "python_full_version >= '3.11' and python_full_version < '3.13' and sys_platform == 'win32'",- "python_full_version == '3.12.*' and sys_platform == 'emscripten'",- "(python_full_version >= '3.11' and python_full_version < '3.13' and sys_platform != 'emscripten' and sys_platform != 'win32') or (python_full_version == '3.11.*' and sys_platform == 'emscripten')",- "python_full_version < '3.11' and sys_platform == 'win32'",- "python_full_version < '3.11' and sys_platform != 'win32'",-]sdist = { url = "https://files.pythonhosted.org/packages/c7/94/1009e248bbfbab11397abca7193bea6626806be9a327d399810d523a07cb/beartype-0.22.9.tar.gz", hash = "sha256:8f82b54aa723a2848a56008d18875f91c1db02c32ef6a62319a002e3e25a975f", size = 1608866, upload-time = "2025-12-13T06:50:30.72Z" }wheels = [{ url = "https://files.pythonhosted.org/packages/71/cc/18245721fa7747065ab478316c7fea7c74777d07f37ae60db2e84f8172e8/beartype-0.22.9-py3-none-any.whl", hash = "sha256:d16c9bbc61ea14637596c5f6fbff2ee99cbe3573e46a716401734ef50c3060c2", size = 1333658, upload-time = "2025-12-13T06:50:28.266Z" },]-[[package]]-name = "beartype"-version = "0.23.0rc2"-source = { registry = "https://pypi.org/simple" }-resolution-markers = [- "python_full_version >= '3.15' and sys_platform == 'win32'",- "python_full_version >= '3.15' and sys_platform != 'win32'",-]-sdist = { url = "https://files.pythonhosted.org/packages/2d/58/a4ac1ef919ce13a20c35ed3312b727e56a52029a1921e8f0e91cc52ef2cd/beartype-0.23.0rc2.tar.gz", hash = "sha256:d589e5c6cf1859e4cf355db52ddcd08e2eca98784d7d73dc5f4491f423f94ee5", size = 1974911, upload-time = "2026-09-26T03:23:22.586Z" }-wheels = [- { url = "https://files.pythonhosted.org/packages/05/70/1e82c75d1869d71cd1d027497af76c755fde89afbdfd3215c10d677095c0/beartype-0.23.0rc2-py3-none-any.whl", hash = "sha256:fffbb5aa86562b034038f2c90da71cac463247374c89981c937685f47a75223c", size = 1578057, upload-time = "2026-09-26T03:23:20.504Z" },-]-[[package]]name = "black"version = "26.5.1"@@ -1027,7 +998,6 @@ azure = []client = [{ name = "authlib" },- { name = "beartype", version = "0.23.0rc2", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.15'" },{ name = "exceptiongroup" },{ name = "httpx2" },{ name = "mcp" },@@ -1057,7 +1027,6 @@ openai = []server = [{ name = "authlib" },- { name = "beartype", version = "0.23.0rc2", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.15'" },{ name = "cyclopts" },{ name = "exceptiongroup" },{ name = "griffelib" },@@ -1086,8 +1055,6 @@ requires-dist = [{ name = "authlib", marker = "extra == 'client'", specifier = ">=1.6.11" },{ name = "authlib", marker = "extra == 'server'", specifier = ">=1.6.11" },{ name = "azure-identity", marker = "extra == 'azure'", specifier = ">=1.16.0" },- { name = "beartype", marker = "python_full_version >= '3.15' and extra == 'client'", specifier = ">=0.23.0rc2" },- { name = "beartype", marker = "python_full_version >= '3.15' and extra == 'server'", specifier = ">=0.23.0rc2" },{ name = "cyclopts", marker = "extra == 'server'", specifier = ">=4.0.0" },{ name = "exceptiongroup", marker = "extra == 'client'", specifier = ">=1.2.2" },{ name = "exceptiongroup", marker = "extra == 'mcp'", specifier = ">=1.2.2" },@@ -1432,10 +1399,8 @@ name = "ipython"version = "9.15.0"source = { registry = "https://pypi.org/simple" }resolution-markers = [- "python_full_version >= '3.15' and sys_platform == 'win32'",- "python_full_version == '3.14.*' and sys_platform == 'win32'",- "python_full_version >= '3.15' and sys_platform != 'win32'",- "python_full_version == '3.14.*' and sys_platform != 'win32'",+ "python_full_version >= '3.14' and sys_platform == 'win32'",+ "python_full_version >= '3.14' and sys_platform != 'win32'","python_full_version == '3.13.*' and sys_platform == 'win32'","python_full_version == '3.13.*' and sys_platform != 'win32'","python_full_version == '3.12.*' and sys_platform == 'emscripten'",@@ -2213,8 +2178,7 @@ name = "py-key-value-aio"version = "0.4.5"source = { registry = "https://pypi.org/simple" }dependencies = [- { name = "beartype", version = "0.22.9", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.15'" },- { name = "beartype", version = "0.23.0rc2", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.15'" },+ { name = "beartype" },{ name = "typing-extensions" },]sdist = { url = "https://files.pythonhosted.org/packages/fb/e2/d689d922894a7ecde73b6daeaf9b13dab5aae06fe6aaaf7514722644d382/py_key_value_aio-0.4.5.tar.gz", hash = "sha256:c6563a2c6abe5da5e20f4f9e875c2a9b425a2244a54fadbf46cf140a9eea45d7", size = 107547, upload-time = "2026-05-27T16:37:08.107Z" }@@ -3200,10 +3164,8 @@ name = "rpds-py"version = "2026.6.3"source = { registry = "https://pypi.org/simple" }resolution-markers = [- "python_full_version >= '3.15' and sys_platform == 'win32'",- "python_full_version == '3.14.*' and sys_platform == 'win32'",- "python_full_version >= '3.15' and sys_platform != 'win32'",- "python_full_version == '3.14.*' and sys_platform != 'win32'",+ "python_full_version >= '3.14' and sys_platform == 'win32'",+ "python_full_version >= '3.14' and sys_platform != 'win32'","python_full_version == '3.13.*' and sys_platform == 'win32'","python_full_version == '3.13.*' and sys_platform != 'win32'","python_full_version == '3.12.*' and sys_platform == 'emscripten'",