Opened 6 years ago
Last modified 4 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 |
Pull Requests: | |||
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.
According to the ticket's flags, the next step(s) to move this issue forward are:
- To provide a patch by sending a pull request. Claim the ticket when you start working so that someone else doesn't duplicate effort. Before sending a pull request, review your work against the patch review checklist. Check the "Has patch" flag on the ticket after sending a pull request and include a link to the pull request in the ticket comment when making that update. The usual format is:
[https://github.com/django/django/pull/#### PR]
.
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 , 3 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 , 11 months ago
Cc: | added |
---|
comment:7 by , 4 months ago
We have a ticket (I'm the assignee) for using watchman, afaik, this one is no longer relevant
comment:8 by , 4 months ago
Cc: | added |
---|
Potential patch: https://github.com/django/django/pull/11480