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

pip pin for sphinx<5 #5122

Merged
merged 1 commit into from
Jan 3, 2023
Merged

Conversation

bjlittle
Copy link
Member

@bjlittle bjlittle commented Jan 3, 2023

🚀 Pull Request

Description

This PR temporarily resolves the existing documentation build failure on RTD i.e., see here

There are a couple of factors in play here:

  1. The sphinx-panels package is no longer maintained (sphinx-panels package no longer maintained #5121) and is pinning back the sphinx package from >=v6.0.0 to v4.5.0 on conda-forge
  2. The pydata-sphinx-theme is pinned to v0.8.1 (latest version available is >=v0.12.0), and this is causing the additional pip install step on RTD to pull the sphinx package way down to v3.5.3 which is incompatible and, I suspect, causing the following traceback:
Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/scitools-iris/conda/latest/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/home/docs/checkouts/readthedocs.org/user_builds/scitools-iris/conda/latest/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/home/docs/checkouts/readthedocs.org/user_builds/scitools-iris/conda/latest/lib/python3.10/site-packages/sphinx/__main__.py", line 13, in <module>
    from sphinx.cmd.build import main
  File "/home/docs/checkouts/readthedocs.org/user_builds/scitools-iris/conda/latest/lib/python3.10/site-packages/sphinx/cmd/build.py", line 25, in <module>
    from sphinx.application import Sphinx
  File "/home/docs/checkouts/readthedocs.org/user_builds/scitools-iris/conda/latest/lib/python3.10/site-packages/sphinx/application.py", line 32, in <module>
    from sphinx.config import Config
  File "/home/docs/checkouts/readthedocs.org/user_builds/scitools-iris/conda/latest/lib/python3.10/site-packages/sphinx/config.py", line 23, in <module>
    from sphinx.util import logging
  File "/home/docs/checkouts/readthedocs.org/user_builds/scitools-iris/conda/latest/lib/python3.10/site-packages/sphinx/util/__init__.py", line 35, in <module>
    from sphinx.util import smartypants  # noqa
  File "/home/docs/checkouts/readthedocs.org/user_builds/scitools-iris/conda/latest/lib/python3.10/site-packages/sphinx/util/smartypants.py", line 33, in <module>
    from sphinx.util.docutils import __version_info__ as docutils_version
  File "/home/docs/checkouts/readthedocs.org/user_builds/scitools-iris/conda/latest/lib/python3.10/site-packages/sphinx/util/docutils.py", line 31, in <module>
    from sphinx.util.typing import RoleFunction
  File "/home/docs/checkouts/readthedocs.org/user_builds/scitools-iris/conda/latest/lib/python3.10/site-packages/sphinx/util/typing.py", line 34, in <module>
    from types import Union as types_Union
ImportError: cannot import name 'Union' from 'types' (/home/docs/checkouts/readthedocs.org/user_builds/scitools-iris/conda/latest/lib/python3.10/types.py)

We can circumvent this dependency carnage (no thanks to pip) by introducing the temporary maximum pin sphinx<5 within the setup.cfg, which prevent the pip dependency resolver "stuffing up" ™️, and maintaining the compatible dependencies resolved and installed by conda.

However, as a follow-up, I strongly recommend that we address:

The documentation built by this PR can be viewed here and the RTD raw build output is available here.


Consult Iris pull request check list

@bjlittle
Copy link
Member Author

bjlittle commented Jan 3, 2023

If we're happy to go with this temporary fix then I'll make an issue to remind us to remove the temporary pin introduced by this pr in the setup.py.

@tkknight tkknight self-requested a review January 3, 2023 13:27
Copy link
Contributor

@tkknight tkknight left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@tkknight tkknight merged commit fc302c9 into SciTools:main Jan 3, 2023
@bjlittle bjlittle deleted the pip-pin-sphinx-for-rtd branch January 3, 2023 14:02
tkknight added a commit to tkknight/iris that referenced this pull request Jan 4, 2023
tkknight added a commit to tkknight/iris that referenced this pull request Jan 5, 2023
* upstream/main: (167 commits)
  pip pin for sphinx<5 (SciTools#5122)
  [pre-commit.ci] pre-commit autoupdate (SciTools#5120)
  Bump actions/stale from 6 to 7 (SciTools#5117)
  [pre-commit.ci] pre-commit autoupdate (SciTools#5114)
  Correct heading for v3.4 release highlights. (SciTools#5110)
  Announce @ESadek-MO as a core Iris developer. (SciTools#5111)
  Remove test timings (SciTools#5101)
  Switch order of options and parameter in `ncgen` command (SciTools#5105)
  [pre-commit.ci] pre-commit autoupdate (SciTools#5107)
  Updated environment lockfiles (SciTools#5104)
  DOC: improve gallery test instructions (SciTools#5100)
  Updated environment lockfiles (SciTools#5092)
  Update What's New for 3.4 release. (SciTools#5088)
  [pre-commit.ci] pre-commit autoupdate (SciTools#5086)
  Updated environment lockfiles (SciTools#5085)
  Updated environment lockfiles (SciTools#5080)
  Restore latest What's New files.
  Documentation updates for `v3.4.0rc0` release. (SciTools#5078)
  What's New fixes. (SciTools#5077)
  More accurate netcdf4 pin `<1.6.1`. (SciTools#5075)
  ...
trexfeathers pushed a commit to trexfeathers/iris that referenced this pull request Feb 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants