From 8ae5bbb3ee479ec4b7f442292da60b1ba4185140 Mon Sep 17 00:00:00 2001 From: Pavol Juhas Date: Tue, 16 Jan 2024 21:10:08 +0000 Subject: [PATCH 1/2] Pin sphinx dependencies that require Sphinx 5.0 or later (#6414) Fixes #6413 Temporary workaround for #6400 --- rtd_docs/requirements.txt | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/rtd_docs/requirements.txt b/rtd_docs/requirements.txt index c6e5451371a..6754890081d 100644 --- a/rtd_docs/requirements.txt +++ b/rtd_docs/requirements.txt @@ -1,6 +1,14 @@ # For generating documentation. -# TODO(#6400,juhas) - upgrade Sphinx and remove the alabaster pin below + +# TODO(#6400,juhas) - upgrade Sphinx and remove the package pins below ------- alabaster<=0.7.13 +sphinxcontrib-applehelp<=1.0.7 +sphinxcontrib-devhelp<=1.0.5 +sphinxcontrib-htmlhelp<=2.0.4 +sphinxcontrib-qthelp<=1.0.6 +sphinxcontrib-serializinghtml<=1.1.9 +# End of TODO ---------------------------------------------------------------- + myst-parser Sphinx~=3.2.0 sphinx_rtd_theme From 9c451a2d9faa4b7244037670744b219a10e5b297 Mon Sep 17 00:00:00 2001 From: Sam Burdick Date: Tue, 16 Jan 2024 17:12:05 -0800 Subject: [PATCH 2/2] Update sphinx version (#6415) * Use the current Sphinx version 7.x * Change language to `en` for Sphinx * Update sphinx config name `master_doc` -> `root_doc` Ref: https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-master_doc * Remove package pinning workarounds introduced for #6400. Also remove an old pinning of the Jinja2 package which is unlikely to be still necessary. Fixes #6400 --------- Co-authored-by: Pavol Juhas --- rtd_docs/conf.py | 6 +++--- rtd_docs/requirements.txt | 13 +------------ 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/rtd_docs/conf.py b/rtd_docs/conf.py index d2a1f071694..b09e694ac8d 100644 --- a/rtd_docs/conf.py +++ b/rtd_docs/conf.py @@ -24,7 +24,7 @@ # -- Project information ----------------------------------------------------- project = 'Cirq' -copyright = '2018-2020, The Cirq Developers' # pylint: disable=redefined-builtin +copyright = '2018-2024, The Cirq Developers' # pylint: disable=redefined-builtin author = 'The Cirq Developers' # The short X.Y version @@ -51,14 +51,14 @@ source_suffix = {'.rst': 'restructuredtext', '.md': 'markdown'} # The main toctree document. -master_doc = 'index' +root_doc = 'index' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. # # This is also used if you do content translation via gettext catalogs. # Usually you set "language" from the command line for these cases. -language = None +language = 'en' # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. diff --git a/rtd_docs/requirements.txt b/rtd_docs/requirements.txt index 6754890081d..37e0fef66f3 100644 --- a/rtd_docs/requirements.txt +++ b/rtd_docs/requirements.txt @@ -1,16 +1,5 @@ # For generating documentation. - -# TODO(#6400,juhas) - upgrade Sphinx and remove the package pins below ------- -alabaster<=0.7.13 -sphinxcontrib-applehelp<=1.0.7 -sphinxcontrib-devhelp<=1.0.5 -sphinxcontrib-htmlhelp<=2.0.4 -sphinxcontrib-qthelp<=1.0.6 -sphinxcontrib-serializinghtml<=1.1.9 -# End of TODO ---------------------------------------------------------------- - myst-parser -Sphinx~=3.2.0 +Sphinx==7.* sphinx_rtd_theme sphinx-notfound-page -Jinja2<=3.0.3