[New-bugs-announce] [issue15386] Still getting two copies of importlib._boostrap
Nick Coghlan
report at bugs.python.org
Wed Jul 18 13:31:34 CEST 2012
New submission from Nick Coghlan <ncoghlan at gmail.com>:
I haven't worked out how yet, but importlib.machinery is managing to bypass the replacement of importlib._bootstrap with _frozen_importlib:
Python 3.3.0b1 (default:8bf691d0b004+, Jul 15 2012, 23:20:06)
[GCC 4.7.0 20120507 (Red Hat 4.7.0-5)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import importlib._bootstrap
[74500 refs]
>>> import importlib.machinery
[74500 refs]
>>> importlib.machinery.FileFinder
<class 'importlib._bootstrap.FileFinder'>
[74505 refs]
>>> importlib._bootstrap.FileFinder
<class '_frozen_importlib.FileFinder'>
[74505 refs]
>>> importlib.machinery.FileFinder.path_hook()("")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/ncoghlan/devel/py3k/Lib/importlib/_bootstrap.py", line 1350, in path_hook_for_FileFinder
if not _path_isdir(path):
File "/home/ncoghlan/devel/py3k/Lib/importlib/_bootstrap.py", line 117, in _path_isdir
path = _os.getcwd()
NameError: global name '_os' is not defined
[74566 refs]
>>> importlib._bootstrap.FileFinder.path_hook()("")
FileFinder('.')
----------
messages: 165757
nosy: ncoghlan
priority: normal
severity: normal
status: open
title: Still getting two copies of importlib._boostrap
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue15386>
_______________________________________
More information about the New-bugs-announce
mailing list