Skip to content
Snippets Groups Projects
  • Nik | Klampfradler's avatar
    2f7ccc1d
    Align with Django 3.1.6 behaviour for own management wrappers · 2f7ccc1d
    Nik | Klampfradler authored
    > commit ec6d2531c59466924b645f314ac33f54470d7ac3
    > Author: William Schwartz <wkschwartz@gmail.com>
    > Date:   Mon Jan 4 08:50:49 2021 -0600
    >
    >     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.
    
    Thanks to William for breaking the API in a a.b.c.d.e patch-level
    release :hearts:!
    Verified
    2f7ccc1d
    History
    Align with Django 3.1.6 behaviour for own management wrappers
    Nik | Klampfradler authored
    > commit ec6d2531c59466924b645f314ac33f54470d7ac3
    > Author: William Schwartz <wkschwartz@gmail.com>
    > Date:   Mon Jan 4 08:50:49 2021 -0600
    >
    >     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.
    
    Thanks to William for breaking the API in a a.b.c.d.e patch-level
    release :hearts:!