Bug 2465574 - python-sphinx-book-theme: FTBFS in Fedora Rawhide: test_build_book fails
Summary: python-sphinx-book-theme: FTBFS in Fedora Rawhide: test_build_book fails
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-sphinx-book-theme
Version: rawhide
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Jerry James
QA Contact:
URL: https://koschei.fedoraproject.org/pac...
Whiteboard:
Depends On:
Blocks: PYTHON3.15 F45FTBFS, RAWHIDEFTBFS
TreeView+ depends on / blocked
 
Reported: 2026-05-04 15:45 UTC by Karolina Surma
Modified: 2026-05-13 21:13 UTC (History)
1 user (show)

Fixed In Version: python-sphinx-book-theme-1.2.0-2.fc44
Clone Of:
Environment:
Last Closed: 2026-05-13 21:13:43 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Karolina Surma 2026-05-04 15:45:24 UTC
Description of problem:
Package python-sphinx-book-theme fails to build from source in Fedora Rawhide.

Version-Release number of selected component (if applicable):
1.2.0-1.fc45

Steps to Reproduce:
koji build --scratch f45 python-sphinx-book-theme-1.2.0-1.fc45.src.rpm

Additional info:
This package is tracked by Koschei. See:
https://koschei.fedoraproject.org/package/python-sphinx-book-theme

Reproducible: Always

Actual Results:
_______________________________ test_build_book ________________________________
sphinx_build_factory = <function sphinx_build_factory.<locals>._func at 0x7fffb50af060>
file_regression = <pytest_regressions.file_regression.FileRegressionFixture object at 0x7fffb4932ba0>
    def test_build_book(sphinx_build_factory, file_regression):
        """Test building the base book template and config."""
        sphinx_build = sphinx_build_factory("base")  # type: SphinxBuild
        sphinx_build.build(assert_pass=True)
        assert (sphinx_build.outdir / "index.html").exists(), sphinx_build.outdir.glob("*")
    
        # -- Notebooks ------------------------------------------------------------
        # Check for correct kernel name
        kernels_expected = {
            "ntbk.html": "python3",
            "ntbk_octave.html": "octave",
            "ntbk_julia.html": "julia-1.4",
        }
        for filename, kernel in kernels_expected.items():
            ntbk_html = sphinx_build.html_tree("section1", filename)
            thebe_config = ntbk_html.find("script", attrs={"type": "text/x-thebe-config"})
            kernel_name = f'name: "{kernel}",'
            if kernel_name not in thebe_config.prettify():
                raise AssertionError(f"{kernel_name} not in {kernels_expected}")
    
        # -- Sidebar --------------------------------------------------------------
        index_html = sphinx_build.html_tree("index.html")
        # Navigation entries
        if sphinx_version.major >= 8:
            # Only run this regression on the latest Sphinx series to avoid duplicates.
            sidebar = index_html.find(attrs={"class": "bd-docs-nav"})
            file_regression.check(
                sidebar.prettify(),
                basename="build__sidebar-primary__nav",
                extension=".html",
                encoding="utf8",
            )
    
        # Check navbar numbering
        sidebar_ntbk = sphinx_build.html_tree("section1", "ntbk.html").find(
            "nav", attrs={"class": "bd-docs-nav"}
        )
        # Pages and sub-pages should be numbered
        assert "1. Page 1" in str(sidebar_ntbk)
        assert "3.1. Section 1 page1" in str(sidebar_ntbk)
    
        # -- Header ---------------------------------------------------------------
        header_article = sphinx_build.html_tree("section1", "ntbk.html").find(
            "div", class_="bd-header-article"
        )
    
        file_regression.check(
            header_article.prettify(),
            basename="build__header-article",
            extension=".html",
            encoding="utf8",
        )
        # Edit button should not be on page
        assert '<a class="edit-button"' not in str(index_html)
        # Title should be just text, no HTML
        assert "Index with code in title" in str(index_html)
    
        # -- Page TOC -------------------------------------------------------------
        # Test that the TOCtree is rendered properly across different title arrangements
        for page in sphinx_build.outdir.joinpath("titles").rglob("**/page-*"):
            page_html = BeautifulSoup(page.read_text("utf8"), "html.parser")
            page_toc = page_html.find("div", attrs={"class": "bd-toc"})
            if page_toc:
>               file_regression.check(
                    page_toc.prettify(),
                    basename=f"build__pagetoc--{page.with_suffix('').name}",
                    extension=".html",
                    encoding="utf8",
                )
E               AssertionError: FILES DIFFER:
E               /tmp/pytest-of-mockbuild/pytest-0/test_build_book0/build__pagetoc--page-multipletitles.html
E               /tmp/pytest-of-mockbuild/pytest-0/test_build_book0/build__pagetoc--page-multipletitles.obtained.html
E               HTML DIFF: /tmp/pytest-of-mockbuild/pytest-0/test_build_book0/build__pagetoc--page-multipletitles.obtained.diff.html
E               --- 
E               +++ 
E               @@ -7,12 +7,12 @@
E                    Contents
E                   </div>
E                   <nav aria-labelledby="pst-page-navigation-heading-2" class="page-toc" id="pst-page-toc-nav">
E               -    <ul class="visible nav section-nav flex-column">
E               +    <ul class="pst-show_toc_level nav section-nav flex-column">
E                     <li class="toc-h1 nav-item toc-entry">
E                      <a class="reference internal nav-link" href="#">
E                       4.1. A page with multiple top-level titles
E                      </a>
E               -      <ul class="visible nav section-nav flex-column">
E               +      <ul class="pst-show_toc_level nav section-nav flex-column">
E                       <li class="toc-h2 nav-item toc-entry">
E                        <a class="reference internal nav-link" href="#a-sub-heading">
E                         4.1.1. A sub-heading
E               @@ -24,7 +24,7 @@
E                      <a class="reference internal nav-link" href="#another-top-level-title">
E                       4.2. Another top-level title
E                      </a>
E               -      <ul class="visible nav section-nav flex-column">
E               +      <ul class="pst-show_toc_level nav section-nav flex-column">
E                       <li class="toc-h2 nav-item toc-entry">
E                        <a class="reference internal nav-link" href="#another-sub-heading">
E                         4.2.1. Another sub-heading

Comment 1 Jerry James 2026-05-04 18:40:26 UTC
Thank you for bringing this to my attention. The issue is that pydata-sphinx-theme 0.17.x changed some output.

Comment 2 Fedora Update System 2026-05-04 18:41:26 UTC
FEDORA-2026-ad2e510afc (python-sphinx-book-theme-1.2.0-2.fc44) has been submitted as an update to Fedora 44.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-ad2e510afc

Comment 3 Fedora Update System 2026-05-05 01:39:21 UTC
FEDORA-2026-ad2e510afc has been pushed to the Fedora 44 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2026-ad2e510afc`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2026-ad2e510afc

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 4 Fedora Update System 2026-05-13 21:13:43 UTC
FEDORA-2026-ad2e510afc (python-sphinx-book-theme-1.2.0-2.fc44) has been pushed to the Fedora 44 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.