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 23882,django 1.7 + inotify breaks autoreload of runserver with vim,Thomas Capricelli,nobody,"Quick summary : since i've migrated to django-1.7, autoreload is broken on my systems. I've used django since 0.96 and i have never had any problem with this great feature. I've turned around the problem until today by removing pyinotify : that fixed the problem for me. But of course i need pyinotify for other things... Today I've spent time testing more thoroughly, here are the results. My system is fairly standard : linux, gentoo, python 2.7, and vim-7.4.488. I patched django/utils/autoreload.py to add some debug to get more information. *) when pyinotify is not installed, USE_INOTIFY is indeed False and everything is working as expected and as before. *) when pyinotify is installed, USE_INOTIFY is True, and the file i'm testing with (main/views/gestion.py) is indeed added to the inotify watch list (around line 185 of autoreload.py). I need to load a page for this to happen, but this is expected because the autoreload stuff only consider those modules loaded by the python interpreter iiuc. In this setup, if i use CLI and does ""touch main/views/gestion.py"", the autoreload is triggered (displayed in the output of runserver). With the same setup, if i open the file with vim and just do "":w"", which saves the file again, nothing is triggered. I tried doing an actual modification and save (in case vim or inotify of even django optimizes the stuff by not reloading a file whose content hasn't changed), but the behaviour is the same. I can confirm the file was not reloaded by changing something in the file and testing from my browser. I think to remember that vim doesn't just overwrite the file but instead writes the content to a new file and then relinks the files, which might be the reason inotify doesn't notice the change. But i can't guarantee this. I know of so many people using django+vim, that i'm very surprised nobody was hit by this before, so maybe I'm not understanding something obvious and the reason is somewhere else .. I'm ""orzel"" on irc, very often available, don't hesitate to ping me (or here) if you need some more information/test.",Bug,closed,Core (Other),1.7,Normal,fixed,autoreload,cmawebsite@… chris.bainbridge@…,Accepted,0,0,0,0,0,0