-
Notifications
You must be signed in to change notification settings - Fork 38
Open
Description
Testing the sphinx 9.0.0-rc2 with this theme crashes with the following error:
Traceback
=========
File "C:\dev\sphinx-immaterial\.venv\Lib\site-packages\sphinx\builders\__init__.py", line 427, in build
pickle.dump(self.env, f, pickle.HIGHEST_PROTOCOL)
~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_pickle.PicklingError: Can't pickle local object <class 'sphinx_immaterial._get_html_builder.<locals>.CustomHTMLBuilder'>
when serializing dict item '_builder_cls'
when serializing sphinx.environment.BuildEnvironment state
when serializing sphinx.environment.BuildEnvironment object
It seems the changes in sphinx v9.0 no longer like our dynamic HTML Builder class (declarated in function body). After moving the class definition outside the function body, it complained about our custom node visitor (which is also defined in a function body):
Traceback
=========
File "C:\dev\sphinx-immaterial\.venv\Lib\site-packages\sphinx\transforms\post_transforms\__init__.py", line 352, in run
if issubclass(translator, SphinxTranslator):
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: issubclass() arg 1 must be a class
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels