Skip to content

Possible incompatibility with Sphinx 3.1.0 #105

Closed

Description

@pllim

Something (maybe here?) is not compatible with Sphinx 3.1.0.

api_class_methods = ['__init__', '__call__']

WARNING: autodoc: failed to import method '__call__' from module 'keyword'; the following exception was raised:
Traceback (most recent call last):
  File "c:\...\sphinx\util\inspect.py", line 323, in safe_getattr
    return getattr(obj, name, *defargs)
AttributeError: module 'keyword' has no attribute '__call__'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\...\sphinx\ext\autodoc\importer.py", line 71, in import_object
    obj = attrgetter(obj, attrname)
  File "c:\...\sphinx\ext\autodoc\__init__.py", line 246, in get_attr
    return autodoc_attrgetter(self.env.app, obj, name, *defargs)
  File "c:\...\sphinx\ext\autodoc\__init__.py", line 2059, in autodoc_attrgetter
    return safe_getattr(obj, name, *defargs)
  File "c:\...\sphinx\util\inspect.py", line 339, in safe_getattr
    raise AttributeError(name)
AttributeError: __call__

xref astropy/astropy#10473 and Sphinx 3.1.0 change log

What happened in astropy is I simply removed automodapi usage for the offending module and fell back to autoclass; see astropy/astropy#10477

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions