Message10043
_imp.find_module returns, for a Java built-in module, a type of C_BUILTIN (=6), but _imp.load_module is then unable to load it, claiming it does not exist.
>>> import sys, imp
>>> file, filename, descr = imp.find_module("_marshal")
>>> descr
('', '', 6)
>>> imp.load_module("_marshal", file, filename, descr)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named _marshal
>>> import _marshal
>>> sys.modules['_marshal']
<type '_marshal'>
With this and #1906 we could revert to the CPython version of test_importhooks. |
|
Date |
User |
Action |
Args |
2015-05-10 15:59:48 | jeff.allen | set | recipients:
+ jeff.allen |
2015-05-10 15:59:48 | jeff.allen | set | messageid: <1431273588.69.0.836437986019.issue2352@psf.upfronthosting.co.za> |
2015-05-10 15:59:48 | jeff.allen | link | issue2352 messages |
2015-05-10 15:59:47 | jeff.allen | create | |
|