From 7250de67bdebc05e9b2c4e9db0491b06bb214f34 Mon Sep 17 00:00:00 2001 From: Theron Luhn Date: Sat, 30 Mar 2019 11:39:06 -0700 Subject: [PATCH 1/6] Fix docs build on Sphinx 2.0.0 Sphinx 2.0.0 was released, which triggered some warnings when building the docs and caused the build to fail. --- docs/conf.py | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index a6d37a176f..8fdebf53d6 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -28,6 +28,7 @@ from docutils import nodes from docutils import utils +from docutils.parsers.rst import Directive def raw(*arg): @@ -326,7 +327,6 @@ def nothing(*arg): latex_elements = { 'preamble': _PREAMBLE, - 'date': '', 'releasename': 'Version', 'title': r'The Pyramid Web Framework', # 'pointsize':'12pt', # uncomment for 12pt version @@ -345,25 +345,25 @@ def nothing(*arg): #subparagraph 5 -def frontmatter(name, arguments, options, content, lineno, - content_offset, block_text, state, state_machine): - return [nodes.raw( - '', - format='latex')] +class FrontMatter(Directive): + def run(self): + return [nodes.raw( + '', + format='latex')] -def mainmatter(name, arguments, options, content, lineno, - content_offset, block_text, state, state_machine): - return [nodes.raw( - '', - format='latex')] +class MainMatter(Directive): + def run(self): + return [nodes.raw( + '', + format='latex')] -def backmatter(name, arguments, options, content, lineno, - content_offset, block_text, state, state_machine): - return [nodes.raw( - '', - format='latex')] +class BackMatter(Directive): + def run(self): + return [nodes.raw( + '', + format='latex')] def app_role(role, rawtext, text, lineno, inliner, options={}, content=[]): @@ -378,9 +378,9 @@ def app_role(role, rawtext, text, lineno, inliner, options={}, content=[]): def setup(app): app.add_role('app', app_role) - app.add_directive('frontmatter', frontmatter, 1, (0, 0, 0)) - app.add_directive('mainmatter', mainmatter, 1, (0, 0, 0)) - app.add_directive('backmatter', backmatter, 1, (0, 0, 0)) + app.add_directive('frontmatter', FrontMatter, 1, (0, 0, 0)) + app.add_directive('mainmatter', MainMatter, 1, (0, 0, 0)) + app.add_directive('backmatter', BackMatter, 1, (0, 0, 0)) app.connect('autodoc-process-signature', resig) From e08c895bdb98398a7679eadd159a99337d38983a Mon Sep 17 00:00:00 2001 From: Theron Luhn Date: Sat, 30 Mar 2019 11:46:35 -0700 Subject: [PATCH 2/6] Sign CONTRIBUTORS.txt --- CONTRIBUTORS.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index 3c92d1d91d..b6eb5b550f 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -338,3 +338,5 @@ Contributors - Alexandre Yukio Harano, 2018/10/05 - Arijit Basu, 2019/02/19 + +- Theron Luhn, 2019/03/30 From 362584435e03a3316d5ac5696f72b02975b1950d Mon Sep 17 00:00:00 2001 From: Theron Luhn Date: Sat, 30 Mar 2019 12:47:34 -0700 Subject: [PATCH 3/6] Fix epub build. --- docs/index.rst | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/docs/index.rst b/docs/index.rst index a1a81872c4..4b413c16da 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -152,11 +152,9 @@ Comprehensive reference material for every public API exposed by :app:`Pyramid`: .. toctree:: - :maxdepth: 1 - :glob: + :maxdepth: 2 api/index - api/* ``p*`` Scripts Documentation @@ -165,11 +163,9 @@ Comprehensive reference material for every public API exposed by ``p*`` scripts included with :app:`Pyramid`. .. toctree:: - :maxdepth: 1 - :glob: + :maxdepth: 2 pscripts/index - pscripts/* Change History From 4f9b54116c8867505e7b4de526795fc222909983 Mon Sep 17 00:00:00 2001 From: Theron Luhn Date: Sat, 30 Mar 2019 13:07:05 -0700 Subject: [PATCH 4/6] Pin Sphinx to Read the Docs version. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index afddbda35f..758a2259b2 100644 --- a/setup.py +++ b/setup.py @@ -44,7 +44,7 @@ def readfile(name): docs_extras = [ - 'Sphinx >= 1.8.1', # Unicode characters in tree diagrams + 'Sphinx == 1.8.5', # Current version for Read the Docs 'docutils', 'pylons-sphinx-themes >= 1.0.8', # Ethical Ads 'pylons_sphinx_latesturl', From cd12850675fc827589d9f841e22010ffb7ab80e2 Mon Sep 17 00:00:00 2001 From: Theron Luhn Date: Sat, 30 Mar 2019 13:26:09 -0700 Subject: [PATCH 5/6] Revert "Pin Sphinx to Read the Docs version." This reverts commit 4f9b54116c8867505e7b4de526795fc222909983. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 758a2259b2..afddbda35f 100644 --- a/setup.py +++ b/setup.py @@ -44,7 +44,7 @@ def readfile(name): docs_extras = [ - 'Sphinx == 1.8.5', # Current version for Read the Docs + 'Sphinx >= 1.8.1', # Unicode characters in tree diagrams 'docutils', 'pylons-sphinx-themes >= 1.0.8', # Ethical Ads 'pylons_sphinx_latesturl', From 9f6e6822fe541bfca399f3aa56c5b3c6a67e3a92 Mon Sep 17 00:00:00 2001 From: Theron Luhn Date: Sat, 30 Mar 2019 13:43:29 -0700 Subject: [PATCH 6/6] Changelog entry. --- CHANGES.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index d8a4f45a6e..afac078b0a 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -93,3 +93,6 @@ Documentation Changes - Restore build of PDF on Read The Docs. See https://github.com/Pylons/pyramid/issues/3290 + +- Fix docs build for Sphinx 2.0. + See https://github.com/Pylons/pyramid/pull/3480