From 42c661cf54960d8dee6005c83bf949acbd6d257e Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Fri, 20 Mar 2015 10:56:33 -0700 Subject: [PATCH] More Python3 fixes --- etgtools/sphinx_generator.py | 4 ++-- sphinxtools/utilities.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/etgtools/sphinx_generator.py b/etgtools/sphinx_generator.py index 935f2e81..bba9a381 100644 --- a/etgtools/sphinx_generator.py +++ b/etgtools/sphinx_generator.py @@ -1960,7 +1960,7 @@ class XMLDocString(object): else: raise Exception('Unhandled docstring kind for %s'%xml_item.__class__.__name__) - if hasattr(xml_item, 'deprecated') and xml_item.deprecated and isinstance(xml_item.deprecated, basestring): + if hasattr(xml_item, 'deprecated') and xml_item.deprecated and isinstance(xml_item.deprecated, string_base): element = et.Element('deprecated', kind='deprecated') element.text = VERSION @@ -2610,7 +2610,7 @@ class XMLDocString(object): if hasattr(method, 'deprecated') and method.deprecated: text = method.deprecated - if isinstance(text, basestring): + if isinstance(text, string_base): text = '%s %s\n%s%s\n\n'%(' .. deprecated::', VERSION, ' '*9, text.replace('\n', ' ')) stream.write(text) diff --git a/sphinxtools/utilities.py b/sphinxtools/utilities.py index 9f3afac1..03d872dc 100644 --- a/sphinxtools/utilities.py +++ b/sphinxtools/utilities.py @@ -301,7 +301,7 @@ def PythonizeType(ptype, is_param): else: if is_param and '.' in ptype: - modules = MODULENAME_REPLACE.values() + modules = list(MODULENAME_REPLACE.values()) modules.sort() modules = modules[1:] if ptype.split('.')[0] + '.' in modules: