[Django] #30057: diffsettings leaves out custom default settings

9 views
Skip to first unread message

Django

unread,
Dec 23, 2018, 7:06:00 AM12/23/18
to django-...@googlegroups.com
#30057: diffsettings leaves out custom default settings
-------------------------------------+-------------------------------------
Reporter: orlnub123 | Owner: nobody
Type: Bug | Status: new
Component: Core | Version: master
(Management commands) | Keywords: diffsettings,
Severity: Normal | settings
Triage Stage: | Has patch: 1
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
If you've manually configured the settings with default settings that
differ from the default they won't show up if you run the diffsettings
command. This is only observable on master as before 49b6793 the settings
were forcefully setup, replacing the manually configured settings.

The reason this happens is because `module_to_dict` reads the settings
from the `__dict__`. If you haven't manually configured your settings this
is fine because the default wrapped settings object preassigns all
settings to the `__dict__`. Since `UserSettingsHolder`, the class that
wraps manually configured settings, relies on the `__dir__` +
`__getattr__` pattern which allows the underlying default settings object
to be dynamic it doesn't store settings from the default settings in its
`__dict__`.

--
Ticket URL: <https://code.djangoproject.com/ticket/30057>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Dec 23, 2018, 1:56:23 PM12/23/18
to django-...@googlegroups.com
#30057: diffsettings leaves out custom default settings
-------------------------------------+-------------------------------------
Reporter: orlnub123 | Owner: nobody
Type: Bug | Status: new
Component: Core (Management | Version: master
commands) |
Severity: Normal | Resolution:
Keywords: diffsettings, | Triage Stage: Accepted
settings |
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Simon Charette):

* stage: Unreviewed => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/30057#comment:1>

Django

unread,
Dec 23, 2018, 1:59:12 PM12/23/18
to django-...@googlegroups.com
#30057: diffsettings leaves out custom default settings
-------------------------------------+-------------------------------------
Reporter: orlnub123 | Owner: nobody
Type: Bug | Status: new
Component: Core (Management | Version: master
commands) |
Severity: Release blocker | Resolution:

Keywords: diffsettings, | Triage Stage: Accepted
settings |
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Simon Charette):

* cc: Hasan Ramezani (added)
* severity: Normal => Release blocker


Comment:

Marking as `master` release blocker since it's a regression introduced by
49b679371fe9beddcd23a93b5fdbadea914f37f8 (#29236).

--
Ticket URL: <https://code.djangoproject.com/ticket/30057#comment:2>

Django

unread,
Jan 12, 2019, 11:30:42 AM1/12/19
to django-...@googlegroups.com
#30057: diffsettings leaves out custom default settings
-------------------------------------+-------------------------------------
Reporter: orlnub123 | Owner: nobody
Type: Bug | Status: closed

Component: Core (Management | Version: master
commands) |
Severity: Release blocker | Resolution: fixed

Keywords: diffsettings, | Triage Stage: Accepted
settings |
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: new => closed
* resolution: => fixed


Comment:

In [changeset:"573f44d62fe1e87e2c20a74eba5e20ca9ff0ed85" 573f44d6]:
{{{
#!CommitTicketReference repository=""
revision="573f44d62fe1e87e2c20a74eba5e20ca9ff0ed85"
Fixed #30057 -- Fixed diffsettings ignoring custom configured settings.

Regression in 49b679371fe9beddcd23a93b5fdbadea914f37f8.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/30057#comment:3>

Django

unread,
Feb 21, 2019, 10:21:04 AM2/21/19
to django-...@googlegroups.com
#30057: diffsettings leaves out custom default settings
-------------------------------------+-------------------------------------
Reporter: orlnub123 | Owner: nobody
Type: Bug | Status: new
Component: Core (Management | Version: master
commands) |
Severity: Release blocker | Resolution:
Keywords: diffsettings, | Triage Stage: Accepted
settings |
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by orlnub123):

* status: closed => new
* resolution: fixed =>


--
Ticket URL: <https://code.djangoproject.com/ticket/30057#comment:4>

Django

unread,
Feb 22, 2019, 9:37:48 AM2/22/19
to django-...@googlegroups.com
#30057: diffsettings leaves out custom default settings
-------------------------------------+-------------------------------------
Reporter: orlnub123 | Owner: nobody
Type: Bug | Status: closed

Component: Core (Management | Version: master
commands) |
Severity: Release blocker | Resolution: fixed

Keywords: diffsettings, | Triage Stage: Accepted
settings |
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

* status: new => closed
* resolution: => fixed


Comment:

The PR seems to be about additional test coverage which can be added
without an open ticket.

--
Ticket URL: <https://code.djangoproject.com/ticket/30057#comment:5>

Django

unread,
Feb 26, 2019, 11:01:49 AM2/26/19
to django-...@googlegroups.com
#30057: diffsettings leaves out custom default settings
-------------------------------------+-------------------------------------
Reporter: orlnub123 | Owner: nobody
Type: Bug | Status: closed
Component: Core (Management | Version: master
commands) |
Severity: Release blocker | Resolution: fixed
Keywords: diffsettings, | Triage Stage: Accepted
settings |
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"2c0fda7f206f2057df642939e51358944b313483" 2c0fda7f]:
{{{
#!CommitTicketReference repository=""
revision="2c0fda7f206f2057df642939e51358944b313483"
Refs #30057 -- Added more diffsettings tests.

The test in 573f44d62fe1e87e2c20a74eba5e20ca9ff0ed85 doesn't act as a
regression test.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/30057#comment:6>

Reply all
Reply to author
Forward
0 new messages