diff -up src/sage_docbuild/ext/multidocs.py.orig src/sage_docbuild/ext/multidocs.py --- src/sage_docbuild/ext/multidocs.py.orig 2021-05-09 16:00:11.000000000 -0600 +++ src/sage_docbuild/ext/multidocs.py 2021-05-28 11:32:20.056542939 -0600 @@ -84,8 +84,11 @@ def merge_environment(app, env): for ind in newalldoc: # treat subdocument source as orphaned file and don't complain md = env.metadata.get(ind, dict()) - md['orphan'] = 1 - env.metadata[ind] = md + try: + md['orphan'] = 1 + env.metadata[ind] = md + except AttributeError: + env.metadata[ind] = {'orphan'} # merge the citations newcite = {} for ind, (path, tag, lineno) in citations.items(): diff -up src/sage/interfaces/singular.py.orig src/sage/interfaces/singular.py --- src/sage/interfaces/singular.py.orig 2021-05-09 16:00:11.000000000 -0600 +++ src/sage/interfaces/singular.py 2021-05-28 11:29:00.597523201 -0600 @@ -2365,7 +2365,7 @@ def generate_docstring_dictionary(): nodes.clear() node_names.clear() - singular_docdir = SINGULARPATH + "/../info/" + singular_docdir = "/usr/share/info/" new_node = re.compile(r"File: singular\.hlp, Node: ([^,]*),.*") new_lookup = re.compile(r"\* ([^:]*):*([^.]*)\..*") @@ -2373,8 +2373,9 @@ def generate_docstring_dictionary(): L, in_node, curr_node = [], False, None # singular.hlp contains a few iso-5559-1 encoded special characters - with io.open(os.path.join(singular_docdir, 'singular.hlp'), - encoding='latin-1') as f: + import gzip + with gzip.open(os.path.join(singular_docdir, 'singular.hlp.gz'), + encoding='utf-8') as f: for line in f: m = re.match(new_node,line) if m: