diff options
| author | Theron Luhn <theron@luhn.com> | 2019-03-30 11:39:06 -0700 |
|---|---|---|
| committer | Theron Luhn <theron@luhn.com> | 2019-03-30 11:45:27 -0700 |
| commit | 7250de67bdebc05e9b2c4e9db0491b06bb214f34 (patch) | |
| tree | 689ef5381baa04b2d0ff998bb3cd3ccc17c609e4 /docs/conf.py | |
| parent | 80baff6e61d775dc34bb11b7d6c8ef8569da1c40 (diff) | |
| download | pyramid-7250de67bdebc05e9b2c4e9db0491b06bb214f34.tar.gz pyramid-7250de67bdebc05e9b2c4e9db0491b06bb214f34.tar.bz2 pyramid-7250de67bdebc05e9b2c4e9db0491b06bb214f34.zip | |
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.
Diffstat (limited to 'docs/conf.py')
| -rw-r--r-- | docs/conf.py | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/docs/conf.py b/docs/conf.py index a6d37a176..8fdebf53d 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -28,6 +28,7 @@ from sphinx.writers.latex import LaTeXTranslator from docutils import nodes from docutils import utils +from docutils.parsers.rst import Directive def raw(*arg): @@ -326,7 +327,6 @@ _PREAMBLE = r""" latex_elements = { 'preamble': _PREAMBLE, - 'date': '', 'releasename': 'Version', 'title': r'The Pyramid Web Framework', # 'pointsize':'12pt', # uncomment for 12pt version @@ -345,25 +345,25 @@ latex_elements = { #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) |
