summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorTom Forbes <tom@tomforb.es>2019-01-14 01:33:47 +0000
committerTim Graham <timograham@gmail.com>2019-01-13 20:33:47 -0500
commitc8720e7696ca41f3262d5369365cc1bd72a216ca (patch)
tree1fc858e37415196f06982d2af32f98e29044cde1 /docs
parenta02a6fd5805f9f0e613b9951249555876b8c4041 (diff)
Fixed #27685 -- Added watchman support to the autoreloader.
Removed support for pyinotify (refs #9722).
Diffstat (limited to 'docs')
-rw-r--r--docs/internals/contributing/writing-code/unit-tests.txt6
-rw-r--r--docs/ref/django-admin.txt25
-rw-r--r--docs/releases/2.2.txt6
3 files changed, 31 insertions, 6 deletions
diff --git a/docs/internals/contributing/writing-code/unit-tests.txt b/docs/internals/contributing/writing-code/unit-tests.txt
index c3af1cd02f..3480e3f2ca 100644
--- a/docs/internals/contributing/writing-code/unit-tests.txt
+++ b/docs/internals/contributing/writing-code/unit-tests.txt
@@ -229,6 +229,7 @@ dependencies:
* Pillow_
* PyYAML_
* pytz_ (required)
+* pywatchman_
* setuptools_
* memcached_, plus a :ref:`supported Python binding <memcached>`
* gettext_ (:ref:`gettext_on_windows`)
@@ -258,6 +259,9 @@ and install the Geospatial libraries</ref/contrib/gis/install/index>`.
Each of these dependencies is optional. If you're missing any of them, the
associated tests will be skipped.
+To run some of the autoreload tests, you'll need to install the Watchman_
+service.
+
.. _argon2-cffi: https://pypi.org/project/argon2_cffi/
.. _bcrypt: https://pypi.org/project/bcrypt/
.. _docutils: https://pypi.org/project/docutils/
@@ -267,12 +271,14 @@ associated tests will be skipped.
.. _Pillow: https://pypi.org/project/Pillow/
.. _PyYAML: https://pyyaml.org/wiki/PyYAML
.. _pytz: https://pypi.org/project/pytz/
+.. _pywatchman: https://pypi.org/project/pywatchman/
.. _setuptools: https://pypi.org/project/setuptools/
.. _memcached: https://memcached.org/
.. _gettext: https://www.gnu.org/software/gettext/manual/gettext.html
.. _selenium: https://pypi.org/project/selenium/
.. _sqlparse: https://pypi.org/project/sqlparse/
.. _pip requirements files: https://pip.pypa.io/en/latest/user_guide/#requirements-files
+.. _Watchman: https://facebook.github.io/watchman/
Code coverage
-------------
diff --git a/docs/ref/django-admin.txt b/docs/ref/django-admin.txt
index e8371897e2..22a5c4dbac 100644
--- a/docs/ref/django-admin.txt
+++ b/docs/ref/django-admin.txt
@@ -879,13 +879,26 @@ needed. You don't need to restart the server for code changes to take effect.
However, some actions like adding files don't trigger a restart, so you'll
have to restart the server in these cases.
-If you are using Linux and install `pyinotify`_, kernel signals will be used to
-autoreload the server (rather than polling file modification timestamps each
-second). This offers better scaling to large projects, reduction in response
-time to code modification, more robust change detection, and battery usage
-reduction.
+If you're using Linux or MacOS and install both `pywatchman`_ and the
+`Watchman`_ service, kernel signals will be used to autoreload the server
+(rather than polling file modification timestamps each second). This offers
+better performance on large projects, reduced response time after code changes,
+more robust change detection, and a reduction in power usage.
-.. _pyinotify: https://pypi.org/project/pyinotify/
+.. admonition:: Large directories with many files may cause performance issues
+
+ When using Watchman with a project that includes large non-Python
+ directories like ``node_modules``, it's advisable to ignore this directory
+ for optimal performance. See the `watchman documentation`_ for information
+ on how to do this.
+
+.. _Watchman: https://facebook.github.io/watchman/
+.. _pywatchman: https://pypi.org/project/pywatchman/
+.. _watchman documentation: https://facebook.github.io/watchman/docs/config.html#ignore_dirs
+
+.. versionchanged:: 2.2
+
+ Watchman support replaced support for `pyinotify`.
When you start the server, and each time you change Python code while the
server is running, the system check framework will check your entire Django
diff --git a/docs/releases/2.2.txt b/docs/releases/2.2.txt
index 45d436ebe1..13f7617888 100644
--- a/docs/releases/2.2.txt
+++ b/docs/releases/2.2.txt
@@ -203,6 +203,10 @@ Management Commands
comments in generated migration file(s). This option is also available for
:djadmin:`squashmigrations`.
+* :djadmin:`runserver` can now use `Watchman
+ <https://facebook.github.io/watchman/>`_ to improve the performance of
+ watching a large number of files for changes.
+
Migrations
~~~~~~~~~~
@@ -487,6 +491,8 @@ Miscellaneous
:func:`~django.contrib.sitemaps.ping_google` function, set the new
``sitemap_uses_https`` argument to ``False``.
+* :djadmin:`runserver` no longer supports `pyinotify` (replaced by Watchman).
+
.. _deprecated-features-2.2:
Features deprecated in 2.2