Steps to reproduce:
$ cat a.py
import sys
class MyFinder:
def __init__(self, path):
if path != "__myfinder__":
raise ImportError()
def find_module(self, fullname, path=None):
return None
sys.path_hooks.append(MyFinder)
sys.path.insert(0, '__myfinder__')
import time
print('OK')
$ python3.3 -V
Python 3.3.2+
$ python3.3 a.py
OK
$ python3.4 -V
Python 3.4.0rc1
$ python3.4 a.py
Traceback (most recent call last):
File "a.py", line 14, in <module>
import time
ImportError: spec missing loader
On Ubuntu 13.10.
python3.3 is ubuntu's package.
python3.4.0rc1 is built by myself.
Vim's custom importer does not work for it.
[vim_dev] Problem with Python 3.4
https://groups.google.com/d/msg/vim_dev/RfuOG7_Jabs/h3YzLTsRgv0J |