#29079: Django settings should not cache user wrapped settings
------------------------------------------------+------------------------
               Reporter:  Riccardo Di Virgilio  |          Owner:  nobody
                   Type:  Uncategorized         |         Status:  new
              Component:  Core (Other)          |        Version:  1.11
               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                     |
------------------------------------------------+------------------------
 django 2.0 and 1.11 are breaking my custom settings.

 I'm using settings.configure with a custom object that can change his
 properties if the environment is changing.
 Starting from 1.11 the function {{{ LazySettings.__getattr__}}} is caching
 the values that are returned from the custom object that is provided by
 the user.

 If all the custom object can do is to provide static values why I should
 use a custom object at all instead of a regular module?

 In my view is an user needs to use a custom object as settings is because
 he needs advanced features that cannot be archived by a normal module.
 It's very easy to add cache to all properties in a custom object if this
 is behavior the user needs, but is really hard to disable this (if not
 impossibile for the way this code is written).

 If the staff is strongly against disabling the cache by default, can we at
 least add an option to disable it?

 thanks.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/29079>
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/061.62abfe25acfad43969a057fe35d41558%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to