From 72aa12e1255752046e4005c759fab82c69074343 Mon Sep 17 00:00:00 2001 From: Lorem Date: Fri, 25 Jun 2021 13:29:11 +0530 Subject: [PATCH] python3-language-server: fix compatibility with jedi 0.18.0 Project seems to be unmaintained at the moment. There's an active fork at https://github.com/python-lsp/python-lsp-server that we can switch to in future. --- .../patches/jedi_compat.patch | 37 +++++++++++++++++++ srcpkgs/python3-language-server/template | 2 +- 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/python3-language-server/patches/jedi_compat.patch diff --git a/srcpkgs/python3-language-server/patches/jedi_compat.patch b/srcpkgs/python3-language-server/patches/jedi_compat.patch new file mode 100644 index 000000000000..52e7e3c59abe --- /dev/null +++ b/srcpkgs/python3-language-server/patches/jedi_compat.patch @@ -0,0 +1,37 @@ +https://github.com/palantir/python-language-server/pull/901 + +From: bnavigator +Date: Tue, 5 Jan 2021 01:17:33 +0100 +Subject: [PATCH] bump jedi compatibility: compare to Path-like object + +--- + pyls/plugins/symbols.py | 2 +- + setup.py | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/pyls/plugins/symbols.py b/pyls/plugins/symbols.py +index 6468dd83..69a09fe9 100644 +--- a/pyls/plugins/symbols.py ++++ b/pyls/plugins/symbols.py +@@ -37,7 +37,7 @@ def pyls_document_symbols(config, document): + not sym_full_name.startswith('__main__')): + continue + +- if _include_def(d) and document.path == d.module_path: ++ if _include_def(d) and os.path.samefile(document.path, d.module_path): + tuple_range = _tuple_range(d) + if tuple_range in exclude: + continue +diff --git a/setup.py b/setup.py +index 12782990..99d2b312 100755 +--- a/setup.py ++++ b/setup.py +@@ -10,7 +10,7 @@ + 'configparser; python_version<"3.0"', + 'future>=0.14.0; python_version<"3"', + 'backports.functools_lru_cache; python_version<"3.2"', +- 'jedi>=0.17.2,<0.18.0', ++ 'jedi>=0.17.2,<0.19.0', + 'python-jsonrpc-server>=0.4.0', + 'pluggy', + 'ujson<=2.0.3 ; platform_system!="Windows" and python_version<"3.0"', diff --git a/srcpkgs/python3-language-server/template b/srcpkgs/python3-language-server/template index 4585a7381de1..265e4798dcbf 100644 --- a/srcpkgs/python3-language-server/template +++ b/srcpkgs/python3-language-server/template @@ -1,7 +1,7 @@ # Template file for 'python3-language-server' pkgname=python3-language-server version=0.36.1 -revision=1 +revision=2 wrksrc="${pkgname/3}-${version}" build_style=python3-module hostmakedepends="python3-setuptools"