Skip to content
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

doc build fails with sphinx 4.2: deprecated API needs updating #2441

Closed
drew-parsons opened this issue Oct 7, 2021 · 0 comments · Fixed by #2442
Closed

doc build fails with sphinx 4.2: deprecated API needs updating #2441

drew-parsons opened this issue Oct 7, 2021 · 0 comments · Fixed by #2442

Comments

@drew-parsons
Copy link
Contributor

drew-parsons commented Oct 7, 2021

xtensor docs previously built under sphinx 3.5. I've now got sphinx 4.2 installed, which is making the docs fail to build:

$ cd docs; make html
...
sphinx-build -b html -d build/doctrees   source build/html
Running Sphinx v4.2.0
making output directory... done

Exception occurred:
  File "/projects/mathlibs/build/xtensor/docs/source/conf.py", line 19, in setup
    app.add_stylesheet("main_stylesheet.css")
AttributeError: 'Sphinx' object has no attribute 'add_stylesheet'
The full traceback has been saved in /tmp/sphinx-err-tqmfa670.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!
make: *** [Makefile:56: html] Error 2

The tmp file mentioned there reports much the same:

# Sphinx version: 4.2.0
# Python version: 3.9.7 (CPython)
# Docutils version: 0.16 release
# Jinja2 version: 3.0.1
# Last messages:

# Loaded extensions:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/sphinx/cmd/build.py", line 276, in build_main
    app = Sphinx(args.sourcedir, args.confdir, args.outputdir,
  File "/usr/lib/python3/dist-packages/sphinx/application.py", line 245, in __init__
    self.config.setup(self)
  File "/projects/mathlibs/build/xtensor/docs/source/conf.py", line 19, in setup
    app.add_stylesheet("main_stylesheet.css")
AttributeError: 'Sphinx' object has no attribute 'add_stylesheet'

sphinx-doc/sphinx#7747 indicates that "the API was deprecated at 1.8.0. Please use app.add_css_file() instead."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant