Title: Fix hanging on streams when stdio_client exiting by LionNatsu · Pull Request #559 · modelcontextprotocol/python-sdk · GitHub
Open Graph Title: Fix hanging on streams when stdio_client exiting by LionNatsu · Pull Request #559 · modelcontextprotocol/python-sdk
X Title: Fix hanging on streams when stdio_client exiting by LionNatsu · Pull Request #559 · modelcontextprotocol/python-sdk
Description: Triggers a TaskGroup cancel after reaching the finally code block. Motivation and Context stdin_writer in the task group hangs when pressing Ctrl+c. Now we explicitly close the streams blocking. How Has This Been Tested? Tested in a new simple no-op test and a real Uvicorn Starlette application. Types of changes Bug fix (non-breaking change which fixes an issue) New feature (non-breaking change which adds functionality) Breaking change (fix or feature that would cause existing functionality to change) Documentation update 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
Open Graph Description: Triggers a TaskGroup cancel after reaching the finally code block. Motivation and Context stdin_writer in the task group hangs when pressing Ctrl+c. Now we explicitly close the streams blocking. Ho...
X Description: Triggers a TaskGroup cancel after reaching the finally code block. Motivation and Context stdin_writer in the task group hangs when pressing Ctrl+c. Now we explicitly close the streams blocking. Ho...
Opengraph URL: https://github.com/modelcontextprotocol/python-sdk/pull/559
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:affd3226-bdee-355f-687d-9099ffa0cfb9 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 9376:25C726:D819C6:136620E:6A5A00AF |
| html-safe-nonce | bab0288d3d9b760e82e8f85a5287d7ccfb0530c852fb61c865e8029748363cd5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5Mzc2OjI1QzcyNjpEODE5QzY6MTM2NjIwRTo2QTVBMDBBRiIsInZpc2l0b3JfaWQiOiIxOTc2NTc0MTIzNTQ4NzM3NzExIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | dc7f6cb483a75173a5244bd53f47c84736abc3526979a2beaf513b20d9f8ad85 |
| hovercard-subject-tag | pull_request:2472881573 |
| 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/559/files |
| twitter:image | https://avatars.githubusercontent.com/u/6694582?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/6694582?s=400&v=4 |
| og:image:alt | Triggers a TaskGroup cancel after reaching the finally code block. Motivation and Context stdin_writer in the task group hangs when pressing Ctrl+c. Now we explicitly close the streams blocking. Ho... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4d3f961cfc83a4348ee5be7691cf4ae3515aab3ef5200c13a7e41b048125fb61 |
| 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 | ac4d28603af300ac851b62521abb878ab5d3319a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width