[New-bugs-announce] [issue15297] pkgutil.iter_importers() includes an ImpImporter

Chris Jerdonek report at bugs.python.org
Sun Jul 8 23:13:00 CEST 2012


New submission from Chris Jerdonek <chris.jerdonek at gmail.com>:

I'm not sure if this should be fixed in the code or in the documentation, but the pkgutil.iter_importers() documentation says that pkgutil.iter_importers(name) should yield the "importers for sys.meta_path, sys.path, and Python’s “classic” import machinery, in that order" when name does not include a ".":

http://docs.python.org/dev/library/pkgutil.html#pkgutil.iter_importers

However, the function appends a "non-classic" pkgutil.ImpImporter at the end of all that:

Python 3.3.0b1 (default:5d43154d68a8, Jul  8 2012, 13:54:45) 
[GCC 4.2.1 Compatible Apple Clang 3.1 (tags/Apple/clang-318.0.58)] on darwin
>>> from pkgutil import iter_importers
>>> list(iter_importers())[-1]
<pkgutil.ImpImporter object at 0x1035fa840>

----------
components: Library (Lib)
messages: 165035
nosy: cjerdonek
priority: normal
severity: normal
status: open
title: pkgutil.iter_importers() includes an ImpImporter
versions: Python 3.3

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


More information about the New-bugs-announce mailing list