summaryrefslogtreecommitdiff
path: root/django/utils/autoreload.py
AgeCommit message (Collapse)Author
2026-03-10Fixed #36943 -- Preserved any exception from URLconf module in autoreloader.varunkasyap
Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
2025-09-25Fixed #36434 -- Preserved unbuffered stdio (-u) in autoreloader child.SaJH
Signed-off-by: SaJH <wogur981208@gmail.com>
2025-07-23Refs #36500 -- Rewrapped long docstrings and block comments via a script.django-bot
Rewrapped long docstrings and block comments to 79 characters + newline using script from https://github.com/medmunds/autofix-w505.
2025-03-31Refs #28909 -- Simplified code using unpacking generalizations.Aarni Koskela
2025-03-30Fixed warnings per flake8 7.2.0.Mariusz Felisiak
https://github.com/PyCQA/flake8/releases/tag/7.2.0
2023-11-28Refs #34986 -- Added PyPy support to ↵Nick Pope
django.utils.autoreload.get_child_arguments(). It seems that `sys._xoptions` is also supported on PyPy.
2023-08-28Fixed #34787 -- Fixed autoreloader crash when run from installed script on ↵sarahboyce
Windows.
2022-08-11Refs #30213 -- Removed post-startup check for Watchman availability.Carlton Gibson
This is checked at startup in get_reloader(). The runtime check ties the implementation to Watchman excessively.
2022-05-25Normalized imports of functools.wraps.Aymeric Augustin
@wraps is 10 times more common than @functools.wraps. Standardize to the most common version.
2022-03-15Fixed #31169 -- Adapted the parallel test runner to use spawn.David Smith
Co-authored-by: Valz <ahmadahussein0@gmail.com> Co-authored-by: Nick Pope <nick@nickpope.me.uk>
2022-02-07Refs #33476 -- Reformatted code with Black.django-bot
2021-09-29Fixed #33027 -- Made autoreloader pass -X options.Chenyang Yan
2021-09-27Refs #32355 -- Used @functools.lru_cache as a straight decorator.Mariusz Felisiak
2021-05-26Fixed #32669 -- Fixed detection when started non-django modules which aren't ↵Moriyoshi Koizumi
packages with "python -m" in autoreloader.
2021-05-26Fixed #32783 -- Fixed crash of autoreloader when __main__ module doesn't ↵Mariusz Felisiak
have __spec__ attribute. Regression in ec6d2531c59466924b645f314ac33f54470d7ac3. Thanks JonathanNickelson for the report.
2021-05-04Refs #32074 -- Removed usage of deprecated Thread.setDaemon().Karthikeyan Singaravelan
Thread.setDaemon() was deprecated in Python 3.10 and will be removed in Python 3.12.
2021-02-10Fixed #32355 -- Dropped support for Python 3.6 and 3.7Mariusz Felisiak
2021-01-05Fixed #32314 -- Fixed detection when started non-django modules with "python ↵William Schwartz
-m" in autoreloader. django.utils.autoreload.get_child_arguments() detected when Python was started with the `-m` option only for `django` module. This commit changes the logic to check __spec__, see https://docs.python.org/3/reference/import.html#main-spec Now packages can implement their own __main__ with the runserver command.
2020-11-25Fixed #32223 -- Removed strict=True in Path.resolve() in autoreloader.Mariusz Felisiak
This reverts commit e28671187903e6aca2428374fdd504fca3032aee which caused permission errors when users didn't have permissions to all intermediate directories in a Django installation path. Thanks Jakub Szafrański for the report.
2020-11-19Fixed #32202 -- Fixed autoreloader argument generation for Windows with ↵Carlton Gibson
Python 3.7-.
2020-11-05Fixed #25791 -- Implement autoreload behaviour for cached template loader.Tom Forbes
2020-11-02Protected Watchman autoreloader against busy loops.Daniel Hahler
With an error in the loop above (e.g. using query without args), this would trigger a busy loop. While this was caused due to changes to the loop itself, it seems to be just good practice to protect against this.
2020-07-30Bumped minimum isort version to 5.1.0.David Smith
Fixed inner imports per isort 5. isort 5.0.0 to 5.1.0 was unstable.
2020-06-18Fixed #31716 -- Fixed detection of console scripts in autoreloader on Windows.Tom Forbes
2020-05-13Updated logging calls to use arguments instead of string interpolation.François Freitag
2020-03-05Fixed #31327 -- Deprecated providing_args argument for Signal.Jon Dufresne
2019-08-23Replaced subprocess commands by run() wherever possible.Claude Paroz
2019-07-24Fixed #30647 -- Fixed crash of autoreloader when extra directory cannot be ↵Tom Forbes
resolved.
2019-07-24Removed unused BaseReloader.watch_file().Mariusz Felisiak
Unused since its introduction in c8720e7696ca41f3262d5369365cc1bd72a216ca.
2019-07-23Fixed #30506 -- Fixed crash of autoreloader when path contains null characters.Tom Forbes
2019-07-01Removed unnecessary import in django/utils/autoreload.py.PatOnTheBack
2019-06-26Fixed #30588 -- Fixed crash of autoreloader when __main__ module doesn't ↵Tom Forbes
have __file__ attribute.
2019-06-24Simplified handling of non-existent paths in autoreloader with ↵Tom Forbes
Path.resolve(strict=True).
2019-05-29Fixed #30523 -- Fixed updating file modification times on seen files in ↵Tom Forbes
auto-reloader when using StatReloader. Previously we updated the file mtimes if the file has not been seen before - i.e on the first iteration of the loop. If the mtime has been changed we triggered the notify_file_changed() method which in all cases except the translations will result in the process being terminated. To be strictly correct we need to update the mtime for either branch of the conditional. Regression in 6754bffa2b2df15a741008aa611c1bb0e8dff22b.
2019-05-29Fixed #30516 -- Fixed crash of autoreloader when re-raising exceptions with ↵Tom Forbes
custom signature. Regression in c8720e7696ca41f3262d5369365cc1bd72a216ca.
2019-05-28Fixed #30479 -- Fixed detecting changes in manage.py by autoreloader when ↵Tom Forbes
using StatReloader. Regression in c8720e7696ca41f3262d5369365cc1bd72a216ca.
2019-05-15Refs #27685 -- Logged unexpected Watchman autoreloader errors.Daniel Hahler
2019-05-03Ignored pywatchman.SocketTimeout in Watchman autoreloader.Daniel Hahler
Bumped minimum supported pywatchman version to 1.2.0. These exceptions don't require checking a server status.
2019-04-29Fixed #30323 -- Fixed detecting changes by autoreloader when using StatReloader.Tom Forbes
2019-04-29Refs #30323 -- Prevented crash of autoreloader when ↵Tom Forbes
get_resolver().urlconf_module raising an exception.
2019-04-29Refs #30323 -- Simplified utils.autoreload.ensure_echo_on().Tom Forbes
2019-04-26Fixed #30361 -- Increased the default timeout of watchman client to 5 ↵Jacob Green
seconds and made it customizable. Made the default timeout of watchman client customizable via DJANGO_WATCHMAN_TIMEOUT environment variable.
2019-02-27Fixed #30215 -- Fixed autoreloader crash for modules without __spec__.shiningfm
Regression in c8720e7696ca41f3262d5369365cc1bd72a216ca.
2019-02-25Refs #27685 -- Removed "watchman unavailable" message.Tom Forbes
2019-02-09Removed unneeded list() calls in sorted() argument.Sergey Fedoseev
2019-01-28Fixed #25624 -- Fixed autoreload crash with jinja2.ModuleLoader.Tom Forbes
2019-01-19Removed redundant period in Watchman unavailable message.Tom Forbes
2019-01-13Fixed #27685 -- Added watchman support to the autoreloader.Tom Forbes
Removed support for pyinotify (refs #9722).
2018-09-26Refs #29784 -- Switched to https:// links where available.Jon Dufresne
2018-02-26Refs #28909 -- Simplifed code using unpacking generalizations.Mariusz Felisiak