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

Pin sphinx version #76

Merged
merged 2 commits into from
Aug 21, 2023
Merged

Pin sphinx version #76

merged 2 commits into from
Aug 21, 2023

Conversation

ru-fu
Copy link
Contributor

@ru-fu ru-fu commented Aug 18, 2023

This should fix the RTD build error.

Seems the latest Sphinx update has caused some issues ...

7.2.2 doesn't work with the notfound extension (see
readthedocs/sphinx-notfound-page#219 ).
When restricting Sphinx to <7.2.0, RTD uses 6.2.1 though, which
is incompatible with a Furo change (see
pradyunsg/furo#693 ).

Therefore, restrict Sphinx to 7.1.2 until the issues are resolved.

Signed-off-by: Ruth Fuchss <[email protected]>
@Hook25
Copy link

Hook25 commented Aug 18, 2023

Hello, pinning Sphinx==7.1.2 may not work. In our project sphinx-rtd-theme is automatically pulled by readthedocs and the latest version of that package is not compatible with sphinx==7.x.

This version of that dependency seems to work: sphinx-rtd-theme==1.3.0rc1, but it is not stable yet

@ru-fu
Copy link
Contributor Author

ru-fu commented Aug 18, 2023

Hello, pinning Sphinx==7.1.2 may not work. In our project sphinx-rtd-theme is automatically pulled by readthedocs and the latest version of that package is not compatible with sphinx==7.x.

This version of that dependency seems to work: sphinx-rtd-theme==1.3.0rc1, but it is not stable yet

Do you have a link to your build?
The one for the starter pack seems to work fine.

@Hook25
Copy link

Hook25 commented Aug 18, 2023

I am not sure if it is publicly visible, this is the link: https://readthedocs.com/projects/canonical-checkbox/builds/1668863/

Reproducing offline the steps but pinning the Sphinx version breaks the process when installing requirements.txt (due to an incompatibility between the two modules)

@ru-fu
Copy link
Contributor Author

ru-fu commented Aug 18, 2023

I can't claim that I really understand what RTD is doing - but in your build, RTD actually uses Sphinx 6.2.1. From your log:

Running Sphinx v6.2.1

My guess is that this is because of the compatibility issue you mention. First, the general requirements are installed, and RTD picks 6.2.1 as the latest version that is compatible.
Then the project requirements are installed, and those currently don't specify a version, so 6.2.1 is fine - but it doesn't work with furo, so the build breaks.

Pinning Sphinx to 7.1.2 in the project requirements won't make a difference for the general requirements, but it forces 7.1.2 to be installed afterwards, and that's why the build works.

@ru-fu
Copy link
Contributor Author

ru-fu commented Aug 18, 2023

Oh, and I just saw that the installation for the starter pack also gives this error:

sphinx-rtd-theme 1.2.2 requires sphinx<7,>=1.6, but you have sphinx 7.1.2 which is incompatible.

But this doesn't matter since we're using furo and not sphinx-rtd-theme.

Saviq added a commit to canonical/mir that referenced this pull request Aug 18, 2023
@ru-fu ru-fu merged commit 13e0aec into canonical:main Aug 21, 2023
3 checks passed
Saviq added a commit to canonical/mir that referenced this pull request Aug 21, 2023
@akcano
Copy link
Contributor

akcano commented Aug 21, 2023

@ru-fu Seems the issue was promptly resolved:

(venv) akonev@ubuntu2204:~/Documents/akcano-workspace/docs$ pip list installed
Package                       Version
----------------------------- ---------
alabaster                     0.7.13
Babel                         2.12.1
beautifulsoup4                4.12.2
bracex                        2.3.post1
certifi                       2023.7.22
charset-normalizer            3.2.0
colorama                      0.4.6
contourpy                     1.1.0
cycler                        0.11.0
docutils                      0.18.1
fonttools                     4.42.1
furo                          2023.8.19
html5lib                      1.1
idna                          3.4
imagesize                     1.4.1
Jinja2                        3.1.2
kiwisolver                    1.4.4
livereload                    2.6.3
lxd-sphinx-extensions         0.0.10
lxml                          4.9.3
Markdown                      3.4.4
markdown-it-py                3.0.0
MarkupSafe                    2.1.3
matplotlib                    3.7.2
mdit-py-plugins               0.4.0
mdurl                         0.1.2
myst-parser                   2.0.0
numpy                         1.25.2
packaging                     23.1
Pillow                        10.0.0
pip                           22.0.2
Pygments                      2.16.1
pyparsing                     3.0.9
pyspelling                    2.8.2
python-dateutil               2.8.2
PyYAML                        6.0.1
requests                      2.31.0
setuptools                    59.6.0
six                           1.16.0
snowballstemmer               2.2.0
soupsieve                     2.4.1
Sphinx                        7.2.2
sphinx-autobuild              2021.3.14
sphinx-basic-ng               1.0.0b2
sphinx-copybutton             0.5.2
sphinx_design                 0.5.0
sphinx-reredirects            0.1.2
sphinx-tabs                   3.4.1
sphinxcontrib-applehelp       1.0.7
sphinxcontrib-devhelp         1.0.5
sphinxcontrib-htmlhelp        2.0.4
sphinxcontrib-jquery          4.1
sphinxcontrib-jsmath          1.0.1
sphinxcontrib-qthelp          1.0.6
sphinxcontrib-serializinghtml 1.1.9
sphinxext-opengraph           0.8.2
tornado                       6.3.3
urllib3                       2.0.4
wcmatch                       8.4.1
webencodings                  0.5.1
[sphinx-autobuild] > sphinx-build -b dirhtml -c . /home/akonev/Documents/akcano-workspace/docs /home/akonev/Documents/akcano-workspace/docs/_build
Running Sphinx v7.2.2
myst v2.0.0: MdParserConfig(commonmark_only=False, gfm_only=False, enable_extensions={'deflist', 'substitution'}, disable_syntax=[], all_links_external=False, url_schemes=('http', 'https', 'mailto', 'ftp'), ref_domains=None, fence_as_directive=set(), number_code_blocks=[], title_to_header=False, heading_anchors=0, heading_slug_func=None, html_meta={}, footnote_transition=True, words_per_minute=200, substitutions={}, linkify_fuzzy_links=True, dmath_allow_labels=True, dmath_allow_space=True, dmath_allow_digits=True, dmath_double_inline=False, update_mathjax=True, mathjax_classes='tex2jax_process|mathjax_process|math|output_area', enable_checkboxes=False, suppress_warnings=[], highlight_code_blocks=True)
building [mo]: targets for 0 po files that are out of date
writing output... 
building [dirhtml]: targets for 12 source files that are out of date
updating environment: [new config] 12 added, 0 changed, 0 removed
reading sources... [100%] tutorial/index
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
copying assets... copying static files... done
copying extra files... done
done
writing output... [100%] tutorial/index
generating indices... genindex done
writing additional pages... search done
dumping search index in English (code: en)... done
dumping object inventory... done
build succeeded.

The HTML pages are in _build.
[I 230821 16:35:54 server:335] Serving on http://127.0.0.1:8000

@ru-fu
Copy link
Contributor Author

ru-fu commented Aug 21, 2023

@ru-fu Seems the issue was promptly resolved:

The Furo part of the issue was resolved. The sphinx-notfound-page extension hasn't been updated yet, and it currently doesn't work with 7.2.2. See readthedocs/sphinx-notfound-page#219

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 this pull request may close these issues.

4 participants