Opened 9 years ago
Last modified 8 years ago
#25999 closed Cleanup/optimization
Remove making deprecation warnings loud by default — at Version 3
Reported by: | Tim Graham | Owned by: | Tim Graham |
---|---|---|---|
Component: | Core (Other) | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
See #18985 for the background of why we route warnings through logging.
However, this idea is slightly flawed given our current deprecation scheme. If a third-party library wants to support both 1.8 and 1.11 (next LTS) would have to use a try (new import)/except (old import) pattern to avoid code running on 1.11 from raising deprecation warnings (some pending deprecation in 1.10, deprecated in 1.11, and removed in 2.0). In my mind, part of the purpose of the new policy was to avoid this type of complexity.
For that reason, I think we should reconsider making Django's deprecation warnings loud by default (at least in LTS versions). Otherwise, users will pester library authors to fix those warnings and we haven't really made things easier.
Instead, the idea would be for library authors to continue using the deprecated APIs while supporting the LTS in which they are deprecated and the previous LTS. When the version of Django following the LTS is released, library authors can then drop support for all Django versions before the LTS, check their package with the LTS using python -Wd and make the deprecation warning fixes, then seamlessly add support for the next version of Django.
Change History (3)
comment:1 by , 9 years ago
comment:2 by , 9 years ago
Component: | Documentation → Core (Other) |
---|---|
Owner: | changed from | to
Status: | new → assigned |
Summary: | Document why Django makes its deprecation warnings loud by default and how to silence them → Remove making deprecation warnings loud by default |
I raised a proposal to discontinue making RemovedInNextVersionWarning loud by default.