Title: fix: chain exceptions with `from` in 12 remaining raise sites by blackwell-systems · Pull Request #2565 · modelcontextprotocol/python-sdk · GitHub
Open Graph Title: fix: chain exceptions with `from` in 12 remaining raise sites by blackwell-systems · Pull Request #2565 · modelcontextprotocol/python-sdk
X Title: fix: chain exceptions with `from` in 12 remaining raise sites by blackwell-systems · Pull Request #2565 · modelcontextprotocol/python-sdk
Description: Summary Follow-up to #2542. Adds from to 12 remaining raise statements inside except blocks that discard the original exception chain. Fixes #2564 Changes 7 files, 12 sites. Each change adds from e (or from exc) to an existing raise inside an except block: client/session.py: ValidationError, SchemaError re-raised as RuntimeError client/auth/utils.py: ValidationError re-raised as OAuthRegistrationError, OAuthTokenError server/auth/middleware/client_auth.py: ValueError/UnicodeDecodeError/binascii.Error re-raised as AuthenticationError server/mcpserver/resources/types.py: 4 sites in FunctionResource, FileResource, DirectoryResource server/mcpserver/resources/resource_manager.py: 1 site server/mcpserver/resources/templates.py: 1 site server/mcpserver/prompts/base.py: 2 sites (also adds as e binding on line 184 which was missing) How Has This Been Tested? All changes are purely additive (from clause) and do not alter control flow or exception types. Existing tests pass unchanged: 1172 passed, 98 skipped, 0 failures Ruff and pyright pass with zero errors on all changed files.
Open Graph Description: Summary Follow-up to #2542. Adds from to 12 remaining raise statements inside except blocks that discard the original exception chain. Fixes #2564 Changes 7 files, 12 sites. Each change adds from e...
X Description: Summary Follow-up to #2542. Adds from to 12 remaining raise statements inside except blocks that discard the original exception chain. Fixes #2564 Changes 7 files, 12 sites. Each change adds from e...
Opengraph URL: https://github.com/modelcontextprotocol/python-sdk/pull/2565
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:fa083d9b-c3f4-b9c5-c762-bdcfbd7769b8 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | E84C:9B177:6AFD10:9947A1:6A59E98F |
| html-safe-nonce | 2dfb1feed888802ee8b06a8ea42b7a99e78fd667810c0ba6b4f0a981f68af426 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFODRDOjlCMTc3OjZBRkQxMDo5OTQ3QTE6NkE1OUU5OEYiLCJ2aXNpdG9yX2lkIjoiODM1OTM1NzM0NjA1ODIwMTQ4NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 5d94aed810549e9418d6e8ac8c4173cbb4e840283c2e3b7dd6e692cf4ac75836 |
| hovercard-subject-tag | pull_request:3651805657 |
| 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/2565/files |
| twitter:image | https://avatars.githubusercontent.com/u/236632453?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/236632453?s=400&v=4 |
| og:image:alt | Summary Follow-up to #2542. Adds from to 12 remaining raise statements inside except blocks that discard the original exception chain. Fixes #2564 Changes 7 files, 12 sites. Each change adds from e... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | ba3976babb66479b1c943a8edc0777d96157da48fadc0161f9ddb219deee8353 |
| 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 | 32bf0b7849e1b6561059cca2cb03568251960859 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width