Bug 2481418 - myst-nb fails to build with Python 3.15: AssertionError in 6 tests
Summary: myst-nb fails to build with Python 3.15: AssertionError in 6 tests
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: myst-nb
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jerry James
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.15
TreeView+ depends on / blocked
 
Reported: 2026-05-26 10:08 UTC by Karolina Surma
Modified: 2026-05-26 20:51 UTC (History)
3 users (show)

Fixed In Version: myst-nb-1.4.0-2.fc45
Clone Of:
Environment:
Last Closed: 2026-05-26 20:51:44 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Karolina Surma 2026-05-26 10:08:20 UTC
myst-nb fails to build with Python 3.15.0b1.

________________ test_custom_convert_multiple_extensions_cache _________________

sphinx_run = <conftest.SphinxFixture object at 0x7f41792e1fd0>
file_regression = <conftest.FileRegression object at 0x7f4173e6c910>
check_nbs = <function check_nbs.<locals>._check_nbs at 0x7f417920bc10>

    @pytest.mark.sphinx_params(
        "custom-formats2.extra.exnt",
        conf={
            "nb_execution_mode": "cache",
            "nb_custom_formats": {".extra.exnt": ["jupytext.reads", {"fmt": "Rmd"}]},
        },
    )
    def test_custom_convert_multiple_extensions_cache(
        sphinx_run, file_regression, check_nbs
    ):
        """The outputs should be populated."""
        sphinx_run.build()
        assert sphinx_run.warnings() == ""
>       regress_nb_doc(file_regression, sphinx_run, check_nbs)

/builddir/build/BUILD/myst-nb-1.4.0-build/MyST-NB-1.4.0/tests/test_execute.py:406: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/builddir/build/BUILD/myst-nb-1.4.0-build/MyST-NB-1.4.0/tests/test_execute.py:38: in regress_nb_doc
    file_regression.check(doctree_string, extension=".xml", encoding="utf-8")
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <conftest.FileRegression object at 0x7f4173e6c910>
data = '<document source="custom-formats2" translation_progress="{\'total\': 0, \'translated\': 0}">\n    <section ids="custo...a7452d74c403.png" uri="_build/jupyter_execute/0b6a8ea915d4261d71ec8b0a09154b40bec3fdc3f17723df98aca7452d74c403.png">\n'
kwargs = {'encoding': 'utf-8', 'extension': '.xml'}

    def check(self, data, **kwargs):
>       return self.file_regression.check(self._strip_ignores(data), **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E       AssertionError: FILES DIFFER:
E       /tmp/pytest-of-mockbuild/pytest-0/test_custom_convert_multiple_e1/test_custom_convert_multiple_extensions_cache.xml
E       /tmp/pytest-of-mockbuild/pytest-0/test_custom_convert_multiple_e1/test_custom_convert_multiple_extensions_cache.obtained.xml
E       HTML DIFF: /tmp/pytest-of-mockbuild/pytest-0/test_custom_convert_multiple_e1/test_custom_convert_multiple_extensions_cache.obtained.diff.html
E       --- 
E       +++ 
E       @@ -19,4 +19,4 @@
E                                <literal_block classes="output text_plain" language="myst-ansi" xml:space="preserve">
E                                    <Figure size 640x480 with 1 Axes>
E                            <container mime_type="image/png">
E       -                        <image candidates="{'*': '_build/jupyter_execute/321b226a9bda4595da09f9389cea3b97e91b9c089e9bab3feae10e2100fc5c38.png'}" uri="_build/jupyter_execute/321b226a9bda4595da09f9389cea3b97e91b9c089e9bab3feae10e2100fc5c38.png">
E       +                        <image candidates="{'*': '_build/jupyter_execute/0b6a8ea915d4261d71ec8b0a09154b40bec3fdc3f17723df98aca7452d74c403.png'}" uri="_build/jupyter_execute/0b6a8ea915d4261d71ec8b0a09154b40bec3fdc3f17723df98aca7452d74c403.png">

/builddir/build/BUILD/myst-nb-1.4.0-build/MyST-NB-1.4.0/tests/conftest.py:316: AssertionError
----------------------------- Captured stderr call -----------------------------
[IPKernelApp] WARNING | debugpy_stream undefined, debugging will not be enabled
=========================== short test summary info ============================
FAILED tests/test_execute.py::test_complex_outputs_unrun_cache - AssertionErr...
FAILED tests/test_execute.py::test_complex_outputs_unrun_auto - AssertionErro...
FAILED tests/test_execute.py::test_custom_convert_auto - AssertionError: FILE...
FAILED tests/test_execute.py::test_custom_convert_cache - AssertionError: FIL...
FAILED tests/test_execute.py::test_custom_convert_multiple_extensions_auto - ...
FAILED tests/test_execute.py::test_custom_convert_multiple_extensions_cache

https://docs.python.org/3.15/whatsnew/3.15.html

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.15-b1/fedora-rawhide-x86_64/10510661-myst-nb/

For all our attempts to build myst-nb with Python 3.15, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.15-b1/package/myst-nb/

Testing and mass rebuild of packages is happening in copr.
You can follow these instructions to test locally in mock if your package builds with Python 3.15:
https://copr.fedorainfracloud.org/coprs/g/python/python3.15-b1/

Let us know here if you have any questions.

Python 3.15 is planned to be included in Fedora 45.
To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.15.
A build failure prevents us from testing all dependent packages (transitive [Build]Requires),
so if this package is required a lot, it's important for us to get it fixed soon.

We'd appreciate help from the people who know this package best,
but if you don't want to work on this now, let us know so we can try to work around it on our side.

Comment 1 Jerry James 2026-05-26 20:51:44 UTC
The image filenames change with pretty much every matplotlib update, so these tests are almost constantly broken.  Thanks for poking me about it.  I finally figured out how to ignore the image filenames when comparing the generated trees.  It's only the tree structure we care about, after all, not the exact image names.


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