Dave Halter
eb27c64c71
Make os.path import issues clearer
2018-11-25 19:25:21 +01:00
Dave Halter
fbc327b960
Refactor py__get__ support pretty heavily
2018-11-01 19:09:07 +01:00
Dave Halter
b14b3d1012
Better debugging
2018-10-06 16:42:02 +02:00
Dave Halter
ad83f5419a
Merge branch 'master' into typeshed
2018-10-02 19:07:59 +02:00
Dave Halter
c24eb4bd67
Fix tensorflow issues with a few hacks (temporary), fixes #1195
2018-10-02 00:52:11 +02:00
Dave Halter
75a02a13d9
Use ContextSet closer to they way how Python's set works
2018-09-24 20:30:57 +02:00
Dave Halter
e3203ebaa5
Try to change the module cache
2018-09-02 13:06:36 +02:00
Dave Halter
4e75a35468
Fix stub searching for nested modules
2018-07-27 10:14:37 +02:00
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
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
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
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
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
90a226f898
All modules now have a code_lines attribute, see #1062
2018-03-16 10:20:26 +01:00
Dave Halter
81a30d61d6
Fix Python 2 old-school relative imports
2018-02-16 20:53:31 +01:00
Dave Halter
039e7ba07b
Some more sys path corrections.
...
The sys path should be defined more or less in the beginning and not be different for all modules
2018-02-16 14:39:01 +01:00
Dave Halter
6a11b7d89e
Generalize the use of smart import paths
...
Now a lot more parts of the current scripts path are used as a sys path.
2018-02-16 12:40:31 +01:00
Dave Halter
30cfdee325
Some simplifications
2018-02-16 10:21:43 +01:00
Dave Halter
9177c120f4
Merge the implicit namespace improvement (pkgutils.itermodules modification)
...
There are still a few issues that need to be addressed.
2018-02-15 20:08:58 +01:00
Dave Halter
76df356628
Relative imports should be working again even when used in more special occasions. Fixes #973
...
There are more fixes needed. Some things are just very unclean and might lead to further bugs.
2018-02-15 14:10:01 +01:00
Dave Halter
276f2d0b52
parent_module is not needed for loading modules
2018-02-14 20:42:53 +01:00
Dave Halter
2a56323c16
Try to avoid CachedMetaClass for modules
2018-02-13 20:47:43 +01:00
Dave Halter
36699b77b2
DOn't check the parser cache, that's parso's responsibility
2018-02-13 19:19:00 +01:00
Dave Halter
a52b6edd01
Better module loading
2018-02-12 21:17:21 +01:00
Dave Halter
a33cbc8ae3
Try to put all module loading in one place including namespace packages
2018-02-12 20:49:45 +01:00
Dave Halter
9fec494e84
Unify load_module access
2018-02-12 20:39:42 +01:00
Dave Halter
514eaf89c3
Prepare a test to eventually solve a relative import problem
2018-02-12 20:33:48 +01:00
Dave Halter
26774c79fb
Add a module cache that has a bit more capabilites
2018-02-10 21:21:25 +01:00
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
Maxim Novikov
78cbad0d08
Fix implicit namespace autocompletion. Resolves : #959
2018-01-02 18:17:48 +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