#24704: Development server does not restart on SynaxError in models.py
-------------------------------------+-------------------------------------
     Reporter:  artemrizhov          |                    Owner:  aaugustin
         Type:  Bug                  |                   Status:  closed
    Component:  Core (Management     |                  Version:  1.7
  commands)                          |
     Severity:  Normal               |               Resolution:  fixed
     Keywords:                       |             Triage Stage:  Ready for
                                     |  checkin
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Aymeric Augustin <aymeric.augustin@…>):

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


Comment:

 In [changeset:"fe6ddb837d18bd4e71cd22fc18272d31478b19f2" fe6ddb8]:
 {{{
 #!CommitTicketReference repository=""
 revision="fe6ddb837d18bd4e71cd22fc18272d31478b19f2"
 Fixed #24704 -- Made the autoreloader survive SyntaxErrors.

 With this change, it's expected to survive anything except errors
 that make it impossible to import the settings. It's too complex
 to fallback to a sensible behavior with a broken settings module.

 Harcoding things about runserver in ManagementUtility.execute is
 atrocious but it's the only way out of the chicken'n'egg problem:
 the current implementation of the autoreloader primarily watches
 imported Python modules -- and then a few other things that were
 bolted on top of this design -- but we want it to kick in even if
 the project contains import-time errors and django.setup() fails.

 At some point we should throw away this code and replace it by an
 off-the-shelf autoreloader that watches the working directory and
 re-runs `django-admin runserver` whenever something changes.
 }}}

--
Ticket URL: <https://code.djangoproject.com/ticket/24704#comment:20>
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/069.af1b4b843ced4ef0e2f30885d791460f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to