This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eric.smith
Recipients eric.smith, ethan.furman, serhiy.storchaka, terry.reedy
Date 2017-02-05.15:35:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1486308945.78.0.976579569924.issue29446@psf.upfronthosting.co.za>
In-reply-to
Content
Instead of:
__all__ = [name for name in globals() if not name.startswith('_') and name not in {'enum', 're', 'sys', 'wantobjects'}]

Maybe this would be less fragile:
import types
__all__ = [name for name, obj in globals().items() if not name.startswith('_') and not isinstance(obj, types.ModuleType) and name not in {'wantobjects'}]

That is, exclude all modules. Admittedly, I had to import types, but there are other ways to do this test without that import.
History
Date User Action Args
2017-02-05 15:35:45eric.smithsetrecipients: + eric.smith, terry.reedy, ethan.furman, serhiy.storchaka
2017-02-05 15:35:45eric.smithsetmessageid: <1486308945.78.0.976579569924.issue29446@psf.upfronthosting.co.za>
2017-02-05 15:35:45eric.smithlinkissue29446 messages
2017-02-05 15:35:45eric.smithcreate