Skip to content

Fix CircleCI doc build #21698

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

Merged
merged 3 commits into from
Nov 17, 2021
Merged

Conversation

lesteve
Copy link
Member

@lesteve lesteve commented Nov 17, 2021

What does this implement/fix? Explain your changes.

Work-around for CircleCI failure: https://app.circleci.com/pipelines/github/scikit-learn/scikit-learn/20216/workflows/48912744-6176-4bcd-bea7-c5b0b3dc2a49/jobs/162969

Looks like sphinx may not be supporting Python 3.10 yet?

Traceback (most recent call last):
  File "/home/circleci/miniconda/envs/testenv/bin/sphinx-build", line 6, in <module>
    from sphinx.cmd.build import main
  File "/home/circleci/miniconda/envs/testenv/lib/python3.10/site-packages/sphinx/cmd/build.py", line 25, in <module>
    from sphinx.application import Sphinx
  File "/home/circleci/miniconda/envs/testenv/lib/python3.10/site-packages/sphinx/application.py", line 31, in <module>
    from sphinx.config import Config
  File "/home/circleci/miniconda/envs/testenv/lib/python3.10/site-packages/sphinx/config.py", line 21, in <module>
    from sphinx.util import logging
  File "/home/circleci/miniconda/envs/testenv/lib/python3.10/site-packages/sphinx/util/__init__.py", line 41, in <module>
    from sphinx.util.typing import PathMatcher
  File "/home/circleci/miniconda/envs/testenv/lib/python3.10/site-packages/sphinx/util/typing.py", line 37, in <module>
    from types import Union as types_Union
ImportError: cannot import name 'Union' from 'types' (/home/circleci/miniconda/envs/testenv/lib/python3.10/types.py)
make: *** [Makefile:48: html] Error 1

Exited with code exit status 2

@lesteve
Copy link
Member Author

lesteve commented Nov 17, 2021

Actually it looks like Python 3.10 is supported in sphinx 4.2.0 according to sphinx-doc/sphinx#9562 (comment).

I switched back to Python 3.10 and pin sphinx version to 4.2.0 in the CircleCI doc build.

@lesteve lesteve changed the title Fix sphinx error with Python 3.10 Fix CircleCI doc build Nov 17, 2021
Copy link
Member

@jjerphan jjerphan left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @lesteve.

- SPHINX_VERSION: 'min'
# Bump the sphinx version from time to time. Avoid latest sphinx version
# that tends to break things slightly too often
- SPHINX_VERSION: 4.2.0
Copy link
Member

Choose a reason for hiding this comment

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

Just a reference to a related discussion: #20057

@glemaitre glemaitre merged commit 00d7e59 into scikit-learn:main Nov 17, 2021
@lesteve lesteve deleted the fix-circleci-sphinx-error branch November 17, 2021 18:23
jjerphan pushed a commit to jjerphan/scikit-learn that referenced this pull request Nov 18, 2021
glemaitre pushed a commit to glemaitre/scikit-learn that referenced this pull request Nov 22, 2021
glemaitre pushed a commit to glemaitre/scikit-learn that referenced this pull request Nov 29, 2021
samronsin pushed a commit to samronsin/scikit-learn that referenced this pull request Nov 30, 2021
glemaitre pushed a commit to glemaitre/scikit-learn that referenced this pull request Dec 24, 2021
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.

3 participants