您当前的位置: 首页 >  Python

Peter_Gao_

暂无认证

  • 4浏览

    0关注

    621博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

修复 python3.7 + vim8 + python-mode Error detected while processing function pymode#breakpoint#init:

Peter_Gao_ 发布时间:2019-02-13 14:52:18 ,浏览量:4

 

Posted on 2018年11月6日 呢喃Posted in python

文章目录[隐藏]

  • 修复 python3.7 + vim8 Error detected while processing function pymode#breakpoint#init:
    • 问题(坑爹的货,还是改源码)
    • 解决
修复 python3.7 + vim8 Error detected while processing function pymode#breakpoint#init: 问题(坑爹的货,还是改源码)
Error detected while processing function pymode#breakpoint#init:
line   22:
/must>not&exist/foo:2: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
Press ENTER or type command to continue
解决

官方文档已经更改

importlib.find_loader(name, path=None)
Find the loader for a module, optionally within the specified path. If the module is in sys.modules, then sys.modules[name].__loader__ is returned (unless the loader would be None or is not set, in which case ValueError is raised). Otherwise a search using sys.meta_path is done. None is returned if no loader is found.

A dotted name does not have its parents implicitly imported as that requires loading them and that may not be desired. To properly import a submodule you will need to import all parent packages of the submodule and use the correct argument to path.

New in version 3.3.

Changed in version 3.4: If __loader__ is not set, raise ValueError, just like when the attribute is set to None.

Deprecated since version 3.4: Use importlib.util.find_spec() instead.

根据文档, 替换

 vim ~/.vim/bundle/python-mode/autoload/pymode/breakpoint.vim

#from imp import find_module
from importlib.util import find_spec as find_module

» 转载请注明来源:呢喃 » 修复 python3.7 + vim8 + python-mode Error detected while processing function pymode#breakpoint#init:

关注
打赏
1664521772
查看更多评论
立即登录/注册

微信扫码登录

0.2188s