From 1902e6c4444d6ca60f0409c47127712094cda83e Mon Sep 17 00:00:00 2001 From: Michael Howitz Date: Fri, 9 Aug 2024 08:52:44 +0200 Subject: [PATCH] Support Sphinx 8. --- docs/conf.py | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 3c46e4f..f2534c9 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -18,13 +18,13 @@ import sys from unittest.mock import MagicMock from unittest.mock import Mock + sys.path.insert(0, os.path.abspath('../')) rqmt = pkg_resources.require('Products.ZMySQLDA')[0] sys.modules['MySQLdb'] = Mock() sys.modules['MySQLdb.constants'] = Mock() sys.modules['MySQLdb.converters'] = MagicMock() - # -- Project information ----------------------------------------------------- year = datetime.datetime.now().year project = 'Products.ZMySQLDA' @@ -36,7 +36,6 @@ # The full version, including alpha/beta/rc tags release = rqmt.version - # -- General configuration --------------------------------------------------- # If your documentation needs a minimal Sphinx version, state it here. @@ -61,7 +60,7 @@ # You can specify multiple suffix as a list of string: # # source_suffix = ['.rst', '.md'] -source_suffix = '.rst' +source_suffix = {'.rst': 'restructuredtext'} # The master toctree document. master_doc = 'index' @@ -81,7 +80,6 @@ # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'sphinx' - # -- Options for HTML output ------------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for @@ -110,13 +108,11 @@ # # html_sidebars = {} - # -- Options for HTMLHelp output --------------------------------------------- # Output file base name for HTML help builder. htmlhelp_basename = 'ZMySQLDAdoc' - # -- Options for LaTeX output ------------------------------------------------ latex_elements = { @@ -145,16 +141,11 @@ 'Zope Foundation and Contributors', 'manual'), ] - # -- Options for manual page output ------------------------------------------ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). -man_pages = [ - (master_doc, 'zmysqlda', 'ZMySQLDA Documentation', - [author], 1) -] - +man_pages = [(master_doc, 'zmysqlda', 'ZMySQLDA Documentation', [author], 1)] # -- Options for Texinfo output ---------------------------------------------- @@ -162,18 +153,16 @@ # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ - (master_doc, 'ZMySQLDA', 'ZMySQLDA Documentation', - author, 'ZMySQLDA', 'One line description of project.', - 'Miscellaneous'), + (master_doc, 'ZMySQLDA', 'ZMySQLDA Documentation', author, 'ZMySQLDA', + 'One line description of project.', 'Miscellaneous'), ] - # -- Extension configuration ------------------------------------------------- # -- Options for intersphinx extension --------------------------------------- # Example configuration for intersphinx: refer to the Python standard library. -intersphinx_mapping = {'https://docs.python.org/3/': None} +intersphinx_mapping = {'python': ('https://docs.python.org/3/', None)} # -- Options for todo extension ----------------------------------------------