sphinx fails to build the documentation (see trace below). It seems to come from two cached methods in origami_dense.pyx. After removing them, the compilation of the documentation does suceed.
$ make html
Sphinx v3.1.2 en cours d'exécution
chargement de l'inventaire intersphinx de http://docs.python.org/objects.inv...
l’inventaire intersphinx a bougé : http://docs.python.org/objects.inv -> https://docs.python.org/3/objects.inv
construction en cours [mo]:cibles pour les fichiers po 0 qui sont périmées
construction [html]:cibles pour les fichiers sources 6 qui sont périmées
mise-à-jour de l'environnement :[nouvelle configuration] 6 ajouté, 0 modifié, 0 supprimé
lecture des sources... [ 16%] database
lecture des sources... [ 33%] index
lecture des sources... [ 50%] interval_exchanges
lecture des sources... [ 66%] origamis
Traceback (most recent call last):
File "/opt/sage/local/lib/python3.9/site-packages/sage/misc/sageinspect.py", line 2378, in sage_getsourcelines
return inspect.getsourcelines(obj)
File "/usr/lib/python3.9/inspect.py", line 1006, in getsourcelines
lines, lnum = findsource(object)
File "/usr/lib/python3.9/inspect.py", line 817, in findsource
file = getsourcefile(object)
File "/usr/lib/python3.9/inspect.py", line 697, in getsourcefile
filename = getfile(object)
File "/usr/lib/python3.9/inspect.py", line 677, in getfile
raise TypeError('module, class, method, function, traceback, frame, or '
TypeError: module, class, method, function, traceback, frame, or code object was expected, got method_descriptor
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/sage/local/lib/python3.9/site-packages/sage/misc/sageinspect.py", line 2378, in sage_getsourcelines
return inspect.getsourcelines(obj)
File "/usr/lib/python3.9/inspect.py", line 1006, in getsourcelines
lines, lnum = findsource(object)
File "/usr/lib/python3.9/inspect.py", line 817, in findsource
file = getsourcefile(object)
File "/usr/lib/python3.9/inspect.py", line 697, in getsourcefile
filename = getfile(object)
File "/usr/lib/python3.9/inspect.py", line 666, in getfile
raise TypeError('{!r} is a built-in class'.format(object))
TypeError: <class 'method_descriptor'> is a built-in class
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/sage/local/lib/python3.9/site-packages/sphinx/cmd/build.py", line 280, in build_main
app.build(args.force_all, filenames)
File "/opt/sage/local/lib/python3.9/site-packages/sphinx/application.py", line 348, in build
self.builder.build_update()
File "/opt/sage/local/lib/python3.9/site-packages/sphinx/builders/__init__.py", line 297, in build_update
self.build(to_build,
File "/opt/sage/local/lib/python3.9/site-packages/sphinx/builders/__init__.py", line 311, in build
updated_docnames = set(self.read())
File "/opt/sage/local/lib/python3.9/site-packages/sphinx/builders/__init__.py", line 418, in read
self._read_serial(docnames)
File "/opt/sage/local/lib/python3.9/site-packages/sphinx/builders/__init__.py", line 439, in _read_serial
self.read_doc(docname)
File "/opt/sage/local/lib/python3.9/site-packages/sphinx/builders/__init__.py", line 479, in read_doc
doctree = read_doc(self.app, self.env, self.env.doc2path(docname))
File "/opt/sage/local/lib/python3.9/site-packages/sphinx/io.py", line 221, in read_doc
pub.publish()
File "/opt/sage/local/lib/python3.9/site-packages/docutils/core.py", line 216, in publish
self.document = self.reader.read(self.source, self.parser,
File "/opt/sage/local/lib/python3.9/site-packages/sphinx/io.py", line 126, in read
self.parse()
File "/opt/sage/local/lib/python3.9/site-packages/docutils/readers/__init__.py", line 78, in parse
self.parser.parse(self.input, document)
File "/opt/sage/local/lib/python3.9/site-packages/sphinx/parsers.py", line 102, in parse
self.statemachine.run(inputlines, document, inliner=self.inliner)
File "/opt/sage/local/lib/python3.9/site-packages/docutils/parsers/rst/states.py", line 170, in run
results = StateMachineWS.run(self, input_lines, input_offset,
File "/opt/sage/local/lib/python3.9/site-packages/docutils/statemachine.py", line 238, in run
context, next_state, result = self.check_line(
File "/opt/sage/local/lib/python3.9/site-packages/docutils/statemachine.py", line 460, in check_line
return method(match, context, next_state)
File "/opt/sage/local/lib/python3.9/site-packages/docutils/parsers/rst/states.py", line 2753, in underline
self.section(title, source, style, lineno - 1, messages)
File "/opt/sage/local/lib/python3.9/site-packages/docutils/parsers/rst/states.py", line 327, in section
self.new_subsection(title, lineno, messages)
File "/opt/sage/local/lib/python3.9/site-packages/docutils/parsers/rst/states.py", line 393, in new_subsection
newabsoffset = self.nested_parse(
File "/opt/sage/local/lib/python3.9/site-packages/docutils/parsers/rst/states.py", line 281, in nested_parse
state_machine.run(block, input_offset, memo=self.memo,
File "/opt/sage/local/lib/python3.9/site-packages/docutils/parsers/rst/states.py", line 196, in run
results = StateMachineWS.run(self, input_lines, input_offset)
File "/opt/sage/local/lib/python3.9/site-packages/docutils/statemachine.py", line 238, in run
context, next_state, result = self.check_line(
File "/opt/sage/local/lib/python3.9/site-packages/docutils/statemachine.py", line 460, in check_line
return method(match, context, next_state)
File "/opt/sage/local/lib/python3.9/site-packages/docutils/parsers/rst/states.py", line 2753, in underline
self.section(title, source, style, lineno - 1, messages)
File "/opt/sage/local/lib/python3.9/site-packages/docutils/parsers/rst/states.py", line 327, in section
self.new_subsection(title, lineno, messages)
File "/opt/sage/local/lib/python3.9/site-packages/docutils/parsers/rst/states.py", line 393, in new_subsection
newabsoffset = self.nested_parse(
File "/opt/sage/local/lib/python3.9/site-packages/docutils/parsers/rst/states.py", line 281, in nested_parse
state_machine.run(block, input_offset, memo=self.memo,
File "/opt/sage/local/lib/python3.9/site-packages/docutils/parsers/rst/states.py", line 196, in run
results = StateMachineWS.run(self, input_lines, input_offset)
File "/opt/sage/local/lib/python3.9/site-packages/docutils/statemachine.py", line 238, in run
context, next_state, result = self.check_line(
File "/opt/sage/local/lib/python3.9/site-packages/docutils/statemachine.py", line 460, in check_line
return method(match, context, next_state)
File "/opt/sage/local/lib/python3.9/site-packages/docutils/parsers/rst/states.py", line 2326, in explicit_markup
nodelist, blank_finish = self.explicit_construct(match)
File "/opt/sage/local/lib/python3.9/site-packages/docutils/parsers/rst/states.py", line 2338, in explicit_construct
return method(self, expmatch)
File "/opt/sage/local/lib/python3.9/site-packages/docutils/parsers/rst/states.py", line 2080, in directive
return self.run_directive(
File "/opt/sage/local/lib/python3.9/site-packages/docutils/parsers/rst/states.py", line 2130, in run_directive
result = directive_instance.run()
File "/opt/sage/local/lib/python3.9/site-packages/sphinx/ext/autodoc/directive.py", line 146, in run
documenter.generate(more_content=self.content)
File "/opt/sage/local/lib/python3.9/site-packages/sphinx/ext/autodoc/__init__.py", line 846, in generate
self.document_members(all_members)
File "/opt/sage/local/lib/python3.9/site-packages/sphinx/ext/autodoc/__init__.py", line 727, in document_members
documenter.generate(
File "/opt/sage/local/lib/python3.9/site-packages/sphinx/ext/autodoc/__init__.py", line 1514, in generate
return super().generate(more_content=more_content,
File "/opt/sage/local/lib/python3.9/site-packages/sphinx/ext/autodoc/__init__.py", line 846, in generate
self.document_members(all_members)
File "/opt/sage/local/lib/python3.9/site-packages/sphinx/ext/autodoc/__init__.py", line 1505, in document_members
super().document_members(all_members)
File "/opt/sage/local/lib/python3.9/site-packages/sphinx/ext/autodoc/__init__.py", line 708, in document_members
for (mname, member, isattr) in self.filter_members(members, want_all):
File "/opt/sage/local/lib/python3.9/site-packages/sphinx/ext/autodoc/__init__.py", line 598, in filter_members
doc = getdoc(member, self.get_attr, self.env.config.autodoc_inherit_docstrings,
File "/opt/sage/local/lib/python3.9/site-packages/sphinx/util/inspect.py", line 769, in getdoc
doc = inspect.getdoc(obj)
File "/usr/lib/python3.9/inspect.py", line 614, in getdoc
doc = object.__doc__
File "sage/docs/instancedoc.pyx", line 211, in sage.docs.instancedoc.InstanceDocDescriptor.__get__ (build/cythonized/sage/docs/instancedoc.c:1800)
return self.instancedoc(obj)
File "sage/misc/cachefunc.pyx", line 877, in sage.misc.cachefunc.CachedFunction._instancedoc_ (build/cythonized/sage/misc/cachefunc.c:5053)
sourcelines = sage_getsourcelines(f)
File "/opt/sage/local/lib/python3.9/site-packages/sage/misc/sageinspect.py", line 2397, in sage_getsourcelines
return sage_getsourcelines(obj.__class__)
File "/opt/sage/local/lib/python3.9/site-packages/sage/misc/sageinspect.py", line 2395, in sage_getsourcelines
return sage_getsourcelines(B)
File "/opt/sage/local/lib/python3.9/site-packages/sage/misc/sageinspect.py", line 2398, in sage_getsourcelines
raise err
File "/opt/sage/local/lib/python3.9/site-packages/sage/misc/sageinspect.py", line 2378, in sage_getsourcelines
return inspect.getsourcelines(obj)
File "/usr/lib/python3.9/inspect.py", line 1006, in getsourcelines
lines, lnum = findsource(object)
File "/usr/lib/python3.9/inspect.py", line 817, in findsource
file = getsourcefile(object)
File "/usr/lib/python3.9/inspect.py", line 697, in getsourcefile
filename = getfile(object)
File "/usr/lib/python3.9/inspect.py", line 666, in getfile
raise TypeError('{!r} is a built-in class'.format(object))
TypeError: <class 'object'> is a built-in class
sphinx fails to build the documentation (see trace below). It seems to come from two cached methods in origami_dense.pyx. After removing them, the compilation of the documentation does suceed.