#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.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/django-updates/0107019e09900e49-b70e70f5-2858-4a83-9e43-f93fb1f8ac60-000000%40eu-central-1.amazonses.com.

Reply via email to