Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-sphinx-gallery for 
openSUSE:Factory checked in at 2026-01-28 15:12:12
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-sphinx-gallery (Old)
 and      /work/SRC/openSUSE:Factory/.python-sphinx-gallery.new.1928 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-sphinx-gallery"

Wed Jan 28 15:12:12 2026 rev:6 rq:1329536 version:0.20.0

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-sphinx-gallery/python-sphinx-gallery.changes  
    2025-03-31 11:44:34.899648713 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-sphinx-gallery.new.1928/python-sphinx-gallery.changes
    2026-01-28 15:14:55.997440966 +0100
@@ -1,0 +2,31 @@
+Tue Jan 27 16:25:27 UTC 2026 - Dirk Müller <[email protected]>
+
+- update to 0.20.0:
+  * Support for Python 3.8 dropped in this release. Requirement
+    is now Python >=3.10.
+  * Bump version 0.20.0
+  * MNT Add test for `_bool_eval` and add configs to `_bool_eval`
+    check
+  * Add POT, SKADA and TorchDR to the list in README
+  * Update instructions for converting script to notebook
+  * Add comment on path for sphinx_gallery_thumbnail_path
+  * DOC Add plotly to supported scrapers
+  * DOC: Add JUnit XML parsing example
+  * DOC Update junit doc
+  * [DOC] Add an example or index.rst file that allow example in
+    multiple sections
+  * Embed code links with dirhtml builder
+  * Fix typo in note about Binder/JupyterLite
+  * Remove "# noqa: E501" from end of text blocks
+  * allow git archives to have dynamic versioning
+  * Update FAQ with notebook and RST file guidance
+  * DOC: Add cards for the subsections on the main topic pages
+  * Fix sphinx warning
+  * MNT: Use names instead of indices for Block namedtuple
+  * FIX: Fix test_recommend_n_examples
+  * ENH: Use :doc: instead of :ref: to link to examples
+  * MAINT: Add MNE-Python doc build integration test
+  * Support plain .rst files as example inputs
+  * MNT Update jupyterlite-sphinx version in circle CI
+
+-------------------------------------------------------------------

Old:
----
  sphinx_gallery-0.19.0.tar.gz

New:
----
  sphinx_gallery-0.20.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-sphinx-gallery.spec ++++++
--- /var/tmp/diff_new_pack.wgIcZm/_old  2026-01-28 15:14:56.765472960 +0100
+++ /var/tmp/diff_new_pack.wgIcZm/_new  2026-01-28 15:14:56.769473127 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-sphinx-gallery
 #
-# Copyright (c) 2025 SUSE LLC
+# Copyright (c) 2026 SUSE LLC and contributors
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,7 @@
 
 %{?sle15_python_module_pythons}
 Name:           python-sphinx-gallery
-Version:        0.19.0
+Version:        0.20.0
 Release:        0
 Summary:        Sphinx extension that builds an HTML gallery of examples
 License:        BSD-3-Clause

++++++ sphinx_gallery-0.19.0.tar.gz -> sphinx_gallery-0.20.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sphinx_gallery-0.19.0/.gitattributes 
new/sphinx_gallery-0.20.0/.gitattributes
--- old/sphinx_gallery-0.19.0/.gitattributes    1970-01-01 01:00:00.000000000 
+0100
+++ new/sphinx_gallery-0.20.0/.gitattributes    2025-12-02 16:51:02.000000000 
+0100
@@ -0,0 +1 @@
+.git_archival.txt  export-subst
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sphinx_gallery-0.19.0/.github/install.sh 
new/sphinx_gallery-0.20.0/.github/install.sh
--- old/sphinx_gallery-0.19.0/.github/install.sh        2025-02-13 
04:24:18.000000000 +0100
+++ new/sphinx_gallery-0.20.0/.github/install.sh        2025-12-02 
16:51:02.000000000 +0100
@@ -13,7 +13,7 @@
     if [ "$PLATFORM" != "Linux" ]; then
         conda remove -y memory_profiler
     fi
-    PIP_DEPENDENCIES="jupyterlite-sphinx>=0.17.1 jupyterlite-pyodide-kernel 
libarchive-c numpy"
+    PIP_DEPENDENCIES="jupyterlite-sphinx>=0.17.1 jupyterlite-pyodide-kernel 
libarchive-c numpy sphinx-design"
 elif [ "$DISTRIB" == "minimal" ]; then
     PIP_DEPENDENCIES=""
 elif [ "$DISTRIB" == "pip" ]; then
@@ -30,7 +30,10 @@
 
 # Sphinx version
 if [ "$SPHINX_VERSION" == "dev" ]; then
-    PIP_DEPENDENCIES="--upgrade --pre 
https://api.github.com/repos/sphinx-doc/sphinx/zipball/master 
--default-timeout=60 --extra-index-url 
'https://pypi.anaconda.org/scientific-python-nightly-wheels/simple' 
$PIP_DEPENDENCIES"
+    # TODO: Reenable once sphinx-design and pydata-sphinx-theme are 9.0+ 
compatible,
+    # Then also add a sphinx-9 test job
+    # PIP_DEPENDENCIES="--upgrade --pre 
https://api.github.com/repos/sphinx-doc/sphinx/zipball/master 
--default-timeout=60 --extra-index-url 
'https://pypi.anaconda.org/scientific-python-nightly-wheels/simple' 
$PIP_DEPENDENCIES"
+    PIP_DEPENDENCIES="--upgrade --pre sphinx<9 --default-timeout=60 
--extra-index-url 
'https://pypi.anaconda.org/scientific-python-nightly-wheels/simple' 
$PIP_DEPENDENCIES"
 elif [ "$SPHINX_VERSION" != "default" ]; then
     PIP_DEPENDENCIES="sphinx==${SPHINX_VERSION}.* $PIP_DEPENDENCIES"
 else
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sphinx_gallery-0.19.0/.github/release.yml 
new/sphinx_gallery-0.20.0/.github/release.yml
--- old/sphinx_gallery-0.19.0/.github/release.yml       2025-02-13 
04:24:18.000000000 +0100
+++ new/sphinx_gallery-0.20.0/.github/release.yml       2025-12-02 
16:51:02.000000000 +0100
@@ -1,5 +1,5 @@
 changelog:
   exclude:
     authors:
-      - dependabot
-      - pre-commit-ci
+      - dependabot[bot]
+      - pre-commit-ci[bot]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sphinx_gallery-0.19.0/.github/workflows/release.yml 
new/sphinx_gallery-0.20.0/.github/workflows/release.yml
--- old/sphinx_gallery-0.19.0/.github/workflows/release.yml     2025-02-13 
04:24:18.000000000 +0100
+++ new/sphinx_gallery-0.20.0/.github/workflows/release.yml     2025-12-02 
16:51:02.000000000 +0100
@@ -19,11 +19,11 @@
   package:
     runs-on: ubuntu-latest
     steps:
-      - uses: actions/checkout@v4
+      - uses: actions/checkout@v6
       - name: Set up Python
-        uses: actions/setup-python@v5
+        uses: actions/setup-python@v6
         with:
-          python-version: '3.10'
+          python-version: '3.13'
       - name: Install dependencies
         run: |
           python -m pip install --upgrade pip
@@ -35,7 +35,7 @@
       - name: Check env vars
         run: |
           echo "Triggered by: ${{ github.event_name }}"
-      - uses: actions/upload-artifact@v4
+      - uses: actions/upload-artifact@v5
         with:
           name: dist
           path: dist
@@ -45,13 +45,15 @@
     needs: package
     runs-on: ubuntu-latest
     if: github.event_name == 'release'
+    permissions:
+      id-token: write  # for trusted publishing
+    environment:
+      name: pypi
+      url: https://pypi.org/p/sphinx-gallery
     steps:
-      - uses: actions/download-artifact@v4
+      - uses: actions/download-artifact@v6
         with:
           name: dist
           path: dist
       - name: Publish to PyPI
         uses: pypa/gh-action-pypi-publish@release/v1
-        with:
-          user: __token__
-          password: ${{ secrets.PYPI_API_TOKEN }}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sphinx_gallery-0.19.0/.github/workflows/tests.yml 
new/sphinx_gallery-0.20.0/.github/workflows/tests.yml
--- old/sphinx_gallery-0.19.0/.github/workflows/tests.yml       2025-02-13 
04:24:18.000000000 +0100
+++ new/sphinx_gallery-0.20.0/.github/workflows/tests.yml       2025-12-02 
16:51:02.000000000 +0100
@@ -12,6 +12,16 @@
   contents: read
 
 jobs:
+  style:
+    name: 'Quick checks'
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v6
+      - uses: actions/setup-python@v6
+        with:
+          python-version: '3.13'
+      - run: pip install check-manifest
+      - run: check-manifest
   pytest:
     name: '${{ matrix.os }} / ${{ matrix.python }} / ${{ matrix.distrib }} / 
${{ matrix.sphinx_version }}'
     timeout-minutes: 30
@@ -28,7 +38,7 @@
       matrix:
         include:
           - os: ubuntu-latest  # newest possible
-            python: '3.12'
+            python: '3.13'
             sphinx_version: dev
             distrib: pip
             locale: C
@@ -41,11 +51,15 @@
             sphinx_version: '6'
             distrib: mamba
           - os: ubuntu-latest
-            python: '3.8'
+            python: '3.10'
             sphinx_version: '7'
             distrib: minimal
+          - os: ubuntu-latest
+            python: '3.13'
+            sphinx_version: '8'
+            distrib: pip
           - os: macos-latest
-            python: '3.11'
+            python: '3.12'
             sphinx_version: 'default'
             distrib: mamba  # only use mamba on macOS to avoid Python shell 
issues
           - os: windows-latest
@@ -53,7 +67,7 @@
             sphinx_version: 'default'
             distrib: pip
     steps:
-      - uses: actions/checkout@v4
+      - uses: actions/checkout@v6
         with:
           fetch-depth: 0
       # Xvfb/OpenGL
@@ -62,7 +76,7 @@
           qt: true
           pyvista: false
       # Python (if pip)
-      - uses: actions/setup-python@v5
+      - uses: actions/setup-python@v6
         with:
           python-version: ${{ env.PYTHON_VERSION }}
         if: matrix.distrib != 'mamba'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sphinx_gallery-0.19.0/MANIFEST.in 
new/sphinx_gallery-0.20.0/MANIFEST.in
--- old/sphinx_gallery-0.19.0/MANIFEST.in       2025-02-13 04:24:18.000000000 
+0100
+++ new/sphinx_gallery-0.20.0/MANIFEST.in       2025-12-02 16:51:02.000000000 
+0100
@@ -40,5 +40,6 @@
 exclude gen_modules
 exclude .DS_store
 exclude .github_changelog_generator
+exclude .git_archival.txt
 exclude .git-blame-ignore-revs
 exclude .pre-commit-config.yaml
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sphinx_gallery-0.19.0/PKG-INFO 
new/sphinx_gallery-0.20.0/PKG-INFO
--- old/sphinx_gallery-0.19.0/PKG-INFO  2025-02-13 04:24:28.434207400 +0100
+++ new/sphinx_gallery-0.20.0/PKG-INFO  2025-12-02 16:51:11.451979200 +0100
@@ -1,6 +1,6 @@
-Metadata-Version: 2.2
+Metadata-Version: 2.4
 Name: sphinx-gallery
-Version: 0.19.0
+Version: 0.20.0
 Summary: A Sphinx extension that builds an HTML gallery of examples from any 
set of Python scripts.
 Author-email: Óscar Nájera <[email protected]>
 License: 3-clause BSD
@@ -11,13 +11,12 @@
 Classifier: Intended Audience :: Developers
 Classifier: Programming Language :: Python
 Classifier: Programming Language :: Python :: 3 :: Only
-Classifier: Programming Language :: Python :: 3.8
-Classifier: Programming Language :: Python :: 3.9
 Classifier: Programming Language :: Python :: 3.10
 Classifier: Programming Language :: Python :: 3.11
 Classifier: Programming Language :: Python :: 3.12
 Classifier: Programming Language :: Python :: 3.13
-Requires-Python: >=3.8
+Classifier: Programming Language :: Python :: 3.14
+Requires-Python: >=3.10
 Description-Content-Type: text/x-rst
 License-File: LICENSE
 Requires-Dist: pillow
@@ -40,6 +39,7 @@
 Requires-Dist: pytest; extra == "dev"
 Requires-Dist: pytest-coverage; extra == "dev"
 Requires-Dist: seaborn; extra == "dev"
+Requires-Dist: sphinx-design; extra == "dev"
 Requires-Dist: sphinxcontrib-video; extra == "dev"
 Requires-Dist: statsmodels; extra == "dev"
 Provides-Extra: jupyterlite
@@ -52,6 +52,7 @@
 Requires-Dist: graphviz; extra == "show-api-usage"
 Provides-Extra: show-memory
 Requires-Dist: memory-profiler; extra == "show-memory"
+Dynamic: license-file
 
 ==============
 Sphinx-Gallery
@@ -190,6 +191,7 @@
 * `OpenTURNS 
<https://openturns.github.io/openturns/latest/examples/examples.html>`_
 * `Optuna <https://optuna.readthedocs.io/en/stable/tutorial/index.html>`_
 * `PlasmaPy <https://docs.plasmapy.org/en/latest/examples.html>`_
+* `POT <https://pythonot.github.io/auto_examples/index.html>`_
 * `PyGMT <https://www.pygmt.org/latest/gallery/index.html>`_
 * `pyRiemann <https://pyriemann.readthedocs.io/en/latest/index.html>`_
 * `PyStruct <https://pystruct.github.io/auto_examples/index.html>`_
@@ -201,9 +203,11 @@
 * `scikit-image <https://scikit-image.org/docs/dev/auto_examples/>`_
 * `scikit-learn <https://scikit-learn.org/stable/auto_examples/index.html>`_
 * `SimPEG <https://docs.simpeg.xyz/content/examples/>`_
+* `SKADA Scikit-adaptation 
<https://scikit-adaptation.github.io/auto_examples/index.html>`_
 * `Sphinx-Gallery 
<https://sphinx-gallery.github.io/stable/auto_examples/index.html>`_
 * `SunPy <https://docs.sunpy.org/en/stable/generated/gallery/index.html>`_
 * `Tonic <https://tonic.readthedocs.io/en/latest/auto_examples/index.html>`_
+* `TorchDR <https://torchdr.github.io/auto_examples/index.html>`_
 * `TorchIO <https://torchio.readthedocs.io/auto_examples/index.html>`_
 
 .. projects_list_end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sphinx_gallery-0.19.0/README.rst 
new/sphinx_gallery-0.20.0/README.rst
--- old/sphinx_gallery-0.19.0/README.rst        2025-02-13 04:24:18.000000000 
+0100
+++ new/sphinx_gallery-0.20.0/README.rst        2025-12-02 16:51:02.000000000 
+0100
@@ -135,6 +135,7 @@
 * `OpenTURNS 
<https://openturns.github.io/openturns/latest/examples/examples.html>`_
 * `Optuna <https://optuna.readthedocs.io/en/stable/tutorial/index.html>`_
 * `PlasmaPy <https://docs.plasmapy.org/en/latest/examples.html>`_
+* `POT <https://pythonot.github.io/auto_examples/index.html>`_
 * `PyGMT <https://www.pygmt.org/latest/gallery/index.html>`_
 * `pyRiemann <https://pyriemann.readthedocs.io/en/latest/index.html>`_
 * `PyStruct <https://pystruct.github.io/auto_examples/index.html>`_
@@ -146,9 +147,11 @@
 * `scikit-image <https://scikit-image.org/docs/dev/auto_examples/>`_
 * `scikit-learn <https://scikit-learn.org/stable/auto_examples/index.html>`_
 * `SimPEG <https://docs.simpeg.xyz/content/examples/>`_
+* `SKADA Scikit-adaptation 
<https://scikit-adaptation.github.io/auto_examples/index.html>`_
 * `Sphinx-Gallery 
<https://sphinx-gallery.github.io/stable/auto_examples/index.html>`_
 * `SunPy <https://docs.sunpy.org/en/stable/generated/gallery/index.html>`_
 * `Tonic <https://tonic.readthedocs.io/en/latest/auto_examples/index.html>`_
+* `TorchDR <https://torchdr.github.io/auto_examples/index.html>`_
 * `TorchIO <https://torchio.readthedocs.io/auto_examples/index.html>`_
 
 .. projects_list_end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/sphinx_gallery-0.19.0/examples/plot_4b_provide_thumbnail.py 
new/sphinx_gallery-0.20.0/examples/plot_4b_provide_thumbnail.py
--- old/sphinx_gallery-0.19.0/examples/plot_4b_provide_thumbnail.py     
2025-02-13 04:24:18.000000000 +0100
+++ new/sphinx_gallery-0.20.0/examples/plot_4b_provide_thumbnail.py     
2025-12-02 16:51:02.000000000 +0100
@@ -7,6 +7,7 @@
 ``sphinx_gallery_thumbnail_path = 'fig path'`` as a comment somewhere below the
 docstring in the example file. In this example, we specify that we wish the
 figure ``demo.png`` in the folder ``_static`` to be used for the thumbnail.
+Note, the path to the image should be relative to the ``conf.py``.
 """
 
 import matplotlib.pyplot as plt
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sphinx_gallery-0.19.0/pyproject.toml 
new/sphinx_gallery-0.20.0/pyproject.toml
--- old/sphinx_gallery-0.19.0/pyproject.toml    2025-02-13 04:24:18.000000000 
+0100
+++ new/sphinx_gallery-0.20.0/pyproject.toml    2025-12-02 16:51:02.000000000 
+0100
@@ -2,7 +2,7 @@
 build-backend = "setuptools.build_meta"
 requires = [
   "setuptools",
-  "setuptools-scm",
+  "setuptools-scm>=7",
 ]
 
 [project]
@@ -13,19 +13,18 @@
 authors = [
   { name = "Óscar Nájera", email = '[email protected]' },
 ]
-requires-python = ">=3.8"
+requires-python = ">=3.10"
 classifiers = [
   "Development Status :: 4 - Beta",
   "Framework :: Sphinx :: Extension",
   "Intended Audience :: Developers",
   "Programming Language :: Python",
   "Programming Language :: Python :: 3 :: Only",
-  "Programming Language :: Python :: 3.8",
-  "Programming Language :: Python :: 3.9",
   "Programming Language :: Python :: 3.10",
   "Programming Language :: Python :: 3.11",
   "Programming Language :: Python :: 3.12",
   "Programming Language :: Python :: 3.13",
+  "Programming Language :: Python :: 3.14",
 ]
 dynamic = [
   "version",
@@ -53,6 +52,7 @@
   "pytest",
   "pytest-coverage",
   "seaborn",
+  "sphinx-design",
   "sphinxcontrib-video",
   "statsmodels",
 ]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sphinx_gallery-0.19.0/sphinx_gallery/__init__.py 
new/sphinx_gallery-0.20.0/sphinx_gallery/__init__.py
--- old/sphinx_gallery-0.19.0/sphinx_gallery/__init__.py        2025-02-13 
04:24:18.000000000 +0100
+++ new/sphinx_gallery-0.20.0/sphinx_gallery/__init__.py        2025-12-02 
16:51:02.000000000 +0100
@@ -8,7 +8,7 @@
 
 # dev versions should have "dev" in them, stable should not.
 # doc/conf.py makes use of this to set the version drop-down.
-__version__ = "0.19.0"
+__version__ = "0.20.0"
 
 
 def glr_path_static():
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/sphinx_gallery-0.19.0/sphinx_gallery/backreferences.py 
new/sphinx_gallery-0.20.0/sphinx_gallery/backreferences.py
--- old/sphinx_gallery-0.19.0/sphinx_gallery/backreferences.py  2025-02-13 
04:24:18.000000000 +0100
+++ new/sphinx_gallery-0.20.0/sphinx_gallery/backreferences.py  2025-12-02 
16:51:02.000000000 +0100
@@ -300,7 +300,7 @@
   .. image:: /{thumbnail}
     :alt:
 
-  :ref:`sphx_glr_{ref_name}`
+  :doc:`{doc_name}`
 
 .. raw:: html
 
@@ -314,7 +314,7 @@
     + """
 .. only:: not html
 
- * :ref:`sphx_glr_{ref_name}`
+ * :doc:`{doc_name}`
 """
 )
 
@@ -362,11 +362,11 @@
     # Inside rst files forward slash defines paths
     thumb = thumb.replace(os.sep, "/")
 
-    ref_name = os.path.join(full_dir, fname).replace(os.sep, "_")
+    doc_name = "/" + (Path(full_dir) / fname).with_suffix("").as_posix()
 
     template = BACKREF_THUMBNAIL_TEMPLATE if is_backref else THUMBNAIL_TEMPLATE
     return template.format(
-        intro=escape(intro), thumbnail=thumb, title=title, ref_name=ref_name
+        intro=escape(intro), thumbnail=thumb, title=title, doc_name=doc_name
     )
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sphinx_gallery-0.19.0/sphinx_gallery/docs_resolv.py 
new/sphinx_gallery-0.20.0/sphinx_gallery/docs_resolv.py
--- old/sphinx_gallery-0.19.0/sphinx_gallery/docs_resolv.py     2025-02-13 
04:24:18.000000000 +0100
+++ new/sphinx_gallery-0.20.0/sphinx_gallery/docs_resolv.py     2025-12-02 
16:51:02.000000000 +0100
@@ -377,9 +377,12 @@
     for dirpath, fname in iterator:
         full_fname = os.path.join(html_gallery_dir, dirpath, fname)
         subpath = dirpath[len(html_gallery_dir) + 1 :]
-        json_fname = os.path.join(
-            src_gallery_dir, subpath, fname[:-5] + ".codeobj.json"
-        )
+        if app.builder.name == "dirhtml":
+            json_fname = os.path.join(src_gallery_dir, 
f"{subpath}.codeobj.json")
+        else:
+            json_fname = os.path.join(
+                src_gallery_dir, subpath, fname[:-5] + ".codeobj.json"
+            )
         if not os.path.exists(json_fname):
             continue
 
@@ -408,6 +411,8 @@
                             _handle_http_url_error(
                                 e, msg=f"resolving {modname}.{cname}"
                             )
+                        if link is not None and app.builder.name == "dirhtml":
+                            link = link.replace(".html", "/")
 
                     # next try intersphinx
                     if this_module == modname == "builtins":
@@ -421,7 +426,10 @@
                         for key, value in inv.items():
                             # only python domain
                             if key.startswith("py") and want in value:
-                                link = value[want][2]
+                                try:
+                                    link = value[want].uri
+                                except AttributeError:  # sphinx < 8.2
+                                    link = value[want][2]
                                 type_ = key
                                 break
 
@@ -489,7 +497,7 @@
     # require searchindex.js to exist for the links to the local doc
     # and there does not seem to be a good way of knowing which
     # builders creates a searchindex.js.
-    if app.builder.name not in ["html", "readthedocs"]:
+    if app.builder.name not in ["html", "dirhtml", "readthedocs"]:
         return
 
     logger.info("embedding documentation hyperlinks...", color="white")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sphinx_gallery-0.19.0/sphinx_gallery/downloads.py 
new/sphinx_gallery-0.20.0/sphinx_gallery/downloads.py
--- old/sphinx_gallery-0.19.0/sphinx_gallery/downloads.py       2025-02-13 
04:24:18.000000000 +0100
+++ new/sphinx_gallery-0.20.0/sphinx_gallery/downloads.py       2025-12-02 
16:51:02.000000000 +0100
@@ -96,7 +96,8 @@
     download_rst: str
         RestructuredText to include download buttons to the generated files
     """
-    src_ext = tuple(gallery_conf["example_extensions"])
+    # .rst are plain sources which should not be available as zip.
+    src_ext = tuple(ext for ext in gallery_conf["example_extensions"] if ext 
!= ".rst")
     notebook_ext = tuple(gallery_conf["notebook_extensions"])
     source_files = list_downloadable_sources(gallery_dir, src_ext)
     notebook_files = list_downloadable_sources(gallery_dir, notebook_ext)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sphinx_gallery-0.19.0/sphinx_gallery/gen_gallery.py 
new/sphinx_gallery-0.20.0/sphinx_gallery/gen_gallery.py
--- old/sphinx_gallery-0.19.0/sphinx_gallery/gen_gallery.py     2025-02-13 
04:24:18.000000000 +0100
+++ new/sphinx_gallery-0.20.0/sphinx_gallery/gen_gallery.py     2025-12-02 
16:51:02.000000000 +0100
@@ -96,11 +96,8 @@
     "reference_url": {},
     "capture_repr": ("_repr_html_", "__repr__"),
     "ignore_repr_types": r"",
-    # Build options
-    # -------------
-    # 'plot_gallery' also accepts strings that evaluate to a bool, e.g. "True",
-    # "False", "1", "0" so that they can be easily set via command line
-    # switches of sphinx-build
+    # 'plot_gallery' should accept strings that evaluate to a bool, to allow
+    # setting via `sphinx-build -D` on command line
     "plot_gallery": "True",
     "download_all_examples": True,
     "abort_on_example_error": False,
@@ -148,7 +145,11 @@
 
 
 def _bool_eval(x):
-    """Evaluate bool only configs, to allow setting via -D on the command 
line."""
+    """Evaluate bool only configs, allows setting via `sphinx-build -D` on 
command line.
+
+    Ensures that strings that evaluate to a bool, e.g. "True", "False", "1", 
"0",
+    work as expected.
+    """
     if isinstance(x, str):
         try:
             x = eval(x)
@@ -362,11 +363,18 @@
     _check_extra_config_keys(gallery_conf, sphinx_gallery_conf, check_keys)
 
     gallery_conf.update(sphinx_gallery_conf)
-    # XXX anything that can only be a bool (rather than str) should probably be
-    # evaluated this way as it allows setting via -D on the command line
+    # Bool only (i.e. not string) configs are evaluated with
+    # `_bool_eval` to allow setting via `sphinx-build -D`
     for key in (
+        "download_all_examples",
+        "inspect_global_variables",
+        "line_numbers",
+        "nested_sections",
+        "only_warn_on_example_error",
         "promote_jupyter_magic",
+        "remove_config_comments",
         "run_stale_examples",
+        "show_signature",
     ):
         gallery_conf[key] = _bool_eval(gallery_conf[key])
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sphinx_gallery-0.19.0/sphinx_gallery/gen_rst.py 
new/sphinx_gallery-0.20.0/sphinx_gallery/gen_rst.py
--- old/sphinx_gallery-0.19.0/sphinx_gallery/gen_rst.py 2025-02-13 
04:24:18.000000000 +0100
+++ new/sphinx_gallery-0.20.0/sphinx_gallery/gen_rst.py 2025-12-02 
16:51:02.000000000 +0100
@@ -32,7 +32,7 @@
 from sphinx.errors import ConfigError, ExtensionError
 from sphinx.util.console import blue, bold, red
 
-from . import glr_path_static, py_source_parser
+from . import glr_path_static, py_source_parser, rst_source_parser
 from .backreferences import (
     THUMBNAIL_PARENT_DIV,
     THUMBNAIL_PARENT_DIV_CLOSE,
@@ -64,6 +64,7 @@
     _replace_md5,
     _write_json,
     get_md5sum,
+    iter_gallery_header_filenames,
     optipng,
     scale_image,
     status_iterator,
@@ -444,13 +445,19 @@
         if os.path.isfile(fpth):
             return None
     # Next look for GALLERY_HEADER.[ext] (and for backward-compatibility 
README.[ext]
-    extensions = [".txt"] + sorted(gallery_conf["source_suffix"])
-    for ext in extensions:
-        for fname in ("GALLERY_HEADER", "README", "readme"):
-            fpth = os.path.join(dir_, fname + ext)
-            if os.path.isfile(fpth):
-                return fpth
+    for fname in iter_gallery_header_filenames(gallery_conf):
+        fpth = os.path.join(dir_, fname)
+        if os.path.isfile(fpth):
+            return fpth
     if raise_error:
+        extensions = list(
+            sorted(
+                set(
+                    os.path.splitext(fname)[1]
+                    for fname in iter_gallery_header_filenames(gallery_conf)
+                )
+            )
+        )
         raise ExtensionError(
             "Example directory {} does not have a GALLERY_HEADER file with "
             "one of the expected file extensions {}. Please write one to "
@@ -810,6 +817,9 @@
     if fname.endswith(".py"):
         parser = py_source_parser
         language = "Python"
+    elif fname.endswith(".rst"):
+        parser = rst_source_parser
+        language = "RST"
     else:
         parser = BlockParser(fname, gallery_conf)
         language = parser.language
@@ -1452,7 +1462,7 @@
         :class: sphx-glr-download-link-note
 
         :ref:`Go to the end <sphx_glr_download_{1}>`
-        to download the full example code.{2}
+        to download the full example code{2}
 
 .. rst-class:: sphx-glr-example-title
 
@@ -1528,7 +1538,14 @@
             block_separator = (
                 "\n\n" if not script_block.content.endswith("\n") else "\n"
             )
-            example_rst += script_block.content + block_separator
+            # Remove "# noqa: E501" at the end of any lines (issue #1403)
+            text_content = re.sub(
+                r"^(.*)( +# noqa: ?E501 *)$",
+                r"\1",  # replace with first capturing group
+                script_block.content,
+                flags=re.MULTILINE,
+            )
+            example_rst += text_content + block_separator
 
     return example_rst
 
@@ -1569,16 +1586,17 @@
     jupyterlite_conf = gallery_conf["jupyterlite"]
     is_jupyterlite_enabled = jupyterlite_conf is not None
 
-    interactive_example_text = ""
     if is_binder_enabled or is_jupyterlite_enabled:
-        interactive_example_text += " or to run this example in your browser 
via "
+        interactive_example_text = " or to run this example in your browser 
via "
+    else:
+        interactive_example_text = "."
 
     if is_binder_enabled and is_jupyterlite_enabled:
-        interactive_example_text += "JupyterLite or Binder"
+        interactive_example_text += "JupyterLite or Binder."
     elif is_binder_enabled:
-        interactive_example_text += "Binder"
+        interactive_example_text += "Binder."
     elif is_jupyterlite_enabled:
-        interactive_example_text += "JupyterLite"
+        interactive_example_text += "JupyterLite."
 
     example_rst = (
         EXAMPLE_HEADER.format(example_fname, ref_fname, 
interactive_example_text)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/sphinx_gallery-0.19.0/sphinx_gallery/rst_source_parser.py 
new/sphinx_gallery-0.20.0/sphinx_gallery/rst_source_parser.py
--- old/sphinx_gallery-0.19.0/sphinx_gallery/rst_source_parser.py       
1970-01-01 01:00:00.000000000 +0100
+++ new/sphinx_gallery-0.20.0/sphinx_gallery/rst_source_parser.py       
2025-12-02 16:51:02.000000000 +0100
@@ -0,0 +1,52 @@
+"""Parser for reStructuredText files.
+
+The parser simply converts the whole reST file into a single text block.
+"""
+
+from pathlib import Path
+
+from .py_source_parser import Block
+
+
+def split_code_and_text_blocks(source_file, return_node=False):
+    """Return list with source file separated into code and text blocks.
+
+    Parameters
+    ----------
+    source_file : str
+        Path to the source file.
+    return_node : bool
+        If True, return the ast node.
+
+    Returns
+    -------
+    file_conf : dict
+        This is always empty as file config is not defined / supported in ReST 
files.
+    blocks : list
+        (type, content, line_number)
+        List where each element is a tuple with the label ('text' or 'code'),
+        the corresponding content string of block and the leading line number.
+    node : None
+        Always None.
+    """
+    file_conf = {}  # not defined in .rst example files
+    content = Path(source_file).read_text()
+    blocks = [Block("text", content, 1)]
+    node = None
+
+    return file_conf, blocks, node
+
+
+def remove_ignore_blocks(code_block):
+    """
+    Return the content of *code_block* with ignored areas removed.
+
+    As we don't have ignored areas in ReST, the codeblock is returned
+    unchanged.
+
+    Parameters
+    ----------
+    code_block : str
+        A code segment.
+    """
+    return code_block
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/sphinx_gallery-0.19.0/sphinx_gallery/tests/test_backreferences.py 
new/sphinx_gallery-0.20.0/sphinx_gallery/tests/test_backreferences.py
--- old/sphinx_gallery-0.19.0/sphinx_gallery/tests/test_backreferences.py       
2025-02-13 04:24:18.000000000 +0100
+++ new/sphinx_gallery-0.20.0/sphinx_gallery/tests/test_backreferences.py       
2025-12-02 16:51:02.000000000 +0100
@@ -22,7 +22,7 @@
   .. image:: /fake_dir/images/thumb/sphx_glr_test_file_thumb.png
     :alt:
 
-  :ref:`sphx_glr_fake_dir_test_file.py`
+  :doc:`/fake_dir/test_file`
 
 .. raw:: html
 
@@ -79,7 +79,7 @@
         extra = """
 .. only:: not html
 
- * :ref:`sphx_glr_fake_dir_test_file.py`
+ * :doc:`/fake_dir/test_file`
 """
     else:
         extra = ""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/sphinx_gallery-0.19.0/sphinx_gallery/tests/test_block_parser.py 
new/sphinx_gallery-0.20.0/sphinx_gallery/tests/test_block_parser.py
--- old/sphinx_gallery-0.19.0/sphinx_gallery/tests/test_block_parser.py 
2025-02-13 04:24:18.000000000 +0100
+++ new/sphinx_gallery-0.20.0/sphinx_gallery/tests/test_block_parser.py 
2025-12-02 16:51:02.000000000 +0100
@@ -101,8 +101,8 @@
     file_conf, blocks, _ = parser._split_content(doc)
 
     assert len(blocks) == 2
-    assert blocks[0][0] == "text"
-    assert blocks[0][1] == expected_docstring
+    assert blocks[0].type == "text"
+    assert blocks[0].content == expected_docstring
 
 
 @pytest.mark.parametrize(
@@ -189,8 +189,8 @@
     file_conf, blocks, _ = parser._split_content(doc)
 
     assert len(blocks) == 4
-    assert blocks[2][0] == "text"
-    assert blocks[2][1] == expected
+    assert blocks[2].type == "text"
+    assert blocks[2].content == expected
 
 
 def test_cpp_file_to_rst():
@@ -226,14 +226,16 @@
     assert parser.language == "C++"
     assert file_conf == {"foobar": 14}
 
-    assert "First heading\n-------------\n\nThis is the start" in blocks[2][1]
+    assert "First heading\n-------------\n\nThis is the start" in 
blocks[2].content
 
-    assert "// This is just a comment" in blocks[3][1]
-    assert "secret" in blocks[3][1]
+    assert "// This is just a comment" in blocks[3].content
+    assert "secret" in blocks[3].content
 
-    assert "sphinx_gallery_foobar" in blocks[3][1]
-    assert "sphinx_gallery_foobar" not in 
parser.remove_config_comments(blocks[3][1])
+    assert "sphinx_gallery_foobar" in blocks[3].content
+    assert "sphinx_gallery_foobar" not in parser.remove_config_comments(
+        blocks[3].content
+    )
 
-    cleaned = parser.remove_ignore_blocks(blocks[3][1])
+    cleaned = parser.remove_ignore_blocks(blocks[3].content)
     assert "secret" not in cleaned
     assert "y == 4" in cleaned
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/sphinx_gallery-0.19.0/sphinx_gallery/tests/test_full.py 
new/sphinx_gallery-0.20.0/sphinx_gallery/tests/test_full.py
--- old/sphinx_gallery-0.19.0/sphinx_gallery/tests/test_full.py 2025-02-13 
04:24:18.000000000 +0100
+++ new/sphinx_gallery-0.20.0/sphinx_gallery/tests/test_full.py 2025-12-02 
16:51:02.000000000 +0100
@@ -46,7 +46,7 @@
 N_GOOD = N_EXAMPLES - N_FAILING  # galleries that run w/o error
 # passthroughs and non-executed examples in
 # (examples + examples_rst_index + examples_with_rst + examples_README_header)
-N_PASS = 3 + 0 + 2 + 0
+N_PASS = 4 + 0 + 2 + 0
 # indices SG generates  (extra non-plot*.py file) in
 # (examples + examples_rst_index + examples_with_rst + examples_README_header)
 N_INDEX = 2 + 1 + 3 + 1
@@ -680,6 +680,33 @@
     assert "figure_rst.html" not in html  # excluded
 
 
+def test_backreferences_dirhtml(sphinx_dirhtml_app):
+    """Test backreferences in dirhtml doc."""
+    out_dir = sphinx_dirhtml_app.outdir
+    mod_file = op.join(out_dir, "gen_modules", "sphinx_gallery.sorting", 
"index.html")
+    with codecs.open(mod_file, "r", "utf-8") as fid:
+        lines = fid.read()
+    assert "ExplicitOrder" in lines  # in API doc
+    assert "plot_second_future_imports/" in lines  # backref via code use
+    assert "FileNameSortKey" in lines  # in API doc
+    assert "plot_numpy_matplotlib/" in lines  # backref via :class: in str
+    mod_file = op.join(
+        out_dir, "gen_modules", "sphinx_gallery.backreferences", "index.html"
+    )
+    with codecs.open(mod_file, "r", "utf-8") as fid:
+        lines = fid.read()
+    assert "NameFinder" in lines  # in API doc
+    assert "plot_future_imports/" in lines  # backref via doc block
+    # rendered file
+    html = op.join(out_dir, "auto_examples", "plot_second_future_imports", 
"index.html")
+    assert op.isfile(html)
+    with codecs.open(html, "r", "utf-8") as fid:
+        html = fid.read()
+    assert "sphinx_gallery.sorting/#sphinx_gallery.sorting.ExplicitOrder" in 
html  # noqa: E501
+    assert "sphinx_gallery.scrapers/#sphinx_gallery.scrapers.clean_modules" in 
html  # noqa: E501
+    assert "figure_rst.html" not in html  # excluded
+
+
 @pytest.mark.parametrize(
     "rst_file, example_used_in",
     [
@@ -921,7 +948,7 @@
     else:
         assert (
             re.match(
-                ".*[0|1] added, ([1-9]|1[0-1]) changed, 0 removed$.*",
+                ".*[0|1] added, ([1-9]|1[0-2]) changed, 0 removed$.*",
                 status,
                 re.MULTILINE | re.DOTALL,
             )
@@ -987,6 +1014,10 @@
         "plot_scraper_broken",
         "plot_failing_example",
         "plot_failing_example_thumbnail",
+        # the rst of rst-input gallery entries is updated, because
+        # inputs are currently always copied over and "execution"
+        # is no-op.
+        "rst_gallery_entry",
     )
     _assert_mtimes(generated_rst_0, generated_rst_1, ignore=ignore)
 
@@ -1083,6 +1114,7 @@
     # - auto_examples/plot_failing_example
     # - auto_examples/plot_failing_example_thumbnail
     # - auto_examples/plot_scraper_broken
+    # - auto_examples/rst_gallery_entry
     # - auto_examples/sg_execution_times
     # - auto_examples_rst_index/sg_execution_times
     # - auto_examples_with_rst/sg_execution_times
@@ -1098,7 +1130,7 @@
     if how == "modify":
         n_ch = "([3-9]|1[0-3])"  # 3-13
     else:
-        n_ch = "([1-9]|1[01])"  # 1-11
+        n_ch = "([1-9]|1[0-2])"  # 1-12
     lines = "\n".join([f"\n{how} != {n_ch}:"] + lines)
     want = f".*updating environment:.*[0|1] added, {n_ch} changed, 0 removed.*"
     assert re.match(want, status, flags) is not None, lines
@@ -1164,6 +1196,10 @@
         "plot_scraper_broken",
         "plot_failing_example",
         "plot_failing_example_thumbnail",
+        # the rst of rst-input gallery entries is updated, because
+        # inputs are currently always copied over and "execution"
+        # is no-op.
+        "rst_gallery_entry",
     )
     # not reliable on Windows and one Ubuntu run
     bad = sys.platform.startswith("win") or os.getenv("BAD_MTIME", "0") == "1"
@@ -1274,6 +1310,16 @@
     assert ":alt:" in rst
 
 
+def test_noqa_removal(sphinx_app):
+    """Test that "noqa: E501" is removed from end of text blocks."""
+    src_dir = sphinx_app.srcdir
+
+    example_rst = op.join(src_dir, "auto_examples", "plot_matplotlib_alt.rst")
+    with codecs.open(example_rst, "r", "utf-8") as fid:
+        rst = fid.read()
+    assert "# noqa: E501" not in rst
+
+
 def test_backreference_labels(sphinx_app):
     """Tests that backreference labels work."""
     src_dir = sphinx_app.srcdir
@@ -1594,15 +1640,18 @@
     with codecs.open(fname, "r", "utf-8") as fid:
         html = fid.read()
 
-    count = html.count('<div class="sphx-glr-thumbnail-title">')
+    (related_html,) = re.findall(
+        '<p class="rubric">Related examples</p>(.*)</section>', html, re.DOTALL
+    )
+
+    n_thumbnails = related_html.count('<div class="sphx-glr-thumbnail-title">')
     n_examples = 
sphinx_app.config.sphinx_gallery_conf["recommender"]["n_examples"]
+    assert n_thumbnails == n_examples
 
-    assert '<p class="rubric">Related examples</p>' in html
-    assert count == n_examples
     # Check the same 3 related examples are shown (can change when new 
examples added)
-    assert "sphx-glr-auto-examples-plot-defer-figures-py" in html
-    assert "sphx-glr-auto-examples-plot-webp-py" in html
-    assert "sphx-glr-auto-examples-plot-command-line-args-py" in html
+    assert 'href="plot_webp.html"' in related_html
+    assert 'href="plot_command_line_args.html"' in related_html
+    assert 'href="plot_numpy_matplotlib.html"' in related_html
 
 
 def test_sidebar_components_download_links(sphinx_app):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/sphinx_gallery-0.19.0/sphinx_gallery/tests/test_gen_gallery.py 
new/sphinx_gallery-0.20.0/sphinx_gallery/tests/test_gen_gallery.py
--- old/sphinx_gallery-0.19.0/sphinx_gallery/tests/test_gen_gallery.py  
2025-02-13 04:24:18.000000000 +0100
+++ new/sphinx_gallery-0.20.0/sphinx_gallery/tests/test_gen_gallery.py  
2025-12-02 16:51:02.000000000 +0100
@@ -14,6 +14,7 @@
 from sphinx.errors import ConfigError, ExtensionError, SphinxWarning
 
 from sphinx_gallery.gen_gallery import (
+    _bool_eval,
     _fill_gallery_conf_defaults,
     fill_gallery_conf_defaults,
     write_api_entry_usage,
@@ -37,6 +38,15 @@
 """
 
 
+def test_bool_eval():
+    """Ensure `_bool_eval` evaluates strings correctly to bool."""
+    assert _bool_eval("True") == True
+    assert _bool_eval("False") == False
+    assert _bool_eval("True") == True
+    assert _bool_eval("True") == True
+    assert _bool_eval("0") == False
+
+
 def test_bad_config():
     """Test that bad config values are caught."""
     sphinx_gallery_conf = dict(example_dir="")
@@ -283,8 +293,8 @@
     index_fname = Path(sphinx_app.outdir, "..", "ex", "index.rst")
     order = list()
     if key is None:
-        regex = 
r".*:ref:`sphx_glr_ex_(?:(?:first|second)-subsection_)?plot_(\d)\.py`"
-        locator = ":ref:"
+        regex = r".*:doc:`/ex/(?:(?:first|second)-subsection/)?plot_(\d)`"
+        locator = ":doc:"
     else:
         regex = rf".*:{key}=(\d):.*"
         locator = "sphx-glr-thumbcontainer"
@@ -806,7 +816,7 @@
     # Check thumbnail correct
     assert "_images/sphx_glr_plot_nested_thumb.png" in mg_html
     # Check href correct
-    assert "sphx-glr-ex-sub-folder-sub-sub-folder-plot-nested-py" in mg_html
+    assert 'href="ex/sub_folder/sub_sub_folder/plot_nested.html"' in mg_html
 
 
 def _get_minigallery_thumbnails(rst_fname):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/sphinx_gallery-0.19.0/sphinx_gallery/tests/test_gen_rst.py 
new/sphinx_gallery-0.20.0/sphinx_gallery/tests/test_gen_rst.py
--- old/sphinx_gallery-0.19.0/sphinx_gallery/tests/test_gen_rst.py      
2025-02-13 04:24:18.000000000 +0100
+++ new/sphinx_gallery-0.20.0/sphinx_gallery/tests/test_gen_rst.py      
2025-12-02 16:51:02.000000000 +0100
@@ -75,8 +75,8 @@
     )
 
     assert file_conf == {}
-    assert blocks[0][0] == "text"
-    assert blocks[1][0] == "code"
+    assert blocks[0].type == "text"
+    assert blocks[1].type == "code"
 
 
 def test_bug_cases_of_notebook_syntax():
@@ -183,10 +183,10 @@
 
     assert file_conf == {}
     assert len(blocks) == 4
-    assert blocks[0][0] == "text"
-    assert blocks[1][0] == "text"
-    assert blocks[2][0] == "text"
-    assert blocks[3][0] == "text"
+    assert blocks[0].type == "text"
+    assert blocks[1].type == "text"
+    assert blocks[2].type == "text"
+    assert blocks[3].type == "text"
 
     script_vars = {"execute_script": ""}
     file_conf = {}
@@ -216,6 +216,53 @@
     assert example_rst == want_rst
 
 
+def test_rst_block_noqa_removal(gallery_conf, tmpdir):
+    """Check "# noqa: E501" removed from end of text blocks (issue #1403)."""
+    filename = str(tmpdir.join("temp.py"))
+    with open(filename, "w") as f:
+        f.write(
+            "\n".join(
+                [
+                    '"Docstring"',
+                    "####################",
+                    "# Paragraph 1",
+                    "# has a noqa at the end. # noqa: E501",
+                    "",
+                    "#%%",
+                    "# Paragraph 2 also has a noqa # noqa:E501",
+                    "",
+                    "# %%",
+                    "# Paragraph 3",
+                    "",
+                ]
+            )
+        )
+    file_conf, blocks = split_code_and_text_blocks(filename)
+
+    script_vars = {"execute_script": ""}
+    output_blocks, _ = sg.execute_script(blocks, script_vars, gallery_conf, 
file_conf)
+
+    example_rst = sg.rst_blocks(blocks, output_blocks, file_conf, gallery_conf)
+    want_rst = """\
+Docstring
+
+.. GENERATED FROM PYTHON SOURCE LINES 3-5
+
+Paragraph 1
+has a noqa at the end.
+
+.. GENERATED FROM PYTHON SOURCE LINES 7-8
+
+Paragraph 2 also has a noqa
+
+.. GENERATED FROM PYTHON SOURCE LINES 10-11
+
+Paragraph 3
+
+"""
+    assert example_rst == want_rst
+
+
 def test_rst_empty_code_block(gallery_conf, tmpdir):
     """Test that we can "execute" a code block containing only comments."""
     gallery_conf.update(image_scrapers=())
@@ -236,9 +283,9 @@
 
     assert file_conf == {}
     assert len(blocks) == 3
-    assert blocks[0][0] == "text"
-    assert blocks[1][0] == "text"
-    assert blocks[2][0] == "code"
+    assert blocks[0].type == "text"
+    assert blocks[1].type == "text"
+    assert blocks[2].type == "code"
 
     gallery_conf["abort_on_example_error"] = True
     script_vars = dict(
@@ -288,8 +335,8 @@
         )
     file_conf, blocks = split_code_and_text_blocks(filename)
     assert len(blocks) == 2
-    assert blocks[0][0] == "text"
-    assert blocks[1][0] == "code"
+    assert blocks[0].type == "text"
+    assert blocks[1].type == "code"
     assert file_conf == {}
     script_vars = {
         "execute_script": True,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/sphinx_gallery-0.19.0/sphinx_gallery/tests/test_rst_source_parser.py 
new/sphinx_gallery-0.20.0/sphinx_gallery/tests/test_rst_source_parser.py
--- old/sphinx_gallery-0.19.0/sphinx_gallery/tests/test_rst_source_parser.py    
1970-01-01 01:00:00.000000000 +0100
+++ new/sphinx_gallery-0.20.0/sphinx_gallery/tests/test_rst_source_parser.py    
2025-12-02 16:51:02.000000000 +0100
@@ -0,0 +1,20 @@
+import sphinx_gallery.rst_source_parser as rsp
+
+sample_contents = """\
+The rst parser
+==============
+
+The .rst parser converts the whole file into
+a single text block.
+"""
+
+
+def test_split_code_and_text_blocks(tmp_path):
+    source_file = tmp_path / "source.rst"
+    source_file.write_text(sample_contents)
+
+    file_conf, blocks, node = rsp.split_code_and_text_blocks(source_file)
+
+    assert file_conf == {}
+    assert blocks == [rsp.Block("text", sample_contents, 1)]
+    assert node is None
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/sphinx_gallery-0.19.0/sphinx_gallery/tests/tinybuild/doc/conf.py 
new/sphinx_gallery-0.20.0/sphinx_gallery/tests/tinybuild/doc/conf.py
--- old/sphinx_gallery-0.19.0/sphinx_gallery/tests/tinybuild/doc/conf.py        
2025-02-13 04:24:18.000000000 +0100
+++ new/sphinx_gallery-0.20.0/sphinx_gallery/tests/tinybuild/doc/conf.py        
2025-12-02 16:51:02.000000000 +0100
@@ -73,7 +73,11 @@
         "../examples_rst_index",
         "../examples_README_header",
     ],
-    "example_extensions": {".py", ".cpp", ".m", ".jl"},
+    "example_extensions": {".py", ".cpp", ".m", ".jl", ".rst"},
+    # we have .rst in the example_extensions but want the index.rst files in
+    # examples_rst_index/ and the direct-to-copy .rst files in 
examples_with_rst
+    # to be ignored. Therefore, we extend the ignore_pattern by this.
+    "ignore_pattern": r"(__init__\.py|index\.rst|rst_example[1-9]\.rst)",
     "filetype_parsers": {".m": "Matlab"},
     "reset_argv": f"{util_root}.reset_argv",
     "reset_modules": (f"{util_root}.mock_scrape_problem", "matplotlib"),
@@ -102,7 +106,7 @@
     "image_srcset": ["2x"],
     "exclude_implicit_doc": ["figure_rst"],
     "show_api_usage": True,
-    "copyfile_regex": r".*\.rst",
+    "copyfile_regex": r"(index\.rst|rst_example[1-9]\.rst)",
     "recommender": {"enable": True, "n_examples": 3},
     "parallel": 2,
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/sphinx_gallery-0.19.0/sphinx_gallery/tests/tinybuild/examples/plot_matplotlib_alt.py
 
new/sphinx_gallery-0.20.0/sphinx_gallery/tests/tinybuild/examples/plot_matplotlib_alt.py
--- 
old/sphinx_gallery-0.19.0/sphinx_gallery/tests/tinybuild/examples/plot_matplotlib_alt.py
    2025-02-13 04:24:18.000000000 +0100
+++ 
new/sphinx_gallery-0.20.0/sphinx_gallery/tests/tinybuild/examples/plot_matplotlib_alt.py
    2025-12-02 16:51:02.000000000 +0100
@@ -1,10 +1,11 @@
 """
-======================
+===================
 Matplotlib alt text
-======================
+===================
 
 This example tests that the alt text is generated correctly for matplotlib
 figures.
+It also checks that "noqa: E501" is removed from the end of text blocks. # 
noqa: E501
 """
 
 import matplotlib.pyplot as plt
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/sphinx_gallery-0.19.0/sphinx_gallery/tests/tinybuild/examples/rst_gallery_entry.rst
 
new/sphinx_gallery-0.20.0/sphinx_gallery/tests/tinybuild/examples/rst_gallery_entry.rst
--- 
old/sphinx_gallery-0.19.0/sphinx_gallery/tests/tinybuild/examples/rst_gallery_entry.rst
     1970-01-01 01:00:00.000000000 +0100
+++ 
new/sphinx_gallery-0.20.0/sphinx_gallery/tests/tinybuild/examples/rst_gallery_entry.rst
     2025-12-02 16:51:02.000000000 +0100
@@ -0,0 +1,4 @@
+reStructuredText gallery entry
+==============================
+
+This file creates a regular gallery entry and page.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sphinx_gallery-0.19.0/sphinx_gallery/utils.py 
new/sphinx_gallery-0.20.0/sphinx_gallery/utils.py
--- old/sphinx_gallery-0.19.0/sphinx_gallery/utils.py   2025-02-13 
04:24:18.000000000 +0100
+++ new/sphinx_gallery-0.20.0/sphinx_gallery/utils.py   2025-12-02 
16:51:02.000000000 +0100
@@ -189,6 +189,18 @@
     assert os.path.isfile(fname_old)
 
 
+def iter_gallery_header_filenames(gallery_conf):
+    """
+    A generator of all possible gallery header filenames.
+
+    We support GALLERY_HEADER.[ext], and for backward-compatibility 
README.[ext]
+    """
+    extensions = [".txt"] + sorted(gallery_conf["source_suffix"])
+    for ext in extensions:
+        for fname in ("GALLERY_HEADER", "README", "readme"):
+            yield fname + ext
+
+
 def check_duplicate_filenames(files):
     """Check for duplicate filenames across gallery directories."""
     # Check whether we'll have duplicates
@@ -234,6 +246,7 @@
     exts = gallery_conf["example_extensions"]
     max_depth = 1 if check_filenames else 0
     files = []
+    gallery_header_filenames = 
list(iter_gallery_header_filenames(gallery_conf))
     for example_dir in examples_dirs:
         example_depth = os.path.abspath(example_dir).count(os.sep)
         for root, _, filenames in os.walk(example_dir):
@@ -241,6 +254,8 @@
             if (root.count(os.sep) - example_depth) > max_depth:
                 break
             for filename in filenames:
+                if filename in gallery_header_filenames:
+                    continue
                 if (s := Path(filename).suffix) and s in exts:
                     if re.search(gallery_conf["ignore_pattern"], filename) is 
None:
                         file = filename
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/sphinx_gallery-0.19.0/sphinx_gallery.egg-info/PKG-INFO 
new/sphinx_gallery-0.20.0/sphinx_gallery.egg-info/PKG-INFO
--- old/sphinx_gallery-0.19.0/sphinx_gallery.egg-info/PKG-INFO  2025-02-13 
04:24:28.000000000 +0100
+++ new/sphinx_gallery-0.20.0/sphinx_gallery.egg-info/PKG-INFO  2025-12-02 
16:51:11.000000000 +0100
@@ -1,6 +1,6 @@
-Metadata-Version: 2.2
+Metadata-Version: 2.4
 Name: sphinx-gallery
-Version: 0.19.0
+Version: 0.20.0
 Summary: A Sphinx extension that builds an HTML gallery of examples from any 
set of Python scripts.
 Author-email: Óscar Nájera <[email protected]>
 License: 3-clause BSD
@@ -11,13 +11,12 @@
 Classifier: Intended Audience :: Developers
 Classifier: Programming Language :: Python
 Classifier: Programming Language :: Python :: 3 :: Only
-Classifier: Programming Language :: Python :: 3.8
-Classifier: Programming Language :: Python :: 3.9
 Classifier: Programming Language :: Python :: 3.10
 Classifier: Programming Language :: Python :: 3.11
 Classifier: Programming Language :: Python :: 3.12
 Classifier: Programming Language :: Python :: 3.13
-Requires-Python: >=3.8
+Classifier: Programming Language :: Python :: 3.14
+Requires-Python: >=3.10
 Description-Content-Type: text/x-rst
 License-File: LICENSE
 Requires-Dist: pillow
@@ -40,6 +39,7 @@
 Requires-Dist: pytest; extra == "dev"
 Requires-Dist: pytest-coverage; extra == "dev"
 Requires-Dist: seaborn; extra == "dev"
+Requires-Dist: sphinx-design; extra == "dev"
 Requires-Dist: sphinxcontrib-video; extra == "dev"
 Requires-Dist: statsmodels; extra == "dev"
 Provides-Extra: jupyterlite
@@ -52,6 +52,7 @@
 Requires-Dist: graphviz; extra == "show-api-usage"
 Provides-Extra: show-memory
 Requires-Dist: memory-profiler; extra == "show-memory"
+Dynamic: license-file
 
 ==============
 Sphinx-Gallery
@@ -190,6 +191,7 @@
 * `OpenTURNS 
<https://openturns.github.io/openturns/latest/examples/examples.html>`_
 * `Optuna <https://optuna.readthedocs.io/en/stable/tutorial/index.html>`_
 * `PlasmaPy <https://docs.plasmapy.org/en/latest/examples.html>`_
+* `POT <https://pythonot.github.io/auto_examples/index.html>`_
 * `PyGMT <https://www.pygmt.org/latest/gallery/index.html>`_
 * `pyRiemann <https://pyriemann.readthedocs.io/en/latest/index.html>`_
 * `PyStruct <https://pystruct.github.io/auto_examples/index.html>`_
@@ -201,9 +203,11 @@
 * `scikit-image <https://scikit-image.org/docs/dev/auto_examples/>`_
 * `scikit-learn <https://scikit-learn.org/stable/auto_examples/index.html>`_
 * `SimPEG <https://docs.simpeg.xyz/content/examples/>`_
+* `SKADA Scikit-adaptation 
<https://scikit-adaptation.github.io/auto_examples/index.html>`_
 * `Sphinx-Gallery 
<https://sphinx-gallery.github.io/stable/auto_examples/index.html>`_
 * `SunPy <https://docs.sunpy.org/en/stable/generated/gallery/index.html>`_
 * `Tonic <https://tonic.readthedocs.io/en/latest/auto_examples/index.html>`_
+* `TorchDR <https://torchdr.github.io/auto_examples/index.html>`_
 * `TorchIO <https://torchio.readthedocs.io/auto_examples/index.html>`_
 
 .. projects_list_end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/sphinx_gallery-0.19.0/sphinx_gallery.egg-info/SOURCES.txt 
new/sphinx_gallery-0.20.0/sphinx_gallery.egg-info/SOURCES.txt
--- old/sphinx_gallery-0.19.0/sphinx_gallery.egg-info/SOURCES.txt       
2025-02-13 04:24:28.000000000 +0100
+++ new/sphinx_gallery-0.20.0/sphinx_gallery.egg-info/SOURCES.txt       
2025-12-02 16:51:11.000000000 +0100
@@ -1,3 +1,4 @@
+.gitattributes
 .gitignore
 CHANGES.rst
 LICENSE
@@ -53,6 +54,7 @@
 sphinx_gallery/notebook.py
 sphinx_gallery/py_source_parser.py
 sphinx_gallery/recommender.py
+sphinx_gallery/rst_source_parser.py
 sphinx_gallery/scrapers.py
 sphinx_gallery/sorting.py
 sphinx_gallery/utils.py
@@ -89,6 +91,7 @@
 sphinx_gallery/tests/test_notebook.py
 sphinx_gallery/tests/test_py_source_parser.py
 sphinx_gallery/tests/test_recommender.py
+sphinx_gallery/tests/test_rst_source_parser.py
 sphinx_gallery/tests/test_scrapers.py
 sphinx_gallery/tests/test_sorting.py
 sphinx_gallery/tests/test_utils.py
@@ -138,6 +141,7 @@
 sphinx_gallery/tests/tinybuild/examples/plot_second_future_imports.py
 sphinx_gallery/tests/tinybuild/examples/plot_svg.py
 sphinx_gallery/tests/tinybuild/examples/plot_webp.py
+sphinx_gallery/tests/tinybuild/examples/rst_gallery_entry.rst
 sphinx_gallery/tests/tinybuild/examples/future/README.rst
 sphinx_gallery/tests/tinybuild/examples/future/plot_future_imports.py
 sphinx_gallery/tests/tinybuild/examples/future/plot_future_imports_broken.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/sphinx_gallery-0.19.0/sphinx_gallery.egg-info/requires.txt 
new/sphinx_gallery-0.20.0/sphinx_gallery.egg-info/requires.txt
--- old/sphinx_gallery-0.19.0/sphinx_gallery.egg-info/requires.txt      
2025-02-13 04:24:28.000000000 +0100
+++ new/sphinx_gallery-0.20.0/sphinx_gallery.egg-info/requires.txt      
2025-12-02 16:51:11.000000000 +0100
@@ -20,6 +20,7 @@
 pytest
 pytest-coverage
 seaborn
+sphinx-design
 sphinxcontrib-video
 statsmodels
 

Reply via email to