@@ -112,12 +112,12 @@ class members that are inherited from a base class. This value can be
112112from sphinx .ext .autosummary import Autosummary
113113from sphinx .ext .inheritance_diagram import InheritanceDiagram , InheritanceGraph , try_import
114114
115- from .utils import find_mod_objs , cleanup_whitespace
115+ from .utils import find_mod_objs , cleanup_whitespace , SPHINX_LT_8_3
116116
117117__all__ = ['Automoddiagram' , 'Automodsumm' , 'automodsumm_to_autosummary_lines' ,
118118 'generate_automodsumm_docs' , 'process_automodsumm_generation' ]
119119logger = logging .getLogger (__name__ )
120- SPHINX_LT_8_2 = Version (sphinx .__version__ ) < Version ("8.2.dev " )
120+ SPHINX_LT_8_2 = Version (sphinx .__version__ ) < Version ("8.2" )
121121
122122
123123def _str_list_converter (argument ):
@@ -219,7 +219,8 @@ def run(self):
219219
220220 def get_items (self , names ):
221221
222- self .bridge .genopt .imported_members = True
222+ if SPHINX_LT_8_3 :
223+ self .bridge .genopt .imported_members = True
223224
224225 return Autosummary .get_items (self , names )
225226
@@ -479,13 +480,14 @@ def generate_automodsumm_docs(lines, srcfn, app=None, suffix='.rst',
479480 """
480481
481482 from sphinx .jinja2glue import BuiltinTemplateLoader
482- from sphinx .ext .autosummary import import_by_name , get_documenter
483+ from sphinx .ext .autosummary import import_by_name
483484 from sphinx .util .osutil import ensuredir
484485 from sphinx .util .inspect import safe_getattr
485486 from jinja2 import FileSystemLoader , TemplateNotFound
486487 from jinja2 .sandbox import SandboxedEnvironment
487488
488489 from .utils import find_autosummary_in_lines_for_automodsumm as find_autosummary_in_lines
490+ from .utils import get_documenter
489491
490492 # Create our own templating environment - here we use Astropy's
491493 # templates rather than the default autosummary templates, in order to
0 commit comments