ref: Unify warnings (warnings.warn for deprecations, logging.warning for everything else) - #7268
Conversation
Codecov Results 📊✅ 110908 passed | ⏭️ 5428 skipped | Total: 116336 | Pass Rate: 95.33% | Execution Time: 373m 29s 📊 Comparison with Base Branch
All tests are passing successfully. ❌ Patch coverage is 67.74%. Project has 2228 uncovered lines. Files with missing lines (5)
Coverage diff@@ Coverage Diff @@
## main #PR +/-##
==========================================
+ Coverage 90.24% 90.64% +0.4%
==========================================
Files 193 185 -8
Lines 25482 23803 -1679
Branches 9384 8782 -602
==========================================
+ Hits 22994 21575 -1419
- Misses 2488 2228 -260
- Partials 1431 1363 -68Generated by Codecov Action |
warnings.warn for deprecations, logging.warning for everything else)
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 56cb13b. Configure here.
| "We detected the use of uWSGI in preforking mode without " | ||
| "thread support. This might lead to crashing workers. " | ||
| 'Please run uWSGI with both "--enable-threads" and ' | ||
| '"--py-call-uwsgi-fork-hooks" for full support.' |
There was a problem hiding this comment.
Warnings hidden unless debug enabled
High Severity
Switching these notices from warnings.warn() to logger.warning() hides them unless debug=True. The sentry_sdk.errors logger uses _DebugFilter, which drops records by default. Users will no longer see alerts about uWSGI crashing workers, ignored options, async close()/flush() misuse, or the Django Channels data-leak issue.
Additional Locations (2)
Reviewed by Cursor Bugbot for commit 56cb13b. Configure here.


warnings.warn()logger.warning()Closes https://linear.app/getsentry/issue/PY-1934/use-warningswarn-for-deprecations-and-loggerwarning-for-everything