Skip to content

ref(starlette): Remove unused _serialize_request_body_data helper - #8146

Merged
sentrivana merged 1 commit into
masterfrom
ref/starlette-remove-unused-serialize-helper
Oct 29, 2026
Merged

sentrivana merged 1 commit into
masterfrom
ref/starlette-remove-unused-serialize-helper

Conversation

@sentry-junior

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

Copy link
Copy Markdown
Contributor

Removes _serialize_request_body_data from sentry_sdk/integrations/starlette.py. Nothing calls it.

It was added in #6136 to serialize the request body for the segment span under span streaming. #6286 changed the FastAPI path to serialize the cached request._json / request._form directly and removed the only call site (_serialize_request_body_data(info["data"])). The definition stayed behind.

Why it's safe:

  • The underscore-prefixed name doesn't appear anywhere else in the repo: no references in sentry_sdk/, tests/, scripts/, or docs.
  • None of the open PRs use it.
  • The module still uses the json and AnnotatedValue imports elsewhere, so this change doesn't remove any imports.
  • Users see no change in behavior or public API.

via automation sched_65eed06cc199036c2b13411096f412d4 · Run ID sched_65eed06cc199036c2b13411096f412d4:1793267486380.

--

View Junior Session [Sentry]

@sentry-junior
sentry-junior Bot requested a review from a team as a code owner October 29, 2026 09:55
@sentrivana
sentrivana enabled auto-merge (squash) October 29, 2026 09:57
@sentrivana
sentrivana merged commit c44f1f2 into master Oct 29, 2026
170 checks passed
@sentrivana
sentrivana deleted the ref/starlette-remove-unused-serialize-helper branch October 29, 2026 10:08
@github-actions

Copy link
Copy Markdown
Contributor

Coverage Results 📊

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

📊 Comparison with Base Branch

Metric Change
Total Tests 📈 +251
Passed Tests 📈 +137
Failed Tests —
Skipped Tests 📈 +114

All tests are passing successfully.

✅ Patch coverage is 100.00% (no changed executable lines found; target 80%).
Project statement coverage is 90.32% (up 0.04 percentage points from base (63707d7) to head (127d2cf)).

Files with missing lines (1)
File Coverage % Lines
sentry_sdk/integrations/starlette.py 93.61% ⚠️ 29 Missing and 30 partials
Coverage diff
@@            Coverage Diff             @@
##        master     #8146       +/-##
==========================================
+ Coverage    90.28%    90.32%    +0.04%
==========================================
  Files          203       203         —
  Tracked lines     26883     26877        -6
  Branches     10046     10044        -2
==========================================
+ Hits         24272     24276        +4
+ Misses        2611      2601       -10
- Partials      1518      1520        +2

Generated by Coverage Action

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.

2 participants