What do we think about removing the pyinotify functionality in the
autoreloader? For context, if pyinotify is installed (Linux only) the
autoreloader will attempt to use it to detect file changes over the
standard polling-based approach. It is generally much more efficient but is
not cross platform, and is not well documented currently IMO.

I’m hacking away at my attempt at refactoring the autoreloader (
https://github.com/django/django/pull/8819) and I’ve made some good
progress but I am worried about the lack of tests for pyinotify (there are
none!). The current code in master works but it’s really hard to refactor
in any meaningful way without them. I would very much like to explore
adding support for watchdog (https://pythonhosted.org/watchdog/) instead of
pyinotify and these changes I’m working on are a means to that end.

Wwatchdog is a library that wraps efficient platform-specific filesystem
notifications in cross-platform way, and it includes an inotify
implementation.

So I think there are three ways forward:

   1.

   Spend time and effort adding special tests for PyInotify (testing this
   stuff is not simple, especially with the current code)
   2.

   Remove the functionality with an eye to using something like watchdog in
   the near future
   3.

   Never really touch the autoreloader much (it is some of the oldest and
   nastiest code we have).

Does anyone have any strong opinions on this? Does anyone use the pyinotify
speedup while developing?

Tom

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAFNZOJPZiKXhJhyOTGiB4xqLr3UBLAwVszicAAbPmFrLhQAsuw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to