[vim-jedi] Standard installation of vim-jedi is broken (#1190187)
Petr Hracek
phracek at fedoraproject.org
Thu Mar 19 13:40:44 UTC 2015
commit 4fedf5f59d8807f176f186c12872b7de12b5a353
Author: Petr Hracek <phracek at redhat.com>
Date: Thu Mar 19 14:39:12 2015 +0100
Standard installation of vim-jedi is broken (#1190187)
Signed-off-by: Petr Hracek <phracek at redhat.com>
vim-jedi-broken-error.patch | 45 +++++++++++++++++++++++++++++++++++++++++++++
vim-jedi.spec | 8 +++++++-
2 files changed, 52 insertions(+), 1 deletion(-)
---
diff --git a/vim-jedi-broken-error.patch b/vim-jedi-broken-error.patch
new file mode 100644
index 0000000..ba980c6
--- /dev/null
+++ b/vim-jedi-broken-error.patch
@@ -0,0 +1,45 @@
+diff --git a/jedi_vim.py b/jedi_vim.py
+index 35df53a..6ae03f8 100644
+--- a/jedi_vim.py
++++ b/jedi_vim.py
+@@ -6,12 +6,15 @@ with VIM.
+ import traceback # for exception output
+ import re
+ import os
++import sys
+ from shlex import split as shsplit
+
+ import vim
+ import jedi
+-import jedi.keywords
+-from jedi._compatibility import unicode, is_py3k
++
++is_py3 = sys.version_info[0] >= 3
++if is_py3:
++ unicode = str
+
+
+ def catch_and_print_exceptions(func):
+@@ -62,7 +65,7 @@ class PythonToVimStr(unicode):
+ """ Vim has a different string implementation of single quotes """
+ __slots__ = []
+ def __new__(cls, obj, encoding='UTF-8'):
+- if is_py3k or isinstance(obj, unicode):
++ if is_py3 or isinstance(obj, unicode):
+ return unicode.__new__(cls, obj)
+ else:
+ return unicode.__new__(cls, obj, encoding)
+@@ -468,6 +471,12 @@ def escape_file_path(path):
+ def print_to_stdout(level, str_out):
+ print(str_out)
+
+-if not hasattr(jedi, '__version__') or jedi.__version__ < (0, 7, 0):
++
++version = jedi.__version__
++if isinstance(version, str):
++ # the normal use case, now.
++ from jedi import utils
++ version = utils.version_info()
++if version < (0, 7):
+ echo_highlight('Please update your Jedi version, it is to old.')
+
diff --git a/vim-jedi.spec b/vim-jedi.spec
index 42aa147..11696fa 100644
--- a/vim-jedi.spec
+++ b/vim-jedi.spec
@@ -3,7 +3,7 @@
Name: vim-jedi
Version: 0.7.0
-Release: 6%{?dist}
+Release: 7%{?dist}
Summary: The Jedi vim plugin
Group: Applications/Editors
@@ -13,6 +13,7 @@ Source0: https://github.com/davidhalter/jedi-vim/archive/%{version}
Source1: %{name}.metainfo.xml
Requires: python-jedi
Requires: vim-common
+Patch0: vim-jedi-broken-error.patch
BuildArch: noarch
@@ -22,6 +23,8 @@ vim-jedi is a VIM binding to the awesome auto completion library Jedi.
%prep
%setup -q -n jedi-vim-%{version}
+%patch0 -p1 -b .broken
+
cp %{SOURCE1} .
%build
@@ -45,6 +48,9 @@ install -m 644 %{SOURCE1} %{buildroot}%{_datadir}/appdata/
%{_datadir}/appdata/%{name}.metainfo.xml
%changelog
+* Thu Mar 19 2015 Petr Hracek <phracek at redhat.com> - 0.7.0-7
+- Standard installation of vim-jedi is broken (#1190187)
+
* Thu Feb 26 2015 Petr Hracek <phracek at redhat.com> - 0.7.0-6
- Add Addon metadata for GNOME Software (#1128812)
- Previous fix was totally wrong
More information about the scm-commits
mailing list