Skip to content

ref(toxgen): Remove unused get_file_hash() and get_last_updated() helpers - #8173

Merged
alexander-alderman-webb merged 1 commit into
masterfrom
ref/toxgen-remove-unused-hash-helpers
Nov 3, 2026
Merged

alexander-alderman-webb merged 1 commit into
masterfrom
ref/toxgen-remove-unused-hash-helpers

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Description

Removes get_file_hash() and get_last_updated() from scripts/populate_tox/populate_tox.py. Nothing has called either of them for about a year.

#4072 (Feb 2025) added both for toxgen's --fail-on-changes mode. get_last_updated() read the last commit timestamp of tox.ini, so new releases after that point could be ignored. get_file_hash() hashed tox.ini before and after regeneration to spot manual edits. #4892 (Oct 2025, "Remove toxgen check") dropped fail_on_changes and removed every call to both helpers, but left the definitions behind.

Evidence

Why it's safe

  • This is dev tooling under scripts/. It isn't part of the published sentry_sdk package, so SDK users aren't affected.
  • The imports these helpers used (hashlib, subprocess, Path, Optional, datetime) are still used elsewhere in the script. timezone is still covered by the existing # noqa: F401 that keeps the commented-out CUTOFF example working.
  • scripts/generate-test-files.sh --only bottle still runs to completion. Its regenerated tox.ini and release caches only picked up new upstream releases, so I didn't commit them.

Issues

n/a

via automation sched_65eed06cc199036c2b13411096f412d4 · Run ID sched_65eed06cc199036c2b13411096f412d4:1793606400000.

--

View Session [Sentry]

@sentry-junior
sentry-junior Bot requested a review from a team as a code owner November 2, 2026 08:05
@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Coverage Results 📊

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

📊 Comparison with Base Branch

Metric Change
Total Tests —
Passed Tests 📈 +1
Failed Tests 📉 -1
Skipped Tests —

➖ Removed Tests (1)

View removed tests
  • test_profile_stops_when_segment_ends
    • File: tests.tracing.test_span_streaming

All tests are passing successfully.

✅ Patch coverage is 100.00% (no changed executable lines found; target 80%).
Project statement coverage is 90.32% (unchanged from base (7ad4e1a) to head (4a9ff1d)).

Coverage diff
@@            Coverage Diff             @@
##        master     #8173       +/-##
==========================================
  Coverage    90.32%    90.32%        —%
==========================================
  Files          203       203         —
  Tracked lines     26872     26872         —
  Branches     10044     10044         —
==========================================
  Hits         24272     24272         —
  Misses        2600      2600         —
  Partials      1520      1520         —

Generated by Coverage Action

@alexander-alderman-webb alexander-alderman-webb changed the title ref(toxgen): Remove unused get_file_hash and get_last_updated helpers ref(toxgen): Remove unused get_file_hash() and get_last_updated() helpers Nov 3, 2026
@alexander-alderman-webb
alexander-alderman-webb merged commit 84934fe into master Nov 3, 2026
172 checks passed
@alexander-alderman-webb
alexander-alderman-webb deleted the ref/toxgen-remove-unused-hash-helpers branch November 3, 2026 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant