﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
30479	Auto-reloading with StatReloader may not track changes to the main entrypoint?	Keryn Knight	nobody	"This is a bit convoluted, but here we go.

Environment (OSX 10.11):
{{{
$ python -V
Python 3.6.2
$ pip -V
pip 19.1.1
$ pip install Django==2.2.1 django-microscope==0.1.1
Requirement already satisfied: Django==2.2.1 in ./lib/python3.6/site-packages (2.2.1)
Requirement already satisfied: django-microscope==0.1.1 in ./lib/python3.6/site-packages (0.1.1)
Requirement already satisfied: sqlparse in ./lib/python3.6/site-packages (from Django==2.2.1) (0.3.0)
Requirement already satisfied: pytz in ./lib/python3.6/site-packages (from Django==2.2.1) (2019.1)
Requirement already satisfied: django-environ>=0.4.4 in ./lib/python3.6/site-packages (from django-microscope==0.1.1) (0.4.5)
}}}

----

Create a file, `manage.py`:
{{{
# -*- coding: utf-8 -*-
from __future__ import unicode_literals, absolute_import
from microscope import run, routes


@routes.path("""")
def index(request, *, x=None):
    return None


application = run(
    DEBUG=True,
    INSTALLED_APPS=(),
    ROOT_URLCONF=routes,
    ALLOWED_HOSTS=[""127.0.0.1""],
    LOGGING={
        ""version"": 1,
        ""disable_existing_loggers"": False,
        ""handlers"": {""console"": {""class"": ""logging.StreamHandler""}},
        ""loggers"": {
            ""django.utils.autoreload"": {
                ""handlers"": [""console""],
                ""level"": ""DEBUG"",
                ""propagate"": True,
            }
        },
    },
)
}}}

Then do:
{{{
$ python manage.py runserver 127.0.0.1:8080
}}}

and it should boot like normal. So far so good.

----

Steps to reproduce:
- Edit `the manage.py` file. Just change the `ALLOWED_IPS` setting or whatever.

Under 2.1.8 (and prior), this will trigger the auto-reloading mechanism. Under 2.2.1, it won't. As far as I can tell from the `django.utils.autoreload` log lines, it never sees the `manage.py` itself.
"	Bug	new	Core (Management commands)	2.2	Normal		autoreload		Unreviewed	0	0	0	0	0	0
