From 42fb88a67df3c261db101f048d482f4318e417b3 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Mon, 21 Apr 2025 11:35:43 +0000 Subject: [PATCH 1/3] Remove ability to conditionalize parts of the documentation Reverts #36495 --- .../en/developer/packaging_sage_library.rst | 11 ----- src/doc/en/developer/sage_manuals.rst | 26 ----------- .../en/reference/polynomial_rings/index.rst | 8 ++-- src/doc/en/tutorial/latex.rst | 2 +- src/sage_docbuild/builders.py | 19 -------- src/sage_docbuild/conf.py | 46 ++++++++----------- 6 files changed, 22 insertions(+), 90 deletions(-) diff --git a/src/doc/en/developer/packaging_sage_library.rst b/src/doc/en/developer/packaging_sage_library.rst index 9fbb4271727..a324fa9cb7f 100644 --- a/src/doc/en/developer/packaging_sage_library.rst +++ b/src/doc/en/developer/packaging_sage_library.rst @@ -497,17 +497,6 @@ requiring all of Sage to be present. mechanism mentioned above can also be used for this. -Dependencies of the Sage documentation --------------------------------------- - -The documentation will not be modularized. - -However, some parts of the Sage reference manual may depend on functionality -provided by optional packages. These portions of the reference manual -should be conditionalized using the Sphinx directive ``.. ONLY::``, -as explained in :ref:`section-documentation-conditional`. - - Version constraints of dependencies ----------------------------------- diff --git a/src/doc/en/developer/sage_manuals.rst b/src/doc/en/developer/sage_manuals.rst index 13f6a3da94a..84cf0f4f3c3 100644 --- a/src/doc/en/developer/sage_manuals.rst +++ b/src/doc/en/developer/sage_manuals.rst @@ -299,32 +299,6 @@ procedure is different: * Add your file to the index contained in :sage_root:`src/doc/en/reference/combinat/module_list.rst`. -.. _section-documentation-conditional: - -Making portions of the reference manual conditional on optional features -======================================================================== - -For every dynamically detectable feature such as :class:`graphviz -<~sage.features.graphviz.Graphviz>` or :class:`sage.symbolic -` (see :mod:`sage.features`), -Sage defines a Sphinx tag that can be used with the `Sphinx -directive ".. ONLY::" -`_. -Because Sphinx tags have to use Python identifier syntax, Sage uses -the format ``feature_``, followed by the feature name where dots are -replaced by underscores. Hence, conditionalizing on the features of -the previous examples would look as follows: - -.. CODE-BLOCK:: rest - - .. ONLY:: feature_graphviz - -and: - -.. CODE-BLOCK:: rest - - .. ONLY:: feature_sage_symbolic - .. _section-building-manuals: Building the manuals diff --git a/src/doc/en/reference/polynomial_rings/index.rst b/src/doc/en/reference/polynomial_rings/index.rst index a3b32b51ce7..0325ac79d62 100644 --- a/src/doc/en/reference/polynomial_rings/index.rst +++ b/src/doc/en/reference/polynomial_rings/index.rst @@ -75,11 +75,9 @@ Tropical Polynomials Boolean Polynomials ------------------- -.. ONLY:: feature_sage_rings_polynomial_pbori - - .. toctree:: - :maxdepth: 1 +.. toctree:: + :maxdepth: 1 - sage/rings/polynomial/pbori/pbori + sage/rings/polynomial/pbori/pbori .. include:: ../footer.txt diff --git a/src/doc/en/tutorial/latex.rst b/src/doc/en/tutorial/latex.rst index 73ef2df3a31..a173afd75c5 100644 --- a/src/doc/en/tutorial/latex.rst +++ b/src/doc/en/tutorial/latex.rst @@ -49,7 +49,7 @@ output of the entered commands automatically. You can start this automatic rendering by executing ``%display latex`` (and stop by executing ``%display plain``). -.. ONLY:: html and feature_jupyter_sphinx +.. ONLY:: html Thus, in the Jupyter notebook, you get diff --git a/src/sage_docbuild/builders.py b/src/sage_docbuild/builders.py index ab39d93c280..dc93754ec98 100644 --- a/src/sage_docbuild/builders.py +++ b/src/sage_docbuild/builders.py @@ -1035,8 +1035,6 @@ def get_modules(self, filename): Given a filename for a reST file, return an iterator for all of the autogenerated reST files that it includes. """ - from sage.features.all import all_features - # Create the regular expression used to detect an autogenerated file auto_re = re.compile(r'^\s*(..\/)*(sage(_docbuild)?\/[\w\/]*)\s*$') @@ -1044,24 +1042,7 @@ def get_modules(self, filename): with open(filename) as f: lines = f.readlines() - skip = False for line in lines: - if skip: - if not line.strip() or line.count(' ', 0) >= indent: - continue - skip = False - elif line.lstrip().lower().startswith('.. only::'): - try: - tag_name = line[line.index('feature_') + 8:].strip() - for feature in all_features(): - if tag_name == feature.name.replace('.', '_') and feature.is_present(): - break - else: - skip = True - indent = line.index('.. ') + 3 - continue - except ValueError: - pass match = auto_re.match(line) if match: yield match.group(2).replace(os.path.sep, '.') diff --git a/src/sage_docbuild/conf.py b/src/sage_docbuild/conf.py index 6c8f2d923e9..1bf5c390fbf 100644 --- a/src/sage_docbuild/conf.py +++ b/src/sage_docbuild/conf.py @@ -15,26 +15,23 @@ # https://www.gnu.org/licenses/ # **************************************************************************** -# Load configuration shared with sage.misc.sphinxify -from sage.misc.sagedoc_conf import * - -import sys +import importlib import os import re -import importlib +import sys + import dateutil.parser -import sphinx -import sphinx.ext.intersphinx as intersphinx +from IPython.lib.lexers import IPyLexer, IPythonConsoleLexer from sphinx import highlighting +from sphinx.ext import intersphinx from sphinx.transforms import SphinxTransform from sphinx.util.docutils import SphinxDirective -from IPython.lib.lexers import IPythonConsoleLexer, IPyLexer -from sage.misc.sagedoc import extlinks -from sage.env import SAGE_DOC_SRC, SAGE_DOC, PPLPY_DOCS, MATHJAX_DIR -from sage.misc.latex_macros import sage_mathjax_macros -from sage.features.sphinx import JupyterSphinx -from sage.features.all import all_features + import sage.version +from sage.env import MATHJAX_DIR, PPLPY_DOCS, SAGE_DOC, SAGE_DOC_SRC +from sage.features.sphinx import JupyterSphinx +from sage.misc.latex_macros import sage_mathjax_macros +from sage.misc.sagedoc_conf import * # Load configuration shared with sage.misc.sphinxify # --------------------- # General configuration @@ -377,8 +374,8 @@ def set_intersphinx_mappings(app, config): # https://www.sphinx-doc.org/en/master/usage/extensions/linkcode.html def linkcode_resolve(domain, info): - import inspect from urllib.parse import quote + from sage.misc.sageinspect import sage_getsourcelines if domain != 'py': return None @@ -707,8 +704,8 @@ def add_page_context(app, pagename, templatename, context, doctree): # source files are generated. suffix = '.py' if importlib.import_module(pagename.replace('/','.')).__file__.endswith('.py') else '.pyx' context['page_source_suffix'] = suffix - context['theme_source_view_link'] = os.path.join(source_repository, f'blob/develop/src', '{filename}') - context['theme_source_edit_link'] = os.path.join(source_repository, f'edit/develop/src', '{filename}') + context['theme_source_view_link'] = os.path.join(source_repository, 'blob/develop/src', '{filename}') + context['theme_source_edit_link'] = os.path.join(source_repository, 'edit/develop/src', '{filename}') dangling_debug = False @@ -962,7 +959,10 @@ def apply(self): if self.app.builder.tags.has('html') or self.app.builder.tags.has('inventory'): for node in list(self.document.findall(nodes.literal_block)): if node.get('language') is None and node.astext().startswith('sage:'): - from docutils.nodes import container as Container, label as Label, literal_block as LiteralBlock, Text + from docutils.nodes import Text + from docutils.nodes import container as Container + from docutils.nodes import label as Label + from docutils.nodes import literal_block as LiteralBlock from sphinx_inline_tabs._impl import TabContainer parent = node.parent index = parent.index(node) @@ -1022,7 +1022,7 @@ def apply(self): prev_node['classes'].append('with-python-tab') if SAGE_LIVE_DOC == 'yes': # Tab for Jupyter-sphinx cell - from jupyter_sphinx.ast import JupyterCellNode, CellInputNode + from jupyter_sphinx.ast import CellInputNode, JupyterCellNode source = node.rawsource lines = [] for line in source.splitlines(): @@ -1099,13 +1099,3 @@ def setup(app): # app.connect('missing-reference', missing_reference) app.connect('missing-reference', find_sage_dangling_links) app.connect('html-page-context', add_page_context) - - -# Conditional content -# https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#tags -# https://www.sphinx-doc.org/en/master/usage/configuration.html#conf-tags -# https://github.com/readthedocs/readthedocs.org/issues/4603#issuecomment-1411594800 -def feature_tags(): - for feature in all_features(): - if feature.is_present(): - yield 'feature_' + feature.name.replace('.', '_') From fc6a1508f3ccb690aaee90d846ef38e055e25ffb Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Mon, 21 Apr 2025 13:02:59 +0000 Subject: [PATCH 2/3] Revert "src/doc/**/conf.py: Fix handling of tags" This reverts commit 61b9f0e91ca334c46ff3cf77533cd1b9a1688b33. --- src/doc/ca/intro/conf.py | 5 ----- src/doc/de/a_tour_of_sage/conf.py | 5 ----- src/doc/de/thematische_anleitungen/conf.py | 5 ----- src/doc/de/tutorial/conf.py | 5 ----- src/doc/el/a_tour_of_sage/conf.py | 5 ----- src/doc/en/a_tour_of_sage/conf.py | 5 ----- src/doc/en/constructions/conf.py | 5 ----- src/doc/en/developer/conf.py | 5 ----- src/doc/en/faq/conf.py | 5 ----- src/doc/en/installation/conf.py | 5 ----- src/doc/en/prep/conf.py | 5 ----- src/doc/en/reference/conf.py | 5 ----- src/doc/en/reference/conf_sub.py | 5 ----- src/doc/en/thematic_tutorials/conf.py | 5 ----- .../explicit_methods_in_number_theory/conf.py | 5 ----- src/doc/en/thematic_tutorials/numerical_sage/conf.py | 5 ----- src/doc/en/tutorial/conf.py | 5 ----- src/doc/en/website/conf.py | 5 ----- src/doc/es/a_tour_of_sage/conf.py | 5 ----- src/doc/es/tutorial/conf.py | 5 ----- src/doc/fr/a_tour_of_sage/conf.py | 5 ----- src/doc/fr/tutorial/conf.py | 5 ----- src/doc/hu/a_tour_of_sage/conf.py | 5 ----- src/doc/it/a_tour_of_sage/conf.py | 5 ----- src/doc/it/faq/conf.py | 5 ----- src/doc/it/tutorial/conf.py | 5 ----- src/doc/ja/a_tour_of_sage/conf.py | 5 ----- src/doc/ja/tutorial/conf.py | 5 ----- src/doc/pt/a_tour_of_sage/conf.py | 5 ----- src/doc/pt/tutorial/conf.py | 5 ----- src/doc/ru/tutorial/conf.py | 5 ----- src/doc/tr/a_tour_of_sage/conf.py | 5 ----- 32 files changed, 160 deletions(-) diff --git a/src/doc/ca/intro/conf.py b/src/doc/ca/intro/conf.py index 877eba7eeb7..71d81dcdbf3 100644 --- a/src/doc/ca/intro/conf.py +++ b/src/doc/ca/intro/conf.py @@ -13,11 +13,6 @@ from sage_docbuild.conf import release from sage_docbuild.conf import * # NOQA - -for tag in feature_tags(): - tags.add(tag) - - # Add any paths that contain custom static files (such as style sheets), # relative to this directory to html_static_path. They are copied after the # builtin static files, so a file named "default.css" will overwrite the diff --git a/src/doc/de/a_tour_of_sage/conf.py b/src/doc/de/a_tour_of_sage/conf.py index fb960f06ffd..71fc7ef9012 100644 --- a/src/doc/de/a_tour_of_sage/conf.py +++ b/src/doc/de/a_tour_of_sage/conf.py @@ -15,11 +15,6 @@ from sage_docbuild.conf import release from sage_docbuild.conf import * # NOQA - -for tag in feature_tags(): - tags.add(tag) - - # Add any paths that contain custom static files (such as style sheets), # relative to this directory to html_static_path. They are copied after the # builtin static files, so a file named "default.css" will overwrite the diff --git a/src/doc/de/thematische_anleitungen/conf.py b/src/doc/de/thematische_anleitungen/conf.py index b8ec2573f90..337f1a98c68 100644 --- a/src/doc/de/thematische_anleitungen/conf.py +++ b/src/doc/de/thematische_anleitungen/conf.py @@ -13,11 +13,6 @@ from sage_docbuild.conf import release from sage_docbuild.conf import * # NOQA - -for tag in feature_tags(): - tags.add(tag) - - # Add any paths that contain custom static files (such as style sheets), # relative to this directory to html_static_path. They are copied after the # builtin static files, so a file named "default.css" will overwrite the diff --git a/src/doc/de/tutorial/conf.py b/src/doc/de/tutorial/conf.py index da1c19e0ffc..399a915e9f4 100644 --- a/src/doc/de/tutorial/conf.py +++ b/src/doc/de/tutorial/conf.py @@ -13,11 +13,6 @@ from sage_docbuild.conf import release from sage_docbuild.conf import * # NOQA - -for tag in feature_tags(): - tags.add(tag) - - # Add any paths that contain custom static files (such as style sheets), # relative to this directory to html_static_path. They are copied after the # builtin static files, so a file named "default.css" will overwrite the diff --git a/src/doc/el/a_tour_of_sage/conf.py b/src/doc/el/a_tour_of_sage/conf.py index ff4e9436313..5548c31525e 100644 --- a/src/doc/el/a_tour_of_sage/conf.py +++ b/src/doc/el/a_tour_of_sage/conf.py @@ -13,11 +13,6 @@ from sage_docbuild.conf import release from sage_docbuild.conf import * # NOQA - -for tag in feature_tags(): - tags.add(tag) - - # Add any paths that contain custom static files (such as style sheets), # relative to this directory to html_static_path. They are copied after the # builtin static files, so a file named "default.css" will overwrite the diff --git a/src/doc/en/a_tour_of_sage/conf.py b/src/doc/en/a_tour_of_sage/conf.py index 689eed59af3..7cf31297409 100644 --- a/src/doc/en/a_tour_of_sage/conf.py +++ b/src/doc/en/a_tour_of_sage/conf.py @@ -13,11 +13,6 @@ from sage_docbuild.conf import release from sage_docbuild.conf import * # NOQA - -for tag in feature_tags(): - tags.add(tag) - - # Add any paths that contain custom static files (such as style sheets), # relative to this directory to html_static_path. They are copied after the # builtin static files, so a file named "default.css" will overwrite the diff --git a/src/doc/en/constructions/conf.py b/src/doc/en/constructions/conf.py index a28d011781c..b6bbbbaab3b 100644 --- a/src/doc/en/constructions/conf.py +++ b/src/doc/en/constructions/conf.py @@ -13,11 +13,6 @@ from sage_docbuild.conf import release from sage_docbuild.conf import * # NOQA - -for tag in feature_tags(): - tags.add(tag) - - # Add any paths that contain custom static files (such as style sheets), # relative to this directory to html_static_path. They are copied after the # builtin static files, so a file named "default.css" will overwrite the diff --git a/src/doc/en/developer/conf.py b/src/doc/en/developer/conf.py index 6e80447f4c7..e8877d61770 100644 --- a/src/doc/en/developer/conf.py +++ b/src/doc/en/developer/conf.py @@ -13,11 +13,6 @@ from sage_docbuild.conf import release from sage_docbuild.conf import * # NOQA - -for tag in feature_tags(): - tags.add(tag) - - # Add any paths that contain custom static files (such as style sheets), # relative to this directory to html_static_path. They are copied after the # builtin static files, so a file named "default.css" will overwrite the diff --git a/src/doc/en/faq/conf.py b/src/doc/en/faq/conf.py index a175e9cf0ee..4c8a71bd9d1 100644 --- a/src/doc/en/faq/conf.py +++ b/src/doc/en/faq/conf.py @@ -15,11 +15,6 @@ from sage_docbuild.conf import release from sage_docbuild.conf import * - -for tag in feature_tags(): - tags.add(tag) - - # Add any paths that contain custom static files (such as style sheets), # relative to this directory to html_static_path. They are copied after the # builtin static files, so a file named "default.css" will overwrite the diff --git a/src/doc/en/installation/conf.py b/src/doc/en/installation/conf.py index 7e6174b0d90..ea6956d2678 100644 --- a/src/doc/en/installation/conf.py +++ b/src/doc/en/installation/conf.py @@ -13,11 +13,6 @@ from sage_docbuild.conf import release from sage_docbuild.conf import * # NOQA - -for tag in feature_tags(): - tags.add(tag) - - # Add any paths that contain custom static files (such as style sheets), # relative to this directory to html_static_path. They are copied after the # builtin static files, so a file named "default.css" will overwrite the diff --git a/src/doc/en/prep/conf.py b/src/doc/en/prep/conf.py index 03ff6ed7afc..645d451644d 100644 --- a/src/doc/en/prep/conf.py +++ b/src/doc/en/prep/conf.py @@ -13,11 +13,6 @@ from sage_docbuild.conf import release from sage_docbuild.conf import * # NOQA - -for tag in feature_tags(): - tags.add(tag) - - # Add any paths that contain custom static files (such as style sheets), # relative to this directory to html_static_path. They are copied after the # builtin static files, so a file named "default.css" will overwrite the diff --git a/src/doc/en/reference/conf.py b/src/doc/en/reference/conf.py index 92b8a8d45b4..984c43363f2 100644 --- a/src/doc/en/reference/conf.py +++ b/src/doc/en/reference/conf.py @@ -15,11 +15,6 @@ from sage_docbuild.conf import release, latex_elements, exclude_patterns from sage_docbuild.conf import * - -for tag in feature_tags(): - tags.add(tag) - - # Add any paths that contain custom static files (such as style sheets), # relative to this directory to html_static_path. They are copied after the # builtin static files, so a file named "default.css" will overwrite the diff --git a/src/doc/en/reference/conf_sub.py b/src/doc/en/reference/conf_sub.py index c7adc1da994..479e9c306d2 100644 --- a/src/doc/en/reference/conf_sub.py +++ b/src/doc/en/reference/conf_sub.py @@ -15,11 +15,6 @@ from sage_docbuild.conf import release, exclude_patterns from sage_docbuild.conf import * - -for tag in feature_tags(): - tags.add(tag) - - # Add any paths that contain custom static files (such as style sheets), # relative to this directory to html_static_path. They are copied after the # builtin static files, so a file named "default.css" will overwrite the diff --git a/src/doc/en/thematic_tutorials/conf.py b/src/doc/en/thematic_tutorials/conf.py index 581a8e89fc6..cb6d1662f47 100644 --- a/src/doc/en/thematic_tutorials/conf.py +++ b/src/doc/en/thematic_tutorials/conf.py @@ -15,11 +15,6 @@ from sage_docbuild.conf import release from sage_docbuild.conf import * - -for tag in feature_tags(): - tags.add(tag) - - # Add any paths that contain custom static files (such as style sheets), # relative to this directory to html_static_path. They are copied after the # builtin static files, so a file named "default.css" will overwrite the diff --git a/src/doc/en/thematic_tutorials/explicit_methods_in_number_theory/conf.py b/src/doc/en/thematic_tutorials/explicit_methods_in_number_theory/conf.py index 9de7aa68adb..b8eef385e4f 100644 --- a/src/doc/en/thematic_tutorials/explicit_methods_in_number_theory/conf.py +++ b/src/doc/en/thematic_tutorials/explicit_methods_in_number_theory/conf.py @@ -13,11 +13,6 @@ from sage_docbuild.conf import release from sage_docbuild.conf import * # NOQA - -for tag in feature_tags(): - tags.add(tag) - - # Add any paths that contain custom static files (such as style sheets), # relative to this directory to html_static_path. They are copied after the # builtin static files, so a file named "default.css" will overwrite the diff --git a/src/doc/en/thematic_tutorials/numerical_sage/conf.py b/src/doc/en/thematic_tutorials/numerical_sage/conf.py index c8e220f8f99..5772289f6fa 100644 --- a/src/doc/en/thematic_tutorials/numerical_sage/conf.py +++ b/src/doc/en/thematic_tutorials/numerical_sage/conf.py @@ -13,11 +13,6 @@ from sage_docbuild.conf import release from sage_docbuild.conf import * # NOQA - -for tag in feature_tags(): - tags.add(tag) - - # Add any paths that contain custom static files (such as style sheets), # relative to this directory to html_static_path. They are copied after the # builtin static files, so a file named "default.css" will overwrite the diff --git a/src/doc/en/tutorial/conf.py b/src/doc/en/tutorial/conf.py index 52be3420ed1..b566ec19677 100644 --- a/src/doc/en/tutorial/conf.py +++ b/src/doc/en/tutorial/conf.py @@ -13,11 +13,6 @@ from sage_docbuild.conf import release from sage_docbuild.conf import * # NOQA - -for tag in feature_tags(): - tags.add(tag) - - # Add any paths that contain custom static files (such as style sheets), # relative to this directory to html_static_path. They are copied after the # builtin static files, so a file named "default.css" will overwrite the diff --git a/src/doc/en/website/conf.py b/src/doc/en/website/conf.py index b238169bb3c..38f31e5d46f 100644 --- a/src/doc/en/website/conf.py +++ b/src/doc/en/website/conf.py @@ -13,11 +13,6 @@ from sage_docbuild.conf import release from sage_docbuild.conf import * # NOQA - -for tag in feature_tags(): - tags.add(tag) - - # Add any paths that contain custom static files (such as style sheets), # relative to this directory to html_static_path. They are copied after the # builtin static files, so a file named "default.css" will overwrite the diff --git a/src/doc/es/a_tour_of_sage/conf.py b/src/doc/es/a_tour_of_sage/conf.py index 801f7cadb95..dee2afa4d66 100644 --- a/src/doc/es/a_tour_of_sage/conf.py +++ b/src/doc/es/a_tour_of_sage/conf.py @@ -15,11 +15,6 @@ from sage_docbuild.conf import release from sage_docbuild.conf import * - -for tag in feature_tags(): - tags.add(tag) - - # Add any paths that contain custom static files (such as style sheets), # relative to this directory to html_static_path. They are copied after the # builtin static files, so a file named "default.css" will overwrite the diff --git a/src/doc/es/tutorial/conf.py b/src/doc/es/tutorial/conf.py index dcb44232ca0..43e23fdc568 100644 --- a/src/doc/es/tutorial/conf.py +++ b/src/doc/es/tutorial/conf.py @@ -13,11 +13,6 @@ from sage_docbuild.conf import release from sage_docbuild.conf import * - -for tag in feature_tags(): - tags.add(tag) - - # Add any paths that contain custom static files (such as style sheets), # relative to this directory to html_static_path. They are copied after the # builtin static files, so a file named "default.css" will overwrite the diff --git a/src/doc/fr/a_tour_of_sage/conf.py b/src/doc/fr/a_tour_of_sage/conf.py index 9cca4b7d1f8..af1f453f3e4 100644 --- a/src/doc/fr/a_tour_of_sage/conf.py +++ b/src/doc/fr/a_tour_of_sage/conf.py @@ -13,11 +13,6 @@ from sage_docbuild.conf import release, latex_elements from sage_docbuild.conf import * # NOQA - -for tag in feature_tags(): - tags.add(tag) - - # Add any paths that contain custom static files (such as style sheets), # relative to this directory to html_static_path. They are copied after the # builtin static files, so a file named "default.css" will overwrite the diff --git a/src/doc/fr/tutorial/conf.py b/src/doc/fr/tutorial/conf.py index 38e0160f3ba..af70d3eb4ff 100644 --- a/src/doc/fr/tutorial/conf.py +++ b/src/doc/fr/tutorial/conf.py @@ -13,11 +13,6 @@ from sage_docbuild.conf import release, latex_elements from sage_docbuild.conf import * # NOQA - -for tag in feature_tags(): - tags.add(tag) - - # Add any paths that contain custom static files (such as style sheets), # relative to this directory to html_static_path. They are copied after the # builtin static files, so a file named "default.css" will overwrite the diff --git a/src/doc/hu/a_tour_of_sage/conf.py b/src/doc/hu/a_tour_of_sage/conf.py index 2e5215fcf5d..b097f56dfe0 100644 --- a/src/doc/hu/a_tour_of_sage/conf.py +++ b/src/doc/hu/a_tour_of_sage/conf.py @@ -15,11 +15,6 @@ from sage_docbuild.conf import release from sage_docbuild.conf import * # NOQA - -for tag in feature_tags(): - tags.add(tag) - - # Add any paths that contain custom static files (such as style sheets), # relative to this directory to html_static_path. They are copied after the # builtin static files, so a file named "default.css" will overwrite the diff --git a/src/doc/it/a_tour_of_sage/conf.py b/src/doc/it/a_tour_of_sage/conf.py index 48a568cc4d1..d06280ece36 100644 --- a/src/doc/it/a_tour_of_sage/conf.py +++ b/src/doc/it/a_tour_of_sage/conf.py @@ -13,11 +13,6 @@ from sage_docbuild.conf import release, latex_elements from sage_docbuild.conf import * # NOQA - -for tag in feature_tags(): - tags.add(tag) - - # Add any paths that contain custom static files (such as style sheets), # relative to this directory to html_static_path. They are copied after the # builtin static files, so a file named "default.css" will overwrite the diff --git a/src/doc/it/faq/conf.py b/src/doc/it/faq/conf.py index 84a8ac93eab..e3898184a1f 100644 --- a/src/doc/it/faq/conf.py +++ b/src/doc/it/faq/conf.py @@ -15,11 +15,6 @@ from sage_docbuild.conf import release from sage_docbuild.conf import * - -for tag in feature_tags(): - tags.add(tag) - - # Add any paths that contain custom static files (such as style sheets), # relative to this directory to html_static_path. They are copied after the # builtin static files, so a file named "default.css" will overwrite the diff --git a/src/doc/it/tutorial/conf.py b/src/doc/it/tutorial/conf.py index ea77f3199b0..15186edb4ba 100644 --- a/src/doc/it/tutorial/conf.py +++ b/src/doc/it/tutorial/conf.py @@ -13,11 +13,6 @@ from sage_docbuild.conf import release, latex_elements from sage_docbuild.conf import * # NOQA - -for tag in feature_tags(): - tags.add(tag) - - # Add any paths that contain custom static files (such as style sheets), # relative to this directory to html_static_path. They are copied after the # builtin static files, so a file named "default.css" will overwrite the diff --git a/src/doc/ja/a_tour_of_sage/conf.py b/src/doc/ja/a_tour_of_sage/conf.py index eef0eba83b3..e8ec7cca39b 100644 --- a/src/doc/ja/a_tour_of_sage/conf.py +++ b/src/doc/ja/a_tour_of_sage/conf.py @@ -13,11 +13,6 @@ from sage_docbuild.conf import release, latex_elements from sage_docbuild.conf import * # NOQA - -for tag in feature_tags(): - tags.add(tag) - - # Add any paths that contain custom static files (such as style sheets), # relative to this directory to html_static_path. They are copied after the # builtin static files, so a file named "default.css" will overwrite the diff --git a/src/doc/ja/tutorial/conf.py b/src/doc/ja/tutorial/conf.py index eaaa4558a34..9002593de99 100644 --- a/src/doc/ja/tutorial/conf.py +++ b/src/doc/ja/tutorial/conf.py @@ -13,11 +13,6 @@ from sage_docbuild.conf import release, latex_elements from sage_docbuild.conf import * # NOQA - -for tag in feature_tags(): - tags.add(tag) - - # Add any paths that contain custom static files (such as style sheets), # relative to this directory to html_static_path. They are copied after the # builtin static files, so a file named "default.css" will overwrite the diff --git a/src/doc/pt/a_tour_of_sage/conf.py b/src/doc/pt/a_tour_of_sage/conf.py index 806bc1b77c8..267d499ca64 100644 --- a/src/doc/pt/a_tour_of_sage/conf.py +++ b/src/doc/pt/a_tour_of_sage/conf.py @@ -13,11 +13,6 @@ from sage_docbuild.conf import release from sage_docbuild.conf import * # NOQA - -for tag in feature_tags(): - tags.add(tag) - - # Add any paths that contain custom static files (such as style sheets), # relative to this directory to html_static_path. They are copied after the # builtin static files, so a file named "default.css" will overwrite the diff --git a/src/doc/pt/tutorial/conf.py b/src/doc/pt/tutorial/conf.py index 26368567ee4..a5cabc5b0d1 100644 --- a/src/doc/pt/tutorial/conf.py +++ b/src/doc/pt/tutorial/conf.py @@ -13,11 +13,6 @@ from sage_docbuild.conf import release from sage_docbuild.conf import * # NOQA - -for tag in feature_tags(): - tags.add(tag) - - # Add any paths that contain custom static files (such as style sheets), # relative to this directory to html_static_path. They are copied after the # builtin static files, so a file named "default.css" will overwrite the diff --git a/src/doc/ru/tutorial/conf.py b/src/doc/ru/tutorial/conf.py index f2f44113045..5d39f7d2600 100644 --- a/src/doc/ru/tutorial/conf.py +++ b/src/doc/ru/tutorial/conf.py @@ -13,11 +13,6 @@ from sage_docbuild.conf import release from sage_docbuild.conf import * # NOQA - -for tag in feature_tags(): - tags.add(tag) - - # Add any paths that contain custom static files (such as style sheets), # relative to this directory to html_static_path. They are copied after the # builtin static files, so a file named "default.css" will overwrite the diff --git a/src/doc/tr/a_tour_of_sage/conf.py b/src/doc/tr/a_tour_of_sage/conf.py index 9d2a503d78d..b7536470bd4 100644 --- a/src/doc/tr/a_tour_of_sage/conf.py +++ b/src/doc/tr/a_tour_of_sage/conf.py @@ -13,11 +13,6 @@ from sage_docbuild.conf import release from sage_docbuild.conf import * # NOQA - -for tag in feature_tags(): - tags.add(tag) - - # Add any paths that contain custom static files (such as style sheets), # relative to this directory to html_static_path. They are copied after the # builtin static files, so a file named "default.css" will overwrite the From e85cdb014808ce891c27ee575c1b234af1685594 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Mon, 21 Apr 2025 15:19:38 +0000 Subject: [PATCH 3/3] Readd missing import --- src/sage_docbuild/conf.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sage_docbuild/conf.py b/src/sage_docbuild/conf.py index 1bf5c390fbf..99187bf30f0 100644 --- a/src/sage_docbuild/conf.py +++ b/src/sage_docbuild/conf.py @@ -31,6 +31,7 @@ from sage.env import MATHJAX_DIR, PPLPY_DOCS, SAGE_DOC, SAGE_DOC_SRC from sage.features.sphinx import JupyterSphinx from sage.misc.latex_macros import sage_mathjax_macros +from sage.misc.sagedoc import extlinks as extlinks # noqa: PLC0414 from sage.misc.sagedoc_conf import * # Load configuration shared with sage.misc.sphinxify # ---------------------