GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — ref(sessions): Remove unused TERMINAL_SESSION_STATES constant by sentry-junior[bot] · Pull Request #8151 · getsentry/sentry-python

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

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 feat: Add envelope abstraction and session tracking #627 (added) and feat: Support pre-aggregated sessions #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

via Ivana Kellyer.

--

View Junior Session [Sentry]

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@sentry-junior @sentrivana
ref(sessions): Remove unused TERMINAL_SESSION_STATES constant
583ac5d
Co-Authored-By: Ivana Kellyer <[email protected]>
@sentry-junior
sentry-junior Bot requested a review from a team as a code owner October 29, 2026 10:46
sentrivana
sentrivana approved these changes Oct 29, 2026
View reviewed changes
@github-actions

github-actions Bot commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

Coverage Results 📊

✅ 136856 passed | ⏭️ 7456 skipped | Total: 144312 | Pass Rate: 94.83% | Execution Time: 447m 26s

📊 Comparison with Base Branch

Metric Change
Total Tests —
Passed Tests —
Failed Tests —
Skipped Tests —

✨ Test counts unchanged from base.

All tests are passing successfully.

✅ Patch coverage is 100.00% (no changed executable lines found; target 80%).
Project statement coverage is 90.31% (up 0.01 percentage points from base (825ff97) to head (583ac5d)).

Files with missing lines (1)
File Coverage % Lines
sentry_sdk/sessions.py 90.91% ⚠️ 12 Missing and 9 partials
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        -2

Generated by Coverage Action

sentry-junior[bot] reacted with eyes emoji
All reactions
  • 👀 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@sentrivana
sentrivana merged commit 7ad4e1a into master Oct 29, 2026
172 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@sentrivana
sentrivana deleted the ivana/remove-terminal-session-states branch October 29, 2026 11:05
This was referenced Nov 4, 2026
publish: getsentry/[email protected] getsentry/publish#10182
Closed
publish: getsentry/[email protected] getsentry/publish#10240
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@sentrivana sentrivana sentrivana approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@sentrivana
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.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.