π The fast, Pythonic way to build MCP servers and clients.
Expand supported Python CI coverage (#5391)
Jeremiah Lowinc8183899d0ee
diff --git a/.github/scripts/test-ci-workflows.mjs b/.github/scripts/test-ci-workflows.mjsindex 3c9e10ea0..09835d4d7 100644--- a/.github/scripts/test-ci-workflows.mjs+++ b/.github/scripts/test-ci-workflows.mjs@@ -192,7 +192,12 @@ 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" }],+ include: [+ { os: "ubuntu-latest", "python-version": "3.11" },+ { os: "ubuntu-latest", "python-version": "3.12" },+ { os: "ubuntu-latest", "python-version": "3.13" },+ { os: "ubuntu-latest", "python-version": "3.14" },+ ],});assert.equal(matrix.if, "${{ !cancelled() }}");assert.equal(matrix.steps[0].uses, "actions/checkout@v7");@@ -220,20 +225,29 @@ test("required matrix checks retain names even when editorial steps skip", () =>);}});-test("Windows retains its check name but runs only outside PRs", () => {+test("Windows retains matrix check names while skipping PR test steps", () => {const windows = workflow.jobs.run_windows_tests;- assert.equal(windows.name, "Tests: Python 3.10 on windows-latest");- assert.equal(windows.if, "github.event_name != 'pull_request'");+ assert.equal(+ windows.name,+ "Tests: Python ${{ matrix.python-version }} on windows-latest",+ );+ assert.deepEqual(windows.strategy.matrix, {+ "python-version": ["3.10", "3.14"],+ });+ assert.equal(windows.if, "${{ !cancelled() }}");assert.equal(windows["runs-on"], "windows-latest");assert.equal(windows.needs, undefined);assert.deepEqual(windows.steps[1].with, {- "python-version": "3.10",+ "python-version": "${{ matrix.python-version }}",resolution: "locked",});assert.equal(windows.steps[2].uses, "./.github/actions/run-pytest");assert.equal(windows.steps[3].uses, "./.github/actions/run-pytest");assert.equal(windows.steps[3].with["test-type"], "client_process");- assert.ok(windows.steps.every((step) => step.if === undefined));+ assert.equal(windows.steps[0].if, undefined);+ assert.ok(+ windows.steps.slice(1).every((step) => step.if === "github.event_name != 'pull_request'"),+ );});test("PR cancellation cannot supersede main or manual runs", () => {for (const name of ["run-tests", "run-static"]) {@@ -253,6 +267,14 @@ 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, {+ os: ["ubuntu-latest", "windows-latest"],+ "python-version": ["3.10"],+ include: [+ ...workflow.jobs.run_tests.strategy.matrix.include,+ { os: "windows-latest", "python-version": "3.14" },+ ],+ });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 a459e2c6e..ebf7c3b59 100644--- a/.github/workflows/run-tests.yml+++ b/.github/workflows/run-tests.yml@@ -75,8 +75,14 @@ jobs:os: [ubuntu-latest]python-version: ["3.10"]include:+ - os: ubuntu-latest+ python-version: "3.11"+ - os: ubuntu-latest+ python-version: "3.12"- os: ubuntu-latestpython-version: "3.13"+ - os: ubuntu-latest+ python-version: "3.14"fail-fast: falsetimeout-minutes: 10@@ -106,20 +112,29 @@ jobs:run: uv run pytest tests/docs -n 0run_windows_tests:- if: github.event_name != 'pull_request'- name: "Tests: Python 3.10 on windows-latest"+ # Expand the matrix on PRs to preserve required check names.+ # Skip the steps instead of the job so matrix expressions are resolved.+ if: ${{ !cancelled() }}+ name: "Tests: Python ${{ matrix.python-version }} on windows-latest"+ strategy:+ matrix:+ python-version: ["3.10", "3.14"]+ fail-fast: falseruns-on: windows-latesttimeout-minutes: 10steps:- uses: actions/checkout@v7- name: Setup uv+ if: github.event_name != 'pull_request'uses: ./.github/actions/setup-uvwith:- python-version: "3.10"+ python-version: ${{ matrix.python-version }}resolution: locked- name: Run unit tests+ if: github.event_name != 'pull_request'uses: ./.github/actions/run-pytest- name: Run serial subprocess tests+ if: github.event_name != 'pull_request'uses: ./.github/actions/run-pytestwith:test-type: client_processdiff --git a/.github/workflows/run-upgrade-checks.yml b/.github/workflows/run-upgrade-checks.ymlindex f7decf9f1..fe1f87e3b 100644--- a/.github/workflows/run-upgrade-checks.yml+++ b/.github/workflows/run-upgrade-checks.yml@@ -41,8 +41,16 @@ jobs:os: [ubuntu-latest, windows-latest]python-version: ["3.10"]include:+ - os: ubuntu-latest+ python-version: "3.11"+ - os: ubuntu-latest+ python-version: "3.12"- os: ubuntu-latestpython-version: "3.13"+ - os: ubuntu-latest+ python-version: "3.14"+ - os: windows-latest+ python-version: "3.14"fail-fast: falsetimeout-minutes: 10diff --git a/fastmcp_remote/pyproject.toml b/fastmcp_remote/pyproject.tomlindex b75259529..4c08e6918 100644--- a/fastmcp_remote/pyproject.toml+++ b/fastmcp_remote/pyproject.toml@@ -25,6 +25,7 @@ classifiers = ["Programming Language :: Python :: 3.11","Programming Language :: Python :: 3.12","Programming Language :: Python :: 3.13",+ "Programming Language :: Python :: 3.14","Typing :: Typed",]diff --git a/fastmcp_slim/pyproject.toml b/fastmcp_slim/pyproject.tomlindex 8c6ec6a45..7f32eecf1 100644--- a/fastmcp_slim/pyproject.toml+++ b/fastmcp_slim/pyproject.toml@@ -34,6 +34,7 @@ classifiers = ["Programming Language :: Python :: 3.11","Programming Language :: Python :: 3.12","Programming Language :: Python :: 3.13",+ "Programming Language :: Python :: 3.14","Typing :: Typed",]diff --git a/fastmcp_tasks/pyproject.toml b/fastmcp_tasks/pyproject.tomlindex a7ee1f146..3f1c22914 100644--- a/fastmcp_tasks/pyproject.toml+++ b/fastmcp_tasks/pyproject.toml@@ -23,6 +23,7 @@ classifiers = ["Programming Language :: Python :: 3.11","Programming Language :: Python :: 3.12","Programming Language :: Python :: 3.13",+ "Programming Language :: Python :: 3.14","Typing :: Typed",]diff --git a/pyproject.toml b/pyproject.tomlindex a9f34463a..92e8798cd 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -23,6 +23,7 @@ classifiers = ["Programming Language :: Python :: 3.11","Programming Language :: Python :: 3.12","Programming Language :: Python :: 3.13",+ "Programming Language :: Python :: 3.14","Typing :: Typed",]