Skip to content

Commit 7ad4e1a

Browse files
ref(sessions): Remove unused TERMINAL_SESSION_STATES constant (#8151)
### Description Removes the module-level `TERMINAL_SESSION_STATES` tuple from `sentry_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()`, `SessionFlusher` aggregation) compares against the status literals directly. **Evidence** - `git grep TERMINAL_SESSION_STATES` across the whole repo matches only the definition. - `git log -G TERMINAL_SESSION_STATES` shows only #627 (added) and #985 (moved). - No open PR or issue mentions it. **Why it's safe** - It's a plain constant in an internal module. It's not re-exported from `sentry_sdk` and doesn't appear in `docs/`, `CHANGELOG.md` or `MIGRATION_GUIDE.md`. - It was never read at runtime, so behavior doesn't change. #### Issues n/a <!-- junior-request-attribution:start --> via **Ivana Kellyer**. <!-- junior-request-attribution:end --> <!-- junior-session-footer:start --> <!-- junior-conversation-id:slack%3AC0BTREZTS2Z%3A1793270559.842119 --> -- [View Junior Session](https://junior-prod.sentry.dev/conversations/slack%3AC0BTREZTS2Z%3A1793270559.842119) [[Sentry]](https://sentry.sentry.io/explore/conversations/slack%3AC0BTREZTS2Z%3A1793270559.842119/?project=4510944073809921) <!-- junior-session-footer:end --> Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> Co-authored-by: Ivana Kellyer <ivana.kellyer@sentry.io>
1 parent cc257a4 commit 7ad4e1a

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

‎sentry_sdk/sessions.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,6 @@ def track_session(
132132
scope.end_session()
133133

134134

135-
TERMINAL_SESSION_STATES = ("exited", "abnormal", "crashed")
136135
MAX_ENVELOPE_ITEMS = 100
137136

138137

0 commit comments

Comments
 (0)