Currently defined Sphinx version (3.5.4) doesn't support python 3.10
What steps does it take to reproduce the issue?
- Have python 3.10 installed on host (tested with 3.10.6)
- Install Sphinx as stated in the documentation
- Build Sphynx guides
-
When does this issue occur? When building Sphynx guides using Python 3.10
-
What happens? An error is returned:
from types import Union as types_Union
ImportError: cannot import name 'Union' from 'types' (/usr/lib64/python3.10/types.py)
- What did you expect to happen? The Sphynx docs to be built successfully
Which version of Dataverse are you using? v5.11.1
Any related open or closed issues to this bug report?
This issue is seconded by issues from in Sphynx repository:
- https://github.com/sphinx-doc/sphinx/issues/9816
- https://github.com/sphinx-doc/sphinx/issues/9562
Oh! Is that why make html stopped working for me?! I accidentally upgraded to Python 3.10.7 the other day (I was messing with nodejs stuff).
Thanks for opening this issue, @j-n-c!
As I mentioned, I'm suffering from this as well. For now my workaround is to follow https://guides.dataverse.org/en/5.12/developers/documentation.html#installing-sphinx but replace
python3 -m venv venv
with
python3.9 -m venv venv
to make sure I'm using Python 3.9 instead of 3.10 until the fix from @j-n-c (thanks! 🎉 ) is merged:
- #9076