summaryrefslogtreecommitdiff
path: root/dev-python/python-language-server/files/pyls-jedi-18.patch
diff options
context:
space:
mode:
authorLiguros - Gitlab CI/CD [develop] <gitlab@liguros.net>2021-04-07 01:52:55 +0000
committerLiguros - Gitlab CI/CD [develop] <gitlab@liguros.net>2021-04-07 01:52:55 +0000
commite0f0cfbd0b5786b9576a76b717018b5bdcafbde8 (patch)
tree2f3a28d6cbf0e0a6cd119e07bda0297b1ccb647d /dev-python/python-language-server/files/pyls-jedi-18.patch
parent1b9c706bdbbcaa877c2d7ba7d7a984beda2c5163 (diff)
downloadbaldeagleos-repo-e0f0cfbd0b5786b9576a76b717018b5bdcafbde8.tar.gz
baldeagleos-repo-e0f0cfbd0b5786b9576a76b717018b5bdcafbde8.tar.xz
baldeagleos-repo-e0f0cfbd0b5786b9576a76b717018b5bdcafbde8.zip
Adding metadata
Diffstat (limited to 'dev-python/python-language-server/files/pyls-jedi-18.patch')
-rw-r--r--dev-python/python-language-server/files/pyls-jedi-18.patch68
1 files changed, 68 insertions, 0 deletions
diff --git a/dev-python/python-language-server/files/pyls-jedi-18.patch b/dev-python/python-language-server/files/pyls-jedi-18.patch
new file mode 100644
index 000000000000..1410f3a81dd7
--- /dev/null
+++ b/dev-python/python-language-server/files/pyls-jedi-18.patch
@@ -0,0 +1,68 @@
+From 40afab312a6bf0dcd620c82e59555ea2967aacdf Mon Sep 17 00:00:00 2001
+From: bnavigator <code@bnavigator.de>
+Date: Tue, 5 Jan 2021 01:17:33 +0100
+Subject: [PATCH 1/2] 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"',
+
+From e442467312fe967bff5f893b7e3f92da133182c8 Mon Sep 17 00:00:00 2001
+From: bnavigator <code@bnavigator.de>
+Date: Tue, 5 Jan 2021 01:37:25 +0100
+Subject: [PATCH 2/2] Curse you Python 2 on Windows: os.path.samefile not
+ implemented
+
+---
+ pyls/plugins/symbols.py | 10 ++++++++--
+ 1 file changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/pyls/plugins/symbols.py b/pyls/plugins/symbols.py
+index 69a09fe9..ef8e7fb8 100644
+--- a/pyls/plugins/symbols.py
++++ b/pyls/plugins/symbols.py
+@@ -36,8 +36,14 @@ def pyls_document_symbols(config, document):
+ if (not sym_full_name.startswith(module_name) and
+ not sym_full_name.startswith('__main__')):
+ continue
+-
+- if _include_def(d) and os.path.samefile(document.path, d.module_path):
++ try:
++ docismodule = os.path.samefile(document.path, d.module_path)
++ except AttributeError:
++ # Python 2 on Windows has no .samefile, but then these are
++ # strings for sure
++ docismodule = document.path == d.module_path
++
++ if _include_def(d) and docismodule:
+ tuple_range = _tuple_range(d)
+ if tuple_range in exclude:
+ continue