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

Fail to build docs w/ Python < 3.5.2 #5492

Closed
zaufi opened this issue Sep 25, 2018 · 3 comments
Closed

Fail to build docs w/ Python < 3.5.2 #5492

zaufi opened this issue Sep 25, 2018 · 3 comments
Labels
Milestone

Comments

@zaufi
Copy link

zaufi commented Sep 25, 2018

Problem

Using CentOS 7 and Python 3.5.1 available via Software Collections I've got a build failure w/ Sphinx >= 1.8.0:

Traceback (most recent call last):
  File "/opt/scl/ci/lib/python3.5/site-packages/sphinx/registry.py", line 472, in load_extension
    mod = __import__(extname, None, None, ['setup'])
  File "/opt/scl/ci/lib/python3.5/site-packages/sphinx/transforms/post_transforms/compat.py", line 13, in <module>
    from typing import TYPE_CHECKING
ImportError: cannot import name 'TYPE_CHECKING'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/scl/ci/lib/python3.5/site-packages/sphinx/cmd/build.py", line 303, in build_main
    args.tags, args.verbosity, args.jobs, args.keep_going)
  File "/opt/scl/ci/lib/python3.5/site-packages/sphinx/application.py", line 224, in __init__
    self.setup_extension(extension)
  File "/opt/scl/ci/lib/python3.5/site-packages/sphinx/application.py", line 449, in setup_extension
    self.registry.load_extension(self, extname)
  File "/opt/scl/ci/lib/python3.5/site-packages/sphinx/registry.py", line 475, in load_extension
    raise ExtensionError(__('Could not import extension %s') % extname, err)
sphinx.errors.ExtensionError: Could not import extension sphinx.transforms.post_transforms.compat (exception: cannot import name 'TYPE_CHECKING')

Environment info

  • OS: CentOS 7
  • Python version: 3.5.1
  • Sphinx version: 1.8.0 / 1.8.1
@tk0miya tk0miya added this to the 1.8.2 milestone Oct 1, 2018
@carlosalbaladejo
Copy link

carlosalbaladejo commented Oct 5, 2018

Same problem on virtual environment with Python version: 3.5.1.

sphinx.errors.ExtensionError: Could not import extension sphinx.transforms.post_transforms.compat (exception: cannot import name 'TYPE_CHECKING')

TYPE_CHECKING is not defined in typing.py library for Python 3.5.
I solved it upgrading to Python 3.7

@zaufi
Copy link
Author

zaufi commented Oct 5, 2018 via email

tk0miya added a commit that referenced this issue Oct 6, 2018
Fix #5492: sphinx-build fails to build docs w/ Python < 3.5.2
@tk0miya
Copy link
Member

tk0miya commented Oct 6, 2018

Fixed by #5510.
Thank you for reporting.

@tk0miya tk0miya closed this as completed Oct 6, 2018
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants