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.

Title: More incomplete module.__all__ lists
Type: Stage:
Components: Library (Lib) Versions: Python 3.4
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: berker.peksag, jayvdb, martin.panter, python-dev, serhiy.storchaka
Priority: normal Keywords:

Created on 2014-08-22 02:42 by martin.panter, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (4)
msg225637 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2014-08-22 02:42
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):
    return api

__all__ = list()
def public_function(): ...
class PublicClass: ...

* Issue 18554: os.__all__
* Issue 22191: warnings.__all__
msg225663 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2014-08-22 12:18
Issue 20689: socket.__all__
msg227145 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2014-09-20 05:53
New changeset eb9eac80c17a by Berker Peksag in branch '3.4':
Issue #22247: Add NNTPError to nntplib.__all__.

New changeset e21b0bbc06ea by Berker Peksag in branch 'default':
Issue #22247: Add NNTPError to nntplib.__all__.
msg228828 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2014-10-09 02:15
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.
Date User Action Args
2022-04-11 14:58:07adminsetgithub: 66443
2016-05-10 16:27:57jayvdbsetnosy: + jayvdb
2014-10-09 05:04:54benjamin.petersonsetstatus: open -> closed
resolution: fixed
2014-10-09 02:15:29martin.pantersetmessages: + msg228828
2014-09-20 05:53:43python-devsetnosy: + python-dev
messages: + msg227145
2014-08-22 12:18:50serhiy.storchakasetnosy: + serhiy.storchaka
messages: + msg225663
2014-08-22 10:29:36berker.peksagsetnosy: + berker.peksag
2014-08-22 02:42:48martin.pantercreate