Opened 6 years ago
Last modified 2 months ago
#30213 new New feature
Add support for a "watchdog" based autoreloader
Reported by: | Tom Forbes | Owned by: | nobody |
---|---|---|---|
Component: | Utilities | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Petr Přikryl, Carlton Gibson, Adam Johnson, Ülgen Sarıkavak, Ahmed Ibrahim | Triage Stage: | Accepted |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
It was suggested on the mailing list (https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/django-developers/Y3caNikdM6M/BYpsr0qLBAAJ) that an alternative reloader might be useful on Linux based systems.
I propose adding support for Watchdog (https://github.com/gorakhargosh/watchdog) which will give us improved reloading performance on Linux and potentially Windows as well.
Change History (8)
comment:1 by , 6 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:2 by , 6 years ago
comment:3 by , 4 years ago
Cc: | added |
---|
comment:4 by , 2 years ago
Cc: | added |
---|
Adam recently put together a proof-of-concept for a Watchfiles based reloader. See https://github.com/adamchainz/django-watchfiles
(All these reloaders... it's quite complex 🤯).
Watchfiles is based on the Rust Notify crate, which had good cross-platform support. Arguably it would be the way to go.
Given how many options there are in this field, I wonder if we'd not be better served making get_reloader()
properly pluggable, rather than adding (an ever growing set of) specific reloaders? 🤔
comment:6 by , 9 months ago
Cc: | added |
---|
comment:7 by , 2 months ago
We have a ticket (I'm the assignee) for using watchman, afaik, this one is no longer relevant
comment:8 by , 2 months ago
Cc: | added |
---|
Potential patch: https://github.com/django/django/pull/11480