summaryrefslogtreecommitdiffstats
path: root/contrib/python/jedi
diff options
context:
space:
mode:
authormaxim-yurchuk <[email protected]>2024-10-09 12:29:46 +0300
committermaxim-yurchuk <[email protected]>2024-10-09 13:14:22 +0300
commit9731d8a4bb7ee2cc8554eaf133bb85498a4c7d80 (patch)
treea8fb3181d5947c0d78cf402aa56e686130179049 /contrib/python/jedi
parenta44b779cd359f06c3ebbef4ec98c6b38609d9d85 (diff)
publishFullContrib: true for ydb
<HIDDEN_URL> commit_hash:c82a80ac4594723cebf2c7387dec9c60217f603e
Diffstat (limited to 'contrib/python/jedi')
-rw-r--r--contrib/python/jedi/py2/.yandex_meta/yamaker.yaml2
-rw-r--r--contrib/python/jedi/py2/patches/01-arcadia.patch46
-rw-r--r--contrib/python/jedi/py3/.yandex_meta/yamaker.yaml2
-rw-r--r--contrib/python/jedi/py3/patches/01-arcadia.patch46
4 files changed, 96 insertions, 0 deletions
diff --git a/contrib/python/jedi/py2/.yandex_meta/yamaker.yaml b/contrib/python/jedi/py2/.yandex_meta/yamaker.yaml
new file mode 100644
index 00000000000..d9c4226d835
--- /dev/null
+++ b/contrib/python/jedi/py2/.yandex_meta/yamaker.yaml
@@ -0,0 +1,2 @@
+requirements:
+ - setuptools
diff --git a/contrib/python/jedi/py2/patches/01-arcadia.patch b/contrib/python/jedi/py2/patches/01-arcadia.patch
new file mode 100644
index 00000000000..48f5d781a01
--- /dev/null
+++ b/contrib/python/jedi/py2/patches/01-arcadia.patch
@@ -0,0 +1,46 @@
+--- contrib/python/jedi/py2/jedi/evaluate/compiled/fake.py (index)
++++ contrib/python/jedi/py2/jedi/evaluate/compiled/fake.py (working tree)
+@@ -3,22 +3,26 @@ Loads functions that are mixed in to the standard library. E.g. builtins are
+ written in C (binaries), but my autocompletion only understands Python code. By
+ mixing in Python code, the autocompletion should work much better for builtins.
+ """
+-
++import sys
+ import os
+ from itertools import chain
+
++import __res
++
+ from jedi._compatibility import unicode
+
+ fake_modules = {}
+
+
+ def _get_path_dict():
+- path = os.path.dirname(os.path.abspath(__file__))
++ path = os.path.dirname(__file__)
+ base_path = os.path.join(path, 'fake')
+ dct = {}
+- for file_name in os.listdir(base_path):
+- if file_name.endswith('.pym'):
+- dct[file_name[:-4]] = os.path.join(base_path, file_name)
++ for file_name in __res.resfs_files():
++ if sys.version_info[0] == 3:
++ file_name = str(file_name, 'ascii')
++ if file_name.startswith(base_path) and file_name.endswith('.pym'):
++ dct[file_name[len(base_path) + 1:-4]] = file_name
+ return dct
+
+
+@@ -45,8 +49,9 @@ def _load_faked_module(evaluator, module_name):
+ fake_modules[module_name] = None
+ return
+
+- with open(path) as f:
+- source = f.read()
++ if sys.version_info[0] == 3:
++ path = bytes(path, 'ascii')
++ source = __res.resfs_read(path)
+
+ fake_modules[module_name] = m = evaluator.latest_grammar.parse(unicode(source))
+
diff --git a/contrib/python/jedi/py3/.yandex_meta/yamaker.yaml b/contrib/python/jedi/py3/.yandex_meta/yamaker.yaml
new file mode 100644
index 00000000000..d9c4226d835
--- /dev/null
+++ b/contrib/python/jedi/py3/.yandex_meta/yamaker.yaml
@@ -0,0 +1,2 @@
+requirements:
+ - setuptools
diff --git a/contrib/python/jedi/py3/patches/01-arcadia.patch b/contrib/python/jedi/py3/patches/01-arcadia.patch
new file mode 100644
index 00000000000..f661318413a
--- /dev/null
+++ b/contrib/python/jedi/py3/patches/01-arcadia.patch
@@ -0,0 +1,46 @@
+--- contrib/python/jedi/py3/jedi/evaluate/compiled/fake.py (index)
++++ contrib/python/jedi/py3/jedi/evaluate/compiled/fake.py (working tree)
+@@ -3,22 +3,26 @@ Loads functions that are mixed in to the standard library. E.g. builtins are
+ written in C (binaries), but my autocompletion only understands Python code. By
+ mixing in Python code, the autocompletion should work much better for builtins.
+ """
+-
++import sys
+ import os
+ from itertools import chain
+
++import __res
++
+ from jedi._compatibility import unicode
+
+ fake_modules = {}
+
+
+ def _get_path_dict():
+- path = os.path.dirname(os.path.abspath(__file__))
++ path = os.path.dirname(__file__)
+ base_path = os.path.join(path, 'fake')
+ dct = {}
+- for file_name in os.listdir(base_path):
+- if file_name.endswith('.pym'):
+- dct[file_name[:-4]] = os.path.join(base_path, file_name)
++ for file_name in __res.resfs_files():
++ if sys.version_info[0] == 3:
++ file_name = str(file_name, 'ascii')
++ if file_name.startswith(base_path) and file_name.endswith('.pym'):
++ dct[file_name[len(base_path) + 1:-4]] = file_name
+ return dct
+
+
+@@ -45,8 +49,9 @@ def _load_faked_module(evaluator, module_name):
+ fake_modules[module_name] = None
+ return
+
+- with open(path) as f:
+- source = f.read()
++ if sys.version_info[0] == 3:
++ path = bytes(path, 'ascii')
++ source = __res.resfs_read(path)
+
+ fake_modules[module_name] = m = evaluator.latest_grammar.parse(unicode(source))
+