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 cykerway
Recipients cykerway
Date 2018-04-03.02:25:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1522722338.23.0.467229070634.issue33210@psf.upfronthosting.co.za>
In-reply-to
Content
The current implementation of `pkgutil.walk_packages()` is confusing. Users may be given incomplete results while no exception is raised if they don't explicitly provide the `prefix` parameter. The doc says:

>   prefix is a string to output on the front of every module name on output.

But the fact is, `prefix` is not merely an output formatter at all. This function cannot handle an empty prefix (which is the default) and will often encounter import errors which are then simply ignored without an `onerror` function (which is default again).

See test program for details.

Doc:

https://docs.python.org/3.6/library/pkgutil.html#pkgutil.walk_packages

Source:

https://github.com/python/cpython/blob/3.6/Lib/pkgutil.py
History
Date User Action Args
2018-04-03 02:25:38cykerwaysetrecipients: + cykerway
2018-04-03 02:25:38cykerwaysetmessageid: <1522722338.23.0.467229070634.issue33210@psf.upfronthosting.co.za>
2018-04-03 02:25:38cykerwaylinkissue33210 messages
2018-04-03 02:25:37cykerwaycreate