[18.0][FIX] fs_storage, storage_backend: deprecated() must not override the process warning filters #694
All Vouch review confidence checks passed
Residual risk 0.04 = Change Risk (0.23) × (1 − Review Confidence (0.83)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.23 · 16 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.83 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.170
Real PR Conversation Timeline
3 items
All commit authors signed the Contributor License Agreement.
<!-- CLA BOT SIGNING COMMENT DO NOT EDIT -->
Changes Requested
Thank you. Can you squash the commit in one plz.
lmignon
marlon-costa-dc
Problem
The
deprecateddecorator infs_storage(and the copy instorage_backend) runswarnings.simplefilter("always")and thenwarnings.simplefilter("default", DeprecationWarning). Both calls insert a filter at the front of the process-wide list and never remove it.After the first call to a deprecated method, every filter the server installed for
DeprecationWarningstops applying. One example is Odoo's ignore fordatetime.datetime.utcnow()inodoo/netsvc.py. In a test run, tests that run later then logWARNING py.warnings: ... datetime.datetime.utcnow() is deprecated, fromir_mail_server.pyandmail_activity_mixin.py. The fs_storage tests also calledwarnings.filterwarnings("ignore")without restoring it.Fix
simplefiltercalls:warnings.warn(..., DeprecationWarning)is enough, and the process filters decide.filterwarnings("ignore")from the tests;mute_logger("py.warnings")already keeps them quiet.Tests
New
test_deprecated_keeps_warning_filters: it sets an ignore filter, calls a deprecated method, and checks the filter still applies.Run on Odoo 18.0.
CLA
The author signed the OCA CLA; the commit email (marlon.costa@datacosmos.com.br) is now verified on the GitHub account marlon-costa-dc.