[issue23883] __all__ lists are incomplete

Martin Panter report at bugs.python.org
Wed Jun 17 04:42:16 CEST 2015


Martin Panter added the comment:

Reviews of the patches waiting here:

tarfile, calendar (Joel): Look mainly good; I added minor suggestions about the test cases to Reitveld.

fileinput (Mauro): Looks pretty good; one minor comment on Rietveld.

csv (Jacek): Pretty good; couple minor suggestions. In a perfect world, I don’t think __doc/version__ should be there, but since they are already there it is probably safer to leave them. In general, I think style fixes in related code are okay; although in this case I have no problem with the original single blank lines.

There is nothing seriously wrong with the patches so far. They could be committed, perhaps with a few of the tweaks I suggested.

Summary of other things mentioned here left to do:

* Common test.support helper function
* gettext: Module fixed, but no changes to test suite
* Remaining modules from Serhiy’s list: cgi, configparser, doctest, enum, ftplib, http.cookies, logging, mailbox, mimetypes, optparse, pickletools, plistlib, pydoc, smtpd, subprocess, threading, tkinter.ttk, tokenize, wave, xml.etree.ElementTree.

One outstanding question is what to do about module-level constants that are only briefly mentioned in the documentation. IMO they should be included in __all__. Examples: http.client statuses <https://docs.python.org/3.4/library/http.client.html#http.client.HTTPS_PORT>, tarfile member types <https://docs.python.org/dev/library/tarfile.html#tarfile.TarInfo.type>, calendar weekdays <https://docs.python.org/dev/library/calendar.html#calendar.setfirstweekday>. Precedent of similar constants that are already included, in native Python modules: io SEEK_ constants; lzma FORMAT_, CHECK_, PRESET_ etc.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23883>
_______________________________________


More information about the Python-bugs-list mailing list