Skip to content

ref(pyreqwest): Drop support for send_default_pii - #7698

Merged
sentrivana merged 1 commit into
major/3.0from
ivana/major/drop-pii-pyreqwest
Sep 24, 2026
Merged

sentrivana merged 1 commit into
major/3.0from
ivana/major/drop-pii-pyreqwest

Conversation

@sentrivana

Copy link
Copy Markdown
Collaborator

@linear-code

linear-code Bot commented Sep 24, 2026

Copy link
Copy Markdown

PY-2870

@sentrivana
sentrivana marked this pull request as ready for review September 24, 2026 10:01
@sentrivana
sentrivana requested a review from a team as a code owner September 24, 2026 10:01
@github-actions

Copy link
Copy Markdown
Contributor

Codecov Results 📊

✅ 63080 passed | ❌ 1 failed | ⏭️ 2883 skipped | Total: 65964 | Pass Rate: 95.63% | Execution Time: 177m 40s

📊 Comparison with Base Branch

Metric Change
Total Tests 📉 -68029
Passed Tests 📉 -63759
Failed Tests 📉 -1
Skipped Tests 📉 -4269

➕ New Tests (1)

View new tests
  • test_input_attributes_nonstreaming_chat[True-messages0-expected_system_instructions0-expected_input_messages0]
    • File: tests.integrations.mistral.test_mistral
    • Status: ❌ Failing

➖ Removed Tests (1)

View removed tests
  • test_binary_content_encoding_mixed_content[False-False]
    • File: tests.integrations.litellm.test_litellm

❌ Failed Tests

test_input_attributes_nonstreaming_chat[True-messages0-expected_system_instructions0-expected_input_messages0]

File: tests.integrations.mistral.test_mistral
Suite: py3.10-mistral-v2.0.5
Error: KeyError: 140377645912512

Stack Trace
tests/integrations/mistral/test_mistral.py:380: in test_input_attributes_nonstreaming_chat
    sentry_init(
tests/conftest.py:349: in inner
    client = sentry_sdk.Client(*a, **kw)
sentry_sdk/client.py:278: in __init__
    self._init_impl()
sentry_sdk/client.py:428: in _init_impl
    self.integrations = setup_integrations(
sentry_sdk/integrations/__init__.py:216: in setup_integrations
    for integration_cls in iter_default_integrations(
sentry_sdk/integrations/__init__.py:44: in iter_default_integrations
    yield getattr(import_module(module), cls)
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1050: in _gcd_import
    ???
<frozen importlib._bootstrap>:1024: in _find_and_load
    ???
<frozen importlib._bootstrap>:171: in __enter__
    ???
<frozen importlib._bootstrap>:123: in acquire
    ???
E   KeyError: 140377645912512

✅ Patch coverage is 100.00%. Project has 2069 uncovered lines.
❌ Project coverage is 90.15%. Comparing base (43b3bcd) to head (454afaa).

Coverage diff
@@            Coverage Diff             @@
##        master       #PR       +/-##
==========================================
- Coverage    90.22%    90.15%    -0.07%
==========================================
  Files          194       178       -16
  Lines        25997     20999     -4998
  Branches      9662      7582     -2080
==========================================
+ Hits         23454     18930     -4524
- Misses        2543      2069      -474
- Partials      1451      1196      -255

Generated by Codecov Action

@sentrivana
sentrivana merged commit 3d307be into major/3.0 Sep 24, 2026
145 of 147 checks passed
@sentrivana
sentrivana deleted the ivana/major/drop-pii-pyreqwest branch September 24, 2026 11:03
sentrivana added a commit that referenced this pull request Oct 29, 2026
### Description

Removes `get_url_attributes_legacy()` from
`sentry_sdk/tracing_utils.py`. Nothing on `major/3.0` calls it anymore.

Its callers were the outgoing HTTP client integrations (pyreqwest,
httpx, httpx2). It handled their old `send_default_pii` behavior. When
#7698, #7819 and #7830 dropped `send_default_pii` support from those
integrations, each one removed its calls and switched to
`get_url_attributes()`. The legacy helper was left behind.

**Evidence**
- On `major/3.0`, `git grep -w get_url_attributes_legacy` matches only
the definition. There are no callers in `sentry_sdk`, `tests`, `scripts`
or `docs`.
- No open PR mentions it. The function doesn't exist on `master`, so a
future `master` → `major/3.0` merge can't bring it back.

`get_url_attributes()` and
`_apply_data_collection_filtering_to_query_string` are still used, so
they stay.

#### 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>
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