-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
watchdog: Prevent reload if a file gets closed without any changes #2945
Comments
I'm using Django and django-extensions. I started getting reloads on every request. After doing some checks I was able to find that it started happening after upgrading werkzeug from 3.0.3 to 3.0.4 |
I am also having the same problem I am using After a request i get bogus changes detected
|
Opened a PR but needs feedback on direction: #2954 (comment) |
I already opened one over a month ago. Not much progress from the maintainer side so far. |
Thanks @lociii - much better solution. Closing mine |
@ThiefMaster @davidism |
Thank you very much @lociii for reporting the issue :) |
The issue that lead to this pinning should be fixed now: pallets/werkzeug#2945
What's the issue?
watchdog 5.0 introduced a new signal that is fired when a file gets closed without any changes written.
This leads to random reloads when something opens and closes a file.
opened
events are already ignored, so we should ignore the newclosed_no_write
events too.How to reproduce?
Update to watchdog 5.0+ and wait for the reloads to come in.
What's the expected behavior?
Werkzeug should only reload if there are actual changes to the code base.
Environment
The text was updated successfully, but these errors were encountered: