Bug 2488369

Summary: python-nbconvert fails to build with Python 3.15: Error in import line from /usr/lib/python3.15/site-packages/sphinxcontrib_spelling-7.3.3-py3.15-nspkg.pth
Product: [Fedora] Fedora Reporter: Karolina Surma <ksurma>
Component: python-nbconvertAssignee: Miro Hrončok <mhroncok>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: epel-packagers-sig, jonathan, lbalhar, mhroncok, python-packagers-sig, romain.geissler
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python3.15-3.15.0~b2-5.fc45, python-nbconvert-7.16.4-15.fc45 Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2026-06-19 09:35:31 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2412434, 2433833    

Description Karolina Surma 2026-06-12 14:43:28 UTC
python-nbconvert fails to build with Python 3.15.0b2.

______________________ TestNbConvertApp.test_help_output _______________________
self = <tests.test_nbconvertapp.TestNbConvertApp testMethod=test_help_output>
    def[39;49;00m [39;49;00mtest_help_output[39;49;00m(self[39;49;00m):[39;49;00m
        [39;49;00m"""ipython nbconvert --help-all works"""[39;49;00m[39;49;00m
>       check_help_all_output("[39;49;00mnbconvert[39;49;00m"[39;49;00m)[39;49;00m
self       = <tests.test_nbconvertapp.TestNbConvertApp testMethod=test_help_output>
tests/test_nbconvertapp.py:42: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
pkg = 'nbconvert', subcommand = None
    def[39;49;00m [39;49;00mcheck_help_all_output[39;49;00m(pkg: str[39;49;00m, subcommand: Sequence[str[39;49;00m] | None[39;49;00m = None[39;49;00m) -> tuple[39;49;00m[str[39;49;00m, str[39;49;00m]:[39;49;00m
        [39;49;00m"""test that `python -m PKG --help-all` works"""[39;49;00m[39;49;00m
        cmd = [sys.executable, "[39;49;00m-m[39;49;00m"[39;49;00m, pkg][39;49;00m
        if[39;49;00m subcommand:[39;49;00m
            cmd.extend(subcommand)[39;49;00m
        cmd.append("[39;49;00m--help-all[39;49;00m"[39;49;00m)[39;49;00m
        out, err, rc = get_output_error_code(cmd)[39;49;00m
        assert[39;49;00m rc == 0[39;49;00m, err[39;49;00m
>       assert[39;49;00m "[39;49;00mTraceback[39;49;00m"[39;49;00m not[39;49;00m in[39;49;00m err[39;49;00m
               ^^^^^^^^^^^^^^^^^^^^^^[39;49;00m
E       AssertionError
cmd        = ['/usr/bin/python3', '-m', 'nbconvert', '--help-all']
err        = 'Error in import line from /usr/lib/python3.15/site-packages/sphinxcontrib_spelling-7.3.3-py3.15-nspkg.pth: import sys..._exec_imports\n    File "<string>", line 1, in <module>\n  KeyError: "local variable \'\'sitedir\'\' is not defined"\n'
out        = 'This application is used to convert notebook files (*.ipynb) to various other\nformats.\n\nWARNING: THE COMMANDLINE I...             c.NbConvertApp.notebooks = ["my_notebook.ipynb"]\n\n            > jupyter nbconvert --config mycfg.py\n\n'
pkg        = 'nbconvert'
rc         = 0
subcommand = None

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

For our attempts to build python-nbconvert with Python 3.15, see:
https://koji.fedoraproject.org/koji/search?terms=python-nbconvert&type=package&match=exact

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 Lumír Balhar 2026-06-13 11:44:26 UTC
Proposed fix for sphinxcontrib-spelling: https://src.fedoraproject.org/rpms/python-sphinxcontrib-spelling/pull-request/2

Comment 2 Miro Hrončok 2026-06-13 19:33:26 UTC
Proposed fix for Python https://src.fedoraproject.org/rpms/python3.15/pull-request/80

Comment 3 Karolina Surma 2026-06-14 09:19:42 UTC
I tested the build with Python from PR#80, nbconvert builds successfully with it.