Changes between Initial Version and Version 1 of Ticket #30479
- Timestamp:
- May 17, 2019, 1:54:58 AM (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #30479
- Property Cc added
- Property Component Core (Management commands) → Utilities
- Property Severity Normal → Release blocker
- Property Triage Stage Unreviewed → Accepted
- 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 7 7 $ pip -V 8 8 pip 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 15 10 }}} 16 11 17 ---- 18 19 Create a file, `manage.py`: 12 Steps to reproduce: 13 - Run a server `python manage.py runserver` 14 - Edit the `manage.py` file, e.g. add `print()`: 20 15 {{{ 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 ) 16 def main(): 17 print('sth') 18 os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'ticket_30479.settings') 19 ... 49 20 }}} 50 21 51 Then do:52 {{{53 $ python manage.py runserver 127.0.0.1:808054 }}}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 63 22 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.