Title: Fix completed request cancellation cleanup by FU-max-boop · Pull Request #2624 · modelcontextprotocol/python-sdk · GitHub
Open Graph Title: Fix completed request cancellation cleanup by FU-max-boop · Pull Request #2624 · modelcontextprotocol/python-sdk
X Title: Fix completed request cancellation cleanup by FU-max-boop · Pull Request #2624 · modelcontextprotocol/python-sdk
Description: Summary suppress the cancellation raised by CancelScope.__exit__ only after RequestResponder has already completed and sent a response keep incomplete responder cancellations propagating normally add focused regression coverage for the completed vs incomplete cleanup paths Fixes #2610. Validation uv run pytest tests/shared/test_session.py::test_request_cancellation tests/shared/test_session.py::test_completed_request_responder_suppresses_cancel_scope_exit tests/shared/test_session.py::test_incomplete_request_responder_propagates_cancel_scope_exit tests/server/test_cancel_handling.py -q uv run ruff format --check src/mcp/shared/session.py tests/shared/test_session.py uv run ruff check src/mcp/shared/session.py tests/shared/test_session.py uv run pyright src/mcp/shared/session.py tests/shared/test_session.py git diff --check
Open Graph Description: Summary suppress the cancellation raised by CancelScope.__exit__ only after RequestResponder has already completed and sent a response keep incomplete responder cancellations propagating normally ...
X Description: Summary suppress the cancellation raised by CancelScope.__exit__ only after RequestResponder has already completed and sent a response keep incomplete responder cancellations propagating normally ...
Opengraph URL: https://github.com/modelcontextprotocol/python-sdk/pull/2624
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:04855569-7911-45fb-596a-f59de0d17e58 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 8B7C:70EA8:17D372C:21F0BA3:6A5A3481 |
| html-safe-nonce | 2fbae2cc55d54460afbe87af4baff96b9195a220b07ee15bfe6d94ad8ced9ea2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QjdDOjcwRUE4OjE3RDM3MkM6MjFGMEJBMzo2QTVBMzQ4MSIsInZpc2l0b3JfaWQiOiI0NzgxMjYzMDk2MTQ2OTU1NTMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 1e25a257178b9de772ad547f438974bf1f1b767c795eb13df762e8417295a4ee |
| hovercard-subject-tag | pull_request:3696709144 |
| 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/2624/files |
| twitter:image | https://avatars.githubusercontent.com/u/214359569?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/214359569?s=400&v=4 |
| og:image:alt | Summary suppress the cancellation raised by CancelScope.__exit__ only after RequestResponder has already completed and sent a response keep incomplete responder cancellations propagating normally ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 19c67ad7579d2401ff06e88a32ef45460fbb40fab3191c7f7582d5e166f326fc |
| 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 | a3dea2706161c733403beb02e41d5765d358d44e |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width