#32669: Allow autoreloading of `python -m custom_module runserver`
-------------------------------------+-------------------------------------
     Reporter:  Moriyoshi Koizumi    |                    Owner:  Moriyoshi
                                     |  Koizumi
         Type:  New feature          |                   Status:  assigned
    Component:  Utilities            |                  Version:  4.0
     Severity:  Normal               |               Resolution:
     Keywords:  autoreload           |             Triage Stage:  Accepted
  runserver                          |
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

 * status:  new => assigned
 * cc: William Schwartz (added)
 * version:  3.2 => 4.0
 * owner:  nobody => Moriyoshi Koizumi
 * type:  Uncategorized => New feature
 * stage:  Unreviewed => Accepted


Old description:

> The original fix [1] only attempted to deal with `-m foo.bar` where `bar`
> is a package and `__main__.py` exists under `foo/bar`.
>
> When a dotted name for a module (for example, `foo.bar.baz` where
> `baz.py` resides under `foo/bar`) is specified like `-m foo.bar.baz`, the
> resulting arguments end up being `-m foo.bar`, which is uncalled for.
>
> [1]
> https://github.com/django/django/commit/ec6d2531c59466924b645f314ac33f54470d7ac3

New description:

 The original fix [1] only attempted to deal with `-m foo.bar` where `bar`
 is a package and `__main__.py` exists under `foo/bar`.

 When a dotted name for a module (for example, `foo.bar.baz` where `baz.py`
 resides under `foo/bar`) is specified like `-m foo.bar.baz`, the resulting
 arguments end up being `-m foo.bar`, which is uncalled for.

 [1]
 
https://github.com/django/django/commit/ec6d2531c59466924b645f314ac33f54470d7ac3

 Fixed detection when started non-django modules with "python -m" in
 autoreloader.

--

Comment:

 It doesn't work in Django 3.1 so I would not call it a regression.

 Can you send PR via GitHub?

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32669#comment:2>
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/067.1d73741c5e1297de4e67df09f6d4a529%40djangoproject.com.

Reply via email to