| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This option simplifies the configuration options:
1) `g:python{,3}_host_prog` is not set.
Neovim tries its best to find a suitable interpreter. This means calling
exepath(), potentially multiple times, and a system('python -c ...') with
the first found interpreter, to get the Python version.
2) `g:python{,3}_host_prog` is set.
Avoids everything of the above. No safety checks, no training wheels. Fast
host startup time!
|
|
|
|
|
|
| |
Never throw an error when provider/clipboard.vim is sourced for the first time.
Save the error instead and expose it via `provider#clipboard#Error()`, mimicking
provider/python.vim.
|
| |
|
|
|
|
| |
This makes stderr and exit callbacks work for rpc jobs
|
| |
|
|\ |
|
|/ |
|
|
|
|
|
|
| |
- Move info to providers.txt
- Remove "nvim-" prefix.
- Brevity, clarity, ...
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
This avoids the issue of nvim started daemons causing mountpoints to be
unmountable. This is currently the only place in runtime/ where this
calling convention occurred.
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
|
|\
| |
| | |
provider/pythonx: handle exit code 127 from pyenv
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This also checks the major/min version only for expected return codes.
With pyenv, you might get the following (return code 127):
pyenv: python3.4: command not found
The `python3.4' command exists in these Python versions:
3.4.3
3.4.3/envs/tmp-3.4.3-eElS6Y
tmp-3.4.3-eElS6Y
|
|/ |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
`RedirectStream` is used to redirect `stdout` and `stderr`, but are
missing certain I/O methods available on other file-like objects.
This causes external plugins (like `colorama`) to crash.
Inheriting from `io.IOBase` adds an abstract implementation of these
methods, which will at least keep the python code running.
Fixes #4045
|
|
|
|
| |
Do not use `finish` inside of `provider#python{,3}#Call`, but `return`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
"python -c" returns 1 in case of an error. Use a return code of 2 if
the Neovim module is not found to distinguish these cases.
Verify the interpreter version before checking for an installed Neovim
module. Show a new error message if the Python interpreter version
is below the minimum required version.
Always use "pkgutil" to determine if the Neovim module is installed.
In contrast to "importlib", which was used for Python 3,
"pkgutil.find_loader" is available for all Python versions [1,2].
"pkgutil.find_loader" internally uses "importlib" for Python >= 3.3 [2].
Also, the previously used "importlib.find_loader" is only available
since Python 3.3 (so checking the major Python version was not enough)
and deprecated since Python 3.4 [3].
Finally, conditioning on the major version in Vimscript was incorrect,
as checking the Neovim module for a certain Python major version does
not mean that the tested interpreters are actually of that version.
For example, we test the "python" executable, which is Python 2 on
Ubuntu and Python 3 on Arch Linux.
[1] https://docs.python.org/2/library/pkgutil.html#pkgutil.find_loader
[2] https://docs.python.org/3/library/pkgutil.html#pkgutil.find_loader
[3] https://docs.python.org/3/library/importlib.html#importlib.find_loader
|
|
|
|
|
|
|
|
|
|
| |
Before, running Nvim in a directory containing a Python module `neovim`,
or one that is imported by it or a plugin, will load that module and not
the system one. So Nvim might be tricked into running arbitrary scripts
from the current working directory.
Fixes #1665
Fixes #2530
|
| |
|
|\
| |
| | |
Python: fixes for sys.path_hooks handler
|
| |
| |
| |
| | |
This method was not used, but `VimModuleLoader.load_module` is.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The path hook used to load the module already in the `find_module` hook.
This caused different behaviour between Python 2.7 and 3.3, where the
former would call the `VimModuleLoader`, while Python 3.3 appears to
short-circuited this (because the module was loaded already).
This patch will now only find the module, but not load it in the
`find_module` hook.
|
| |
| |
| |
| | |
This is required by PEP302 for `reload()`ing modules.
|
| |
| |
| |
| | |
Fixes https://github.com/neovim/neovim/issues/2909
|
| | |
|
|/
|
|
|
| |
DecodeHook isn't needed since neovim/python-client#53
rpc methods won't pass bytes anymore, ref neovim/python-client#129
|
|
|
|
|
|
| |
Fixes #2712
Helped-By: Michael Reed <m.reed@mykolab.com>
|
|
|
|
| |
Helped-By: Justin M. Keyes <justinkz@gmail.com>
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
The executable 'python' can refer to either Python 2 or Python 3. Add a
check to only accept Python 2 interpreters as providers for +python.
Also improve the error messages.
Resolves #2734.
|
|
|
|
| |
Ref: https://github.com/blueyed/neovim/commit/9b653ce0#commitcomment-11195449
|
|
|
|
|
| |
Do not call it again in case of an exception in `remote#host#Require`
(ref: https://github.com/neovim/neovim/pull/2549#issuecomment-102674350).
|
|
|
|
|
|
|
|
| |
`provider#pythonX#Error` and `provider#pythonX#Prog` are currently meant
for debugging only (the error message is not being used), and should
therefore be defined always, especially in case of errors.
Ref: https://github.com/neovim/neovim/pull/2549#issuecomment-98607580
|
|
|
|
|
| |
The `check` return value of `s:check_version` was not being used, and it
was returned always.
|
|
|
|
|
| |
python3/python2 will typically point at the default / most recent
interpreter.
|
| |
|
| |
|
|
|
|
|
| |
`s:check_interpreter` will query/return the version also, so that
`s:check_version` can just use that, without calling "python" again.
|
|
|
|
|
| |
Reviewed-by: Michael Reed <m.reed@mykolab.com>, Daniel Hahler <github@thequod.de>
Helped-by: Daniel Hahler <github@thequod.de>
|
| |
|
| |
|