aboutsummaryrefslogtreecommitdiff
path: root/runtime/autoload/provider/pythonx.vim
Commit message (Collapse)AuthorAge
* provider/pythonx: Improve detection code and error messages.Florian Walch2015-09-17
| | | | | | | | | | | | | | | | | | | | | | | | | | "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
* python: remove current working directory from pathJakob Schnitzer2015-09-14
| | | | | | | | | | 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
* provider/pythonx.vim: Use shell-agnostic construction. #3190sanmiguel2015-08-21
|
* provider/pythonx: Show absolute path to executable in error message.Florian Walch2015-06-09
|
* provider/pythonx: Merge s:check_version() and s:check_interpreter().Florian Walch2015-06-09
|
* provider/pythonx: Don't use Python 3 interpreter for +python.Florian Walch2015-06-09
| | | | | | | | | 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.
* provider/pythonx: return error from DetectDaniel Hahler2015-06-09
| | | | Ref: https://github.com/blueyed/neovim/commit/9b653ce0#commitcomment-11195449
* provider/pythonx: Detect: only return valid versionsDaniel Hahler2015-06-09
| | | | | The `check` return value of `s:check_version` was not being used, and it was returned always.
* provider/pythonx: test python3/2 first, do not test python3.2Daniel Hahler2015-06-09
| | | | | python3/python2 will typically point at the default / most recent interpreter.
* provider/pythonx: add reference to ":help nvim-python" for errorDaniel Hahler2015-06-09
|
* provider/pythonx: fix grammar with errorDaniel Hahler2015-06-09
|
* provider/pythonx: only call system("python") onceDaniel Hahler2015-06-09
| | | | | `s:check_interpreter` will query/return the version also, so that `s:check_version` can just use that, without calling "python" again.
* Add if_python3 supportShougo Matsushita2015-04-21
Reviewed-by: Michael Reed <m.reed@mykolab.com>, Daniel Hahler <github@thequod.de> Helped-by: Daniel Hahler <github@thequod.de>