The main motivation is to being able to use normal/other pytest based
tests.
Therefore this moves everything from conftest into test_integration
itself.
When being initialized via ftplugin `set shortmess+=F` (default in
Neovim by now) causes the additional information (the full traceback) to
be silenced.
This patch uses `:unsilent` to always display it.
Ref: https://github.com/neovim/neovim/issues/8675
I am seeing `p` twice for os.path.dirname, which seems to come from
Lib/posixpath.py and Lib/ntpath.py, as can be seen with `os.path.join`,
where I still see two with this patch:
```
(path, *paths)
import os (a, *p)
os.path.join()
```
It uses cterm=reverse, which is supported by current Neovim, and at
least for xterm and rxvt-unicode reverse and standout are the same.
See `infocmp`:
> smso=\E[7m / rev=\E[7m
a79a1fb Merge branch 'parso'
58141f1 Don't use requirements for now, and use the git version instead in tox
e0e2be3 Add a better comment about why people need to upgrade parso
1e7662c Prepare release of 0.12.1
68974ae Don't use internal parso APIs if possible
c208d37 Remove code that is no longer used, because parso was refactored.
3847406 Make jedi work with the next parso release
95f835a Force unicode when listing module names
282c6a2 Use highest possible pickle protocol
ea71ded Include stderr with "subprocess has crashed" exception (#1124)
106b11f Set stdout and stdin to binary mode on Python 2 and Windows
f9e90e8 Use system default buffering on Python 2
197aa22 Use cPickle on Python 2 if available
e96ebbe Add tests for DefaultDict support.
55941e5 Add support for DefaultDict on jedi_typing.py.
ff4a773 Parse correct AST attribute for version
70c2fce Replace distutils.spawn.find_executable with shutil.which
5dab97a Add an error message, see also #1139.
e2cd228 Dict comprehension items call should now work, fixes#1129
c1014e0 Fix flow analysis test
62a3f99 Fix a wrong branch check, fixes#1128
6ebe3f8 Drop 3.3 tests from travis
50812b5 A simple yield should not cause an error, fixes#1117
d10eff5 Travis: report coverage also to codecov.io
6748faa Fix _get_numpy_doc_string_cls: use cache
fc14aad Fix namespace autocompletion error
3c909a9 Travis: remove TOXENV=cov from allowed failures
b94b45c Environment._get_version: add msgs with exceptions
a95274d None/False/True are atom non-terminals in the syntax tree, fixes#1103
8d48e74 When searching submodules, use all of __path__, fixes#1105
9149956 Specially crafted docstrings sometimes lead to errors, fixes#1103
ba96c21 Follow up from the last async issue, fixes more related things about #1092.
8494164 Fix an async funcdef issue, fixes 1092.
4075c38 In some very rare cases it was possible to get an interpreter crash
because of this bug. Fixes#1087
0bcd170 Start using our own monkeypatch function for some things
ceb5509 Include function return type annotation in docstring if it is present
88243d2 Don't catch IndexError where we don't have to
5f37d08 Extend create_environment to accept an executable path
aa6857d check_fs: handle FileNotFoundError
* pythonx/parso 6f385bd...e6bc924 (44):
> Use a setuptools that still supports py33
> 3.1 release notes
> Use one simple functions to check for funcdefs in diff parser
> Make sure to treat async funcdefs the same way as normal funcdefs
> Fix an issue in the diff parser
> Asterisks in function definitions may be at the end of a func without a comma, fixes#44
> Remove some TODOs that were fixed
> Error recovery should not match the whole line in case of an invalid token, fixes#40
> docs: enable searchbox
> Merge branch 'pgen'
> Merge branch 'master' of github.com:davidhalter/parso
> Add docstring
> Add some comments
> Use a set instead of dict if it's not necessary
> Simplify some code
> Some refactorings for simplicity
> Use NFAArc as a class
> Some more renames
> Another rename
> Rename
> Move the grammar parsing to a separate module
> More renames
> Rename
> Separate generating dfas from parsing
> Cleanup some names
> Remove some code that is not used anymore
> Some cleanups and documentation
> Move out some more functions out of classes
> Some more refactorings for clarification
> Factor out start_symbol into a better position
> Refactor out dfas
> Document pgen grammars a bit better
> addarc -> add_arc
> Refactor some things in pgen
> Move some initializations
> Change license again. The year shouldn't matter
> Make first private
> Change copyright years
> Remove some code from the grammar
> Separate the grammar generation from the grammar parsing
> In pgen now everything is named grammar and not c
> Better recovery for online classes and functions
> Fix one-line error recovery for all things that are using a suite
> Add a debug function for first tokens
* jedi_vim.jedi_import_error: add location
This is useful for debugging. It contains e.g. the path to parso, if
importing failed from there.
Example:
> Error: jedi-vim failed to initialize Python: jedi#setup_python_imports: could not import jedi: cannot import name 'PythonTokenTypes' (in /…/jedi-vim/pythonx/jedi/jedi/api/completion.py:1). (in function jedi#init_python[3]..<SNR>44_init_python[27]..jedi#setup_python_imports, line 37)
* init: handle jedi_vim.jedi_import_error in Vim plugin
Using `set shortmess+=F` would suppress the `:echom` used in
`jedi_vim.no_jedi_warning` [1].
This patch makes `jedi#setup_python_imports` handle the error instead.
1: https://github.com/neovim/neovim/issues/8675
* Revisit error handling with loading jedi_vim
* jedi#debug_info: display parso submodule separately
* Fix jedi#reinit_python
* fixup! Revisit error handling with loading jedi_vim
* display_debug_info: handle exceptions with environment.get_sys_path
* fixup! Revisit error handling with loading jedi_vim
[ci skip]
It was removed previously, since it now refers to the environment being
used.
This brings it back for now.
There could be a separate var for it later, and/or it needs changes
later (or rather the environment needs a new variable name, since it
should refer to the executable really) - but this is good for now I think.
Fixes https://github.com/davidhalter/jedi-vim/issues/833
* pythonx/parso 579146b...6f385bd (7):
> Not testing Python 3.3 anymore on travis. It seems to be broken
> Add a changelog for 0.2.1
> Push the version
> The diff parser was slighly off with prefixes, fixes#1121
> A better repr for the endmarker
> Merge branch 'master' of github.com:davidhalter/parso
> Fix a prefix issue with error leafs.
- cache current environment
- s/jedi.get_python_environment/jedi.get_system_environment: the former
does not exist (renamed in https://github.com/davidhalter/jedi/commit/336087f)
- improve error display