Dave Halter
fd8f254ce1
Fix an issue with stderr debugging of subprocesses
2018-08-03 23:51:58 +02:00
Dave Halter
1c76359291
stderr of the child processes should be printed in debug output
...
This fixes #1169 . It might have a bit of a different intention, but at least it's now possible to see output of the subprocess and it's not just a black hole.
2018-08-03 13:35:21 +02:00
Dave Halter
ccb460b433
Use close_fds for posix.
2018-08-03 13:08:07 +02:00
Dave Halter
30d14ea016
Remove some redundant code
2018-08-03 12:33:35 +02:00
Dave Halter
bbb1502e06
Use names of classes to infer names of instances
2018-08-03 12:23:54 +02:00
Dave Halter
f34a9281b9
Don't have execute and execute_evaluated on name
2018-08-03 11:34:33 +02:00
Dave Halter
95a1a69771
Fix an issue where __ prefixed variables where not hidden when accessed from a class
...
Everything worked well when looking at it from an instance perspective.
2018-08-03 11:05:49 +02:00
Dave Halter
f25310e0b9
BoundMethods now have access to the function that they are using
2018-08-03 00:25:25 +02:00
Dave Halter
e576457a43
Remove another usage of is_class where it's not needed
2018-08-03 00:25:25 +02:00
Dave Halter
a1314ac3c1
FunctionContext should be created from a unified interface
2018-08-03 00:25:25 +02:00
Dave Halter
481e6bcff0
Don't create a FunctionExecutionContext if it's not used.
2018-08-03 00:25:25 +02:00
Dave Halter
9ff5050d01
Use TreeContext in a good way
2018-08-03 00:25:25 +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
733919e34c
Fix a doctest
2018-07-17 00:47:42 +02:00
Daniel Hahler
10b61c41f4
Some minor flake8 fixes
2018-07-16 23:41:42 +02:00
Daniel Hahler
08b0b668a6
Script.__repr__: include environment
2018-07-16 13:26:10 +02:00
Daniel Hahler
72a8ceed76
Add params to CallSignature.__repr__
...
Looks like this for `jedi.Script` then:
> <CallSignature: Script index=0 params=[source=None, line=None, column=None, path=None, encoding='utf-8', sys_path=None, environment=None]>
`_params_str` could be made public, and then could be used in jedi-vim,
which currently has this:
params = [p.description.replace('\n', '').replace('param ', '', 1)
for p in signature.params]
08792d3fd7/pythonx/jedi_vim.py (L492-L493)
2018-07-16 13:23:38 +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
Daniel Hahler
f3c1f4c548
Script: improve ValueError for column
...
Ref: https://github.com/davidhalter/jedi/issues/1168
2018-07-11 12:55:18 +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
aa4dcc1631
Remove source_encoding from documentation (see #1167 )
2018-07-09 18:12:27 +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
a12d62e9c9
Don't mutate the sys.path. This is pretty nasty bug that fixes #1148
2018-07-04 08:40:05 +02:00
Dave Halter
2500112f6c
Don't follow builtin imports anymore by default when follow_imports is on (goto)
2018-07-04 00:01:03 +02:00
Dave Halter
80831d79c2
additional_module_paths in usages never actually worked
2018-07-03 22:54:47 +02:00
Dave Halter
d857668292
Add include_builtins to usages, fixes #1131 .
2018-07-03 22:53:19 +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
Dave Halter
8ffdf6746f
Comprehensions are also possible arguments. Fixes 1146
2018-07-01 03:33:24 +02:00
Dave Halter
a79a1fbef5
Merge branch 'parso'
2018-06-30 14:27:30 +02:00
Dave Halter
1e7662c3e1
Prepare release of 0.12.1
2018-06-29 18:10:41 +02:00
Dave Halter
68974aee58
Don't use internal parso APIs if possible
2018-06-29 10:04:03 +02:00
Dave Halter
c208d37ac4
Remove code that is no longer used, because parso was refactored.
2018-06-29 09:56:56 +02:00
Dave Halter
38474061cf
Make jedi work with the next parso release
2018-06-29 09:54:57 +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
micbou
197aa22f29
Use cPickle on Python 2 if available
...
Attempt to load the C version of pickle on Python 2 as it is way faster.
2018-06-21 19:39:08 +02:00