-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Sphinx doesn't support python 3.10 #9562
Comments
Hi @Itotutona , you forgot to say what version of Sphinx are you using. I see that this error should be fixed at least on Lines 36 to 39 in 8fd4373
|
@astrojuanlu I use 4.1.2 |
I just attempted to build docs using Sphinx and Python 3.10 and the issue still exists. I can work around it by building docs on Python 3.9. If the issue is fixed on master, maybe consider cutting a release with the fix so that others like me don't have to encounter the issue. |
Confirm the problem is still present when testing with the latest Fedora (35 and Rawhide). |
From my understanding, the problem is present in Sphinx 4.1.2: Lines 36 to 39 in 4ba5c21
but it was fixed on the Lines 36 to 39 in a1bb4a8
Can folks try to reproduce the problem with the development version? |
This issue cause a failed release of Setuptools requiring a workaround to be committed to the repo and adding debt to remove that workaround later. Please consider cutting a release so that there is a working published version of Sphinx for Python 3.10. |
4.2.0 will be released the next weekend. Please wait a moment more. |
…on 58.0.0 Alan Fregtman (6): Implement "glob:" directive for declarative "data_files" option. Add changelog entry for PR #2712. Update globbing for [options.data_files] to be implicit, not requiring a custom directive. globbing for [options.data_files]: Remove special treatment for filenames with globby characters that exist literally. Satisfy some flake8 style checks for the previous commit. config.py: Fix line-too-long warning in _parse_list_glob() Ian Wienand (1): build_meta: Clarify the reasons for project requirements in pyproject.toml Jason R. Coombs (13): Trim back chaneglog. 👹 Feed the hobgoblins (delint). Rely on setuptools 56 and drop the explicit mention of the license file in favor of simple discovery. Remove workaround for python/typed_ast#156. Use line continuations to indicate which exclusions are for which workarounds. Remove blacken docs as it cannot honor Python's default repr. Ref asotille/blacken-docs#62. Remove blacken docs as it cannot honor Python's default repr. Ref adamchainz/blacken-docs#62. Restore whitespace and single quotes after blacken-docs. Bump version: 57.4.0 → 57.5.0 Fix broken Sphinx builds on Python 3.10. Fixes #2763. Ref sphinx-doc/sphinx#9562. 👹 Feed the hobgoblins (delint). Prefer "command" to "function". Use direct imperative voice. Bump version: 57.5.0 → 58.0.0 Louis Maddox (1): Remove repeated information in same sentence SeungMin Lee (1): Fix broken links in easy_install.py Thomas Grainger (13): run pre-commit in ci blacken docs disable unused black pre-commit hook Delete pre-commit.yml add newsfragment remove magci trailing commas Delete .pre-commit-config.yaml readme: update to reflect the cpython distutils status (#48) remove 2to3 add python_requires example add python_requires example remove lib2to3 usage add newsfragment
Problem
Recently, I updated Python 3.9.6 to Python 3.10 RC. No problems. When I want to compile my Sphinx documentation (make html), I see:
$ make build
sphinx-build -b html -d _build/doctrees . _build/html
Traceback (most recent call last):
File "/home/titouan/.local/bin/sphinx-build", line 5, in
from sphinx.cmd.build import main
File "/home/titouan/.local/lib/python3.10/site-packages/sphinx/cmd/build.py", line 25, in
from sphinx.application import Sphinx
File "/home/titouan/.local/lib/python3.10/site-packages/sphinx/application.py", line 32, in
from sphinx.config import Config
File "/home/titouan/.local/lib/python3.10/site-packages/sphinx/config.py", line 21, in
from sphinx.util import logging
File "/home/titouan/.local/lib/python3.10/site-packages/sphinx/util/init.py", line 41, in
from sphinx.util.typing import PathMatcher
File "/home/titouan/.local/lib/python3.10/site-packages/sphinx/util/typing.py", line 37, in
from types import Union as types_Union
ImportError: cannot import name 'Union' from 'types' (/usr/lib64/python3.10/types.py)
make: *** [Makefile:53 : html] Erreur 1
I suggest you update the sphinx code to be usable with oython 3.10 as it will be released very soon
If you want some help, I can contribute to sphinx.
Solution
I suggest you update the sphinx code to be usable with python 3.10 as it will be released very soon ( 4 october )
If you want some help, I can contribute to sphinx.
Additional context
The text was updated successfully, but these errors were encountered: