Skip to content

Commit

Permalink
Unpin docs dependencies
Browse files Browse the repository at this point in the history
The sphinx doc build run by CircleCI is currently failing:

```
make: Entering directory '/home/circleci/wayback/docs'
Traceback (most recent call last):
  File "/home/circleci/venv/bin/sphinx-build", line 5, in <module>
    from sphinx.cmd.build import main
  File "/home/circleci/venv/lib/python3.8/site-packages/sphinx/cmd/build.py", line 25, in <module>
    from sphinx.application import Sphinx
  File "/home/circleci/venv/lib/python3.8/site-packages/sphinx/application.py", line 42, in <module>
    from sphinx.registry import SphinxComponentRegistry
  File "/home/circleci/venv/lib/python3.8/site-packages/sphinx/registry.py", line 24, in <module>
    from sphinx.builders import Builder
  File "/home/circleci/venv/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 26, in <module>
    from sphinx.util import import_object, logging, rst, progress_message, status_iterator
  File "/home/circleci/venv/lib/python3.8/site-packages/sphinx/util/rst.py", line 22, in <module>
    from jinja2 import environmentfilter
ImportError: cannot import name 'environmentfilter' from 'jinja2' (/home/circleci/venv/lib/python3.8/site-packages/jinja2/__init__.py)
make: *** [Makefile:20: html] Error 1
make: Leaving directory '/home/circleci/wayback/docs'

Exited with code exit status 2

CircleCI
```

It looks like this might be the result of jinja2 imports being
deprecated?

sphinx-doc/sphinx#10291

I tried unpinning all the dependencies, and making a few minor changes
to the sphinx config and the docs seem to build fine locally but maybe
I'm missing some detail about theme/css?

Unfortunately I did have to tell pip to ignore sphinx 5.2.0.post0 which
appears to have a recent bug that hopefully will be fixed shortly:

readthedocs/sphinx_rtd_theme#1343
  • Loading branch information
edsu committed Sep 25, 2022
1 parent 1b9ccdb commit e767780
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 deletions.
5 changes: 3 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,15 +95,16 @@ jobs:
docs:
working_directory: ~/wayback
docker:
- image: cimg/python:3.8
- image: cimg/python:3.10
steps:
- checkout
- setup_pip:
python-version: "3.8"
python-version: "3.10"
- run:
name: Build docs
command: |
. ~/venv/bin/activate
pip list
make -C docs html
workflows:
Expand Down
10 changes: 5 additions & 5 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
# import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))
import os
import sys
sys.path.insert(0, os.path.abspath('../..'))


# -- General configuration ------------------------------------------------
Expand Down Expand Up @@ -81,7 +81,7 @@
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
language = "en"

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
Expand All @@ -90,7 +90,7 @@

# Set up link shortcuts
extlinks = {
'issue': ('https://github.com/edgi-govdata-archiving/wayback/issues/%s', '#'),
'issue': ('https://github.com/edgi-govdata-archiving/wayback/issues/%s', 'issue %s'),
}

# The name of the Pygments (syntax highlighting) style to use.
Expand Down
11 changes: 7 additions & 4 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,14 @@ coverage
flake8
requests-mock
pytest
sphinx ~=3.1.1

# remove pin after https://github.com/readthedocs/sphinx_rtd_theme/issues/1343 closes
sphinx!=5.2.0.post0

vcrpy
twine
# These are dependencies of various sphinx extensions for documentation.
ipython
numpydoc ~=1.0.0
sphinx-copybutton ~=0.2.12
sphinx_rtd_theme ~=0.5.0
numpydoc
sphinx-copybutton
sphinx_rtd_theme

0 comments on commit e767780

Please sign in to comment.