[Django] #34479: Support "watchfiles" in the autoreloader

24 views
Skip to first unread message

Django

unread,
Apr 10, 2023, 10:09:16 AM4/10/23
to django-...@googlegroups.com
#34479: Support "watchfiles" in the autoreloader
---------------------------------------+--------------------------
Reporter: Tom Forbes | Owner: nobody
Type: New feature | Status: assigned
Component: Utilities | Version: 4.2
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
---------------------------------------+--------------------------
As per https://forum.djangoproject.com/t/the-future-of-the-watchman-
autoreloader/19973, I believe we should drop support for the pywatchman
autoreloader backend and switch to watchfiles. The current pywatchman
implementation is broken.

This should make it a bit easier to test, and the implementation seems
like it will be simpler than our watchman implementation.

--
Ticket URL: <https://code.djangoproject.com/ticket/34479>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Apr 10, 2023, 1:00:25 PM4/10/23
to django-...@googlegroups.com
#34479: Support "watchfiles" in the autoreloader
--------------------------------------+------------------------------------

Reporter: Tom Forbes | Owner: nobody
Type: Cleanup/optimization | Status: assigned
Component: Utilities | Version: 4.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by David Sanders):

* type: New feature => Cleanup/optimization
* stage: Unreviewed => Accepted


Comment:

Cool 👍 Looks like a fair bit of support from the community to improve it,
just need to determine what the improvement is?

Are you going to assign yourself Tom?

--
Ticket URL: <https://code.djangoproject.com/ticket/34479#comment:1>

Django

unread,
Apr 10, 2023, 1:01:59 PM4/10/23
to django-...@googlegroups.com
#34479: Support "watchfiles" in the autoreloader
--------------------------------------+------------------------------------
Reporter: Tom Forbes | Owner: (none)
Type: Cleanup/optimization | Status: new

Component: Utilities | Version: 4.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by David Sanders):

* owner: nobody => (none)
* status: assigned => new


--
Ticket URL: <https://code.djangoproject.com/ticket/34479#comment:2>

Django

unread,
May 11, 2023, 2:18:03 AM5/11/23
to django-...@googlegroups.com
#34479: Support "watchfiles" in the autoreloader
--------------------------------------+------------------------------------
Reporter: Tom Forbes | Owner: (none)
Type: Cleanup/optimization | Status: new
Component: Utilities | Version: 4.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Anvansh Singh):

Seems like Tom already has a PR for it
(https://github.com/django/django/pull/16747). But I don't think much work
has been done on it in the past month. Anyways, I would like to work on
this one if Tom isn't already working on it.

--
Ticket URL: <https://code.djangoproject.com/ticket/34479#comment:3>

Django

unread,
Mar 19, 2024, 12:56:44 AM3/19/24
to django-...@googlegroups.com
#34479: Support "watchfiles" in the autoreloader
--------------------------------------+------------------------------------
Reporter: Tom Forbes | Owner: (none)
Type: Cleanup/optimization | Status: new
Component: Utilities | Version: 4.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Ülgen Sarıkavak):

* cc: Ülgen Sarıkavak (added)

--
Ticket URL: <https://code.djangoproject.com/ticket/34479#comment:4>

Django

unread,
Mar 19, 2024, 1:03:02 AM3/19/24
to django-...@googlegroups.com
#34479: Support "watchfiles" in the autoreloader
--------------------------------------+------------------------------------
Reporter: Tom Forbes | Owner: (none)
Type: Cleanup/optimization | Status: new
Component: Utilities | Version: 4.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Comment (by Mariusz Felisiak):

Ülgen, Can I ask why you added yourself to CC in hundreds of tickets in
the last way days? You can use a [https://groups.google.com/g/django-
updates django-updates mailing list] or follow the
[https://code.djangoproject.com/timeline timeline] to track updates on all
tickets.
--
Ticket URL: <https://code.djangoproject.com/ticket/34479#comment:5>

Django

unread,
Mar 19, 2024, 1:11:27 AM3/19/24
to django-...@googlegroups.com
#34479: Support "watchfiles" in the autoreloader
--------------------------------------+------------------------------------
Reporter: Tom Forbes | Owner: (none)
Type: Cleanup/optimization | Status: new
Component: Utilities | Version: 4.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Comment (by Ülgen Sarıkavak):

Replying to [comment:5 Mariusz Felisiak]:
> Ülgen, Can I ask why you added yourself to CC in hundreds of tickets in
the last way days? You can use a [https://groups.google.com/g/django-
updates django-updates mailing list] or follow the
[https://code.djangoproject.com/timeline timeline] to track updates on all
tickets.

Hey Maurizs. I was checking issues before the second session of
djangonaut-space and GSoC. According to my notes, it shouldn't be more
than 50 issues so far, and I did go over almost 600 issues to select a
small portion of them that interests me and the people I work with. I
believe this is a proper use of the CC feature, but if it is creating
notifications for all those other people and no way to disable it on my
end, I'll be more careful about it. Thanks for the comment and the
direction.
--
Ticket URL: <https://code.djangoproject.com/ticket/34479#comment:6>

Django

unread,
Mar 19, 2024, 1:24:28 AM3/19/24
to django-...@googlegroups.com
#34479: Support "watchfiles" in the autoreloader
--------------------------------------+------------------------------------
Reporter: Tom Forbes | Owner: (none)
Type: Cleanup/optimization | Status: new
Component: Utilities | Version: 4.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Comment (by Mariusz Felisiak):

Replying to [comment:6 Ülgen Sarıkavak]:
> According to my notes, it shouldn't be more than 50 issues so far,

120 :) I think it's more than enough for GSoC and Djangonaut space.
Crossing fingers that they will be fixed by you.
--
Ticket URL: <https://code.djangoproject.com/ticket/34479#comment:7>

Django

unread,
Mar 19, 2024, 1:35:01 AM3/19/24
to django-...@googlegroups.com
#34479: Support "watchfiles" in the autoreloader
--------------------------------------+------------------------------------
Reporter: Tom Forbes | Owner: (none)
Type: Cleanup/optimization | Status: new
Component: Utilities | Version: 4.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Comment (by Ülgen Sarıkavak):

Got it, thanks again. I'll do my best at least a couple of them :)
--
Ticket URL: <https://code.djangoproject.com/ticket/34479#comment:8>

Django

unread,
Sep 4, 2024, 3:56:28 AM9/4/24
to django-...@googlegroups.com
#34479: Support "watchfiles" in the autoreloader
--------------------------------------+------------------------------------
Reporter: Tom Forbes | Owner: (none)
Type: Cleanup/optimization | Status: new
Component: Utilities | Version: 4.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Comment (by Ahmed Ibrahim):

What's the status here?
--
Ticket URL: <https://code.djangoproject.com/ticket/34479#comment:9>

Django

unread,
Oct 12, 2024, 1:42:59 AM10/12/24
to django-...@googlegroups.com
#34479: Support "watchfiles" in the autoreloader
--------------------------------------+------------------------------------
Reporter: Tom Forbes | Owner: (none)
Type: Cleanup/optimization | Status: new
Component: Utilities | Version: 4.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Comment (by Ahmed Ibrahim):

News? and where can I build consensus? the mailing list is read only
--
Ticket URL: <https://code.djangoproject.com/ticket/34479#comment:10>

Django

unread,
Oct 26, 2024, 8:52:46 AM10/26/24
to django-...@googlegroups.com
#34479: Support "watchfiles" in the autoreloader
--------------------------------------+------------------------------------
Reporter: Tom Forbes | Owner: (none)
Type: Cleanup/optimization | Status: new
Component: Utilities | Version: 4.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Evstifeev Roman):

* cc: Evstifeev Roman (added)

--
Ticket URL: <https://code.djangoproject.com/ticket/34479#comment:11>

Django

unread,
Nov 3, 2024, 7:48:30 AM11/3/24
to django-...@googlegroups.com
#34479: Support "watchfiles" in the autoreloader
--------------------------------------+------------------------------------
Reporter: Tom Forbes | Owner: (none)
Type: Cleanup/optimization | Status: new
Component: Utilities | Version: 4.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by şuayip üzülmez):

* cc: şuayip üzülmez (added)

--
Ticket URL: <https://code.djangoproject.com/ticket/34479#comment:12>

Django

unread,
Sep 23, 2025, 6:40:53 AMSep 23
to django-...@googlegroups.com
#34479: Support "watchfiles" in the autoreloader
--------------------------------------+------------------------------------
Reporter: Tom Forbes | Owner: (none)
Type: Cleanup/optimization | Status: new
Component: Utilities | Version: 4.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Adam Johnson):

* cc: Adam Johnson (added)

Comment:

I've just rounded out some issues in django-watchfiles, so I now consider
it pretty stable: https://adamj.eu/tech/2025/09/22/introducing-django-
watchfiles/ .

This can serve as a base for merging the feature into Django core.

It's worth noting that correct support of globbing currently relies on
Python 3.13+, through `pathlib.Path.full_match()`. I didn't deem it
feasible to backport that function for old Pythons. Since Django's current
in-development version, 6.1, targets Python 3.12+, that will need figuring
out - perhaps making the watchfiles reloader only work on Python 3.13+ ?
--
Ticket URL: <https://code.djangoproject.com/ticket/34479#comment:13>

Django

unread,
Sep 23, 2025, 9:05:20 AMSep 23
to django-...@googlegroups.com
#34479: Support "watchfiles" in the autoreloader
--------------------------------------+------------------------------------
Reporter: Tom Forbes | Owner: (none)
Type: Cleanup/optimization | Status: new
Component: Utilities | Version: 4.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Comment (by Ülgen Sarıkavak):

If we wanted to add watchfiles mention to the docs
(https://docs.djangoproject.com/en/5.2/ref/django-admin/#runserver), would
it be in the scope of this issue?
--
Ticket URL: <https://code.djangoproject.com/ticket/34479#comment:14>

Django

unread,
Sep 23, 2025, 1:02:21 PMSep 23
to django-...@googlegroups.com
#34479: Support "watchfiles" in the autoreloader
--------------------------------------+------------------------------------
Reporter: Tom Forbes | Owner: (none)
Type: Cleanup/optimization | Status: new
Component: Utilities | Version: 4.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Comment (by Adam Johnson):

We generally don't mention third-party packages in the docs, to avoid
implying they're of the same quality and because such references can
easily go outdated.
--
Ticket URL: <https://code.djangoproject.com/ticket/34479#comment:15>
Reply all
Reply to author
Forward
0 new messages