Aldo Stracquadanio
3ef564847d
Simplified code for readability
...
Splitted import compatibility function definition for better readability
Simplified code for python 3.3 load_module implementation
2013-03-27 10:48:26 +00:00
Aldo Stracquadanio
be8ef33b69
Fixed caching issues
...
Fixed exception raised during cache reading
Switched cache hashing to hashlib
In python 3.3 the hash function is returning different hashes during
different executions of the application.
2013-03-27 10:48:13 +00:00
Aldo Stracquadanio
de849fbe8a
Fixed follow_definition test
2013-03-27 10:48:12 +00:00
Aldo Stracquadanio
d481a7aae4
Created find_module helper to handle compatibility with python 3.3
...
Moved package checking logic in follow_str function
Created find_module compatibility helper method
Conditional implementation of load_module for python 3.3
2013-03-27 10:47:29 +00:00
David Halter
6c998067e8
Merge pull request #177 from tkf/Generator-object-has-no-attribute-start_pos
...
Generator object has no attribute start_pos (added a failing test)
2013-03-21 11:06:21 -07:00
David Halter
6c65eaf14d
Merge pull request #186 from tkf/versioned-cache
...
Remove old version of FS cache automatically
2013-03-20 09:05:37 -07:00
Takafumi Arakaki
aca1cbfa4b
Use "jedi/cpython-27" instead of "jedi/2.7" for FS cache
2013-03-20 16:46:55 +01:00
Takafumi Arakaki
27d007adba
Compare version using "!="
...
Cache is not forward compatible.
2013-03-20 12:21:22 +01:00
Takafumi Arakaki
942b66ba5b
Separate directory for each Python version
2013-03-20 12:21:22 +01:00
Takafumi Arakaki
f8d3339f2f
Remove old version of FS cache automatically
2013-03-20 12:21:22 +01:00
David Halter
960dd38e2c
Merge pull request #185 from tkf/cPickle
...
Use cPickle if available
2013-03-19 21:32:22 -07:00
Takafumi Arakaki
8734e0efe2
Use cPickle if available
2013-03-19 20:33:15 +01:00
David Halter
09f39d891a
remove __all__ from api, because not needed, fixes #180
2013-03-18 08:25:14 +04:30
Takafumi Arakaki
d1150cfdae
List allowed attributes in Generator.__getattr__
2013-03-17 13:56:54 +01:00
David Halter
8c1ccd2800
Merge pull request #182 from tkf/Fix-Completion.follow_definition
...
Fix Completion.follow_definition
2013-03-17 03:48:22 -07:00
David Halter
e8d34c574f
Merge pull request #178 from tkf/no-duplicate-module
...
Add a test to make sure that the import hack works
2013-03-17 03:39:45 -07:00
David Halter
66fb7915c2
Merge pull request #179 from tkf/remove-known-failures-tag
...
Remove tags for known failures due to the import hack
2013-03-17 03:35:55 -07:00
Takafumi Arakaki
2cc6edfa7c
Fix Completion.follow_definition
2013-03-16 22:57:31 +01:00
Takafumi Arakaki
6a2e535bcb
Add er.Generator.__getattr__
2013-03-16 21:50:05 +01:00
Takafumi Arakaki
c25ee531a2
AttributeError: 'Generator' object has no attribute 'start_pos'
...
Running py.test raises this error:
```tb
test/test_api_classes.py:50: in <module>
> @pytest.mark.parametrize('definition', make_definitions())
test/test_api_classes.py:38: in make_definitions
> definitions += script.definition()
jedi/api_classes.py:44: in wrapper
> result = func(*args, **kwds)
jedi/api.py:274: in definition
> if not isinstance(s, imports.ImportPath._GlobalNamespace)])
jedi/api_classes.py:418: in __init__
> super(Definition, self).__init__(definition, definition.start_pos)
E AttributeError: 'Generator' object has no attribute 'start_pos'
```
2013-03-16 21:50:05 +01:00
Takafumi Arakaki
febc65be6f
Skip test_no_duplicate_modules for jedi.__init__
2013-03-16 21:28:27 +01:00
Takafumi Arakaki
4aac06eb86
Remove tags for known failures due to the import hack
2013-03-16 21:18:37 +01:00
Takafumi Arakaki
f5fee5f0df
Fix wrong imports
...
- "from _compatibility import ..." (not in circular imports)
- "from jedi import builtin" (one of circular imports)
- "api_classes = api.api_classes"
("from jedi import api_classes" is not supported)
2013-03-16 21:03:34 +01:00
Takafumi Arakaki
07ba6658dd
Add test_no_duplicate_modules
2013-03-16 20:44:00 +01:00
David Halter
cd513590ab
Merge pull request #176 from tkf/basedefinition-type
...
More detailed BaseDefinition.type (fixes #169 )
2013-03-15 10:36:53 -07:00
David Halter
89b6741539
Merge pull request #175 from davidhalter/absolute-import
...
Use Absolute Imports
2013-03-15 10:35:28 -07:00
David Halter
8be6b64bc7
add @tkf to main authors, concrats man - you earned it - more than enough.
2013-03-15 21:01:44 +04:30
Takafumi Arakaki
df08122639
Fix a failure when run with Python 3
2013-03-15 14:51:59 +01:00
Takafumi Arakaki
be33f0ad98
Fix previously failing test_follow_definition
2013-03-15 14:39:51 +01:00
Takafumi Arakaki
c8c1113c55
Test generator and lambda
2013-03-15 14:26:58 +01:00
Takafumi Arakaki
a0c796087a
Generate "param" definition in make_definitions
2013-03-15 14:24:42 +01:00
Takafumi Arakaki
956ad50276
Make more examples in make_definitions
2013-03-15 14:13:55 +01:00
Takafumi Arakaki
f791e96d9d
Fix failing test_basedefinition_type
2013-03-15 13:54:19 +01:00
Takafumi Arakaki
3caebcb5aa
Add test_basedefinition_type
2013-03-15 13:54:17 +01:00
Takafumi Arakaki
f70e425c4a
Lowercase the str returned by BaseDefinition.type
2013-03-15 13:08:55 +01:00
David Halter
8c51d1e53e
increase speed test limit a little bit, because it fails sometimes on travis
2013-03-15 16:31:35 +04:30
David Halter
7b6a4c9a2b
some corrections of imports
2013-03-15 16:01:23 +04:30
David Halter
9ad9c806bb
rename non-cycling imports to 'from jedi import ..'
2013-03-15 15:02:33 +04:30
David Halter
2f809d8066
Merge pull request #172 from tkf/test_modulepickling_change_cache_dir
...
ModulePickling should not save old cache when cache_directory is changed
2013-03-15 02:25:10 -07:00
David Halter
26eb7add23
Merge pull request #173 from tkf/gc-and-cache
...
Do not clear cache in __del__
2013-03-14 21:11:39 -07:00
David Halter
952b510c24
Merge pull request #171 from tkf/norecursedirs-fix
...
Use pytest_(un)configure to setup cache_directory
2013-03-14 21:01:36 -07:00
Takafumi Arakaki
6659a532ac
Remove --assert=plain
2013-03-15 00:25:10 +01:00
Takafumi Arakaki
7cf70a3f0a
Do not clear cache in __del__
...
Prior to this change, running
`py.test --assert=rewrite test/test_integration.py` fails with errors
due to:
```py
cls = <class 'jedi.recursion.ExecutionRecursionDecorator'>
@classmethod
def cleanup(cls):
> cls.parent_execution_funcs.pop()
E IndexError: pop from empty list
recursion.py:127: IndexError
```
Similar errors occurred in travis occasionally:
- https://travis-ci.org/davidhalter/jedi/jobs/5449831
- https://travis-ci.org/davidhalter/jedi/jobs/5512538
I think this is because GC calls __del__ at random point during
actual execution of ExecutionRecursionDecorator.__call__.
As --assert=rewrite works by AST dynamically, I guess that it
is harder for Python's GC to clean up code and therefore GC
happens sometime later. Although this is just a random guess,
as `tox -- --assert=rewrite` works with this patch now, I think
this is a good change.
2013-03-15 00:21:46 +01:00
Takafumi Arakaki
841d46684f
Skip test in Python 3. It is a known bug.
...
See: #161
2013-03-14 22:21:58 +01:00
Takafumi Arakaki
edc7148320
Fix test_modulepickling_change_cache_dir failure
2013-03-14 22:15:34 +01:00
Takafumi Arakaki
860cf7b974
Add test_modulepickling_change_cache_dir
2013-03-14 22:15:07 +01:00
Takafumi Arakaki
ee03f3ae0d
Use pytest_(un)configure to setup cache_directory
2013-03-14 20:43:10 +01:00
David Halter
22fa66b6e1
Merge pull request #168 from tkf/norecursedirs
...
Run doctests in the "main" py.test run
2013-03-14 12:09:57 -07:00
Takafumi Arakaki
95aed3c54e
Exclude docs directory from test search
2013-03-14 19:20:20 +01:00
David Halter
fbbdc50bb0
Merge pull request #164 from tkf/doc-api-classes
...
Document api_classes
2013-03-14 09:20:38 -07:00