-
Notifications
You must be signed in to change notification settings - Fork 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
TypeError: entry_points() got an unexpected keyword argument 'group' #10479
Comments
What does A |
The same happens on Debian-11-Buster when >>> import importlib_metadata
>>> importlib_metadata.__file__
'/usr/lib/python3/dist-packages/importlib_metadata/__init__.py'
>>> import importlib.metadata
>>> importlib.metadata.__file__
'/usr/lib/python3.9/importlib/metadata.py' dpkg -S /usr/lib/python3/dist-packages/importlib_metadata/__init__.py /usr/lib/python3.9/importlib/metadata.py
# python3-importlib-metadata: /usr/lib/python3/dist-packages/importlib_metadata/__init__.py
# libpython3.9-minimal:amd64: /usr/lib/python3.9/importlib/metadata.py
dpkg-query -W python3-importlib-metadata libpython3.9-minimal
# libpython3.9-minimal:amd64 3.9.2-1
# python3-importlib-metadata 1.6.0-2 Looking at importlib_metadata there is not The Python library documentation even has a "Compatibility Note" section as its end:
To support older Python version with older versions of --- sphinx/theming.py
+++ sphinx/theming.py
@@ -190,1 +190,4 @@
- theme_entry_points = entry_points(group='sphinx.html_themes')
+ try:
+ theme_entry_points = entry_points(group='sphinx.html_themes')
+ except TypeError:
+ theme_entry_points = {mod.name: mod for mod in entry_points().get("sphinx.html_themes", ())} |
For Pythons < 3.9, the Sphinx version needs to be constrained. Otherwise it errors out with: TypeError: entry_points() got an unexpected keyword argument 'group' due to Sphinx issue #10479. Higher Python versions use Sphinx versions which are so up to date, they get other errors with our documentation. So all in all, we need the constraint to not run in any weird errors when building the documentation for now. [0]: sphinx-doc/sphinx#10479
I believe there's user who can't update |
Describe the bug
when running sphinx-build I get the following error:
Running Sphinx v4.5.0
making output directory... done
Traceback (most recent call last):
File "/opt/miniconda3/envs/py37/lib/python3.7/site-packages/sphinx/cmd/build.py", line 275, in build_main
args.tags, args.verbosity, args.jobs, args.keep_going)
File "/opt/miniconda3/envs/py37/lib/python3.7/site-packages/sphinx/application.py", line 256, in init
self._init_builder()
File "/opt/miniconda3/envs/py37/lib/python3.7/site-packages/sphinx/application.py", line 314, in _init_builder
self.builder.init()
File "/opt/miniconda3/envs/py37/lib/python3.7/site-packages/sphinx/builders/html/init.py", line 212, in init
self.init_templates()
File "/opt/miniconda3/envs/py37/lib/python3.7/site-packages/sphinx/builders/html/init.py", line 260, in init_templates
self.theme = theme_factory.create(themename)
File "/opt/miniconda3/envs/py37/lib/python3.7/site-packages/sphinx/theming.py", line 232, in create
self.load_extra_theme(name)
File "/opt/miniconda3/envs/py37/lib/python3.7/site-packages/sphinx/theming.py", line 177, in load_extra_theme
self.load_external_theme(name)
File "/opt/miniconda3/envs/py37/lib/python3.7/site-packages/sphinx/theming.py", line 199, in load_external_theme
theme_entry_points = entry_points(group='sphinx.html_themes')
TypeError: entry_points() got an unexpected keyword argument 'group'
How to Reproduce
make docs
Expected behavior
No response
Your project
https://gitlabsbnb.irbbarcelona.org/packages/chemical_checker/-/tree/master/package/docs
Screenshots
No response
OS
ubuntu 20.04
Python version
3.7
Sphinx version
4.5.0
Sphinx extensions
autodoc
Extra tools
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: