1
0
forked from VimPlug/jedi
Commit Graph

56 Commits

Author SHA1 Message Date
Sergey Glazyrin
c2874ff84a fix for #122 2016-01-26 22:54:15 +01:00
Dave Halter
fbe26ab64a Importlib might raise a ValueError. Fix #491. 2015-04-13 15:12:46 +02:00
Dave Halter
72fd190149 unicode strings should not raise an error if used in repr.
Python 2 doesn't allow unicode objects in __repr__ methods. Therefore we need to encode them as utf-8 bytes.
2015-03-25 23:42:52 +01:00
Dave Halter
468ff59c1c Remove hasattr/next from _compatibility (not used anymore), thanks @dongweiming for noticing. 2015-03-06 00:25:42 +01:00
Dave Halter
e6b9111749 Python 2.7 compatibility. 2015-01-13 02:12:49 +01:00
Dave Halter
f4a508ac53 handle *args arguments the right way. 2014-05-29 20:53:51 +02:00
Dave Halter
289dbc8629 Merge branch 'dev' of github.com:davidhalter/jedi into dev 2014-04-25 15:03:36 +02:00
Jorgen Schaefer
9ed0dc4861 Always load source files in binary mode.
Source files can be in any coding system, provided Python can
read a coding: line at the beginning of the file. So source files
should be loaded in binary format and decoded according to that
line, not assumed to be in the default coding system.

Fixes #398.
2014-04-24 11:10:59 +02:00
Dave Halter
4ae99256be py3.0, py3.1 and py32 don't support unicode literals. Support those. 2014-04-22 16:00:13 +02:00
ColinDuquesnoy
d6187a4e23 Fix UnicodeDecodeError
Open binary file in binary mode. This happens in py34 because they
fixed the missing ``get_filename`` attribute of ExtensionLoader
2014-03-18 19:19:35 +01:00
Dave Halter
c5fcebde82 changed _compatibility.utf8 -> 'u' and removed a lot of the issues with the now enforced unicode source input of the parser 2014-02-23 11:29:00 +01:00
Dave Halter
5478e50f8b Merge branch 'dev' of github.com:davidhalter/jedi into dev 2014-02-21 17:52:44 +01:00
Dave Halter
9c2fcfffd7 StringIo is now always used as part of the io library 2014-02-21 17:52:09 +01:00
ColinDuquesnoy
18a31dcbf1 Fix read mode for pyc files
Now all test should pass on travis.
2014-02-18 19:00:55 +01:00
ColinDuquesnoy
a75773cf9f Fix import of compiled module with python3.
This at least fix #331
2014-02-17 09:08:30 +01:00
Dave Halter
99882724da is_py3k -> is_py3 2014-01-14 11:43:56 +01:00
Dave Halter
a6e49f2680 compatibility improvements -> use reduce from functools 2014-01-14 11:31:01 +01:00
Dave Halter
d40030c14e disable a test for py26. 2013-12-27 02:40:52 +01:00
David Halter
873fc16247 py33 fix for an undefined name 2013-10-11 23:37:31 +04:30
David Halter
566d1023ee don't load builtin modules, if not necessary in python3.3 2013-09-14 23:15:41 +04:30
David Halter
a2ceaf1987 fixed import problems in python3.3 2013-09-14 23:12:09 +04:30
David Halter
c3ba7d2ae8 remove except only clauses 2013-09-06 00:02:32 +04:30
David Halter
9a3ea38b1c use builtin repl completion after all, but written by us not the std lib module, which doesn't seem to work really, #280 2013-08-15 12:47:10 +04:30
David Halter
f93226420e fix a few debugging problems 2013-08-11 20:10:52 +04:30
David Halter
29f89cc75a finally fixed a unicode problem that existed for a longer time 2013-07-18 16:55:19 +02:00
Laurens Van Houtven
ad932815b9 PEP8 whitespace fixes 2013-07-10 18:55:48 +02:00
Laurens Van Houtven
fd87e8af2a Refactor the way module_path, module_file and is_package are computed to be a bit more legible 2013-06-20 22:36:16 +02:00
Laurens Van Houtven
1b0822743c Clean up find_module_py33 loader finding 2013-06-20 22:05:08 +02:00
Laurens Van Houtven
f171617766 Raise a nicer exception instance instead of raising an exception class 2013-06-20 21:40:37 +02:00
Laurens Van Houtven
44b1390d80 Clean up find_module_pre_py33 2013-06-20 21:35:56 +02:00
Laurens Van Houtven
68f9cdd884 Pick find_module implementation statically 2013-06-20 21:08:33 +02:00
Laurens Van Houtven
e201f89a77 Remove double reduce import 2013-06-20 21:08:33 +02:00
David Halter
6204cb740b merge with dev branch 2013-05-03 01:28:50 +04:30
Danilo Bargen
b3d9b6ce69 Removed py25 related code (fixes #206) 2013-04-27 16:47:40 +02:00
Danilo Bargen
86d775324b Fix most flake8 issues (fixes #205) 2013-04-27 15:40:36 +02:00
David Halter
cf49bdc9ab merge of tokenizer/dev branch 2013-04-20 19:23:15 +04:30
David Halter
bafb17001b fix encoding problems with terminal 2013-04-13 15:57:28 +04:30
Aldo Stracquadanio
124595de6e Making it nicer
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
2013-03-27 10:49:43 +00:00
Aldo Stracquadanio
0b67a08e48 Using PathFinder rather than find_loader to correctly handle paths
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
2013-03-27 10:49:21 +00:00
Aldo Stracquadanio
07ec134bc9 Adding python 3.3 to test environment, mani fixes
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
2013-03-27 10:48:56 +00:00
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
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
Takafumi Arakaki
93bd00bba4 Document rethrow_uncaught/reraise 2013-03-13 23:50:40 +01:00
Takafumi Arakaki
e42ff9e762 Add common.rethrow_uncaught 2013-03-13 23:21:15 +01:00
Danilo Bargen
ea9a667425 Fixed issue with repr encoding (fixes davidhalter/jedi-vim#94) 2013-02-14 21:10:06 +01:00
David Halter
27b162346a _compatibility docstring 2013-02-06 00:14:29 +01:00
David Halter
1017db903c basic pickle implementation #102 2013-01-11 22:00:03 +01:00
David Halter
5f76ffdfe8 py3k/py2.5 compatibility, and a bugfix 2012-12-16 04:03:46 +01:00
Takafumi Arakaki
8b31117faf Add a test for multi-byte string source 2012-11-10 19:55:56 +01:00