[Debian-med-packaging] Bug#971177: intake: FTBFS: TypeError: 'NoneType' object is not iterable

Dmitry Shachnev mitya57 at debian.org
Mon Oct 26 18:15:15 GMT 2020


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/debian-med-packaging/attachments/20201026/097cbeb2/attachment.sig>


More information about the Debian-med-packaging mailing list