Changes between Initial Version and Version 1 of Ticket #30479


Ignore:
Timestamp:
May 17, 2019, 1:54:58 AM (5 years ago)
Author:
Mariusz Felisiak
Comment:

Thanks for the report. I simplified scenario.

Regression in c8720e7696ca41f3262d5369365cc1bd72a216ca. Reproduced at 8d010f39869f107820421631111417298d1c5bb9.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #30479

    • Property Cc Tom Forbes added
    • Property Component Core (Management commands)Utilities
    • Property Severity NormalRelease blocker
    • Property Triage Stage UnreviewedAccepted
    • Property Summary Auto-reloading with StatReloader may not track changes to the main entrypoint?Autoreloader with StatReloader doesn't track changes in manage.py.
  • Ticket #30479 – Description

    initial v1  
    77$ pip -V
    88pip 19.1.1
    9 $ pip install Django==2.2.1 django-microscope==0.1.1
    10 Requirement already satisfied: Django==2.2.1 in ./lib/python3.6/site-packages (2.2.1)
    11 Requirement already satisfied: django-microscope==0.1.1 in ./lib/python3.6/site-packages (0.1.1)
    12 Requirement already satisfied: sqlparse in ./lib/python3.6/site-packages (from Django==2.2.1) (0.3.0)
    13 Requirement already satisfied: pytz in ./lib/python3.6/site-packages (from Django==2.2.1) (2019.1)
    14 Requirement already satisfied: django-environ>=0.4.4 in ./lib/python3.6/site-packages (from django-microscope==0.1.1) (0.4.5)
     9$ pip install Django==2.2.1
    1510}}}
    1611
    17 ----
    18 
    19 Create a file, `manage.py`:
     12Steps to reproduce:
     13- Run a server `python manage.py runserver`
     14- Edit the `manage.py` file, e.g. add `print()`:
    2015{{{
    21 # -*- coding: utf-8 -*-
    22 from __future__ import unicode_literals, absolute_import
    23 from microscope import run, routes
    24 
    25 
    26 @routes.path("")
    27 def index(request, *, x=None):
    28     return None
    29 
    30 
    31 application = run(
    32     DEBUG=True,
    33     INSTALLED_APPS=(),
    34     ROOT_URLCONF=routes,
    35     ALLOWED_HOSTS=["127.0.0.1"],
    36     LOGGING={
    37         "version": 1,
    38         "disable_existing_loggers": False,
    39         "handlers": {"console": {"class": "logging.StreamHandler"}},
    40         "loggers": {
    41             "django.utils.autoreload": {
    42                 "handlers": ["console"],
    43                 "level": "DEBUG",
    44                 "propagate": True,
    45             }
    46         },
    47     },
    48 )
     16def main():
     17    print('sth')
     18    os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'ticket_30479.settings')
     19    ...
    4920}}}
    5021
    51 Then do:
    52 {{{
    53 $ python manage.py runserver 127.0.0.1:8080
    54 }}}
    55 
    56 and it should boot like normal. So far so good.
    57 
    58 ----
    59 
    60 Steps to reproduce:
    61 - Edit `the manage.py` file. Just change the `ALLOWED_IPS` setting or whatever.
    62 
    6322Under 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.
Back to Top