immerrr
4eb3cf7921
Improve virtualenv support & egg-link resolution
...
- add sys_path= kwarg to Script & Evaluator constructors
- store sys_path for each evaluator instance
- replace get_sys_path with get_venv_path
- get_venv_path: use addsitedir to load .pth extension files
- get_venv_path: look for egg-link files in all directories in path
2015-10-26 13:03:42 +03:00
Dave Halter
844a011193
Replacing the types list with a types set. Some tests are failing, though.
2015-10-13 18:03:36 +02:00
Dave Halter
126f490f1e
Modules have now the name __main__ if they contain dots.
2015-04-28 17:29:42 +02:00
Dave Halter
657920baf5
Finally able to ditch the old namespace_packages implementation.
2015-04-28 02:03:17 +02:00
Dave Halter
0d406d27fd
Different __init__ file searching.
2015-04-28 01:58:49 +02:00
Dave Halter
b8bb258677
Get rid of get_importer and clean up imports in general.
2015-04-28 01:41:01 +02:00
Dave Halter
ef4b424cda
Replace pr with tree, #566 .
2015-04-28 01:34:31 +02:00
Dave Halter
84b774d9e1
Small refactorings.
2015-04-27 17:07:38 +02:00
Dave Halter
06d134a7c1
Finished changing the import logic. The sys.path calculations within Jedi are clearer now.
2015-04-25 22:45:08 +02:00
Dave Halter
fbb960423e
Remove legacy importer code.
2015-04-23 03:42:29 +02:00
Dave Halter
a7c4b5800b
Namespace packages work again. This time the same way as Python does it.
2015-04-23 03:36:46 +02:00
Dave Halter
039579b391
Improved static analysis for imports.
2015-04-23 02:43:49 +02:00
Dave Halter
f4f30841ec
change the return of _Importer.follow_file_system
2015-04-23 02:39:44 +02:00
Dave Halter
d04241b482
Goto should not include imports that cannot be followed.
2015-04-23 02:37:22 +02:00
Dave Halter
691e5a8969
Fix flask tests.
2015-04-22 03:58:44 +02:00
Dave Halter
29bd59a355
Following os.path should be possible again.
2015-04-22 03:35:18 +02:00
Dave Halter
dd3edd15f9
Remove legacy code from imports.
2015-04-22 03:22:54 +02:00
Dave Halter
05554a1c89
Fix some issues with import path errors.
2015-04-21 18:45:12 +02:00
Dave Halter
13267adfc2
Move the level calculation into the Importer.
2015-04-21 17:57:06 +02:00
Dave Halter
9b9049e574
Some small import changes that fix a few of the broken test cases.
2015-04-21 17:31:43 +02:00
Dave Halter
18c4b5f7dc
Add py__package__ to the ModuleWrapper, which makes relative imports easy to implement and fixed a lot of other things.
2015-04-21 16:12:24 +02:00
Dave Halter
77a37be83a
Add a py__path__ method to the ModuleWrapper, that behaves very similar to a package's __path__ attribute.
2015-04-20 16:21:00 +02:00
Dave Halter
df9452f210
Trying to change the import logic completely. We now have a sys.modules like cache.
2015-04-20 14:47:33 +02:00
Dave Halter
8fca3f78a1
Add a py__name__ call to modules. This makes listing the qualified names of modules possible (in combination with the module_name_cache). Fixes #519 .
2015-04-14 17:36:20 +02:00
Dave Halter
1195ed64ea
Fix a small issue in the import logic that caused tests to fail.
2015-04-09 01:43:50 +02:00
Dave Halter
474d390220
Use imp.get_suffixes to deal with __init__ files that are not .py files but .so etc. fixes #472
2015-04-08 02:41:59 +02:00
Dave Halter
26ecb16e5f
CompiledObject.type resembles now the Node.type values.
2015-01-09 01:33:59 +01:00
Dave Halter
0dc61292b9
Remove get_defined_names methods from evaluate representation objects.
2015-01-08 13:42:52 +01:00
Dave Halter
6d58fed0e8
Remove get_defined_names in favor of names_dict in the parser tree.
2015-01-08 13:38:03 +01:00
Dave Halter
705b569e32
Get rid of all get_names_of_scope calls.
2015-01-08 12:48:57 +01:00
Dave Halter
64ebfb0644
Usages/imports cleanup.
2014-12-18 03:22:46 +01:00
Dave Halter
c6315e0b45
todo updates.
2014-12-17 01:48:32 +01:00
Dave Halter
9431d89797
Imports cleanup.
2014-12-15 16:07:43 +01:00
Dave Halter
f2d35c3ff1
Reenable star import caching.
2014-12-15 15:19:22 +01:00
Dave Halter
77fdbac234
static analysis: Import tests working again.
2014-12-11 16:25:18 +01:00
Dave Halter
6818d3affa
Implement Import.is_nested method.
2014-12-11 16:17:07 +01:00
Dave Halter
003d1249c5
empty import statement completion.
2014-12-11 15:24:19 +01:00
Dave Halter
220610bbf4
Importer now handles follow rest as well.
2014-12-11 02:28:55 +01:00
Dave Halter
48d2e99e55
os.path handling.
2014-12-11 01:49:59 +01:00
Dave Halter
243fb8ef34
Small import fix.
2014-12-11 00:14:03 +01:00
Dave Halter
034d782e65
Last few on_import fixes.
2014-12-08 14:15:21 +01:00
Dave Halter
6cc4d71822
Import completion improvements.
2014-12-08 13:47:23 +01:00
Dave Halter
8868b87d42
Make imports stuff in API classes work. Now goto on imports follows even aliases.
2014-12-08 12:04:09 +01:00
Dave Halter
e3ab56504e
Fixed and simplified flask imports.
2014-12-07 18:11:05 +01:00
Dave Halter
db636c35ae
Error recovery should not delete parts of simple_stmt.
2014-12-07 18:04:55 +01:00
Dave Halter
33b39c2b5d
Don't use the old setup_function/teardown_function pytest stuff. It's very implicit and hard to understand.
2014-12-07 17:21:52 +01:00
Dave Halter
49b34b4d01
Stuff mostly related to namespace packages.
2014-12-07 16:51:54 +01:00
Dave Halter
f24a3bf997
Fix on_import tests.
2014-11-26 03:07:41 +01:00
Dave Halter
a940c31a86
Improvments to on import completion.
2014-11-26 02:13:24 +01:00
Dave Halter
149b4d8ad5
Import completion on syntactically correct imports.
2014-11-26 01:15:40 +01:00