Skip to content

[v1.x] refactor: import SSEError from httpx_sse public API#2561

Merged
maxisbey merged 1 commit intov1.xfrom
backport-v1.x/sse-import-public-api
May 8, 2026
Merged

[v1.x] refactor: import SSEError from httpx_sse public API#2561
maxisbey merged 1 commit intov1.xfrom
backport-v1.x/sse-import-public-api

Conversation

@maxisbey
Copy link
Copy Markdown
Contributor

@maxisbey maxisbey commented May 8, 2026

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

AI Disclaimer

Backport of #2560.

`SSEError` is re-exported at the `httpx_sse` package top level and
listed in `__all__` in every release >=0.4.0; the `_exceptions`
submodule is private. Importing via the public path avoids breakage if
httpx-sse reorganises its internals.

No behaviour change (same class object).

Github-Issue: #2543
@maxisbey maxisbey marked this pull request as ready for review May 8, 2026 14:03
@maxisbey maxisbey enabled auto-merge (squash) May 8, 2026 16:33
Copy link
Copy Markdown
Contributor

@bhosmer-ant bhosmer-ant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean backport of #2560v1.x has the same httpx-sse>=0.4 floor and SSEError is public from 0.4.0 onward, so this is safe here too.


Generated by Claude Code

@maxisbey maxisbey merged commit 77431eb into v1.x May 8, 2026
22 checks passed
@maxisbey maxisbey deleted the backport-v1.x/sse-import-public-api branch May 8, 2026 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants