question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

DeprecationWarning with python 3.7 on Windows 10

See original GitHub issue

EDIT: THIS IS NOT RELATED TO LEADERF, PLEASE SEE https://github.com/vim/vim/issues/3117

<del>
  • vim or neovim?

    • [x ] vim
    • neovim
  • vim --version or nvim --version: VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Feb 8 2018 15:00:34) Included patches: 1-1476

  • Output of :echo has("python"):

  • Output of :echo has("python3"):

  • Output of :echo &pythondll(only vim, not neovim):

  • Output of :echo &pythonthreedll(only vim, not neovim): pythonthreeddll=python37.dll

  • Output of :py print(sys.version):

  • Output of :py3 print(sys.version):

  • Operating system:

    • Linux
    • Mac OS X
    • Windows
    • Etc.
  • Configurations related to LeaderF in vimrc: set pythonthreedll=python37.dll

Describe your question, feature request, or bug.

I installed the latest python(https://www.python.org/downloads/release/python-370b3/) on my new PC, and explicitly use its dll for vim. Since the python version is quite new, some features Leaderf use is deprecated. Vim prints following error message when it starts up:

处理 C:\Users\bennyye\vimfiles\bundle\LeaderF\autoload\lfMru.vim 时发生错误:
第   10 行:
/must>not&exist/foo:1: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses

FYI: https://github.com/ARM-DOE/pyart/issues/677 https://github.com/ARM-DOE/pyart/pull/675 </del>

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
Yggdrootcommented, Apr 30, 2018

I think this issue is because the python3.7 version is not consistent with the version when compiling vim. I have installed the latest vim, with output of :version as below:

VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Apr 29 2018 22:08:28)
MS-Windows 32 位图形界面版本 带 OLE 支持
包含补丁: 1-1774
编译者 appveyor@APPVYR-WIN
巨型版本 带图形界面。  可使用(+)与不可使用(-)的功能:
+acl                +cscope             +gettext/dyn        +mouseshape         +ruby/dyn           +toolbar
+arabic             +cursorbind         -hangul_input       +multi_byte_ime/dyn +scrollbind         +user_commands
+autocmd            +cursorshape        +iconv/dyn          +multi_lang         +signs              +vertsplit
+autoservername     +dialog_con_gui     +insert_expand      +mzscheme/dyn       +smartindent        +virtualedit
+balloon_eval       +diff               +job                +netbeans_intg      +startuptime        +visual
-balloon_eval_term  +digraphs           +jumplist           +num64              +statusline         +visualextra
+browse             +directx            +keymap             +ole                -sun_workshop       +viminfo
++builtin_terms     -dnd                +lambda             +packages           +syntax             +vreplace
+byte_offset        -ebcdic             +langmap            +path_extra         +tag_binary         -vtp
+channel            +emacs_tags         +libcall            +perl/dyn           +tag_old_static     +wildignore
+cindent            +eval               +linebreak          +persistent_undo    -tag_any_white      +wildmenu
+clientserver       +ex_extra           +lispindent         -postscript         +tcl/dyn            +windows
+clipboard          +extra_search       +listcmds           +printer            -termguicolors      +writebackup
+cmdline_compl      +farsi              +localmap           +profile            +terminal           -xfontset
+cmdline_hist       +file_in_path       +lua/dyn            +python/dyn         -tgetent            -xim
+cmdline_info       +find_in_path       +menu               +python3/dyn        -termresponse       +xpm_w32
+comments           +float              +mksession          +quickfix           +textobjects        -xterm_save
+conceal            +folding            +modify_fname       +reltime            +timers             
+cryptv             -footer             +mouse              +rightleft          +title              
     系统 vimrc 文件: "$VIM\vimrc"
     用户 vimrc 文件: "$HOME\_vimrc"
 第二用户 vimrc 文件: "$HOME\vimfiles\vimrc"
 第三用户 vimrc 文件: "$VIM\_vimrc"
      用户 exrc 文件: "$HOME\_exrc"
  第二用户 exrc 文件: "$VIM\_exrc"
    系统 gvimrc 文件: "$VIM\gvimrc"
    用户 gvimrc 文件: "$HOME\_gvimrc"
第二用户 gvimrc 文件: "$HOME\vimfiles\gvimrc"
第三用户 gvimrc 文件: "$VIM\_gvimrc"
       defaults file: "$VIMRUNTIME\defaults.vim"
        系统菜单文件: "$VIMRUNTIME\menu.vim"
编译方式: cl -c /W3 /nologo  -I. -Iproto -DHAVE_PATHDEF -DWIN32  -DFEAT_CSCOPE 
-DFEAT_TERMINAL -DFEAT_NETBEANS_INTG -DFEAT_JOB_CHANNEL   -DFEAT_XPM_W32   
-DWINVER=0x0501 -D_WIN32_WINNT=0x0501 /MP -DHAVE_STDINT_H /Ox /GL -DNDEBUG /arch:IA32
 /Zl /MT -DFEAT_OLE -DFEAT_MBYTE_IME -DDYNAMIC_IME -DFEAT_MBYTE -DFEAT_GUI_W32 
-DFEAT_DIRECTX -DDYNAMIC_DIRECTX -DFEAT_DIRECTX_COLOR_EMOJI -DDYNAMIC_ICONV 
-DDYNAMIC_GETTEXT -DFEAT_TCL -DDYNAMIC_TCL -DDYNAMIC_TCL_DLL=\"tcl86t.dll\" 
-DDYNAMIC_TCL_VER=\"8.6\" -DFEAT_LUA -DDYNAMIC_LUA -DDYNAMIC_LUA_DLL=\"lua53.dll\" 
-DFEAT_PYTHON -DDYNAMIC_PYTHON -DDYNAMIC_PYTHON_DLL=\"python27.dll\" -DFEAT_PYTHON3 
-DDYNAMIC_PYTHON3 -DDYNAMIC_PYTHON3_DLL=\"python36.dll\" -DFEAT_MZSCHEME -I 
"C:\Program Files (x86)\Racket\include" -DMZ_PRECISE_GC -DDYNAMIC_MZSCHEME 
-DDYNAMIC_MZSCH_DLL=\"libracket3m_a36fs8.dll\" 
-DDYNAMIC_MZGC_DLL=\"libracket3m_a36fs8.dll\" 
-DFEAT_PERL -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DDYNAMIC_PERL 
-DDYNAMIC_PERL_DLL=\"perl524.dll\" -DFEAT_RUBY -DDYNAMIC_RUBY -DDYNAMIC_RUBY_VER=24 
-DDYNAMIC_RUBY_DLL=\"msvcrt-ruby240.dll\" -DFEAT_HUGE /Fd.\ObjGXOULYHTRZi386/ /Zi
链接方式: link  /nologo /subsystem:windows,5.01 /opt:ref /LTCG:STATUS oldnames.lib kernel32.lib
 advapi32.lib shell32.lib gdi32.lib  comdlg32.lib ole32.lib uuid.lib /machine:i386 gdi32.lib version.lib 
  winspool.lib comctl32.lib advapi32.lib shell32.lib  /machine:i386  libcmt.lib oleaut32.lib user32.lib 
 /nodefaultlib:lua53.lib  /STACK:8388608  /nodefaultlib:python27.lib /nodefaultlib:python36.lib   
"C:\Tcl\lib\tclstub86.lib" WSock32.lib xpm\x86\lib-vc14\libXpm.lib /PDB:gvim.pdb -debug

You can see -DDYNAMIC_PYTHON3 -DDYNAMIC_PYTHON3_DLL=\"python36.dll\" , so you should use python3.6 instead of python3.7.

2reactions
JustinHoytcommented, Jul 4, 2018

@Yggdroot I did google it and I came up with nothing outside of downgraing to python 3.6 which is not an acceptable solution. The error explicitely says that it’s a deprecation warning coming from LeaderF. If it is indeed an issue from something other than LeaderF, maybe there should be a solution somewhere in the documentation since I’m not the first one to run into this issue.

Regretfully I cannot use this plugin anymore because of this issue. I hope it gets resolved soon.

Read more comments on GitHub >

github_iconTop Results From Across the Web

What's New In Python 3.7 — Python 3.11.1 documentation
This article explains the new features in Python 3.7, compared to 3.6. ... On Windows 8.1+ or 10, with DPI compatibility properties of...
Read more >
How to install python 3.7 on windows 10 PC , The non ...
Visit the python for windows page. · Download python 3.7.0 by clicking the link in step 3. · Begin the download and follow...
Read more >
Can't install Matplotlib on Python 3.10 after its release (2021 ...
As others have stated, Python 3.10 is not currently compatible with Matplotlib. You need to install and use Python 3.9 until it is...
Read more >
setuptools 3.7.1 - PyPI
Easily download, build, install, upgrade, and uninstall Python packages. ... On Windows, if Setuptools was installed using an .exe or .msi installer, ...
Read more >
NumPy 1.22.0 Release Notes
The Python versions supported in this release are 3.8-3.10, Python 3.7 ... Also note that 32 bit wheels are only provided for Python...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found