[v1.x] refactor: import SSEError from httpx_sse public API by maxisbey · Pull Request #2561 · modelcontextprotocol/python-sdk
Backport of #2560.
src/mcp/client/sse.py imports SSEError from the private httpx_sse._exceptions submodule (introduced in #975). SSEError is part of httpx-sse's public API — re-exported at the package top level and listed in __all__ in every release ≥0.4.0 — so this switches to the public path.
No behaviour change (same class object). Verified against httpx-sse 0.4.0 (the >=0.4 floor) through 0.4.3.
Types of changes
- Bug fix (non-breaking change which fixes an issue)
Checklist
- I have read the MCP Documentation
- My code follows the repository's style guidelines
- New and existing tests pass locally
- I have added appropriate error handling
- I have added or updated documentation as needed