#27630: Autoreload continuously reloads when not using pyinotify
-----------------------------------------+------------------------
               Reporter:  zatricion      |          Owner:  nobody
                   Type:  Uncategorized  |         Status:  new
              Component:  Uncategorized  |        Version:  master
               Severity:  Normal         |       Keywords:
           Triage Stage:  Unreviewed     |      Has patch:  0
    Needs documentation:  0              |    Needs tests:  0
Patch needs improvement:  0              |  Easy pickings:  0
                  UI/UX:  0              |
-----------------------------------------+------------------------
 In
 https://github.com/django/django/blob/master/django/utils/autoreload.py,
 the function `code_changed` uses `st_mtime` without taking into account
 floating point errors, which in some cases can cause `runserver` to reload
 over and over again.

 For instance:
      $ [os.stat(file).st_mtime for file in os.listdir(os.getcwd())[:3]]
      [1464887244.822038, 1482518222.822038, 1464887244.822038]
      $ [os.stat(file).st_mtime for file in os.listdir(os.getcwd())[:3]]
      [1464887244.380515, 1482518222.380515, 1464887244.380515]
      $ [os.stat(file).st_mtime for file in os.listdir(os.getcwd())[:3]]
      [1464887244.1597567, 1482518222.1597567, 1464887244.1597567]

--
Ticket URL: <https://code.djangoproject.com/ticket/27630>
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/052.50b8f5a49a929f35e175182837f3f17d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to