Repository navigation
ref(sessions): Remove unused TERMINAL_SESSION_STATES constant - #8151
Merged
Merged
Conversation
Co-Authored-By: Ivana Kellyer <ivana.kellyer@sentry.io>
sentrivana
approved these changes
Oct 29, 2026
Contributor
Coverage Results 📊✅ 136856 passed | ⏭️ 7456 skipped | Total: 144312 | Pass Rate: 94.83% | Execution Time: 447m 26s 📊 Comparison with Base Branch
✨ Test counts unchanged from base. All tests are passing successfully. ✅ Patch coverage is 100.00% (no changed executable lines found; target 80%). Files with missing lines (1)
Coverage diff@@ Coverage Diff @@
## master #8151 +/-##
==========================================
+ Coverage 90.30% 90.31% +0.01%
==========================================
Files 203 203 —
Tracked lines 26873 26872 -1
Branches 10044 10044 —
==========================================
+ Hits 24266 24267 +1
+ Misses 2607 2605 -2
+ Partials 1520 1518 -2Generated by Coverage Action |
This was referenced Nov 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Removes the module-level
TERMINAL_SESSION_STATEStuple fromsentry_sdk/sessions.py. It has never been read anywhere.#627 (Mar 2020) added it with the original session tracking code, and #985 (Feb 2021) moved it a few lines down. Neither change, nor any other commit, added a use of it. Session status handling (
Session.close(),SessionFlusheraggregation) compares against the status literals directly.Evidence
git grep TERMINAL_SESSION_STATESacross the whole repo matches only the definition.git log -G TERMINAL_SESSION_STATESshows only feat: Add envelope abstraction and session tracking #627 (added) and feat: Support pre-aggregated sessions #985 (moved).Why it's safe
sentry_sdkand doesn't appear indocs/,CHANGELOG.mdorMIGRATION_GUIDE.md.Issues
n/a
via Ivana Kellyer.
--
View Junior Session [Sentry]