Fixed typo in docstring and added some comments in find_module_py33
Removed a test that is not compatible with python 3.3
Better variable names in find_module implementation(s)
Removed variable assignation in favor of direct return statement
Using PathFinder rather than find_loader to correctly handle from ... import ...
Moved away from find_loader in favour of PathFinder also when using sys.path
Added python 3.3 to test-suite
Removed unused import
Removed unused import
Migrated to EAFP for attribute checking
Bumped version of ModulePickling for migration to hashlib
Added py33 environment to tox
Fixed issue with package importing on python 3.3
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.
Moved package checking logic in follow_str function
Created find_module compatibility helper method
Conditional implementation of load_module for python 3.3
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'
```
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.