[Django] #37092: No warning for deprecated USE_BLANK_CHOICE_DASH in settings.py

6 views
Skip to first unread message

Django

unread,
May 8, 2026, 5:48:22 PM (23 hours ago) May 8
to django-...@googlegroups.com
#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.

Django

unread,
May 8, 2026, 7:50:02 PM (21 hours ago) May 8
to django-...@googlegroups.com
#37092: No warning for deprecated USE_BLANK_CHOICE_DASH in settings.py
---------------------------------+---------------------------------------
Reporter: Mike Edmunds | Owner: Jacob Walls
Type: Bug | Status: assigned
Component: Forms | Version: dev
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+---------------------------------------
Changes (by Jacob Walls):

* cc: Annabelle Wiegart (added)
* owner: (none) => Jacob Walls
* severity: Normal => Release blocker
* stage: Unreviewed => Accepted
* status: new => assigned

Comment:

Yep, this was next on my list, thanks for the report!
--
Ticket URL: <https://code.djangoproject.com/ticket/37092#comment:1>
Reply all
Reply to author
Forward
0 new messages