Scrapy, a fast high-level web crawling & scraping framework for Python.
Fix docs for the renamed ADDONS setting.
Andrey Rakhmatullinfdfab1743864
diff --git a/docs/topics/addons.rst b/docs/topics/addons.rstindex 198c48bcc..25d7da50b 100644--- a/docs/topics/addons.rst+++ b/docs/topics/addons.rst@@ -20,15 +20,15 @@ only then, the add-on manager will read a list of enabled add-ons and theirconfigurations from your settings. There are two places where you can providethe paths to add-ons you want to enable:-* the ``INSTALLED_ADDONS`` setting, and+* the ``ADDONS`` setting, and* the ``scrapy.cfg`` file.As Scrapy settings can be modified from many places, e.g. in a project's``settings.py``, in a Spider's ``custom_settings`` attribute, or from the-command line, using the ``INSTALLED_ADDONS`` setting is the preferred way to+command line, using the ``ADDONS`` setting is the preferred way tomanage add-ons.-The ``INSTALLED_ADDONS`` setting a tuple in which every item is a path to an+The ``ADDONS`` setting a tuple in which every item is a path to anadd-on. The path can be both a Python or a file path. While more precise, it isnot necessary to specify the full add-on Python path if it is either built intoScrapy or lives in your project's ``addons`` submodule.@@ -40,7 +40,7 @@ This is an example where an internal add-on and two third-party add-ons (in thiscase with one requiring no configuration) are enabled/configured in a project's``settings.py``::- INSTALLED_ADDONS = (+ ADDONS = ('httpcache','path.to.some.addon',)@@ -79,7 +79,7 @@ Enabling and configuring add-ons within Python codeThe :class:`~scrapy.addons.AddonManager` will only read from Scrapy's settingsand from ``scrapy.cfg`` *at the beginning* of Scrapy's start-up process.Afterwards, i.e. as soon as the :class:`~scrapy.addons.AddonManager` is-populated, changing the ``INSTALLED_ADDONS`` setting or any of the add-on+populated, changing the ``ADDONS`` setting or any of the add-onconfiguration dictionary settings will have no effect.If you want to enable, disable, or configure add-ons in Python code, for example@@ -202,7 +202,7 @@ specify :pep:`440`-style information about required versions. Examples::requires = ['otheraddon >= 2.0', 'yetanotheraddon']The Python object or module that is pointed to by an add-on path (e.g. given in-the ``INSTALLED_ADDONS`` setting, or given to+the ``ADDONS`` setting, or given to:meth:`~scrapy.addons.AddonManager.add`) does not necessarily have to be anadd-on. Instead, it can provide an ``_addon`` attribute. This attribute can beeither an add-on or another add-on path.@@ -401,7 +401,7 @@ of placing this in your ``settings.py``::you can also use the add-on framework::- INSTALLED_ADDONS = (+ ADDONS = (# ...,'httpcache',)@@ -412,9 +412,9 @@ you can also use the add-on framework::}Note that you *must* enable built-in addons by placing them in your-``INSTALLED_ADDONS`` setting before you can use them for configuring built-in+``ADDONS`` setting before you can use them for configuring built-incomponents. I.e., configuring the ``HTTPCACHE`` setting will have no effect-when ``httpcache`` is not listed in ``INSTALLED_ADDONS``.+when ``httpcache`` is not listed in ``ADDONS``.In general, the add-on names match the lowercase name of the component, with itstype suffix removed (i.e. the add-on configuring thediff --git a/docs/topics/settings.rst b/docs/topics/settings.rstindex 9e8c30efe..aa09abbd5 100644--- a/docs/topics/settings.rst+++ b/docs/topics/settings.rst@@ -201,6 +201,16 @@ to any particular component. In that case the module of that component will beshown, typically an extension, middleware or pipeline. It also means that thecomponent must be enabled in order for the setting to have any effect.+.. setting:: ADDONS++ADDONS+------++Default: ``()``++A tuple containing paths to the add-ons enabled in your project. For more+information, see :ref:`topics-addons`.+.. setting:: AWS_ACCESS_KEY_IDAWS_ACCESS_KEY_ID@@ -964,16 +974,6 @@ some of them need to be enabled through a setting.For more information See the :ref:`extensions user guide <topics-extensions>`and the :ref:`list of available extensions <topics-extensions-ref>`.-.. setting:: INSTALLED_ADDONS--INSTALLED_ADDONS-------------------Default: ``()``--A tuple containing paths to the add-ons enabled in your project. For more-information, see :ref:`topics-addons`.-.. setting:: FEED_TEMPDIRFEED_TEMPDIR