#37092: No warning for deprecated USE_BLANK_CHOICE_DASH in settings.py
------------------------------+--------------------------------------
Reporter: Mike Edmunds | Type: Bug
Status: new | Component: Forms
Version: dev | Severity: Normal
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------------+--------------------------------------
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
[
https://github.com/medmunds/django/blob/e7ba310fa262786ca7ce235da588b27312c7a855/tests/mail/test_deprecated.py#L172-L208
quite complicated] right now. We might consider adding APIs to facilitate
that testing, after 6.1 freezes.
--
Ticket URL: <
https://code.djangoproject.com/ticket/37092>
Django <
https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.