diff options
author | Jongwook Choi <wookayin@gmail.com> | 2023-09-23 05:49:34 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-23 02:49:34 -0700 |
commit | 7bd6bd1ef7214942e94c9238e08619adf41f5995 (patch) | |
tree | b5c33b77f67a79d50be8c7bba87226afab0d3925 /runtime/lua/vim/secure.lua | |
parent | b8103eece30dab8add09e134820b690d9fd00330 (diff) | |
download | rneovim-7bd6bd1ef7214942e94c9238e08619adf41f5995.tar.gz rneovim-7bd6bd1ef7214942e94c9238e08619adf41f5995.tar.bz2 rneovim-7bd6bd1ef7214942e94c9238e08619adf41f5995.zip |
fix(provider): cannot detect python3.12 #25316
PROBLEM: The builtin python3 provider cannot auto-detect python3.12
when g:python3_host_prog is not set. As a result, when python3 on $PATH
is currently python 3.12, neovim will fail to load python3 provider
and result in `has("python3") == 0`, e.g.,
"Failed to load python3 host. You can try to see what happened by ..."
ROOT CAUSE: the `system()` call from `provider#pythonx#DetectByModule`
does not ignore python warnings, and `pkgutil.get_loader` will print
a warning message in the very first line:
```
<string>:1: DeprecationWarning: 'pkgutil.get_loader' is deprecated and
slated for removal in Python 3.14; use importlib.util.find_spec() instead
```
SOLUTION:
- Use `importlib.util.find_spec` instead (python >= 3.4)
- Use `-W ignore` option to prevent any potential warning messages
Diffstat (limited to 'runtime/lua/vim/secure.lua')
0 files changed, 0 insertions, 0 deletions