New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More incomplete module.__all__ lists #66443
Comments
The nntplib.NNTPError exception is documented, but missing from __all__. I ran across another one the other day, but I can’t remember what it was now. Is there a practical way to automatically test for some of these, perhaps by scanning the documentation for function and class definitions? These sort of bugs keep popping up, as people adding new features, exceptions, etc, forget to append them to __all__. Another more radical idea: a decorator something like this might avoid copy-paste errors and make unexported APIs stand out more: def public(api):
sys.modules[api.__module__].__all__.append(api.__name__)
return api
__all__ = list()
@public
def public_function(): ...
@public
class PublicClass: ... Related: |
bpo-20689: socket.__all__ |
New changeset eb9eac80c17a by Berker Peksag in branch '3.4': New changeset e21b0bbc06ea by Berker Peksag in branch 'default': |
Confirmed Python 3.4.2 fixes the missing NNTPError. I never remembered the other instance I found, so I am happy for this to be closed. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: