Skip to content

Commit

Permalink
Merge pull request #4104 from ccordoba12/jedi-09
Browse files Browse the repository at this point in the history
PR: Pin Jedi to 0.9.0
  • Loading branch information
ccordoba12 authored Feb 4, 2017
2 parents 53b5d71 + e707168 commit 0e08506
Show file tree
Hide file tree
Showing 9 changed files with 164 additions and 296 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ a Python version greater than 2.7 (Python 3.2 is not supported anymore).
* **Python** 2.7 or 3.3+
* **PyQt5** 5.2+ or **PyQt4** 4.6+: PyQt5 is recommended.
* **qtconsole** 4.2.0+: Enhanced Python interpreter.
* **Rope** and **Jedi**: Editor code completion, calltips
* **Rope** and **Jedi** 0.9.0: Editor code completion, calltips
and go-to-definition.
* **Pyflakes**: Real-time code analysis.
* **Sphinx**: Rich text mode for the Help pane.
Expand Down
2 changes: 1 addition & 1 deletion continuous_integration/conda-recipes/spyder/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ requirements:
- rope 0.9.* # [py34 or py35]
- rope # [py27]
- pyflakes
- jedi
- jedi 0.9.*
- qtconsole
- nbconvert
- pygments
Expand Down
2 changes: 1 addition & 1 deletion doc/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ The requirements to run Spyder are:
enhanced Python interpreter.

* `Rope <http://rope.sourceforge.net/>`_ >=0.9.4 and
`Jedi <http://jedi.jedidjah.ch/en/latest/>` 0.8.1 -- for code completion,
`Jedi <http://jedi.jedidjah.ch/en/latest/>` 0.9.0 -- for code completion,
go-to-definition and calltips on the Editor.

* `Pyflakes <http://pypi.python.org/pypi/pyflakes>`_ -- for real-time
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ def run(self):

install_requires = [
'rope_py3k' if PY3 else 'rope>=0.9.4',
'jedi',
'jedi==0.9.0',
'pyflakes',
'pygments>=2.0',
'qtconsole>=4.2.0',
Expand Down
285 changes: 0 additions & 285 deletions spyder/utils/introspection/docstrings.py

This file was deleted.

13 changes: 8 additions & 5 deletions spyder/utils/introspection/jedi_patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,11 @@ def apply():
raise ImportError("jedi %s can't be patched" % jedi.__version__)

# [1] Adding numpydoc type returns to docstrings
from spyder.utils.introspection import docstrings
jedi.evaluate.representation.docstrings = docstrings
from spyder.utils.introspection import numpy_docstr
jedi.evaluate.representation.docstrings._search_param_in_numpydocstr = \
numpy_docstr._search_param_in_numpydocstr
jedi.evaluate.representation.docstrings.find_return_types = \
numpy_docstr.find_return_types

# [2] Adding type returns for compiled objects in jedi
# Patching jedi.evaluate.compiled.CompiledObject...
Expand All @@ -42,8 +45,8 @@ def _execute_function(self, evaluator, params):
if self.type != 'funcdef':
return
# patching docstrings here
from spyder.utils.introspection import docstrings
types = docstrings.find_return_types(evaluator, self)
from spyder.utils.introspection import numpy_docstr
types = numpy_docstr.find_return_types(evaluator, self)
if types:
for result in types:
debug.dbg('docstrings type return: %s in %s', result, self)
Expand Down Expand Up @@ -111,7 +114,7 @@ def calculate_children(evaluator, children):
# [4] Fixing introspection for matplotlib Axes objects
# Patching jedi.evaluate.precedence...
from jedi.evaluate.representation import (
tree, InstanceName, Instance, compiled, FunctionExecution, InstanceElement)
InstanceName, Instance, compiled, FunctionExecution, InstanceElement)

def get_instance_el(evaluator, instance, var, is_class_var=False):
"""
Expand Down
2 changes: 1 addition & 1 deletion spyder/utils/introspection/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
_("Editor's code completion, go-to-definition and help"),
required_version=ROPE_REQVER)

JEDI_REQVER = '>=0.8.1'
JEDI_REQVER = '=0.9.0'
dependencies.add('jedi',
_("Editor's code completion, go-to-definition and help"),
required_version=JEDI_REQVER)
Expand Down
Loading

0 comments on commit 0e08506

Please sign in to comment.