From f97fec5ebd34776fdd97220cb2b1eff1f639a409 Mon Sep 17 00:00:00 2001 From: Eugenio Lacuesta Date: Fri, 10 Apr 2020 16:02:53 -0300 Subject: [PATCH 1/8] Pin Sphinx version, including extensions --- docs/requirements.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index 773b92cea..a99d1b78f 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,4 +1,4 @@ -Sphinx>=2.1 -sphinx-hoverxref -sphinx-notfound-page -sphinx_rtd_theme +Sphinx==3.0.1 +sphinx-hoverxref==0.2b1 +sphinx-notfound-page==0.4 +sphinx_rtd_theme==0.4.3 From 24a1d9acae776bc195e6078394ee159b42275833 Mon Sep 17 00:00:00 2001 From: Eugenio Lacuesta Date: Fri, 10 Apr 2020 16:48:42 -0300 Subject: [PATCH 2/8] Get version in docs config --- docs/conf.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 6e2399f66..c59688fbe 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -14,6 +14,7 @@ import sys from datetime import datetime from os import path +from pathlib import Path # If your extensions are in another directory, add it here. If the directory # is relative to the documentation root, use os.path.abspath to make it @@ -59,10 +60,10 @@ copyright = '2008–{}, Scrapy developers'.format(datetime.now().year) # # The short X.Y version. try: - import scrapy - version = '.'.join(map(str, scrapy.version_info[:2])) - release = scrapy.__version__ -except ImportError: + version_path = Path(__file__).parent.absolute().parent.joinpath("scrapy/VERSION") + version = version_path.read_text().strip() + release = version.rsplit(".", 1)[0] +except Exception: version = '' release = '' @@ -295,3 +296,5 @@ intersphinx_mapping = { # ------------------------------------ hoverxref_auto_ref = True +hoverxref_project = "scrapy" +hoverxref_version = release From 4383f452999464b623393288361ecf7f383666e2 Mon Sep 17 00:00:00 2001 From: Eugenio Lacuesta Date: Fri, 10 Apr 2020 16:49:14 -0300 Subject: [PATCH 3/8] Replace os.path with pathlib in docs config --- docs/conf.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index c59688fbe..a0bbbc90a 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -13,14 +13,13 @@ import sys from datetime import datetime -from os import path from pathlib import Path # If your extensions are in another directory, add it here. If the directory # is relative to the documentation root, use os.path.abspath to make it # absolute, like shown here. -sys.path.append(path.join(path.dirname(__file__), "_ext")) -sys.path.insert(0, path.dirname(path.dirname(__file__))) +sys.path.append(str(Path(__file__).absolute().parent / "_ext")) +sys.path.insert(0, str(Path(__file__).absolute().parent.parent)) # General configuration From 34e81d0d74fb0c5b9e880afdf214c2fd2ec193c6 Mon Sep 17 00:00:00 2001 From: Eugenio Lacuesta Date: Fri, 10 Apr 2020 17:29:02 -0300 Subject: [PATCH 4/8] Docs: remove duplicated setting definitions --- docs/topics/downloader-middleware.rst | 1 + docs/topics/settings.rst | 22 ---------------------- 2 files changed, 1 insertion(+), 22 deletions(-) diff --git a/docs/topics/downloader-middleware.rst b/docs/topics/downloader-middleware.rst index 73648994d..cea5e4564 100644 --- a/docs/topics/downloader-middleware.rst +++ b/docs/topics/downloader-middleware.rst @@ -829,6 +829,7 @@ REDIRECT_MAX_TIMES Default: ``20`` The maximum number of redirections that will be followed for a single request. +After this maximum the request's response is returned as is. MetaRefreshMiddleware --------------------- diff --git a/docs/topics/settings.rst b/docs/topics/settings.rst index dc6843d75..90df9a02e 100644 --- a/docs/topics/settings.rst +++ b/docs/topics/settings.rst @@ -1116,17 +1116,6 @@ multi-purpose thread pool used by various Scrapy components. Threaded DNS Resolver, BlockingFeedStorage, S3FilesStore just to name a few. Increase this value if you're experiencing problems with insufficient blocking IO. -.. setting:: REDIRECT_MAX_TIMES - -REDIRECT_MAX_TIMES ------------------- - -Default: ``20`` - -Defines the maximum times a request can be redirected. After this maximum the -request's response is returned as is. We used Firefox default value for the -same task. - .. setting:: REDIRECT_PRIORITY_ADJUST REDIRECT_PRIORITY_ADJUST @@ -1422,17 +1411,6 @@ Default: ``True`` A boolean which specifies if the :ref:`telnet console ` will be enabled (provided its extension is also enabled). -.. setting:: TELNETCONSOLE_PORT - -TELNETCONSOLE_PORT ------------------- - -Default: ``[6023, 6073]`` - -The port range to use for the telnet console. If set to ``None`` or ``0``, a -dynamically assigned port is used. For more info see -:ref:`topics-telnetconsole`. - .. setting:: TEMPLATES_DIR TEMPLATES_DIR From 2205f04631d97103f98a28f865e8ac6511c15c82 Mon Sep 17 00:00:00 2001 From: Eugenio Lacuesta Date: Fri, 10 Apr 2020 18:08:04 -0300 Subject: [PATCH 5/8] Docs: Add hoverxref_role_types setting --- docs/conf.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/conf.py b/docs/conf.py index a0bbbc90a..40de81342 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -297,3 +297,10 @@ intersphinx_mapping = { hoverxref_auto_ref = True hoverxref_project = "scrapy" hoverxref_version = release +hoverxref_role_types = { + "class": "tooltip", + "confval": "tooltip", + "hoverxref": "tooltip", + "mod": "tooltip", + "ref": "tooltip", +} From 0a4ef97fa3d9d25b3f6b4afcf2b4986c505605c9 Mon Sep 17 00:00:00 2001 From: Eugenio Lacuesta Date: Tue, 14 Apr 2020 14:57:20 -0300 Subject: [PATCH 6/8] Loose restrictions for docs requirements --- docs/requirements.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index a99d1b78f..3d34b47da 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,4 +1,4 @@ -Sphinx==3.0.1 -sphinx-hoverxref==0.2b1 -sphinx-notfound-page==0.4 -sphinx_rtd_theme==0.4.3 +Sphinx>=3.0 +sphinx-hoverxref>=0.2b1 +sphinx-notfound-page>=0.4 +sphinx_rtd_theme>=0.4 From ee4ee486b1b4f66deffccbbe15f056edaf135982 Mon Sep 17 00:00:00 2001 From: Eugenio Lacuesta Date: Tue, 14 Apr 2020 15:06:54 -0300 Subject: [PATCH 7/8] Revert unnecessary changes to docs/conf.py --- docs/conf.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 40de81342..4414ef637 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -13,13 +13,13 @@ import sys from datetime import datetime -from pathlib import Path +from os import path # If your extensions are in another directory, add it here. If the directory # is relative to the documentation root, use os.path.abspath to make it # absolute, like shown here. -sys.path.append(str(Path(__file__).absolute().parent / "_ext")) -sys.path.insert(0, str(Path(__file__).absolute().parent.parent)) +sys.path.append(path.join(path.dirname(__file__), "_ext")) +sys.path.insert(0, path.dirname(path.dirname(__file__))) # General configuration @@ -59,10 +59,10 @@ copyright = '2008–{}, Scrapy developers'.format(datetime.now().year) # # The short X.Y version. try: - version_path = Path(__file__).parent.absolute().parent.joinpath("scrapy/VERSION") - version = version_path.read_text().strip() - release = version.rsplit(".", 1)[0] -except Exception: + import scrapy + version = '.'.join(map(str, scrapy.version_info[:2])) + release = scrapy.__version__ +except ImportError: version = '' release = '' From ac869181fb9118eb3e2dd0cb938cb1c8271bf6fc Mon Sep 17 00:00:00 2001 From: Eugenio Lacuesta Date: Wed, 15 Apr 2020 13:42:35 -0300 Subject: [PATCH 8/8] Update docs/topics/downloader-middleware.rst MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Adrián Chaves --- docs/topics/downloader-middleware.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/topics/downloader-middleware.rst b/docs/topics/downloader-middleware.rst index cea5e4564..8d3ea51f3 100644 --- a/docs/topics/downloader-middleware.rst +++ b/docs/topics/downloader-middleware.rst @@ -829,7 +829,7 @@ REDIRECT_MAX_TIMES Default: ``20`` The maximum number of redirections that will be followed for a single request. -After this maximum the request's response is returned as is. +After this maximum, the request's response is returned as is. MetaRefreshMiddleware ---------------------