Anton Zub
c2bb795151
Fix typo in docstring for imports.py
2018-02-03 11:55:53 +01:00
Dave Halter
68f15c90ac
Undo most of the namespace changes and use module again
...
Is a module like every other module, because if you import an empty
folder foobar it will be available as an object:
<module 'foobar' (namespace)>.
See #1033 .
2018-01-25 20:51:55 +01:00
Dave Halter
04fba28d35
Differentiate between namespace and module as a type
...
Also fixed a bug related to implicit namespace contexts, fixes #1033 .
2018-01-25 20:35:54 +01:00
Dave Halter
d986c44b94
Merge with master
...
The deprecation of Python2.6 and the insertion of environments made it quite difficult to merge.
2018-01-20 19:32:59 +01:00
Dave Halter
877383b110
Add a test to avoid encoding issues. Fixes #1003
2018-01-20 18:28:29 +01:00
Dave Halter
16b463a646
Refactor to avoid having unicode decode errors by default
2018-01-19 19:23:11 +01:00
Dave Halter
9b5e3447d9
Make the new project API fully work in tests
2018-01-17 09:54:11 +01:00
Dave Halter
fe813292cf
Try to migrate to the new project API
2018-01-16 23:56:35 +01:00
Dave Halter
f36f5ec234
Merge with master
2018-01-06 12:31:29 +01:00
Dave Halter
b716fb7dc6
Use the parser to check for certain namedtuple features
...
This fixes tests that are used with python 2 but a different environment
2017-12-30 04:41:19 +01:00
Dave Halter
7de04fb28d
Move the module name searching to the subprocess
2017-12-29 21:10:00 +01:00
Dave Halter
35158f693d
Remove some of the last py27 errors that were caused in combination with 3.6
2017-12-29 02:45:11 +01:00
Dave Halter
59c44fe499
Use force_unicode for all sys paths
2017-12-29 01:28:23 +01:00
Dave Halter
87666d72a1
Move the import logic to the subprocess
2017-12-23 17:59:56 +01:00
Dave Halter
473be114f3
Move even more import stuff to a separate function
2017-12-23 17:10:57 +01:00
Dave Halter
e2f8d53ee4
Move some import parts around to refactor it
2017-12-23 16:16:17 +01:00
Dave Halter
4ab7f7a0b0
Make ImplicitNamespaceContext a bit cleaner
2017-12-21 23:43:47 +01:00
Dave Halter
890dd2213d
Use better error messages for import errors
2017-12-19 23:51:05 +01:00
Daniel Hahler
adace8d7cb
sys_path_with_modifications: append local file
...
This fixes "goto" preferring a local module instead of a global one.
Fixes https://github.com/davidhalter/jedi/issues/995 .
2017-12-19 20:51:20 +01:00
Dave Halter
6780eba157
Fix sys_path propagation for builtins load_module
2017-12-18 20:16:58 +01:00
Dave Halter
aa40ef3140
A small refactoring
2017-12-18 20:03:23 +01:00
Dave Halter
7db6d11c49
Create a way of accessing access objects through a subprocess
2017-12-06 14:18:10 +01:00
Dave Halter
542644ad19
Move load_module a bit around
2017-12-04 19:18:30 +01:00
Dave Halter
96a0003cb5
Progress in executing builtin stuff in submodules.
2017-11-20 21:02:40 +01:00
Dave Halter
8658ac5c28
Using additional_dynamic_modules sometimes led to weird behavior of using modules twice.
2017-10-09 20:28:39 +02:00
Dave Halter
8dba08eeb2
Small sys path refactoring.
2017-10-06 09:01:15 +02:00
Dave Halter
383f749026
Move the initial sys path generation into a new project class.
2017-10-02 20:19:55 +02:00
Dave Halter
3c75f27376
Move the base Context stuff to another module to keep context free for imports.
2017-09-30 16:46:07 +02:00
Dave Halter
5f613ece28
Move the namespace to a separate module.
2017-09-29 15:31:26 +02:00
Dave Halter
8f177eea07
Move the ModuleContext to a separate module.
2017-09-29 13:24:48 +02:00
Dave Halter
b74c8cb033
To be able to customize ContextSet, move a subclass to evaluate.context
2017-09-27 09:20:58 +02:00
Dave Halter
ee52cc7501
Fix most dynamic array issues.
2017-09-26 17:26:33 +02:00
Dave Halter
174eff5875
Replace a lot more of empty sets and unite calls.
2017-09-25 23:08:59 +02:00
Dave Halter
5328d1e700
Add a ContextSet.
...
This is not bug free yet, but it's going to be a good abstraction for a lot of small things.
2017-09-25 11:04:09 +02:00
Dave Halter
a433ee7a7e
Move common to evaluate.utils.
2017-09-20 20:33:01 +02:00
Dave Halter
0c01a3b823
The sys.modules implementation did not work properly with newly created files.
...
Fixes #886 .
2017-09-20 10:06:02 +02:00
Dave Halter
03584ff3f3
Imports can be executed twice without this.
2017-09-19 18:17:07 +02:00
Dave Halter
e389c61377
Relative imports with more than one level did not work
...
Fixes #784 .
2017-09-14 22:06:08 +02:00
Dave Halter
5ff7e3dbbe
Actually do goto when follow_imports is used
...
Fixes #945 .
2017-09-13 00:28:49 +02:00
Dave Halter
619acbd2ca
Goto didn't work well on imports in __init__.py files.
...
Fixes #956 .
2017-09-11 21:48:37 +02:00
Dave Halter
e85000b798
Replace memoize_default with two nicer functions.
2017-09-05 18:46:16 +02:00
Dave Halter
882f8029ea
Use split_lines and python_bytes_to_unicode directly.
2017-09-03 18:38:00 +02:00
Dave Halter
fe9be9fe09
source_to_unicode -> python_bytes_to_unicode.
2017-08-15 20:09:48 +02:00
Dave Halter
f9e31dc941
Refactor splitlines -> split_lines.
2017-08-15 19:55:50 +02:00
Dave Halter
b9271cf5a5
Use the parser_cache correctly.
2017-05-26 13:43:18 -04:00
Dave Halter
cd8932fbfc
Add a latest grammar to the evaluator and use it to avoid importing from parso import parse.
2017-05-24 00:37:36 -04:00
Dave Halter
f35f1b9676
Add the cache_path parameter to parso calls.
2017-05-20 10:08:48 -04:00
Dave Halter
50c7137437
splitlines and source_to_unicode are utils of parso.
2017-05-20 09:55:16 -04:00
Dave Halter
9bca3d39f5
Actually use parso now instead of Jedi.
2017-05-19 14:20:14 -04:00
Dave Halter
336b8a46d0
search_ancestor now uses *node_types as a parameter instead of a mix of tuple and simple string like isinstance.
2017-05-02 19:19:07 +02:00