#20636: AttributeError: 'Settings' object has no attribute
'_original_allowed_hosts'
-----------------------------------+--------------------------------------
     Reporter:  aaugustin          |                    Owner:  nobody
         Type:  Bug                |                   Status:  new
    Component:  Testing framework  |                  Version:  master
     Severity:  Release blocker    |               Resolution:
     Keywords:                     |             Triage Stage:  Unreviewed
    Has patch:  0                  |      Needs documentation:  0
  Needs tests:  0                  |  Patch needs improvement:  0
Easy pickings:  0                  |                    UI/UX:  0
-----------------------------------+--------------------------------------

Comment (by aaugustin):

 I double-checked in case I had missed something, and I confirm that steps
 g) and i) operate on the same settings object. However, its `_wrapped`
 attribute has changed!

 I think I'm seeing a variant of the scenario described by Claude, and the
 root cause lies in his first bullet point: `override_settings.wrapped` is
 set in `__init__` rather than in `enable`, which is indeed #20290.

 I see three options:

 - backport #20290,
 - store `_original_allowed_hosts` somewhere else — like
 `original_email_backend` which is stored on the `django.core.mail` module.
 - catch and drop the AttributeError — after all we're in test teardown, we
 don't really care.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/20636#comment:5>
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/067.f5b6b283abcb3a09a5087d87098dce85%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to