Skip to content

ref: Unify warnings (warnings.warn for deprecations, logging.warning for everything else) - #7268

Open
sentrivana wants to merge 3 commits into
major/3.0from
ivana/major/warnings-revamp
Open

ref: Unify warnings (warnings.warn for deprecations, logging.warning for everything else)#7268
sentrivana wants to merge 3 commits into
major/3.0from
ivana/major/warnings-revamp

Conversation

@sentrivana

@sentrivana sentrivana commented Aug 27, 2026

Copy link
Copy Markdown
Contributor
  • Add a helper to use for deprecation warnings, specifically, that uses warnings.warn()
  • For everything but deprecation warnings, use logger.warning()

Closes https://linear.app/getsentry/issue/PY-1934/use-warningswarn-for-deprecations-and-loggerwarning-for-everything

@github-actions

github-actions Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Codecov Results 📊

110964 passed | ⏭️ 5428 skipped | Total: 116392 | Pass Rate: 95.34% | Execution Time: 385m 6s

📊 Comparison with Base Branch

Metric Change
Total Tests 📉 -8635
Passed Tests 📉 -7331
Failed Tests
Skipped Tests 📉 -1304

All tests are passing successfully.

❌ Patch coverage is 65.00%. Project has 2256 uncovered lines.
✅ Project coverage is 90.55%. Comparing base (base) to head (head).

Files with missing lines (8)
File Patch % Lines
sentry_sdk/tracing_utils.py 0.00% ⚠️ 4 Missing
sentry_sdk/scope.py 50.00% ⚠️ 3 Missing
sentry_sdk/client.py 66.67% ⚠️ 2 Missing
sentry_sdk/debug.py 50.00% ⚠️ 1 Missing
sentry_sdk/integrations/langchain.py 0.00% ⚠️ 1 Missing
sentry_sdk/integrations/threading.py 0.00% ⚠️ 1 Missing
sentry_sdk/traces.py 66.67% ⚠️ 1 Missing
sentry_sdk/transport.py 50.00% ⚠️ 1 Missing
Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
+ Coverage    90.24%    90.55%    +0.31%
==========================================
  Files          193       185        -8
  Lines        25474     23871     -1603
  Branches      9378      8802      -576
==========================================
+ Hits         22988     21615     -1373
- Misses        2486      2256      -230
- Partials      1431      1368       -63

Generated by Codecov Action

@linear-code

linear-code Bot commented Aug 27, 2026

Copy link
Copy Markdown

PY-1934

@sentrivana
sentrivana marked this pull request as ready for review August 27, 2026 10:34
@sentrivana
sentrivana requested a review from a team as a code owner August 27, 2026 10:34
@sentrivana sentrivana changed the title ref: Change warnings ref: Unify warnings (warnings.warn for deprecations, logging.warning for everything else) Aug 27, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit f52c667. Configure here.

Comment thread sentry_sdk/utils.py Outdated
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