Hi all!

On Mon, Oct 26, 2020 at 03:45:54PM +0200, Adrian Bunk wrote:
> The error is "FTBFS with Sphinx 3.2".
> Sphinx 3.2 entered unstable on August 9th.
>
> Dmitry (Cc'ed) might know more regarding what is the problem.

Let me explain what happens here:

- Sphinx' inspect module is capable of fetching the docstrings for parent
  classes when the child class does not have its own.

- To do that, it checks the __mro__ property that is defined for classes
  (and contains the tuple of parent classes).

- The top-level intake module (intake/__init__.py) defines a very generic
  __getattr__ function, which is defined this way:

    def __getattr__(attr):
        if attr == 'Catalog':
            ...

  If attr != 'Catalog', this function does not raise AttributeError exception
  (and returns None).

  So basically, that module has *every* possible attribute, including one
  named "__mro__" (and that attribute is None).

- Sphinx tries to iterate through __mro__ (because it expects it to be a
  tuple) but fails (because it's None, not a tuple).

To fix this, __getattr__('__mro__') should raise an AttributeError, not return
None.

So you can either:

- Remove that function completely (it is provided for compatibility reasons).

- Update to a newer upstream snapshot where that function is refactored and
  does raise AttributeError (see https://github.com/intake/intake/pull/526).

- Add these two lines as a temporary measure:

        elif attr == '__mro__':
            raise AttributeError

--
Dmitry Shachnev

Attachment: signature.asc
Description: PGP signature

Reply via email to