Opened 5 years ago

Last modified 6 weeks 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 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 (6)

comment:1 by Claude Paroz, 5 years ago

Triage Stage: UnreviewedAccepted

comment:3 by Petr Přikryl, 3 years ago

Cc: Petr Přikryl added

comment:4 by Carlton Gibson, 22 months ago

Cc: Carlton Gibson Adam Johnson 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:5 by Carlton Gibson <carlton@…>, 21 months ago

In e34dfad:

Refs #30213 -- Removed post-startup check for Watchman availability.

This is checked at startup in get_reloader(). The runtime check ties
the implementation to Watchman excessively.

comment:6 by Ülgen Sarıkavak, 6 weeks ago

Cc: Ülgen Sarıkavak added
Note: See TracTickets for help on using tickets.
Back to Top