Skip to content

Commit e2e0751

Browse files
committed
Merge remote-tracking branch 'upstream/main' into HEAD
# Conflicts: # tests/server/mcpserver/test_server.py
2 parents 41f3ba8 + 9f66f37 commit e2e0751

95 files changed

Lines changed: 2855 additions & 525 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.claude/skills/test-quality/SKILL.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ where one exists; a rule with no stated why is a convention — follow it anyway
107107
silently become load-bearing.
108108
- Comments live next to the line they explain, not in docstrings; single backticks for code
109109
refs; match the surrounding comment density (one-liners next to one-liners). No
110-
`from __future__ import annotations` (py310+ repo).
110+
`from __future__ import annotations` (py311+ repo).
111111
- Test work doesn't change `src/` as a side effect — the one mechanical exception is deleting a
112112
pragma a new test now covers. If a test can't be written without a library change, raise it
113113
as a finding or defer the test; don't quietly edit `src/`.

‎.github/workflows/conformance.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
- uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0
4545
with:
4646
enable-cache: true
47-
version: 0.9.5
47+
version: 0.12.24
4848
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
4949
with:
5050
node-version: 24
@@ -90,7 +90,7 @@ jobs:
9090
- uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0
9191
with:
9292
enable-cache: true
93-
version: 0.9.5
93+
version: 0.12.24
9494
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
9595
with:
9696
node-version: 24

‎.github/workflows/deploy-docs.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0
5656
with:
5757
enable-cache: true
58-
version: 0.9.5
58+
version: 0.12.24
5959

6060
- name: Build combined docs (main at / and /v2/, v1.x at /v1/)
6161
run: bash scripts/build-docs.sh site

‎.github/workflows/docs-preview.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ jobs:
9999
# defence in depth (and avoids a refused save in the post step).
100100
# Mirrors publish-pypi.yml.
101101
enable-cache: false
102-
version: 0.9.5
102+
version: 0.12.24
103103

104104
# Both triggers run this workflow file from the default branch (whatever
105105
# the PR targets), so the whole recipe — dependency sync included — must

‎.github/workflows/publish-pypi.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0
2222
with:
2323
enable-cache: false
24-
version: 0.12.5
24+
version: 0.12.24
2525

2626
- name: Set up Python 3.12
2727
run: uv python install 3.12

‎.github/workflows/shared.yml‎

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ jobs:
2121
uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0
2222
with:
2323
enable-cache: true
24-
version: 0.9.5
24+
version: 0.12.24
2525

2626
- name: Install dependencies
27-
run: uv sync --frozen --all-extras --python 3.10
27+
run: uv sync --frozen --all-extras --python 3.11
2828

2929
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
3030
with:
@@ -36,6 +36,9 @@ jobs:
3636
- name: Workflow script tests
3737
run: node --test '.github/scripts/*.test.js'
3838

39+
- name: MCP Apps UI script tests
40+
run: node --test tests/docs_src/test_apps.test.js
41+
3942
- name: Surface types match vendored schema
4043
run: |
4144
uv sync --group codegen --frozen
@@ -55,7 +58,7 @@ jobs:
5558
strategy:
5659
fail-fast: false
5760
matrix:
58-
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
61+
python-version: ["3.11", "3.12", "3.13", "3.14", "3.15"]
5962
dep-resolution:
6063
- name: lowest-direct
6164
install-flags: "--upgrade --resolution lowest-direct"
@@ -72,7 +75,7 @@ jobs:
7275
uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0
7376
with:
7477
enable-cache: true
75-
version: 0.9.5
78+
version: 0.12.24
7679

7780
- name: Install the project
7881
run: uv sync ${{ matrix.dep-resolution.install-flags }} --all-extras --python ${{ matrix.python-version }}
@@ -107,10 +110,10 @@ jobs:
107110
uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0
108111
with:
109112
enable-cache: true
110-
version: 0.9.5
113+
version: 0.12.24
111114

112115
- name: Install dependencies
113-
run: uv sync --frozen --all-extras --python 3.10
116+
run: uv sync --frozen --all-extras --python 3.11
114117

115118
- name: Check README snippets are up to date
116119
run: uv run --frozen scripts/update_readme_snippets.py --check
@@ -136,7 +139,7 @@ jobs:
136139
uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0
137140
with:
138141
enable-cache: true
139-
version: 0.9.5
142+
version: 0.12.24
140143

141144
- name: Build the docs in strict mode
142145
run: bash scripts/docs/build.sh

‎AGENTS.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ assigned to their author are closed automatically.
3434
the example packages still take plain `uv add`.
3535
- Running tools: `uv run --frozen <tool>`. Always pass `--frozen` so uv doesn't
3636
rewrite `uv.lock` as a side effect.
37-
- Cross-version testing: `uv run --frozen --python 3.10 pytest ...` to run
38-
against a specific interpreter (CI covers 3.10–3.14).
37+
- Cross-version testing: `uv run --frozen --python 3.11 pytest ...` to run
38+
against a specific interpreter (CI covers 3.11–3.15).
3939
- Upgrading: `uv lock --upgrade-package <package>`
4040
- FORBIDDEN: `uv pip install`, `@latest` syntax
4141
- Don't raise dependency floors for CVEs alone. The `>=` constraint already
@@ -100,7 +100,7 @@ assigned to their author are closed automatically.
100100
CI requires 100% (`fail_under = 100`, `branch = true`).
101101

102102
- Full check: `./scripts/test` (~23s). Runs coverage + `strict-no-cover` on the
103-
default Python. Not identical to CI: CI runs 3.10–3.14 × {ubuntu, windows}
103+
default Python. Not identical to CI: CI runs 3.11–3.15 × {ubuntu, windows}
104104
× {locked, lowest-direct}, and some branch-coverage quirks only surface on
105105
specific matrix entries.
106106
- Targeted check while iterating (~4s, deterministic):

‎CONTRIBUTING.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ Security reports do not belong in the issue tracker; [SECURITY.md](SECURITY.md)
7878

7979
## Development Setup
8080

81-
1. Make sure you have Python 3.10+ installed
81+
1. Make sure you have Python 3.11+ installed
8282
2. Install [uv](https://docs.astral.sh/uv/getting-started/installation/)
8383
3. Fork the repository
8484
4. Clone your fork: `git clone https://github.com/YOUR-USERNAME/python-sdk.git`

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ The [Model Context Protocol](https://modelcontextprotocol.io) lets you build ser
2929

3030
## Requirements
3131

32-
Python 3.10+.
32+
Python 3.11+.
3333

3434
## Installation
3535

‎docs/advanced/apps.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ then come back.
2020

2121
## A clock with a face
2222

23-
```python title="server.py" hl_lines="17 20 28 30"
23+
```python title="server.py" hl_lines="36 39 47 49"
2424
--8<-- "docs_src/apps/tutorial001.py"
2525
```
2626

@@ -51,7 +51,7 @@ The model reads `content`; the iframe is for humans. A UI-capable host still fee
5151
the text result to the model, and a text-only client gets *only* that. So the
5252
canonical pattern is one tool, two answers. Look at `get_time` again:
5353

54-
```python title="server.py" hl_lines="21-25"
54+
```python title="server.py" hl_lines="40-44"
5555
--8<-- "docs_src/apps/tutorial001.py"
5656
```
5757

0 commit comments

Comments
 (0)