Bug 2330153 - python-sphinx-notfound-page fails to build with sphinx 8.x: AssertionError: assert chunk in content
Summary: python-sphinx-notfound-page fails to build with sphinx 8.x: AssertionError: a...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-sphinx-notfound-page
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Kevin Fenzi
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: SPHINX8
TreeView+ depends on / blocked
 
Reported: 2024-12-03 12:48 UTC by Tomáš Hrnčiar
Modified: 2025-01-04 21:05 UTC (History)
1 user (show)

Fixed In Version: python-sphinx-notfound-page-1.0.4-1.fc42
Clone Of:
Environment:
Last Closed: 2025-01-04 21:05:19 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Tomáš Hrnčiar 2024-12-03 12:48:53 UTC
python-sphinx-notfound-page fails to build with sphinx 8.x in Fedora 42 (currently Rawhide).

The issue detected:

=================================== FAILURES ===================================
____________________________ test_default_settings _____________________________

app = <SphinxTestApp buildername='html'>
status = <_io.StringIO object at 0x7f8ed11a0640>
warning = <_io.StringIO object at 0x7f8ed11a0400>

    @pytest.mark.sphinx(srcdir=srcdir)
    def test_default_settings(app, status, warning):
        app.build()
        path = app.outdir / '404.html'
        assert path.exists()
        content = path.read_text()
    
        if sphinx.version_info < (6, 0):
            cssclass = "shortcut "
        else:
            cssclass = ""
    
        chunks = [
            '<h1>Page not found</h1>',
            "Unfortunately we couldn't find the content you were looking for.",
            '<title>Page not found &#8212; Python  documentation</title>',
    
            # favicon and logo
            f'<link rel="{cssclass}icon" href="/en/latest/_static/favicon.png"/>',
            '<img class="logo" src="/en/latest/_static/logo.svg" alt="Logo"/>',
    
            # sidebar URLs
            '<h1 class="logo"><a href="/en/latest/index.html">Python</a></h1>',
            '<form class="search" action="/en/latest/search.html" method="get">',
            '<li><a href="/en/latest/index.html">Documentation overview</a><ul>',
    
            # resources
            _get_css_html_link_tag(app, 'en', 'latest', 'alabaster.css'),
            _get_css_html_link_tag(app, 'en', 'latest', 'pygments.css'),
            '<link rel="stylesheet" href="/en/latest/_static/custom.css" type="text/css" />',
        ]
    
        for chunk in chunks:
>           assert chunk in content
E           assert '<title>Page not found &#8212; Python  documentation</title>' in '<!DOCTYPE html>\n\n<html lang="en" data-content_root="./">\n  <head>\n    <meta charset="utf-8" />\n    <meta name="v...pyright .\n      Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 8.1.3.\n    </div>\n  </body>\n</html>'

tests/test_urls.py:88: AssertionError
--------------------------- Captured stdout teardown ---------------------------
# testroot: root
# builder: html
# srcdir: /builddir/build/BUILD/python-sphinx-notfound-page-1.0.2-build/sphinx-notfound-page-1.0.2/tests/examples/default
# outdir: /builddir/build/BUILD/python-sphinx-notfound-page-1.0.2-build/sphinx-notfound-page-1.0.2/tests/examples/default/_build/html
# status: 
Running Sphinx v8.1.3
loading translations [en]... done
building [mo]: targets for 0 po files that are out of date
writing output... 
building [html]: targets for 3 source files that are out of date
updating environment: [new config] 3 added, 0 changed, 0 removed
reading sources... [ 33%] chapter
reading sources... [ 67%] chapter-i
reading sources... [100%] index

looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
copying assets... 
copying static files... 
Writing evaluated template result to /builddir/build/BUILD/python-sphinx-notfound-page-1.0.2-build/sphinx-notfound-page-1.0.2/tests/examples/default/_build/html/_static/basic.css
Writing evaluated template result to /builddir/build/BUILD/python-sphinx-notfound-page-1.0.2-build/sphinx-notfound-page-1.0.2/tests/examples/default/_build/html/_static/documentation_options.js
Writing evaluated template result to /builddir/build/BUILD/python-sphinx-notfound-page-1.0.2-build/sphinx-notfound-page-1.0.2/tests/examples/default/_build/html/_static/language_data.js
copying static files: done
copying extra files... 
copying extra files: done
copying assets: done
writing output... [ 33%] chapter
writing output... [ 67%] chapter-i
writing output... [100%] index

generating indices... genindex done
writing additional pages... search done
dumping search index in English (code: en)... done
dumping object inventory... done
build succeeded.

The HTML pages are in tests/examples/default/_build/html.

# warning: 

____________________________ test_context_settings _____________________________

app = <SphinxTestApp buildername='html'>
status = <_io.StringIO object at 0x7f8ed2416500>
warning = <_io.StringIO object at 0x7f8ed24162c0>

    @pytest.mark.sphinx(
        srcdir=srcdir,
        confoverrides={
            'notfound_context': {'title': 'My custom title', 'body': '<h1>Boo!</h1>My bad.'},
        },
    )
    def test_context_settings(app, status, warning):
        app.build()
        path = app.outdir / '404.html'
        assert path.exists()
        content = path.read_text()
    
        chunks = [
            '<h1>Boo!</h1>',
            'My bad.',
            '<title>My custom title &#8212; Python  documentation</title>',
        ]
    
        for chunk in chunks:
>           assert chunk in content
E           assert '<title>My custom title &#8212; Python  documentation</title>' in '<!DOCTYPE html>\n\n<html lang="en" data-content_root="./">\n  <head>\n    <meta charset="utf-8" />\n    <meta name="v...pyright .\n      Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 8.1.3.\n    </div>\n  </body>\n</html>'

tests/test_urls.py:109: AssertionError
--------------------------- Captured stdout teardown ---------------------------
# testroot: root
# builder: html
# srcdir: /builddir/build/BUILD/python-sphinx-notfound-page-1.0.2-build/sphinx-notfound-page-1.0.2/tests/examples/default
# outdir: /builddir/build/BUILD/python-sphinx-notfound-page-1.0.2-build/sphinx-notfound-page-1.0.2/tests/examples/default/_build/html
# status: 
Running Sphinx v8.1.3
loading translations [en]... done
building [mo]: targets for 0 po files that are out of date
writing output... 
building [html]: targets for 3 source files that are out of date
updating environment: [new config] 3 added, 0 changed, 0 removed
reading sources... [ 33%] chapter
reading sources... [ 67%] chapter-i
reading sources... [100%] index

looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
copying assets... 
copying static files... 
Writing evaluated template result to /builddir/build/BUILD/python-sphinx-notfound-page-1.0.2-build/sphinx-notfound-page-1.0.2/tests/examples/default/_build/html/_static/basic.css
Writing evaluated template result to /builddir/build/BUILD/python-sphinx-notfound-page-1.0.2-build/sphinx-notfound-page-1.0.2/tests/examples/default/_build/html/_static/documentation_options.js
Writing evaluated template result to /builddir/build/BUILD/python-sphinx-notfound-page-1.0.2-build/sphinx-notfound-page-1.0.2/tests/examples/default/_build/html/_static/language_data.js
copying static files: done
copying extra files... 
copying extra files: done
copying assets: done
writing output... [ 33%] chapter
writing output... [ 67%] chapter-i
writing output... [100%] index

generating indices... genindex done
writing additional pages... search done
dumping search index in English (code: en)... done
dumping object inventory... done
build succeeded.

The HTML pages are in tests/examples/default/_build/html.

# warning: 

___________________________ test_urls_prefix_setting ___________________________

app = <SphinxTestApp buildername='html'>
status = <_io.StringIO object at 0x7f8ed0ff22c0>
warning = <_io.StringIO object at 0x7f8ed0ff1fc0>

    @pytest.mark.sphinx(
        srcdir=srcdir,
        confoverrides={
            'notfound_urls_prefix': '/language/version/',
        },
    )
    def test_urls_prefix_setting(app, status, warning):
        app.build()
        path = app.outdir / '404.html'
        assert path.exists()
    
        content = path.read_text()
    
        if sphinx.version_info < (6, 0):
            cssclass = "shortcut "
        else:
            cssclass = ""
    
        chunks = [
            # sidebar URLs
            '<h1 class="logo"><a href="/language/version/index.html">Python</a></h1>',
            '<form class="search" action="/language/version/search.html" method="get">',
            '<li><a href="/language/version/index.html">Documentation overview</a><ul>',
    
            # favicon and logo
            f'<link rel="{cssclass}icon" href="/language/version/_static/favicon.png"/>',
            '<img class="logo" src="/language/version/_static/logo.svg" alt="Logo"/>',
    
            # resources
            _get_css_html_link_tag(app, 'language', 'version', 'alabaster.css'),
            _get_css_html_link_tag(app, 'language', 'version', 'pygments.css'),
            '<link rel="stylesheet" href="/language/version/_static/custom.css" type="text/css" />',
        ]
    
        for chunk in chunks:
>           assert chunk in content
E           assert '<h1 class="logo"><a href="/language/version/index.html">Python</a></h1>' in '<!DOCTYPE html>\n\n<html lang="en" data-content_root="./">\n  <head>\n    <meta charset="utf-8" />\n    <meta name="v...pyright .\n      Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 8.1.3.\n    </div>\n  </body>\n</html>'

tests/test_urls.py:159: AssertionError
--------------------------- Captured stdout teardown ---------------------------
# testroot: root
# builder: html
# srcdir: /builddir/build/BUILD/python-sphinx-notfound-page-1.0.2-build/sphinx-notfound-page-1.0.2/tests/examples/default
# outdir: /builddir/build/BUILD/python-sphinx-notfound-page-1.0.2-build/sphinx-notfound-page-1.0.2/tests/examples/default/_build/html
# status: 
Running Sphinx v8.1.3
loading translations [en]... done
building [mo]: targets for 0 po files that are out of date
writing output... 
building [html]: targets for 3 source files that are out of date
updating environment: [new config] 3 added, 0 changed, 0 removed
reading sources... [ 33%] chapter
reading sources... [ 67%] chapter-i
reading sources... [100%] index

looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
copying assets... 
copying static files... 
Writing evaluated template result to /builddir/build/BUILD/python-sphinx-notfound-page-1.0.2-build/sphinx-notfound-page-1.0.2/tests/examples/default/_build/html/_static/basic.css
Writing evaluated template result to /builddir/build/BUILD/python-sphinx-notfound-page-1.0.2-build/sphinx-notfound-page-1.0.2/tests/examples/default/_build/html/_static/documentation_options.js
Writing evaluated template result to /builddir/build/BUILD/python-sphinx-notfound-page-1.0.2-build/sphinx-notfound-page-1.0.2/tests/examples/default/_build/html/_static/language_data.js
copying static files: done
copying extra files... 
copying extra files: done
copying assets: done
writing output... [ 33%] chapter
writing output... [ 67%] chapter-i
writing output... [100%] index

generating indices... genindex done
writing additional pages... search done
dumping search index in English (code: en)... done
dumping object inventory... done
build succeeded.

The HTML pages are in tests/examples/default/_build/html.

# warning: 

________________________ test_urls_prefix_setting_none _________________________

app = <SphinxTestApp buildername='html'>
status = <_io.StringIO object at 0x7f8ed0f0ca00>
warning = <_io.StringIO object at 0x7f8ed0f0cb80>

    @pytest.mark.sphinx(
        srcdir=srcdir,
        confoverrides={
            'notfound_urls_prefix': None,
        },
    )
    def test_urls_prefix_setting_none(app, status, warning):
        app.build()
        path = app.outdir / '404.html'
        assert path.exists()
    
        content = path.read_text()
    
        if sphinx.version_info < (6, 0):
            cssclass = "shortcut "
        else:
            cssclass = ""
    
        chunks = [
            # sidebar URLs
            '<h1 class="logo"><a href="/index.html">Python</a></h1>',
            '<form class="search" action="/search.html" method="get">',
            '<li><a href="/index.html">Documentation overview</a><ul>',
    
            # favicon and logo
            f'<link rel="{cssclass}icon" href="/_static/favicon.png"/>',
            '<img class="logo" src="/_static/logo.svg" alt="Logo"/>',
    
            # resources
            _get_css_html_link_tag(app, '', '', 'alabaster.css'),
            _get_css_html_link_tag(app, '', '', 'pygments.css'),
            '<link rel="stylesheet" href="/_static/custom.css" type="text/css" />',
        ]
    
        for chunk in chunks:
>           assert chunk in content
E           assert '<h1 class="logo"><a href="/index.html">Python</a></h1>' in '<!DOCTYPE html>\n\n<html lang="en" data-content_root="./">\n  <head>\n    <meta charset="utf-8" />\n    <meta name="v...pyright .\n      Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 8.1.3.\n    </div>\n  </body>\n</html>'

tests/test_urls.py:197: AssertionError
--------------------------- Captured stdout teardown ---------------------------
# testroot: root
# builder: html
# srcdir: /builddir/build/BUILD/python-sphinx-notfound-page-1.0.2-build/sphinx-notfound-page-1.0.2/tests/examples/default
# outdir: /builddir/build/BUILD/python-sphinx-notfound-page-1.0.2-build/sphinx-notfound-page-1.0.2/tests/examples/default/_build/html
# status: 
Running Sphinx v8.1.3
loading translations [en]... done
building [mo]: targets for 0 po files that are out of date
writing output... 
building [html]: targets for 3 source files that are out of date
updating environment: [new config] 3 added, 0 changed, 0 removed
reading sources... [ 33%] chapter
reading sources... [ 67%] chapter-i
reading sources... [100%] index

looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
copying assets... 
copying static files... 
Writing evaluated template result to /builddir/build/BUILD/python-sphinx-notfound-page-1.0.2-build/sphinx-notfound-page-1.0.2/tests/examples/default/_build/html/_static/basic.css
Writing evaluated template result to /builddir/build/BUILD/python-sphinx-notfound-page-1.0.2-build/sphinx-notfound-page-1.0.2/tests/examples/default/_build/html/_static/documentation_options.js
Writing evaluated template result to /builddir/build/BUILD/python-sphinx-notfound-page-1.0.2-build/sphinx-notfound-page-1.0.2/tests/examples/default/_build/html/_static/language_data.js
copying static files: done
copying extra files... 
copying extra files: done
copying assets: done
writing output... [ 33%] chapter
writing output... [ 67%] chapter-i
writing output... [100%] index

generating indices... genindex done
writing additional pages... search done
dumping search index in English (code: en)... done
dumping object inventory... done
build succeeded.

The HTML pages are in tests/examples/default/_build/html.

# warning: 

__________________________ test_custom_404_rst_source __________________________

app = <SphinxTestApp buildername='html'>
status = <_io.StringIO object at 0x7f8ed0ff0dc0>
warning = <_io.StringIO object at 0x7f8ed0ff01c0>

    @pytest.mark.sphinx(
        srcdir=rstsrcdir,
        confoverrides={
            'version': '2.5.1',
        },
    )
    def test_custom_404_rst_source(app, status, warning):
        app.build()
        path = app.outdir / '404.html'
        assert path.exists()
    
        content = path.read_text()
    
        chunks = [
            # custom 404.rst file content
            '<title>Oh, oh - Page not found &#8212; Python  documentation</title>',
            '<p>This is a custom 404.rst file.</p>',
            '<p>This file should be rendered instead of the default one.</p>',
            "<p>Variables Sphinx substitution should be allowed here.\nExample, version: 2.5.1.</p>",
    
            # sidebar URLs
            '<h1 class="logo"><a href="/en/latest/index.html">Python</a></h1>',
            '<form class="search" action="/en/latest/search.html" method="get">',
            '<li><a href="/en/latest/index.html">Documentation overview</a><ul>',
    
            # resources
            _get_css_html_link_tag(app, 'en', 'latest', 'alabaster.css'),
            _get_css_html_link_tag(app, 'en', 'latest', 'pygments.css'),
            '<link rel="stylesheet" href="/en/latest/_static/custom.css" type="text/css" />',
        ]
    
        for chunk in chunks:
>           assert chunk in content
E           assert '<title>Oh, oh - Page not found &#8212; Python  documentation</title>' in '<!DOCTYPE html>\n\n<html lang="en" data-content_root="./">\n  <head>\n    <meta charset="utf-8" />\n    <meta name="v...pyright .\n      Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 8.1.3.\n    </div>\n  </body>\n</html>'

tests/test_urls.py:263: AssertionError
--------------------------- Captured stdout teardown ---------------------------
# testroot: root
# builder: html
# srcdir: /builddir/build/BUILD/python-sphinx-notfound-page-1.0.2-build/sphinx-notfound-page-1.0.2/tests/examples/404rst
# outdir: /builddir/build/BUILD/python-sphinx-notfound-page-1.0.2-build/sphinx-notfound-page-1.0.2/tests/examples/404rst/_build/html
# status: 
Running Sphinx v8.1.3
loading translations [en]... done
building [mo]: targets for 0 po files that are out of date
writing output... 
building [html]: targets for 2 source files that are out of date
updating environment: [new config] 2 added, 0 changed, 0 removed
reading sources... [ 50%] 404
reading sources... [100%] index

looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
copying assets... 
copying static files... 
Writing evaluated template result to /builddir/build/BUILD/python-sphinx-notfound-page-1.0.2-build/sphinx-notfound-page-1.0.2/tests/examples/404rst/_build/html/_static/basic.css
Writing evaluated template result to /builddir/build/BUILD/python-sphinx-notfound-page-1.0.2-build/sphinx-notfound-page-1.0.2/tests/examples/404rst/_build/html/_static/documentation_options.js
Writing evaluated template result to /builddir/build/BUILD/python-sphinx-notfound-page-1.0.2-build/sphinx-notfound-page-1.0.2/tests/examples/404rst/_build/html/_static/language_data.js
copying static files: done
copying extra files... 
copying extra files: done
copying assets: done
writing output... [ 50%] 404
writing output... [100%] index

generating indices... genindex done
writing additional pages... search done
copying images... [ 33%] test.png
copying images... [ 67%] images/loudly-crying-face.png
copying images... [100%] https.png

dumping search index in English (code: en)... done
dumping object inventory... done
build succeeded.

The HTML pages are in tests/examples/404rst/_build/html.

# warning: 

________________________ test_urls_for_dirhtml_builder _________________________

app = <SphinxTestApp buildername='dirhtml'>
status = <_io.StringIO object at 0x7f8ed0ff1240>
warning = <_io.StringIO object at 0x7f8ed0ff3880>

    @pytest.mark.sphinx(
        srcdir=srcdir,
        buildername='dirhtml',
    )
    def test_urls_for_dirhtml_builder(app, status, warning):
        app.build()
        path = app.outdir / '404' / 'index.html'
        assert path.exists()
    
        content = path.read_text()
    
        chunks = [
            # sidebar URLs
            '<form class="search" action="/en/latest/search/" method="get">',
            '<li class="toctree-l1"><a class="reference internal" href="/en/latest/chapter/">Chapter</a></li>',
    
            # resources
            _get_css_html_link_tag(app, 'en', 'latest', 'alabaster.css'),
            _get_css_html_link_tag(app, 'en', 'latest', 'pygments.css'),
            '<link rel="stylesheet" href="/en/latest/_static/custom.css" type="text/css" />',
        ]
    
        for chunk in chunks:
>           assert chunk in content
E           assert '<li class="toctree-l1"><a class="reference internal" href="/en/latest/chapter/">Chapter</a></li>' in '<!DOCTYPE html>\n\n<html lang="en" data-content_root="../">\n  <head>\n    <meta charset="utf-8" />\n    <meta name="...pyright .\n      Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 8.1.3.\n    </div>\n  </body>\n</html>'

tests/test_urls.py:366: AssertionError
--------------------------- Captured stdout teardown ---------------------------
# testroot: root
# builder: dirhtml
# srcdir: /builddir/build/BUILD/python-sphinx-notfound-page-1.0.2-build/sphinx-notfound-page-1.0.2/tests/examples/default
# outdir: /builddir/build/BUILD/python-sphinx-notfound-page-1.0.2-build/sphinx-notfound-page-1.0.2/tests/examples/default/_build/dirhtml
# status: 
Running Sphinx v8.1.3
loading translations [en]... done
building [mo]: targets for 0 po files that are out of date
writing output... 
building [dirhtml]: targets for 3 source files that are out of date
updating environment: [new config] 3 added, 0 changed, 0 removed
reading sources... [ 33%] chapter
reading sources... [ 67%] chapter-i
reading sources... [100%] index

looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
copying assets... 
copying static files... 
Writing evaluated template result to /builddir/build/BUILD/python-sphinx-notfound-page-1.0.2-build/sphinx-notfound-page-1.0.2/tests/examples/default/_build/dirhtml/_static/basic.css
Writing evaluated template result to /builddir/build/BUILD/python-sphinx-notfound-page-1.0.2-build/sphinx-notfound-page-1.0.2/tests/examples/default/_build/dirhtml/_static/documentation_options.js
Writing evaluated template result to /builddir/build/BUILD/python-sphinx-notfound-page-1.0.2-build/sphinx-notfound-page-1.0.2/tests/examples/default/_build/dirhtml/_static/language_data.js
copying static files: done
copying extra files... 
copying extra files: done
copying assets: done
writing output... [ 33%] chapter
writing output... [ 67%] chapter-i
writing output... [100%] index

generating indices... genindex done
writing additional pages... search done
dumping search index in English (code: en)... done
dumping object inventory... done
build succeeded.

The HTML pages are in tests/examples/default/_build/dirhtml.

# warning: 

______________________ test_toctree_urls_notfound_default ______________________

app = <SphinxTestApp buildername='html'>
status = <_io.StringIO object at 0x7f8ed11a1000>
warning = <_io.StringIO object at 0x7f8ed11a3e80>

    @pytest.mark.sphinx(
        srcdir=srcdir,
        confoverrides={
            'notfound_urls_prefix': '/ja/default/',
        },
    )
    def test_toctree_urls_notfound_default(app, status, warning):
        app.build()
        path = app.outdir / '404.html'
        assert path.exists()
    
        content = path.read_text()
    
        chunks = [
            # sidebar URLs
            '<form class="search" action="/ja/default/search.html" method="get">',
            '<li class="toctree-l1"><a class="reference internal" href="/ja/default/chapter.html">Chapter</a></li>',
    
            # resources
            _get_css_html_link_tag(app, 'ja', 'default', 'alabaster.css'),
            _get_css_html_link_tag(app, 'ja', 'default', 'pygments.css'),
            '<link rel="stylesheet" href="/ja/default/_static/custom.css" type="text/css" />',
        ]
    
        for chunk in chunks:
>           assert chunk in content
E           assert '<li class="toctree-l1"><a class="reference internal" href="/ja/default/chapter.html">Chapter</a></li>' in '<!DOCTYPE html>\n\n<html lang="en" data-content_root="./">\n  <head>\n    <meta charset="utf-8" />\n    <meta name="v...pyright .\n      Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 8.1.3.\n    </div>\n  </body>\n</html>'

tests/test_urls.py:417: AssertionError
--------------------------- Captured stdout teardown ---------------------------
# testroot: root
# builder: html
# srcdir: /builddir/build/BUILD/python-sphinx-notfound-page-1.0.2-build/sphinx-notfound-page-1.0.2/tests/examples/default
# outdir: /builddir/build/BUILD/python-sphinx-notfound-page-1.0.2-build/sphinx-notfound-page-1.0.2/tests/examples/default/_build/html
# status: 
Running Sphinx v8.1.3
loading translations [en]... done
building [mo]: targets for 0 po files that are out of date
writing output... 
building [html]: targets for 3 source files that are out of date
updating environment: [new config] 3 added, 0 changed, 0 removed
reading sources... [ 33%] chapter
reading sources... [ 67%] chapter-i
reading sources... [100%] index

looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
copying assets... 
copying static files... 
Writing evaluated template result to /builddir/build/BUILD/python-sphinx-notfound-page-1.0.2-build/sphinx-notfound-page-1.0.2/tests/examples/default/_build/html/_static/basic.css
Writing evaluated template result to /builddir/build/BUILD/python-sphinx-notfound-page-1.0.2-build/sphinx-notfound-page-1.0.2/tests/examples/default/_build/html/_static/documentation_options.js
Writing evaluated template result to /builddir/build/BUILD/python-sphinx-notfound-page-1.0.2-build/sphinx-notfound-page-1.0.2/tests/examples/default/_build/html/_static/language_data.js
copying static files: done
copying extra files... 
copying extra files: done
copying assets: done
writing output... [ 33%] chapter
writing output... [ 67%] chapter-i
writing output... [100%] index

generating indices... genindex done
writing additional pages... search done
dumping search index in English (code: en)... done
dumping object inventory... done
build succeeded.

The HTML pages are in tests/examples/default/_build/html.

# warning: 

______________________________ test_toctree_links ______________________________

app = <SphinxTestApp buildername='html'>
status = <_io.StringIO object at 0x7f8ed0ff1000>
warning = <_io.StringIO object at 0x7f8ed0ff28c0>

    @pytest.mark.sphinx(
        srcdir=srcdir,
    )
    def test_toctree_links(app, status, warning):
        app.build()
        path = app.outdir / '404.html'
        assert path.exists()
    
        content = path.read_text()
    
        chunks = [
            '<h3>Navigation</h3>',
            '<li class="toctree-l1"><a class="reference internal" href="/en/latest/chapter-i.html">Chapter I</a></li>',
        ]
    
        for chunk in chunks:
>           assert chunk in content
E           assert '<li class="toctree-l1"><a class="reference internal" href="/en/latest/chapter-i.html">Chapter I</a></li>' in '<!DOCTYPE html>\n\n<html lang="en" data-content_root="./">\n  <head>\n    <meta charset="utf-8" />\n    <meta name="v...pyright .\n      Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 8.1.3.\n    </div>\n  </body>\n</html>'

tests/test_urls.py:436: AssertionError
--------------------------- Captured stdout teardown ---------------------------
# testroot: root
# builder: html
# srcdir: /builddir/build/BUILD/python-sphinx-notfound-page-1.0.2-build/sphinx-notfound-page-1.0.2/tests/examples/default
# outdir: /builddir/build/BUILD/python-sphinx-notfound-page-1.0.2-build/sphinx-notfound-page-1.0.2/tests/examples/default/_build/html
# status: 
Running Sphinx v8.1.3
loading translations [en]... done
building [mo]: targets for 0 po files that are out of date
writing output... 
building [html]: targets for 3 source files that are out of date
updating environment: [new config] 3 added, 0 changed, 0 removed
reading sources... [ 33%] chapter
reading sources... [ 67%] chapter-i
reading sources... [100%] index

looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
copying assets... 
copying static files... 
Writing evaluated template result to /builddir/build/BUILD/python-sphinx-notfound-page-1.0.2-build/sphinx-notfound-page-1.0.2/tests/examples/default/_build/html/_static/basic.css
Writing evaluated template result to /builddir/build/BUILD/python-sphinx-notfound-page-1.0.2-build/sphinx-notfound-page-1.0.2/tests/examples/default/_build/html/_static/documentation_options.js
Writing evaluated template result to /builddir/build/BUILD/python-sphinx-notfound-page-1.0.2-build/sphinx-notfound-page-1.0.2/tests/examples/default/_build/html/_static/language_data.js
copying static files: done
copying extra files... 
copying extra files: done
copying assets: done
writing output... [ 33%] chapter
writing output... [ 67%] chapter-i
writing output... [100%] index

generating indices... genindex done
writing additional pages... search done
dumping search index in English (code: en)... done
dumping object inventory... done
build succeeded.

The HTML pages are in tests/examples/default/_build/html.

# warning: 

______________________ test_toctree_links_custom_settings ______________________

app = <SphinxTestApp buildername='html'>
status = <_io.StringIO object at 0x7f8ed0e7bb80>
warning = <_io.StringIO object at 0x7f8ed0e7b340>

    @pytest.mark.sphinx(
        srcdir=srcdir,
        confoverrides={
            'notfound_urls_prefix': '/pt-br/stable/',
        },
    )
    def test_toctree_links_custom_settings(app, status, warning):
        app.build()
        path = app.outdir / '404.html'
        assert path.exists()
    
        content = path.read_text()
    
        chunks = [
            '<h3>Navigation</h3>',
            '<li class="toctree-l1"><a class="reference internal" href="/pt-br/stable/chapter-i.html">Chapter I</a></li>',
        ]
    
        for chunk in chunks:
>           assert chunk in content
E           assert '<li class="toctree-l1"><a class="reference internal" href="/pt-br/stable/chapter-i.html">Chapter I</a></li>' in '<!DOCTYPE html>\n\n<html lang="en" data-content_root="./">\n  <head>\n    <meta charset="utf-8" />\n    <meta name="v...pyright .\n      Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 8.1.3.\n    </div>\n  </body>\n</html>'

tests/test_urls.py:458: AssertionError
--------------------------- Captured stdout teardown ---------------------------
# testroot: root
# builder: html
# srcdir: /builddir/build/BUILD/python-sphinx-notfound-page-1.0.2-build/sphinx-notfound-page-1.0.2/tests/examples/default
# outdir: /builddir/build/BUILD/python-sphinx-notfound-page-1.0.2-build/sphinx-notfound-page-1.0.2/tests/examples/default/_build/html
# status: 
Running Sphinx v8.1.3
loading translations [en]... done
building [mo]: targets for 0 po files that are out of date
writing output... 
building [html]: targets for 3 source files that are out of date
updating environment: [new config] 3 added, 0 changed, 0 removed
reading sources... [ 33%] chapter
reading sources... [ 67%] chapter-i
reading sources... [100%] index

looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
copying assets... 
copying static files... 
Writing evaluated template result to /builddir/build/BUILD/python-sphinx-notfound-page-1.0.2-build/sphinx-notfound-page-1.0.2/tests/examples/default/_build/html/_static/basic.css
Writing evaluated template result to /builddir/build/BUILD/python-sphinx-notfound-page-1.0.2-build/sphinx-notfound-page-1.0.2/tests/examples/default/_build/html/_static/documentation_options.js
Writing evaluated template result to /builddir/build/BUILD/python-sphinx-notfound-page-1.0.2-build/sphinx-notfound-page-1.0.2/tests/examples/default/_build/html/_static/language_data.js
copying static files: done
copying extra files... 
copying extra files: done
copying assets: done
writing output... [ 33%] chapter
writing output... [ 67%] chapter-i
writing output... [100%] index

generating indices... genindex done
writing additional pages... search done
dumping search index in English (code: en)... done
dumping object inventory... done
build succeeded.

The HTML pages are in tests/examples/default/_build/html.

# warning: 

=============================== warnings summary ===============================
tests/test_urls.py: 80 warnings
  /builddir/build/BUILD/python-sphinx-notfound-page-1.0.2-build/sphinx-notfound-page-1.0.2/notfound/extension.py:269: RemovedInSphinx90Warning: The '_Opt' object tuple interface is deprecated, use attribute access instead for 'default', 'rebuild', and 'valid_types'.
    default, rebuild, types = app.config.values.get('notfound_urls_prefix')

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED tests/test_urls.py::test_default_settings - assert '<title>Page not fo...
FAILED tests/test_urls.py::test_context_settings - assert '<title>My custom t...
FAILED tests/test_urls.py::test_urls_prefix_setting - assert '<h1 class="logo...
FAILED tests/test_urls.py::test_urls_prefix_setting_none - assert '<h1 class=...
FAILED tests/test_urls.py::test_custom_404_rst_source - assert '<title>Oh, oh...
FAILED tests/test_urls.py::test_urls_for_dirhtml_builder - assert '<li class=...
FAILED tests/test_urls.py::test_toctree_urls_notfound_default - assert '<li c...
FAILED tests/test_urls.py::test_toctree_links - assert '<li class="toctree-l1...
FAILED tests/test_urls.py::test_toctree_links_custom_settings - assert '<li c...
================== 9 failed, 12 passed, 80 warnings in 3.18s ===================

Please work with upstream on this issue, I plan to ship sphinx 8 in two weeks.


For the logs from testing build attempts, see:
https://copr.fedorainfracloud.org/coprs/thrnciar/python-sphinx/package/python-sphinx-notfound-page/

You can test you package in mock running:

$ mock -r fedora-rawhide-x86_64
--addrepo=https://download.copr.fedorainfracloud.org/results/thrnciar/python-sphinx/fedora-rawhide-x86_64/ --no-clean your.src.rpm
$ mock -r fedora-rawhide-x86_64
--addrepo=https://download.copr.fedorainfracloud.org/results/thrnciar/python-sphinx/fedora-rawhide-x86_64/ shell

We'd like to include Sphinx 8 in Fedora 42.
Let us know here if you have any questions. Thank you!

Comment 1 Fedora Update System 2025-01-04 20:29:16 UTC
FEDORA-2025-2b336b6842 (python-sphinx-notfound-page-1.0.4-1.fc42) has been submitted as an update to Fedora 42.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-2b336b6842

Comment 2 Fedora Update System 2025-01-04 21:05:19 UTC
FEDORA-2025-2b336b6842 (python-sphinx-notfound-page-1.0.4-1.fc42) has been pushed to the Fedora 42 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.