Skip to content

Deprecate roots, sampling, and logging per SEP-2577 - #2922

Closed
Kludex wants to merge 1 commit into
mainfrom
deprecate-roots-sampling-logging-sep-2577
Closed

Kludex wants to merge 1 commit into
mainfrom
deprecate-roots-sampling-logging-sep-2577

Deprecate roots, sampling, and logging per SEP-2577

08afbf5
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Jun 20, 2026 in 20m 49s

Code review found 1 important issue

Found 5 candidates, confirmed 2. See review comments for details.

Details

Severity Count
🔴 Important 1
🟡 Nit 1
🟣 Pre-existing 0
Severity File:Line Issue
🔴 Important src/mcp/server/session.py:135-142 Non-deprecated public APIs now emit DeprecationWarning at runtime in downstream apps
🟡 Nit README.v2.md:930-935 Inconsistent README treatment of SEP-2577 deprecated features after removing the Sampling section

Annotations

Check failure on line 142 in src/mcp/server/session.py

See this annotation in the file changed.

@claude claude / Claude Code Review

Non-deprecated public APIs now emit DeprecationWarning at runtime in downstream apps

Calling non-deprecated SDK convenience APIs (e.g. `ctx.info()` / `send_log_message`, `create_message`, `list_roots`, `set_logging_level`, `send_roots_list_changed`) now emits a runtime `DeprecationWarning` from inside the SDK, because these methods construct the newly-`@deprecated` types internally — the PR only silences this for this repo's own test suite via the new `pyproject.toml` filterwarnings entry. Downstream test suites using `filterwarnings = ["error"]` will start failing on upgrade ju

Check warning on line 935 in README.v2.md

See this annotation in the file changed.

@claude claude / Claude Code Review

Inconsistent README treatment of SEP-2577 deprecated features after removing the Sampling section

After this PR removes the Sampling section, README.v2.md still lists `await ctx.session.create_message(messages, max_tokens=...)` in the "Context Properties and Methods" list (line 1068) with no deprecation note, leaving an orphaned pointer to a SEP-2577-deprecated feature, and the retained "Logging and Notifications" section likewise carries no deprecation note. Consider removing or annotating the `create_message` bullet and adding a brief "Deprecated as of 2026-07-28 (SEP-2577)" note to the Lo