Opened 5 days ago
Last modified 2 days ago
#37092 assigned Bug
No warning for deprecated USE_BLANK_CHOICE_DASH in settings.py
| Reported by: | Mike Edmunds | Owned by: | Jacob Walls |
|---|---|---|---|
| Component: | Forms | Version: | dev |
| Severity: | Release blocker | Keywords: | |
| Cc: | Annabelle Wiegart | Triage Stage: | Accepted |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
If the deprecated setting USE_BLANK_CHOICE_DASH is defined in settings.py, no deprecation warning is issued. (This setting was added in 63c56cda #35870 as immediately deprecated.)
The warning is only issued if USE_BLANK_CHOICE_DASH is defined via settings.configure() or override_settings().
I think the fix is to duplicate the warning from UserSettingHolder.__setattr__() into Settings.__init__(). (It needs to be in both places.)
Aside: Realistically testing django.conf.settings as if initialized from a settings module seems to be quite complicated right now. We might consider adding APIs to facilitate that testing, after 6.1 freezes.
Change History (2)
comment:1 by , 5 days ago
| Cc: | added |
|---|---|
| Owner: | set to |
| Severity: | Normal → Release blocker |
| Status: | new → assigned |
| Triage Stage: | Unreviewed → Accepted |
Yep, this was next on my list, thanks for the report!