Opened 67 minutes ago
Last modified 12 minutes ago
#37161 new New feature
Implement a system check for deprecated mail settings
| Reported by: | Jacob Walls | Owned by: | |
|---|---|---|---|
| Component: | Core (Mail) | Version: | 6.1 |
| Severity: | Release blocker | Keywords: | |
| Cc: | Mike Edmunds | Triage Stage: | Unreviewed |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
Because the deprecated mail settings will stop working in Django 7.0, this could lead to data loss if someone misses the deprecation warnings and fails to migrate to MAILERS.
For a similar scenario with STORAGES, on the forum we appeared to agree that in retrospect, we should have implemented a temporary system check in core.checks.compatibility despite some disagreement about what a more robust, permanent solution might look like for retiring settings.
An example where this was implemented before is in 354acd04af524ad82002b903df1189581c51cabe, although it's not a perfect analogue because that check only checked for conflicts between old & new settings--which we do have right now in 6.1, raising a runtime ImproperlyConfigured--not the presence of the old settings at all.
(Interestingly, the ImproperlyConfigured is swallowed by manage.py shell...)
Anyway, I think we should consider adding a system check during the deprecation period.
Note DEP 0018 contemplates two similar MAILERS-related system checks as future work.
The "Missing
"default"alias inMAILERS" check would catch this starting in 7.0 (because MAILERS defaults to{}starting in 7.0).