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

Add watchfiles-based reloader #5732

Merged
merged 1 commit into from
Apr 12, 2023
Merged

Conversation

ThiefMaster
Copy link
Member

Watchman works great, but there's no proper release for Python 3.10+ and it requires installing the watchman binary.

Watchfiles on the other hand is much easier to install as it includes its (Rust-based) inotify backend in its wheel.

The only real drawback is that there's no magic that detects and fully groups Git changes (e.g. checkouts). But debouncing covers this just fine, and if needed the thresholds could be tuned (if some poor soul develops on a super slow machine where Git checkouts take ages).


I might refactor it a bit to remove the duplicate code between {watchman,watchfiles}.py but I mainly wanted to have a reloader that works well w/ Python 3.11 to make testing Python 3.11 compatibility less painful...

@ThiefMaster ThiefMaster force-pushed the watchfiles branch 3 times, most recently from b502818 to 9988ca0 Compare April 12, 2023 12:53
Watchman works great, but there's no proper release for Python 3.10+ and
it requires installing the watchman binary.

Watchfiles on the other hand is much easier to install as it includes
its (Rust-based) inotify backend in its wheel.

The only real drawback is that there's no magic that detects and fully
groups Git changes (e.g. checkouts). But debouncing covers this just
fine, and if needed the thresholds could be tuned (if some poor soul
develops on a super slow machine where Git checkouts take ages).
@ThiefMaster ThiefMaster merged commit 3bf2c0f into indico:master Apr 12, 2023
@ThiefMaster ThiefMaster deleted the watchfiles branch April 21, 2023 09:06
@ThiefMaster
Copy link
Member Author

d69b026 fixes an issue during startup when not specifying the reloader but relying on the default

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant