Title: fix: isolate streamable HTTP POST errors by pragnyanramtha · Pull Request #2613 · modelcontextprotocol/python-sdk · GitHub
Open Graph Title: fix: isolate streamable HTTP POST errors by pragnyanramtha · Pull Request #2613 · modelcontextprotocol/python-sdk
X Title: fix: isolate streamable HTTP POST errors by pragnyanramtha · Pull Request #2613 · modelcontextprotocol/python-sdk
Description: Summary convert non-404 POST HTTP status failures into request-scoped JSON-RPC errors for JSON-RPC requests avoid synthesizing responses for notification/no-id messages add a regression test proving one failed concurrent POST request no longer cancels an unrelated sibling request Fixes #2604. This targets v1.x because the released 1.x branch still raises through response.raise_for_status() for POST HTTP errors. main already has equivalent scoped >=400 handling; this PR backports that behavior and adds the concurrency regression coverage for the reported failure mode. Validation uv run --frozen pytest tests/shared/test_streamable_http.py::test_streamable_http_client_http_error_does_not_cancel_concurrent_request uv run --frozen pytest tests/shared/test_streamable_http.py -> 52 passed uv run --frozen pytest tests/shared/test_streamable_http.py::test_streamable_http_client_http_error_does_not_cancel_concurrent_request tests/shared/test_streamable_http.py::test_streamable_http_client_session_termination tests/shared/test_streamable_http.py::test_streamable_http_client_session_termination_204 tests/client/test_notification_response.py::test_non_compliant_notification_response -> 4 passed uv run --frozen ruff check src/mcp/client/streamable_http.py tests/shared/test_streamable_http.py uv sync --frozen --all-extras --dev uv run --frozen pyright -> 0 errors git diff --check
Open Graph Description: Summary convert non-404 POST HTTP status failures into request-scoped JSON-RPC errors for JSON-RPC requests avoid synthesizing responses for notification/no-id messages add a regression test provi...
X Description: Summary convert non-404 POST HTTP status failures into request-scoped JSON-RPC errors for JSON-RPC requests avoid synthesizing responses for notification/no-id messages add a regression test provi...
Opengraph URL: https://github.com/modelcontextprotocol/python-sdk/pull/2613
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:018db325-382a-dc67-096b-1c95bb82c74d |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | B1A4:2AD22:7F769:AC197:6A61579A |
| html-safe-nonce | 657551cbcbe60fcbfcdf2f18ac0743cd9e266d2b3e3915809a5069fcfe08589a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMUE0OjJBRDIyOjdGNzY5OkFDMTk3OjZBNjE1NzlBIiwidmlzaXRvcl9pZCI6IjUxNTEyMzc1MjQzODA4MDA5MjIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 5ee3619b23dbc4d5cd0050e75bb985fdc9df9a9e1868de58458c80aac3fa27dd |
| hovercard-subject-tag | pull_request:3692949756 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/modelcontextprotocol/python-sdk/pull/2613/files |
| twitter:image | https://avatars.githubusercontent.com/u/196208154?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/196208154?s=400&v=4 |
| og:image:alt | Summary convert non-404 POST HTTP status failures into request-scoped JSON-RPC errors for JSON-RPC requests avoid synthesizing responses for notification/no-id messages add a regression test provi... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | c258d2b06b498220e3b94af28b26bbbf58f4203a6373725f779afcc867afd263 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/modelcontextprotocol/python-sdk git https://github.com/modelcontextprotocol/python-sdk.git |
| octolytics-dimension-user_id | 182288589 |
| octolytics-dimension-user_login | modelcontextprotocol |
| octolytics-dimension-repository_id | 862584018 |
| octolytics-dimension-repository_nwo | modelcontextprotocol/python-sdk |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 862584018 |
| octolytics-dimension-repository_network_root_nwo | modelcontextprotocol/python-sdk |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | bae60047c72c7890f36d34d78461f3453c546ee2 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width