Skip to content
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

Switch to an event allowlist for watchdog #2947

Merged
merged 1 commit into from
Oct 24, 2024
Merged

Conversation

lociii
Copy link
Contributor

@lociii lociii commented Sep 5, 2024

Ignores the new closed_no_write event type fired by watchdog 5.x that is causing unnecessary reloads.
To prevent such cases in the future, I introduced an event allow list.

fixes #2945

  • Test case added
  • Change log added

src/werkzeug/_reloader.py Outdated Show resolved Hide resolved
src/werkzeug/_reloader.py Outdated Show resolved Hide resolved
tests/test_serving.py Outdated Show resolved Hide resolved
tests/test_serving.py Outdated Show resolved Hide resolved
@lociii

This comment has been minimized.

@davidism
Copy link
Member

I had to rebase to change the target from main to stable. Since you opened this PR from your main branch, you'll need to reset it: git fetch upstream && git reset --hard upstream/main. Remember to create pull requests from dedicated branches.

@davidism davidism merged commit bcc9302 into pallets:stable Oct 24, 2024
11 checks passed
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

watchdog: Prevent reload if a file gets closed without any changes
3 participants