[New-bugs-announce] [issue15384] FileFinder.path_hook()("") returns None on Windows

Nick Coghlan report at bugs.python.org
Wed Jul 18 12:46:03 CEST 2012


New submission from Nick Coghlan <ncoghlan at gmail.com>:

As noted in #15314, one of the pkgutil tests was failing on Windows because pkgutil.get_importer("") was returning None. On my Fedora system it returns FileFinder(".").

I've now tweaked that particular test to use a bogus path string so that None is the expected result on all platforms.

However, the cross-platform discrepancy is a little disturbing - I would have expected the operation to either fail or succeed regardless of platform.

Since pkgutil.get_importer is now just a wrapper that takes care of checking path_importer_cache and then walking sys.path_hooks, I believe the actual culprit is FileFinder.path_hook()("") returning None (I'm currently downloading and installing 3.3b1 on my gaming machine to confirm that)

----------
components: Library (Lib)
messages: 165752
nosy: brett.cannon, georg.brandl, ncoghlan
priority: normal
severity: normal
status: open
title: FileFinder.path_hook()("") returns None on Windows
versions: Python 3.3

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


More information about the New-bugs-announce mailing list