Skip to content

fix(scope): Drop None user attribute values in set_user#6692

Open
ericapisani wants to merge 1 commit into
masterfrom
py-2567-do-not-set-none-user-data
Open

fix(scope): Drop None user attribute values in set_user#6692
ericapisani wants to merge 1 commit into
masterfrom
py-2567-do-not-set-none-user-data

Conversation

@ericapisani

@ericapisani ericapisani commented Jun 29, 2026

Copy link
Copy Markdown
Member

set_user previously stored None values verbatim in the user dict, which would send null attributes to Sentry. Now any key with a None value is filtered out before the dict is stored on the scope, so only meaningful user attributes are captured in events.

Fixes PY-2567
Fixes #6689

When set_user is called with a dict, any keys with None values are
now filtered out before storing on the scope. This prevents None
user attributes from being sent to Sentry.
@linear-code

linear-code Bot commented Jun 29, 2026

Copy link
Copy Markdown

PY-2567

@ericapisani ericapisani marked this pull request as ready for review June 29, 2026 16:27
@ericapisani ericapisani requested a review from a team as a code owner June 29, 2026 16:27
@github-actions

Copy link
Copy Markdown
Contributor

Codecov Results 📊

89913 passed | ⏭️ 6297 skipped | Total: 96210 | Pass Rate: 93.45% | Execution Time: 310m 19s

📊 Comparison with Base Branch

Metric Change
Total Tests 📈 +30
Passed Tests 📈 +30
Failed Tests
Skipped Tests

All tests are passing successfully.

✅ Patch coverage is 100.00%. Project has 2442 uncovered lines.
❌ Project coverage is 89.75%. Comparing base (base) to head (head).

Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
- Coverage    89.78%    89.75%    -0.03%
==========================================
  Files          192       192         —
  Lines        23809     23814        +5
  Branches      8218      8224        +6
==========================================
+ Hits         21375     21372        -3
- Misses        2434      2442        +8
- Partials      1346      1347        +1

Generated by Codecov 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.

set_user stringifies None dict values

1 participant