ModuleDocumenter incorrectly uses getattr for submodules [patch,tests]
1.) ModuleDocumenter.get_object_members does not include submodules, which it should.
2.) If all has submodule it tries to use getattr() failure point:
Imagine package with following:
__all__ = ['submodule', ...]
On this case the get_object_members fails, as it tries to use getattr for "submodule".
Following patch adds submodules to the get_object_members and does not use getattr for submodules listed in all.
There is also tests for this in patch, it seems to be passing on my computer.
I'm improving autosummary to be able to autodocument packages directly, this patch does not prevent me to continue whether it is added or not, but if this is added, there should be no warnings (of incorrectly tried imports) anymore, since sometimes (I have not yet found the position where) autodoc tries to import submodules that are not really submodules.