Dave Halter
1739ae44f0
Refactor some of the import logic so it's possible to load typeshed modules
2018-07-24 01:19:09 +02:00
Dave Halter
18f26a0c04
Change a module is None check to raise an Exception
2018-07-23 23:57:27 +02:00
Dave Halter
873558a392
Move the os.path hack
2018-07-23 23:04:14 +02:00
Dave Halter
c88afb71c9
Import names are now always strings
2018-07-23 22:40:24 +02:00
Dave Halter
27ab4ba339
Add the flask plugin and move the import hacks there
2018-07-23 04:04:21 +02:00
Dave Halter
8a9202135b
Move import logic around a bit
2018-07-23 03:54:10 +02:00
Dave Halter
e7635b40d5
Remove some unused code
2018-07-22 18:02:53 +02:00
Dave Halter
2cd1ae73ed
Move stdlib content to the stdlib plugin
2018-07-22 03:45:02 +02:00
Dave Halter
061489ec9a
Move the stdlib executions into a plugin
2018-07-22 03:38:12 +02:00
Dave Halter
df55f62ad8
Add a plugin infrastructure
2018-07-21 15:03:05 +02:00
Dave Halter
4b276bae87
The import resolution for namespace packages was wrong
...
With this change we can now include all parents of the script, which will make
relative imports always work.
Now the whole meta_path is scanned and not just importlib's PathFinder.
Fixes #1183 .
2018-07-21 00:16:10 +02:00
Dave Halter
d292333dab
MergedExecutedParams -> DynamicExecutedParams
2018-07-18 10:02:57 +02:00
Dave Halter
a408fb3211
Fix a recursion error, fixes #1173
2018-07-18 10:01:41 +02:00
Dave Halter
fb360506fb
Don't merge params if it's just one param
2018-07-17 09:53:26 +02:00
Dave Halter
fe1799d125
Add a repr for AnonymousArguments
2018-07-17 09:48:27 +02:00
Dave Halter
1e796fc08d
Environments are now always created on request
...
The issue was that if something changed about the environment (e.g. version
switch) or sys.path change, re-creating the environment was possible, but did
not involve the change. The environments have now a __del__ function that
deletes the subprocess after every time an Environment is garbage collected.
2018-07-15 17:49:17 +02:00
Daniel Hahler
2fc91ceb64
Improve Environment
...
It only takes `executable` and gets all the information from the
subprocess directly.
Fixes https://github.com/davidhalter/jedi/issues/1107 .
2018-07-15 17:49:17 +02:00
Dave Halter
71cea7200b
Don't use invalid escape sequences in regex, see https://github.com/davidhalter/jedi-vim/issues/843
2018-07-12 21:13:26 +02:00
Daniel Hahler
87d7c59c6e
subprocess: listen: exit normally with EOFError
...
This is an expected case, since the parent closed normally, and
therefore the subprocess should exit with 0.
2018-07-11 12:56:55 +02:00
Dave Halter
cef769ecd8
The encoding parameter should be used again (includes test), fixes #1167
2018-07-09 18:25:28 +02:00
Dave Halter
a59e5a016f
Actually use the fast_parser setting again
2018-07-05 21:31:03 +02:00
Dave Halter
37a40d53a8
Use an import name list as long as possible
2018-07-05 18:11:58 +02:00
Dave Halter
d8c0d8e5d2
Different _load_module API
2018-07-05 10:15:49 +02:00
Dave Halter
508ed7e5b8
Directly load modules if possible, with this it's not necessary anymore to use dotted_from_fs_path, also fixes #1013 .
2018-07-05 10:03:05 +02:00
Dave Halter
f4aad8bbfe
Finally make it possible to use auto_import_modules for packages
...
This means that you can now write 'from gi.repository import Gtk' and Gtk completions work.
It also means that other libraries could be used like that for speed or other reasons.
Fixes #531
2018-07-03 00:58:43 +02:00
Dave Halter
2b1cbe4d42
Fix a bug about fstring completion
2018-07-02 01:26:17 +02:00
micbou
95f835a014
Force unicode when listing module names
...
pkgutil.iter_modules may return the module name as str instead of unicode on
Python 2.
2018-06-24 22:41:14 +02:00
micbou
282c6a2ba1
Use highest possible pickle protocol
2018-06-23 14:45:34 +02:00
Daniel Hahler
ea71dedaa1
Include stderr with "subprocess has crashed" exception ( #1124 )
...
* Include stderr with "subprocess has crashed" exception
This does not add it to the other similar exception raised from `kill`,
since this should be something like "was killed already" anyway.
* fixup! Include stderr with "subprocess has crashed" exception
2018-06-23 11:37:43 +02:00
micbou
106b11f1af
Set stdout and stdin to binary mode on Python 2 and Windows
2018-06-22 00:08:53 +02:00
micbou
f9e90e863b
Use system default buffering on Python 2
2018-06-21 19:50:51 +02:00
Tarcisio Eduardo Moreira Crocomo
55941e506b
Add support for DefaultDict on jedi_typing.py.
2018-06-17 11:28:12 +02:00
Dave Halter
e2cd228aad
Dict comprehension items call should now work, fixes #1129
2018-06-07 21:00:23 +02:00
Dave Halter
62a3f99594
Fix a wrong branch check, fixes #1128
2018-06-01 08:59:16 +02:00
Dave Halter
50812b5836
A simple yield should not cause an error, fixes #1117
2018-05-23 11:12:19 +02:00
Daniel Hahler
6748faa071
Fix _get_numpy_doc_string_cls: use cache
...
I've noticed that Jedi tries to import numpydoc a lot when using
jedi-vim's goto method in jedi_vim.py itself (via printing in Neovim's
VimPathFinder.find_spec).
This patch uses the cache before trying the import again and again.
2018-05-06 10:54:49 +02:00
Maxim Novikov
fc14aad8f2
Fix namespace autocompletion error
2018-05-03 09:12:17 +02:00
Dave Halter
a95274d66f
None/False/True are atom non-terminals in the syntax tree, fixes #1103
2018-05-01 23:43:49 +02:00
Dave Halter
8d48e7453a
When searching submodules, use all of __path__, fixes #1105
2018-05-01 23:17:42 +02:00
Dave Halter
91499565a9
Specially crafted docstrings sometimes lead to errors, fixes #1103
2018-04-25 21:04:05 +02:00
Dave Halter
4075c384e6
In some very rare cases it was possible to get an interpreter crash because of this bug. Fixes #1087
2018-04-23 21:26:51 +02:00
Dave Halter
0bcd1701f0
Start using our own monkeypatch function for some things
2018-04-23 21:26:51 +02:00
Dave Halter
88243d2408
Don't catch IndexError where we don't have to
2018-04-20 01:46:32 +02:00
Daniel Hahler
aa6857d22d
check_fs: handle FileNotFoundError
...
Ref: https://github.com/davidhalter/jedi-vim/pull/801
2018-04-17 23:40:25 +02:00
Dave Halter
7b15c70551
Fix a lot of old docs code that doesn't exist anymore
2018-04-15 11:52:45 +02:00
Dave Halter
83d635cbac
Add a way to generalize Popen
2018-04-13 10:17:30 +02:00
Dave Halter
323a85db7c
Fix the module_name issue again
2018-04-10 21:27:47 +02:00
Dave Halter
9b17be9ecf
Cleanup some of the module cache stuff
2018-04-10 19:16:18 +02:00
micbou
cf5f06f378
Do not cache unimportable compiled module ( #1079 )
...
From the issue:
The issue can be reproduced by getting the description of the QtBluetooth module from PyQt5 on Windows:
import jedi
completions = jedi.Script('import PyQt5.QtBlueTooth').completions()
completions[0].description
It's hard to write a test for it so we don't write one for it.
2018-04-10 19:10:05 +02:00
Dave Halter
764b67d232
Multiple inheritance completion in Python 2 did not work
...
Fixes #1071 .
2018-04-10 08:58:30 +02:00