| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:f8b990ad-eef6-c9fa-6a03-7538a31ccb5e |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | D4C2:E3C4F:4F57A8:672D1D:6B00D9FE |
| html-safe-nonce | f4c76dd9ca1f7648d28313b36ae7be4d3680dac5c8254f8f9c038a8339840bac |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENEMyOkUzQzRGOjRGNTdBODo2NzJEMUQ6NkIwMEQ5RkUiLCJ2aXNpdG9yX2lkIjoiNjEzMjk2MDAzNDg1MTcwNzM5MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 36b16b06be2d111f076f435d5875f617d282c0d59f1d0d1e346b1964ef8a7ece |
| hovercard-subject-tag | pull_request:3388135258 |
| 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 | ///pull_requests/show/files |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/getsentry/sentry-python/pull/5643/files |
| twitter:image | https://avatars.githubusercontent.com/u/224035503?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/224035503?s=400&v=4 |
| og:image:alt | Description
Run post-iterator steps in a finally block so they run even if the generator does not complete.
Issues
Reminders
Please add tests to validate your changes, and lint your code using t... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | a481f62a1e04c9b9bdcb5628230682c66d59006f5b13b080f79cba84a176905b |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/getsentry/sentry-python git https://github.com/getsentry/sentry-python.git |
| octolytics-dimension-user_id | 1396951 |
| octolytics-dimension-user_login | getsentry |
| octolytics-dimension-repository_id | 137814779 |
| octolytics-dimension-repository_nwo | getsentry/sentry-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 137814779 |
| octolytics-dimension-repository_network_root_nwo | getsentry/sentry-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 84c8c5cc25e2fb7f2308428458538436baecc6d2 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| Skip to content | https://github.com/getsentry/sentry-python/pull/5643/files#start-of-content |
| https://github.com/ |
| Sign in | https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-python%2Fpull%2F5643%2Ffiles |
| GitHubRepository hosting, code review, and collaboration | https://github.com/platform |
| CopilotAI coding agent for tasks, projects, and automated work | https://github.com/features/copilot |
| ActionsCI/CD and automation | https://github.com/features/actions |
| Code QualityQuality analysis, fixes, and enforcement | https://github.com/features/code-quality |
| CodespacesCloud development environments | https://github.com/features/codespaces |
| Code SecurityVulnerability detection and remediation | https://github.com/security/advanced-security/code-security |
| Secret ProtectionSecret scanning and leak prevention | https://github.com/security/advanced-security/secret-protection |
| All Features | https://github.com/features |
| Documentation | https://docs.github.com/en |
| Training | https://learn.github.com/skills |
| Certifications | https://learn.github.com/credentials |
| Build with Copilot | https://github.com/features/ai |
| Customize Copilot | https://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview |
| Integrations | https://github.com/marketplace |
| Trending repos | https://github.com/trending |
| GitHub Sponsors | https://github.com/open-source/sponsors |
| Developer articles | https://github.com/resources/articles |
| ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place. | https://github.blog/changelog/ |
| Enterprises | https://github.com/enterprise |
| Team | https://github.com/team |
| Startups | https://github.com/enterprise/startups |
| Nonprofits | https://github.com/solutions/industry/nonprofits |
| Healthcare | https://github.com/solutions/industry/healthcare |
| Financial services | https://github.com/solutions/industry/financial-services |
| Manufacturing | https://github.com/solutions/industry/manufacturing |
| Government | https://github.com/solutions/industry/government |
| See all industries | https://github.com/solutions/industry |
| Why GitHub | https://github.com/why-github |
| Customer Stories | https://github.com/customer-stories |
| Business insights | https://github.com/solutions/executive-insights |
| Trust Center | https://github.com/trust-center |
| GitHub Advanced SecurityEnterprise-grade code security | https://github.com/security/advanced-security |
| Copilot for businessEnterprise-grade AI features | https://github.com/features/copilot/copilot-business |
| Premium SupportEnterprise-grade 24/7 support | https://github.com/enterprise/premium-support |
| Documentation | https://docs.github.com/en |
| Resource center | https://github.com/resources |
| Blog | https://github.blog/ |
| Events & webinars | https://github.com/resources/events |
| Community Forum | https://github.com/orgs/community/discussions |
| Customer Stories | https://github.com/customer-stories |
| Integrations | https://github.com/marketplace |
| Customer support | https://help.github.com/ |
| Training | https://learn.github.com/skills |
| GitHub Status | https://www.githubstatus.com/ |
| About | https://github.com/about |
| Partners | https://github.com/partners |
| Changelog | https://github.blog/changelog/ |
| GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub. | https://githubuniverse.com/ |
| Pricing | https://github.com/pricing |
| Sign in | https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-python%2Fpull%2F5643%2Ffiles |
| Sign up | https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=getsentry%2Fsentry-python |
| Reload | https://github.com/getsentry/sentry-python/pull/5643/files |
| Reload | https://github.com/getsentry/sentry-python/pull/5643/files |
| Reload | https://github.com/getsentry/sentry-python/pull/5643/files |
| getsentry | https://github.com/getsentry |
| sentry-python | https://github.com/getsentry/sentry-python |
| Code | https://github.com/getsentry/sentry-python |
| Issues345 (345) | https://github.com/getsentry/sentry-python/issues |
| Pull requests42 (42) | https://github.com/getsentry/sentry-python/pulls |
| Discussions | https://github.com/getsentry/sentry-python/discussions |
| Actions | https://github.com/getsentry/sentry-python/actions |
| Security and quality2 (2) | https://github.com/getsentry/sentry-python/security |
| Insights | https://github.com/getsentry/sentry-python/insights |
| Sign up for GitHub
| https://github.com/signup?return_to=%2Fgetsentry%2Fsentry-python%2Fissues%2Fnew%2Fchoose |
| terms of service | https://docs.github.com/terms |
| privacy statement | https://docs.github.com/privacy |
| Sign in | https://github.com/login?return_to=%2Fgetsentry%2Fsentry-python%2Fissues%2Fnew%2Fchoose |
| alexander-alderman-webb | https://github.com/alexander-alderman-webb |
| master | https://github.com/getsentry/sentry-python/tree/master |
| webb/anthropic/handle-generator-exit | https://github.com/getsentry/sentry-python/tree/webb/anthropic/handle-generator-exit |
|
Conversation
9
| https://github.com/getsentry/sentry-python/pull/5643 |
|
Commits
32
| https://github.com/getsentry/sentry-python/pull/5643/commits |
|
Checks
158
| https://github.com/getsentry/sentry-python/pull/5643/checks |
|
Files changed
| https://github.com/getsentry/sentry-python/pull/5643/files |
| Please reload this page | https://github.com/getsentry/sentry-python/pull/5643/files |
|
fix(anthropic): Close span on GeneratorExit
| https://github.com/getsentry/sentry-python/pull/5643/files#top |
|
Show all changes
32 commits
| https://github.com/getsentry/sentry-python/pull/5643/files |
|
4cf7e5a
ref(anthropic): Factor out streamed result handling
alexander-alderman-webb Feb 27, 2026
| https://github.com/getsentry/sentry-python/pull/5643/commits/4cf7e5ae1a9e6bb709ee0af266125daff6a1b73c |
|
61a4cd0
ref(anthropic): Skip accumulation logic for unexpected types in strea…
alexander-alderman-webb Feb 27, 2026
| https://github.com/getsentry/sentry-python/pull/5643/commits/61a4cd0c1e3a24f5a1a421f369d7d7d242edc7ef |
|
6cdab16
.
alexander-alderman-webb Feb 27, 2026
| https://github.com/getsentry/sentry-python/pull/5643/commits/6cdab1673211cae9482d3ba93b50ca76dabb8865 |
|
db5dbb9
.
alexander-alderman-webb Feb 27, 2026
| https://github.com/getsentry/sentry-python/pull/5643/commits/db5dbb921f70944c46d65dbfe870fad4a8cae565 |
|
091506c
Merge branch 'webb/anthropic/separate-output-handling' into webb/anth…
alexander-alderman-webb Feb 27, 2026
| https://github.com/getsentry/sentry-python/pull/5643/commits/091506c27de113ced64117f0ae7e3c9f98ab828d |
|
d47b64d
.
alexander-alderman-webb Feb 27, 2026
| https://github.com/getsentry/sentry-python/pull/5643/commits/d47b64dc29e09f59ca63de2d2423e2359502c64b |
|
384351f
remove duplicate import
alexander-alderman-webb Feb 27, 2026
| https://github.com/getsentry/sentry-python/pull/5643/commits/384351f3ca05dc2981210d0f9d9f83dfb0c63303 |
|
55d5c27
.
alexander-alderman-webb Feb 27, 2026
| https://github.com/getsentry/sentry-python/pull/5643/commits/55d5c27aa54a9f3285e86489ca49e88a63dc8890 |
|
fd84837
simplify
alexander-alderman-webb Feb 27, 2026
| https://github.com/getsentry/sentry-python/pull/5643/commits/fd84837d4e335e85924aedb7108364aa66df3446 |
|
53859e4
.
alexander-alderman-webb Mar 10, 2026
| https://github.com/getsentry/sentry-python/pull/5643/commits/53859e4762f4bec7e6d411738398740d59a2137e |
|
e2d6d78
remove unused import
alexander-alderman-webb Mar 10, 2026
| https://github.com/getsentry/sentry-python/pull/5643/commits/e2d6d78204d619e9ae6f96215a072e421abb5d14 |
|
a01f7c1
add docstring
alexander-alderman-webb Mar 10, 2026
| https://github.com/getsentry/sentry-python/pull/5643/commits/a01f7c1698aeed44085ef2f6b73c2c9546b8649d |
|
7837439
add return
alexander-alderman-webb Mar 10, 2026
| https://github.com/getsentry/sentry-python/pull/5643/commits/7837439b46c89287d1d82380e5696211dc7d68d5 |
|
0e06f49
remove return statement
alexander-alderman-webb Mar 10, 2026
| https://github.com/getsentry/sentry-python/pull/5643/commits/0e06f49dfc34fdbd0ce5e37b6f92af680730b277 |
|
c396a32
merge
alexander-alderman-webb Mar 10, 2026
| https://github.com/getsentry/sentry-python/pull/5643/commits/c396a3229405ad0af9e04e78b6127bbd81f1902b |
|
d4022c5
Merge branch 'master' into webb/anthropic/only-raw-message-stream-events
alexander-alderman-webb Mar 10, 2026
| https://github.com/getsentry/sentry-python/pull/5643/commits/d4022c5bffa7ce9d6fb0d6c4e941c2183fd508a2 |
|
4e3d1db
Merge branch 'master' into webb/anthropic/separate-output-handling
alexander-alderman-webb Mar 10, 2026
| https://github.com/getsentry/sentry-python/pull/5643/commits/4e3d1db799625804bf214438200ea056bee8076d |
|
531c6a8
Merge branch 'webb/anthropic/separate-output-handling' into webb/anth…
alexander-alderman-webb Mar 10, 2026
| https://github.com/getsentry/sentry-python/pull/5643/commits/531c6a8b8a945c4e3276b554a536ab967a720305 |
|
917b8d4
.
alexander-alderman-webb Mar 11, 2026
| https://github.com/getsentry/sentry-python/pull/5643/commits/917b8d48752c26b5deab09f83b6e61ca0fe82007 |
|
aa6e58a
.
alexander-alderman-webb Mar 11, 2026
| https://github.com/getsentry/sentry-python/pull/5643/commits/aa6e58ae700af254e9f42740333d08436367ebe1 |
|
bd00e4e
.
alexander-alderman-webb Mar 11, 2026
| https://github.com/getsentry/sentry-python/pull/5643/commits/bd00e4eeb2ac5ca25569f87f0b52f508589e3330 |
|
a6da66e
merge
alexander-alderman-webb Mar 11, 2026
| https://github.com/getsentry/sentry-python/pull/5643/commits/a6da66e669810c6345f4b70b176c653c6b30796c |
|
c988c26
fix type
alexander-alderman-webb Mar 11, 2026
| https://github.com/getsentry/sentry-python/pull/5643/commits/c988c263421cd4c6008251c2921237d835d8baa3 |
|
3009ba6
Merge branch 'webb/anthropic/separate-output-handling' into webb/anth…
alexander-alderman-webb Mar 11, 2026
| https://github.com/getsentry/sentry-python/pull/5643/commits/3009ba6d7be473a0ff22925e18e45b8d1752cbc5 |
|
9eff33e
fix(anthropic): Close span on GeneratorExit
alexander-alderman-webb Mar 12, 2026
| https://github.com/getsentry/sentry-python/pull/5643/commits/9eff33ea5505741e6edbb105419923ea0939c868 |
|
5e3cb5f
revert conftest
alexander-alderman-webb Mar 12, 2026
| https://github.com/getsentry/sentry-python/pull/5643/commits/5e3cb5f28730a88739910432bd5d50072049ec97 |
|
ab5e3bb
Merge branch 'master' into webb/anthropic/separate-output-handling
alexander-alderman-webb Mar 12, 2026
| https://github.com/getsentry/sentry-python/pull/5643/commits/ab5e3bb0da8e64c30575ef6ed56e4bcb9a093c9c |
|
571db4e
Merge branch 'webb/anthropic/separate-output-handling' into webb/anth…
alexander-alderman-webb Mar 12, 2026
| https://github.com/getsentry/sentry-python/pull/5643/commits/571db4e0384e1a099c2c23e049d5f350686a8d56 |
|
804db65
Merge branch 'webb/anthropic/only-raw-message-stream-events' into web…
alexander-alderman-webb Mar 12, 2026
| https://github.com/getsentry/sentry-python/pull/5643/commits/804db65c38f1cbabaf9ae73d6975088547b916f5 |
|
2a0e5e9
merge master
alexander-alderman-webb Mar 13, 2026
| https://github.com/getsentry/sentry-python/pull/5643/commits/2a0e5e9b022b942b7db0c09f7ed8d6e56cbff376 |
|
f36dd5d
keep comment
alexander-alderman-webb Mar 13, 2026
| https://github.com/getsentry/sentry-python/pull/5643/commits/f36dd5dc4d0b0a8ac9e000c708ec13b91c956b06 |
|
0da2362
wrap finally in capture internal exceptions
alexander-alderman-webb Mar 13, 2026
| https://github.com/getsentry/sentry-python/pull/5643/commits/0da2362319bfb09fda9b8a77e7c5209aa34afbcd |
|
Clear filters
| https://github.com/getsentry/sentry-python/pull/5643/files |
| Please reload this page | https://github.com/getsentry/sentry-python/pull/5643/files |
| Please reload this page | https://github.com/getsentry/sentry-python/pull/5643/files |
|
| https://github.com/getsentry/sentry-python/blob/master/.github/CODEOWNERS#L1 |
| sentry_sdk/integrations/anthropic.py | https://github.com/getsentry/sentry-python/pull/5643/files#diff-2fe73f39bab33821a7af1fccb0fd22b943b931b2cbf8d13aead2784b3cd21e05 |
|
View file
| https://github.com/getsentry/sentry-python/blob/0da2362319bfb09fda9b8a77e7c5209aa34afbcd/sentry_sdk/integrations/anthropic.py |
|
Open in desktop
| https://desktop.github.com |
| https://github.co/hiddenchars |
| https://github.com/getsentry/sentry-python/pull/5643/{{ revealButtonHref }} |
|
| https://github.com/getsentry/sentry-python/pull/5643/files#diff-2fe73f39bab33821a7af1fccb0fd22b943b931b2cbf8d13aead2784b3cd21e05 |
|
| https://github.com/getsentry/sentry-python/pull/5643/files#diff-2fe73f39bab33821a7af1fccb0fd22b943b931b2cbf8d13aead2784b3cd21e05 |
|
| https://github.com/getsentry/sentry-python/pull/5643/files#diff-2fe73f39bab33821a7af1fccb0fd22b943b931b2cbf8d13aead2784b3cd21e05 |
| Please reload this page | https://github.com/getsentry/sentry-python/pull/5643/files |
|
| https://github.com |
| Terms | https://docs.github.com/site-policy/github-terms/github-terms-of-service |
| Privacy | https://docs.github.com/site-policy/privacy-policies/github-privacy-statement |
| Security | https://github.com/security |
| Status | https://www.githubstatus.com/ |
| Community | https://github.community/ |
| Docs | https://docs.github.com/ |
| Contact | https://support.github.com?tags=dotcom-footer |