#32314: Allow autoreloading of `python -m pkg_other_than_django runserver`
-------------------------------------+-------------------------------------
     Reporter:  William Schwartz     |                    Owner:  William
         Type:                       |  Schwartz
  Cleanup/optimization               |                   Status:  closed
    Component:  Core (Management     |                  Version:  master
  commands)                          |
     Severity:  Normal               |               Resolution:  fixed
     Keywords:  runserver,           |             Triage Stage:  Ready for
  autoreload, freezers               |  checkin
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak <felisiak.mariusz@…>):

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


Comment:

 In [changeset:"ec6d2531c59466924b645f314ac33f54470d7ac3" ec6d253]:
 {{{
 #!CommitTicketReference repository=""
 revision="ec6d2531c59466924b645f314ac33f54470d7ac3"
 Fixed #32314 -- Fixed detection when started non-django modules with
 "python -m" in autoreloader.

 django.utils.autoreload.get_child_arguments() detected when Python was
 started with the `-m` option only for `django` module. This commit
 changes the logic to check __spec__, see
 https://docs.python.org/3/reference/import.html#main-spec

 Now packages can implement their own __main__ with the runserver
 command.
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32314#comment:7>
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.ff1dbfa88465f0ff3447cb0e8249f0e1%40djangoproject.com.

Reply via email to