New submission from Eric Snow: pydoc.ispackage() is a best-effort guess at whether or not a path is the location of a package. However, it uses hard-coded suffixes when matching file names, which can miss files (e.g. extension modules and sourceless packages on Windows). It should probably use suffixes defined in importlib.util, as they're used elsewhere in pydoc. The function also does not comprehend namespace packages, but I'm not sure that's worth worrying about.
FWIW, it isn't clear to me what is using pydoc.ispackage(). It may not be used in the stdlib at all. ---------- components: Library (Lib) messages: 204646 nosy: eric.snow priority: low severity: normal stage: needs patch status: open title: pydoc.ispackage() could be more accurate type: enhancement versions: Python 3.5 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue19821> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com