Message165757
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('.') |
|
Date |
User |
Action |
Args |
2012-07-18 11:31:34 | ncoghlan | set | recipients:
+ ncoghlan |
2012-07-18 11:31:34 | ncoghlan | set | messageid: <1342611094.8.0.638334167677.issue15386@psf.upfronthosting.co.za> |
2012-07-18 11:31:34 | ncoghlan | link | issue15386 messages |
2012-07-18 11:31:33 | ncoghlan | create | |
|