From 3189ba76625b45171a30757ed6288d78654137b6 Mon Sep 17 00:00:00 2001 From: Phillip Berndt Date: Mon, 18 Aug 2014 17:22:11 +0200 Subject: [PATCH 1/5] Add type check to jedi.Interpreter() namespace argument and remove default value --- AUTHORS.txt | 1 + jedi/api/__init__.py | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/AUTHORS.txt b/AUTHORS.txt index 668d6576..edf676d7 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -26,5 +26,6 @@ Jorgen Schaefer (@jorgenschaefer) Fredrik Bergroth (@fbergroth) Mathias Fußenegger (@mfussenegger) Syohei Yoshida (@syohex) +Phillip Berndt (@phillipberndt) Note: (@user) means a github user name. diff --git a/jedi/api/__init__.py b/jedi/api/__init__.py index 1aa73f7b..1a2a09d6 100644 --- a/jedi/api/__init__.py +++ b/jedi/api/__init__.py @@ -621,7 +621,7 @@ class Interpreter(Script): upper """ - def __init__(self, source, namespaces=[], **kwds): + def __init__(self, source, namespaces, **kwds): """ Parse `source` and mixin interpreted Python objects from `namespaces`. @@ -635,6 +635,10 @@ class Interpreter(Script): If `line` and `column` are None, they are assumed be at the end of `source`. """ + if type(namespaces) is not list or len(namespaces) == 0 or \ + any([type(x) is not dict for x in namespaces]): + raise TypeError("namespaces must be a non-empty list of dict") + super(Interpreter, self).__init__(source, **kwds) self.namespaces = namespaces From df4845790e365fdceb9fa1b3c07fb446c2330152 Mon Sep 17 00:00:00 2001 From: abingham Date: Mon, 27 Oct 2014 16:12:10 +0200 Subject: [PATCH 2/5] Added link to emacs-ycmd. This is another option for using jedi in emacs via ycmd. --- README.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 5555936c..73b14997 100644 --- a/README.rst +++ b/README.rst @@ -34,7 +34,7 @@ me. Jedi can be used with the following editors: - Vim (jedi-vim_, YouCompleteMe_) -- Emacs (Jedi.el_, elpy_, anaconda-mode_) +- Emacs (Jedi.el_, elpy_, anaconda-mode_, ycmd_) - Sublime Text (SublimeJEDI_ [ST2 + ST3], anaconda_ [only ST3]) - SynWrite_ - TextMate_ (Not sure if it's actually working) @@ -145,6 +145,7 @@ For more detailed information visit the `testing documentation .. _Jedi.el: https://github.com/tkf/emacs-jedi .. _elpy: https://github.com/jorgenschaefer/elpy .. _anaconda-mode: https://github.com/proofit404/anaconda-mode +.. _ycmd: https://github.com/abingham/emacs-ycmd .. _sublimejedi: https://github.com/srusskih/SublimeJEDI .. _anaconda: https://github.com/DamnWidget/anaconda .. _SynWrite: http://uvviewsoft.com/synjedi/ From 672982a2f52597afe381ab1d470ec983043711ac Mon Sep 17 00:00:00 2001 From: Marc Abramowitz Date: Fri, 2 Jan 2015 11:07:01 -0800 Subject: [PATCH 3/5] setup.py: Add python3.4 classifier --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index 97cb3abf..c7caafe3 100755 --- a/setup.py +++ b/setup.py @@ -40,6 +40,7 @@ setup(name='jedi', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.2', 'Programming Language :: Python :: 3.3', + 'Programming Language :: Python :: 3.4', 'Topic :: Software Development :: Libraries :: Python Modules', 'Topic :: Text Editors :: Integrated Development Environments (IDE)', 'Topic :: Utilities', From 91710e0310e136018fc491c30dd5b0c8c6134f2f Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Mon, 5 Jan 2015 13:15:34 +0100 Subject: [PATCH 4/5] Versions should be PEP440 compatible, fixes #521. --- jedi/__init__.py | 2 +- jedi/utils.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/jedi/__init__.py b/jedi/__init__.py index a8439f8c..45ba70ea 100644 --- a/jedi/__init__.py +++ b/jedi/__init__.py @@ -34,7 +34,7 @@ As you see Jedi is pretty simple and allows you to concentrate on writing a good text editor, while still having very good IDE features for Python. """ -__version__ = '0.8.1-final0' +__version__ = '0.8.1' from jedi.api import Script, Interpreter, NotFoundError, set_debug_function from jedi.api import preload_module, defined_names diff --git a/jedi/utils.py b/jedi/utils.py index 9148c773..6b48ef49 100644 --- a/jedi/utils.py +++ b/jedi/utils.py @@ -108,7 +108,7 @@ def version_info(): Returns a namedtuple of Jedi's version, similar to Python's ``sys.version_info``. """ - Version = namedtuple('Version', 'major, minor, micro, releaselevel, serial') + Version = namedtuple('Version', 'major, minor, micro') from jedi import __version__ tupl = re.findall('[a-z]+|\d+', __version__) return Version(*[x if i == 3 else int(x) for i, x in enumerate(tupl)]) From f348aaeab6053255cf9571be9ab39e54d9570cc1 Mon Sep 17 00:00:00 2001 From: felipeacsi Date: Fri, 16 Jan 2015 14:38:39 -0300 Subject: [PATCH 5/5] Updated Arch Linux installation --- docs/docs/installation.rst | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/docs/installation.rst b/docs/docs/installation.rst index 6d5fa42c..c6acbe96 100644 --- a/docs/docs/installation.rst +++ b/docs/docs/installation.rst @@ -30,18 +30,20 @@ System-wide installation via a package manager Arch Linux ~~~~~~~~~~ -You can install |jedi| directly from official AUR packages: +You can install |jedi| directly from official Arch Linux packages: -- `python-jedi `__ (Python 3) -- `python2-jedi `__ (Python 2) +- `python-jedi `__ + (Python 3) +- `python2-jedi `__ + (Python 2) The specified Python version just refers to the *runtime environment* for |jedi|. Use the Python 2 version if you're running vim (or whatever editor you use) under Python 2. Otherwise, use the Python 3 version. But whatever version you choose, both are able to complete both Python 2 and 3 *code*. -(There is also a packaged version of the vim plugin available: `vim-jedi at AUR -`__.) +(There is also a packaged version of the vim plugin available: `vim-jedi at +Arch Linux`__.) Debian ~~~~~~