-
Bug
-
Resolution: Fixed
-
Severe (Users)
-
None
-
None
-
None
-
This is blocking usage of sphinx_rtd_theme by packages that use it to build their documentation.
This is a purely upstream bug, caused by upstream and as far as I can tell not funtoo-created.
Sphinx came out with a new release called 5.2.0_post0 on pypi:
I am guessing this was done to fix some problems with 5.2.0.
When sphinx_rtd_theme (a very popular theme) is used with this version of sphinx, as is done when documentation is built as part of app-emulation/qemu build, sphinx_rtd_theme throws an error. The specific command that fails is:
/usr/bin/env CONFDIR=/etc/qemu /usr/bin/sphinx-build -q -c /var/tmp/portage/app-emulation/qemu-7.1.0/work/qemu-7.1.0/docs -b html /var/tmp/portage/app-emulation/qemu-7.1.0/work/qemu-7.1.0/tools-build/meson-private/temp/sphinx /var/tmp/portage/app-emulation/qemu-7.1.0/work/qemu-7.1.0/tools-build/meson-private/temp/sphinx/out
The terse error that appears when run directly or when the qemu-7.1.0.ebuild fails is:
Theme error:
An error happened in rendering the page index.
Reason: ValueError('too many values to unpack (expected 3)')
When I run this command with multiple -v options, I get the following traceback (showing the key part):
Traceback (most recent call last): File "/usr/lib/python3.7/site-packages/sphinx/builders/html/__init__.py", line 1096, in handle_page output = self.templates.render(templatename, ctx) File "/usr/lib/python3.7/site-packages/sphinx/jinja2glue.py", line 194, in render return self.environment.get_template(template).render(context) File "/usr/lib/python3.7/site-packages/jinja2/environment.py", line 1301, in render self.environment.handle_exception() File "/usr/lib/python3.7/site-packages/jinja2/environment.py", line 936, in handle_exception raise rewrite_traceback_stack(source=source) File "/usr/lib/python3.7/site-packages/sphinx/themes/basic/page.html", line 10, in top-level template code {%- extends "layout.html" %} File "/usr/lib/python3.7/site-packages/sphinx_rtd_theme/layout.html", line 13, in top-level template code {%- set (_ver_major, _ver_minor, _ver_bugfix) = sphinx_version.split('.') | map('int') -%} ValueError: too many values to unpack (expected 3)
The key error is at the very end. The sphinx_rtd_theme is trying to split the version of sphinx and expecting it to break into 3 parts, separated by ".". This doesn't work for 5.2.0.post0. I have seen other packages cause problems when using the pypi versioning like this.
The sphinx_rtd_theme would need a patch to work with 5.2.0.x versions. This is currently breaking app-emulation/qemu-7.1.0 emerge.