Repository navigation
test(sdk/python): remove obsolete enable_mcp test arguments - #1113
remote-controlled-man wants to merge 1 commit into
Conversation
Agent never accepted enable_mcp, so the flag fell through **kwargs into FastAPI. FastAPI 0.145 removed **extra, and unpinned CI installs 0.146, which raises TypeError. Removing the argument restores the previous no-op without pinning FastAPI. Co-authored-by: Steven Huang <remote-controlled-man@users.noreply.github.com>
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
Performance
✓ No regressions detected |
📊 Coverage gateThresholds from
✅ Gate passedNo surface regressed past the allowed threshold and the aggregate stayed above the floor. |
📐 Patch coverage gateThreshold: 80% on lines this PR touches vs
✅ Patch gate passedEvery surface whose lines were touched by this PR has patch coverage at or above the threshold. |
|
Thanks for catching this. We ran into the same FastAPI change in parallel and #1120 landed the identical six-line removal on main a couple of hours after you opened this, so this PR is now a no-op against main. Closing it as superseded, but you spotted it first. |
Summary
Six shutdown/DID test constructors still pass
enable_mcp=False, which the currentAgentconstructor forwards to FastAPI through**kwargs. FastAPI 0.145 removed its unused extra keyword arguments, so these constructors raiseTypeErrorbefore their assertions execute when SDK CI installs a recent FastAPI release.Remove those six stale arguments from the two test files. Production code, test assertions, and dependency requirements are unchanged.
Type of change
Test plan
Verified on macOS arm64 with Python 3.12.14, FastAPI 0.148.0, and Ruff 0.15.22, reusing the same installed environment:
./scripts/run_pytest.sh tests/test_agent_graceful_shutdown.py tests/test_did_manager_error_paths.py --no-cov: 26 passed.ruff check .: passed.mypy --config-file mypy.ini agentfield/: passed../scripts/run_pytest.shwith the configured coverage collection and JSON/XML reports: 2558 passed, 4 skipped, 38 deselected by the repository's default markers; measured coverage 94.72% (2244/2369 statements).ruff format --check .remains failing for the same 102 files on the unchanged base and this head. The graceful-shutdown file has the same two existing line-wrap differences on both sides; the DID file is already formatted on both sides. No autoformat was applied. The SDK CI formatting step is nonblocking, and this is not reported as a formatting pass.The Linux/alternate Python and websockets matrices, repository-wide
./scripts/test-all.sh,make fmt tidy, Docker checks, hosted CI, and all-surface coverage aggregation/gate were not run locally. Go is unavailable and the Docker daemon is not running on this host.Test coverage
Checklist
docs/CONTRIBUTING.mdanddocs/DEVELOPMENT.md.Related issues / PRs
Related to #1109's Python SDK CI failure. This test compatibility repair is independent of its callback retry changes and does not close #1088.