You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Union is no longer in types
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.
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.
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.
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.
Activity
astrojuanlu commentedon Aug 19, 2021
Hi @Itotutona , you forgot to say what version of Sphinx are you using. I see that this error should be fixed at least on
master:sphinx/sphinx/util/typing.py
Lines 36 to 39 in 8fd4373
Itotutona commentedon Aug 19, 2021
@astrojuanlu I use 4.1.2
jaraco commentedon Aug 29, 2021
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.
psss commentedon Sep 1, 2021
Confirm the problem is still present when testing with the latest Fedora (35 and Rawhide).
astrojuanlu commentedon Sep 1, 2021
From my understanding, the problem is present in Sphinx 4.1.2:
sphinx/sphinx/util/typing.py
Lines 36 to 39 in 4ba5c21
but it was fixed on the
masterand4.1.xbranches:sphinx/sphinx/util/typing.py
Lines 36 to 39 in a1bb4a8
Can folks try to reproduce the problem with the development version?
astrojuanlu commentedon Sep 1, 2021
In principle, this issue is a duplicate of #9512, which was fixed in #9513.
Fix broken Sphinx builds on Python 3.10. Fixes #2763. Ref sphinx-doc/…
jaraco commentedon Sep 4, 2021
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.
tk0miya commentedon Sep 5, 2021
4.2.0 will be released the next weekend. Please wait a moment more.
setuptools: Autospec creation for update from version 57.4.0 to versi…