cschwan / sage-on-gentoo

(Unofficial) Gentoo Overlay for Sage- and Sage-related ebuilds
84 stars 26 forks source link

'Extension error' building html-docs with >dev-python/sphinx-4.0.0 #638

Closed strogdon closed 2 years ago

strogdon commented 3 years ago
Building reference manual, first pass.

[reference] /storage/strogdon/gentoo-rap/usr/lib/python3.9/site-packages/sphinx/jinja2glue.py:105: DeprecationWarning: 'contextfunction' is renamed to 'pass_context', the old name will be removed in Jinja 3.1.
[reference]   def warning(context: Dict, message: str, *args: Any, **kwargs: Any) -> str:
[reference] Extension error:
[reference] Could not import extension sage_docbuild.ext.sage_autodoc (exception: cannot import name 'force_decode' from 'sphinx.util' (/storage/strogdon/gentoo-rap/usr/lib/python3.9/site-packages/sphinx/util/__init__.py))

This happens in Prefix because sage-9999 requires

    >=dev-python/sphinx-3.1.0[${PYTHON_USEDEP}]

and there is no keyword masking in Prefix. Perhaps something that has to be dealt with on an individual basis but those running unstable gentoo may encounter this.

kiwifb commented 3 years ago

Yes, Antonio Rojas started a ticket for the sphinx 4 port a few weeks but it wasn't in Gentoo yet then. There are a number of fixes needed. I don't know if they are backward compatible.

strogdon commented 3 years ago

Sage ticket 31807 has been pushed to 31696. The two main patches at 31807 were sufficient to allow building the docs with sphinx-4.0.1-r1. So this should be good to go once merged.

strogdon commented 2 years ago

I suspect this can be closed, unless I'm missing something. sphinx-4.2.0 works here on Prefix and s-o-g requires >=dev-python/sphinx-4.0.2.

kiwifb commented 2 years ago

Yes it should be.