-
Notifications
You must be signed in to change notification settings - Fork 134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot run with Sphinx 8.2.0 #825
Comments
I'm experiencing the same problem. |
Closes spatialaudio#825 Implicit imports (imports that rely on the fact that importing a module imports another module such as a submodule) makes the code vulnerable to breakage due to refactors in the dependent code. Such as the changes in Sphinx 8.2.0 that caused spatialaudio#825 This replaces all implicit imports that I could find by explicit imports.
Sphinx version 8.2.0 broke nbsphinx, temporary fix is to require the older version until the issue is resolved either in nbsphinx or sphinx. spatialaudio/nbsphinx#825 --------- Co-authored-by: Lukas Bertsch <lukas.bertsch@tu-dortmund.de> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
The most recent release of sphinx version 8.2.0 is breaking nbsphinx, see: spatialaudio/nbsphinx#825 This PR pins sphinx to version 8.1.*.
Same. I guess we need an import statement in $ python
Python 3.13.2 | packaged by conda-forge | (main, Feb 17 2025, 14:10:22) [GCC 13.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sphinx
>>> sphinx.__version__
'8.2.0'
>>> sphinx.util.console
Traceback (most recent call last):
File "<python-input-2>", line 1, in <module>
sphinx.util.console
File "/home/kaushikggg/.mambaforge/envs/py312_env/lib/python3.13/site-packages/sphinx/util/__init__.py", line 157, in __getattr__
raise AttributeError(msg)
AttributeError: module 'sphinx.util' has no attribute 'console'
>>> import sphinx.util.console
>>> sphinx.util.console.brown
<function _create_colour_func.<locals>.inner at 0x7f787098c220> |
Currently leads to build errors, probably due to extension incompatibility of nbsphinx. See spatialaudio/nbsphinx#825
Avoid nbsphinx issue by forcing Sphinx in a supported version until this gets resolved: spatialaudio/nbsphinx#825
Looks like nbsphinx does not support sphinx 8.2.0 yet: spatialaudio/nbsphinx#825
Fixes spatialaudio#825 A more minimal version of spatialaudio#826 See also spatialaudio#825 (comment)
I am having the same issue, noticed it when I was testing a build on readthedocs today. The full traceback:
Contents of my `.readthedocs.yml`:version: 2
build:
os: ubuntu-22.04
tools:
python: "mambaforge-4.10"
jobs:
pre_build:
- echo "Copying static X3D files..."; mkdir -p $READTHEDOCS_OUTPUT/html/_static/x3d; cp -r ./doc/source/_static/x3d $READTHEDOCS_OUTPUT/html/_static
formats:
- htmlzip
conda:
environment: doc/environment.yml
python:
install:
- method: pip
path: .
sphinx:
configuration: doc/source/conf.py Contents of my `environment.yml`:channels:
- conda-forge
- defaults
dependencies:
- numpy
- pandas
- rowan>=1.2
- scipy
- jupyter
- sphinx
- furo>=2023.9.10
- sphinxcontrib-bibtex>=2.0.0
- autodocsumm
- nbsphinx>=0.9.6
- fresnel
- matplotlib
- pip:
- plato-draw
- sphinx
name: coxeter-readthedocs What fixed the issue was pinning the version of sphinx to 8.1.3 in |
A sphinx update broke nbsphinx. sphinx views this as an issue with nbsphinx, so the fix is waiting on a new release of nbsphinx. This temporarily limits sphinx to before the downstream breaking change until there is a new nbsphinx release. See: spatialaudio/nbsphinx#825
The currently latest release of nbsphinx (0.9.6) is not compatible with Sphinx 8.2.0, so here Sphinx is pinned to `<8.2`. See: spatialaudio/nbsphinx#825 The issue is that nbsphinx does `import sphinx` and relies `sphinx` to import all of its submodules which it no longer does. Note -- qiskit-experiments mainly uses `jupyter-sphinx` now but it still uses the `nbgallery` directive for the landing pages for the tutorials, so it can not simply be dropped as a dependency (maybe the gallery could be formatted without it). Closes qiskit-community#1513
The currently latest release of nbsphinx (0.9.6) is not compatible with Sphinx 8.2.0, so here Sphinx is pinned to `<8.2`. See: spatialaudio/nbsphinx#825 The issue is that nbsphinx does `import sphinx` and relies `sphinx` to import all of its submodules which it no longer does. Note -- qiskit-experiments mainly uses `jupyter-sphinx` now but it still uses the `nbgallery` directive for the landing pages for the tutorials, so it can not simply be dropped as a dependency (maybe the gallery could be formatted without it). Closes #1513
The currently latest release of nbsphinx (0.9.6) is not compatible with Sphinx 8.2.0, so here Sphinx is pinned to `<8.2`. See: spatialaudio/nbsphinx#825 The issue is that nbsphinx does `import sphinx` and relies `sphinx` to import all of its submodules which it no longer does. Note -- qiskit-experiments mainly uses `jupyter-sphinx` now but it still uses the `nbgallery` directive for the landing pages for the tutorials, so it can not simply be dropped as a dependency (maybe the gallery could be formatted without it). Closes #1513 (cherry picked from commit 28d8b35)
) (#1518) The currently latest release of nbsphinx (0.9.6) is not compatible with Sphinx 8.2.0, so here Sphinx is pinned to `<8.2`. See: spatialaudio/nbsphinx#825 The issue is that nbsphinx does `import sphinx` and relies `sphinx` to import all of its submodules which it no longer does. Note -- qiskit-experiments mainly uses `jupyter-sphinx` now but it still uses the `nbgallery` directive for the landing pages for the tutorials, so it can not simply be dropped as a dependency (maybe the gallery could be formatted without it). Closes #1513 <hr>This is an automatic backport of pull request #1514 done by [Mergify](https://mergify.com). Co-authored-by: Will Shanks <willshanks@us.ibm.com>
There seem to be multiple issues, also involving 3rd party modules. For now, I'm planning to not support Sphinx 8.2 right now: #828. |
Sphinx 8.2.2 includes a temporary work-around for this issue, but the correct fix is to use explicit imports rather than implicit. Sorry that it took a few days, the approach to solve the regression only occured to me recently. A |
Please report any remaining/outstanding regressions to Sphinx, as I've tried to fix all the ones I have seen so far. |
We had temporarily limited the sphinx version due to compatibility issues with nbsphinx. These issues have been addressed upstream, so we can return to using the most recent version. See: spatialaudio/nbsphinx#825 (comment)
Thanks @AA-Turner for the work-around!
Yeah, this will happen in #827. This is the easiest of all the recent problems.
I think there are no more unreported issues left. Currently, there is still a warning from felix-hilden/sphinx-codeautolink#173 and the problem reported in sphinx-doc/sphinx#13346 (with your partial fix #822) is still waiting to be resolved. |
Closes spatialaudio#825 Implicit imports (imports that rely on the fact that importing a module imports another module such as a submodule) makes the code vulnerable to breakage due to refactors in the dependent code. Such as the changes in Sphinx 8.2.0 that caused spatialaudio#825 This replaces all implicit imports that I could find by explicit imports.
@mgeier note that in addition to the issue in sphinx-codeautolink there is also missinglinkelectronics/sphinxcontrib-svg2pdfconverter#26 which is triggered by nbsphinx ci. See old comments in #826 The fix is simple and I have submitted a pr for that missinglinkelectronics/sphinxcontrib-svg2pdfconverter#27 Both the issues in sphinxcontrib-svg2pdfconverter and sphinx-codeautolink however don't really prevent using nbsphinx with sphinx 8.2 since none of them are requirements of nbsphinx |
sphinx-doc/sphinx#13352, sphinx-doc/sphinx#13364
The text was updated successfully, but these errors were encountered: