Message314850
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 |
|
Date |
User |
Action |
Args |
2018-04-03 02:25:38 | cykerway | set | recipients:
+ cykerway |
2018-04-03 02:25:38 | cykerway | set | messageid: <1522722338.23.0.467229070634.issue33210@psf.upfronthosting.co.za> |
2018-04-03 02:25:38 | cykerway | link | issue33210 messages |
2018-04-03 02:25:37 | cykerway | create | |
|