Skip to content

Commit e25dd77

Browse files
authored
Fix jedi requirements (#17470)
* Revert "Jedi behind LSP reqs in main reqs files (#17446)" This reverts commit d6b16b1. * Install isort only in Python 3 workflow steps * Add comment in jedils_requirements.in * Re-add uppercase P
1 parent 502cf21 commit e25dd77

File tree

11 files changed

+143
-89
lines changed

11 files changed

+143
-89
lines changed

.github/actions/build-vsix/action.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@ runs:
5454
python ./pythonFiles/install_debugpy.py
5555
shell: bash
5656

57+
- name: Install Jedi LSP
58+
run: |
59+
python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/jedilsp --no-cache-dir --implementation py --platform any --abi none --no-deps --only-binary :all: --upgrade -r jedils_requirements.txt
60+
shell: bash
61+
5762
- name: Run npm ci
5863
run: npm ci --prefer-offline
5964
shell: bash

.github/workflows/build.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,9 @@ jobs:
117117
python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade --pre debugpy
118118
119119
- name: Install Python 3 requirements
120-
run: python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade -r requirements.txt
120+
run: |
121+
python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade -r requirements.txt
122+
python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/jedilsp --no-cache-dir --implementation py --no-deps --upgrade -r ./jedils_requirements.txt
121123
if: startsWith(matrix.python, 3.)
122124

123125
- name: Install test requirements

.github/workflows/nightly-coverage.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ jobs:
5252
python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade -r requirements.txt --no-user
5353
# We need to have debugpy so that tests relying on it keep passing, but we don't need install_debugpy's logic in the test phase.
5454
python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade --pre debugpy
55+
python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/jedilsp --no-cache-dir --implementation py --no-deps --upgrade -r ./jedils_requirements.txt
5556
5657
- name: Install test requirements
5758
run: python -m pip install --upgrade -r build/test-requirements.txt

.github/workflows/pr-check.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,9 @@ jobs:
9797
python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade --pre debugpy
9898
9999
- name: Install Python 3 requirements
100-
run: python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade -r requirements.txt --no-user
100+
run: |
101+
python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade -r requirements.txt --no-user
102+
python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/jedilsp --no-cache-dir --implementation py --no-deps --upgrade -r ./jedils_requirements.txt
101103
if: startsWith(matrix.python, 3.)
102104

103105
- name: Install test requirements
@@ -385,6 +387,7 @@ jobs:
385387
python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade -r requirements.txt --no-user
386388
# We need to have debugpy so that tests relying on it keep passing, but we don't need install_debugpy's logic in the test phase.
387389
python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade --pre debugpy
390+
python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/jedilsp --no-cache-dir --implementation py --no-deps --upgrade -r ./jedils_requirements.txt
388391
389392
- name: Install test requirements
390393
run: python -m pip install --upgrade -r build/test-requirements.txt

gulpfile.js

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ gulp.task('checkDependencies', gulp.series('checkNativeDependencies'));
223223
gulp.task('prePublishNonBundle', gulp.series('compile'));
224224

225225
gulp.task('installPythonRequirements', async () => {
226-
const args = [
226+
let args = [
227227
'-m',
228228
'pip',
229229
'--disable-pip-version-check',
@@ -239,7 +239,37 @@ gulp.task('installPythonRequirements', async () => {
239239
'-r',
240240
'./requirements.txt',
241241
];
242-
const success = await spawnAsync(process.env.CI_PYTHON_PATH || 'python3', args, undefined, true)
242+
let success = await spawnAsync(process.env.CI_PYTHON_PATH || 'python3', args, undefined, true)
243+
.then(() => true)
244+
.catch((ex) => {
245+
console.error("Failed to install Python Libs using 'python3'", ex);
246+
return false;
247+
});
248+
if (!success) {
249+
console.info("Failed to install Python Libs using 'python3', attempting to install using 'python'");
250+
await spawnAsync('python', args).catch((ex) =>
251+
console.error("Failed to install Python Libs using 'python'", ex),
252+
);
253+
return;
254+
}
255+
256+
args = [
257+
'-m',
258+
'pip',
259+
'--disable-pip-version-check',
260+
'install',
261+
'--no-user',
262+
'-t',
263+
'./pythonFiles/lib/jedilsp',
264+
'--no-cache-dir',
265+
'--implementation',
266+
'py',
267+
'--no-deps',
268+
'--upgrade',
269+
'-r',
270+
'./jedils_requirements.txt',
271+
];
272+
success = await spawnAsync(process.env.CI_PYTHON_PATH || 'python3', args, undefined, true)
243273
.then(() => true)
244274
.catch((ex) => {
245275
console.error("Failed to install Python Libs using 'python3'", ex);

jedils_requirements.in

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# This file is used to generate requirements.txt.
2+
# To update requirements.txt, run the following commands.
3+
# Use Python 3.6 when creating the environment or using pip-tools
4+
# 1) pip install pip-tools
5+
# 2) pip-compile --generate-hashes jedils_requirements.in
6+
7+
# We don't need to add Python version restrictions
8+
# since we don't support anything older than 3.6 anymore,
9+
# However, make sure to use Python 3.6 when running pip-compile,
10+
# so that all Python 3.6-specific requirements are captured when generating requirements.txt.
11+
12+
jedi-language-server>=0.34.3
13+
pygls>=0.10.3
14+
dataclasses==0.8;python_version<="3.6"

jedils_requirements.txt

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
#
2+
# This file is autogenerated by pip-compile with python 3.6
3+
# To update, run:
4+
#
5+
# pip-compile --generate-hashes jedils_requirements.in
6+
#
7+
dataclasses==0.8 ; python_version <= "3.6" \
8+
--hash=sha256:0201d89fa866f68c8ebd9d08ee6ff50c0b255f8ec63a71c16fda7af82bb887bf \
9+
--hash=sha256:8479067f342acf957dc82ec415d355ab5edb7e7646b90dc6e2fd1d96ad084c97
10+
# via
11+
# -r jedils_requirements.in
12+
# pydantic
13+
docstring-to-markdown==0.9 \
14+
--hash=sha256:0b810e6e16737d2d0ede6182f66f513f814a11fad1222e645fbc14acde78e171 \
15+
--hash=sha256:488b9f26339651edc7fc9386caeffd3924569072a8b67b727e253f83d5b18c59
16+
# via jedi-language-server
17+
importlib-metadata==3.10.1 \
18+
--hash=sha256:2ec0faae539743ae6aaa84b49a169670a465f7f5d64e6add98388cc29fd1f2f6 \
19+
--hash=sha256:c9356b657de65c53744046fa8f7358afe0714a1af7d570c00c3835c2d724a7c1
20+
# via jedi-language-server
21+
jedi==0.18.0 \
22+
--hash=sha256:18456d83f65f400ab0c2d3319e48520420ef43b23a086fdc05dff34132f0fb93 \
23+
--hash=sha256:92550a404bad8afed881a137ec9a461fed49eca661414be45059329614ed0707
24+
# via jedi-language-server
25+
jedi-language-server==0.34.3 \
26+
--hash=sha256:103296591fdfe8a8dc6277f54d31ef4ddf41cee81e7af2cc04b2b1f66349cf6a \
27+
--hash=sha256:8356a208b877ba48bdbe7df8373716702446b47e39b925b0e10deed4d52bcb01
28+
# via -r jedils_requirements.in
29+
parso==0.8.2 \
30+
--hash=sha256:12b83492c6239ce32ff5eed6d3639d6a536170723c6f3f1506869f1ace413398 \
31+
--hash=sha256:a8c4922db71e4fdb90e0d0bc6e50f9b273d3397925e5e60a717e719201778d22
32+
# via jedi
33+
pydantic==1.8.2 \
34+
--hash=sha256:021ea0e4133e8c824775a0cfe098677acf6fa5a3cbf9206a376eed3fc09302cd \
35+
--hash=sha256:05ddfd37c1720c392f4e0d43c484217b7521558302e7069ce8d318438d297739 \
36+
--hash=sha256:05ef5246a7ffd2ce12a619cbb29f3307b7c4509307b1b49f456657b43529dc6f \
37+
--hash=sha256:10e5622224245941efc193ad1d159887872776df7a8fd592ed746aa25d071840 \
38+
--hash=sha256:18b5ea242dd3e62dbf89b2b0ec9ba6c7b5abaf6af85b95a97b00279f65845a23 \
39+
--hash=sha256:234a6c19f1c14e25e362cb05c68afb7f183eb931dd3cd4605eafff055ebbf287 \
40+
--hash=sha256:244ad78eeb388a43b0c927e74d3af78008e944074b7d0f4f696ddd5b2af43c62 \
41+
--hash=sha256:26464e57ccaafe72b7ad156fdaa4e9b9ef051f69e175dbbb463283000c05ab7b \
42+
--hash=sha256:41b542c0b3c42dc17da70554bc6f38cbc30d7066d2c2815a94499b5684582ecb \
43+
--hash=sha256:4a03cbbe743e9c7247ceae6f0d8898f7a64bb65800a45cbdc52d65e370570820 \
44+
--hash=sha256:4be75bebf676a5f0f87937c6ddb061fa39cbea067240d98e298508c1bda6f3f3 \
45+
--hash=sha256:54cd5121383f4a461ff7644c7ca20c0419d58052db70d8791eacbbe31528916b \
46+
--hash=sha256:589eb6cd6361e8ac341db97602eb7f354551482368a37f4fd086c0733548308e \
47+
--hash=sha256:8621559dcf5afacf0069ed194278f35c255dc1a1385c28b32dd6c110fd6531b3 \
48+
--hash=sha256:8b223557f9510cf0bfd8b01316bf6dd281cf41826607eada99662f5e4963f316 \
49+
--hash=sha256:99a9fc39470010c45c161a1dc584997f1feb13f689ecf645f59bb4ba623e586b \
50+
--hash=sha256:a7c6002203fe2c5a1b5cbb141bb85060cbff88c2d78eccbc72d97eb7022c43e4 \
51+
--hash=sha256:a83db7205f60c6a86f2c44a61791d993dff4b73135df1973ecd9eed5ea0bda20 \
52+
--hash=sha256:ac8eed4ca3bd3aadc58a13c2aa93cd8a884bcf21cb019f8cfecaae3b6ce3746e \
53+
--hash=sha256:e710876437bc07bd414ff453ac8ec63d219e7690128d925c6e82889d674bb505 \
54+
--hash=sha256:ea5cb40a3b23b3265f6325727ddfc45141b08ed665458be8c6285e7b85bd73a1 \
55+
--hash=sha256:fec866a0b59f372b7e776f2d7308511784dace622e0992a0b59ea3ccee0ae833
56+
# via
57+
# jedi-language-server
58+
# pygls
59+
pygls==0.11.2 \
60+
--hash=sha256:1ade26fc9cf0d7c0700fa5430e8dc8411b1108d1eb21565adbe480b64f721a84 \
61+
--hash=sha256:5c5b1c8717a39b97462b197f6186c12d2e16455da00631cdaaca91d25736ffcd
62+
# via
63+
# -r jedils_requirements.in
64+
# jedi-language-server
65+
typeguard==2.12.1 \
66+
--hash=sha256:c2af8b9bdd7657f4bd27b45336e7930171aead796711bc4cfc99b4731bb9d051 \
67+
--hash=sha256:cc15ef2704c9909ef9c80e19c62fb8468c01f75aad12f651922acf4dbe822e02
68+
# via pygls
69+
typing-extensions==3.10.0.0 \
70+
--hash=sha256:0ac0f89795dd19de6b97debb0c6af1c70987fd80a2d62d1958f7e56fcc31b497 \
71+
--hash=sha256:50b6f157849174217d0656f99dc82fe932884fb250826c18350e159ec6cdf342 \
72+
--hash=sha256:779383f6086d90c99ae41cf0ff39aac8a7937a9283ce0a414e5dd782f4c94a84
73+
# via
74+
# importlib-metadata
75+
# pydantic
76+
zipp==3.5.0 \
77+
--hash=sha256:957cfda87797e389580cb8b9e3870841ca991e2125350677b2ca83a0e99390a3 \
78+
--hash=sha256:f5812b1e007e48cff63449a5e9f4e7ebea716b4111f9c4f9a645f91d579bf0c4
79+
# via importlib-metadata

pythonFiles/run-jedi-language-server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
# Add the lib path to our sys path so jedi_language_server can find its references
55
EXTENSION_ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
6-
sys.path.insert(0, os.path.join(EXTENSION_ROOT, "pythonFiles", "lib", "python"))
6+
sys.path.insert(0, os.path.join(EXTENSION_ROOT, "pythonFiles", "lib", "jedilsp"))
77

88

99
from jedi_language_server.cli import cli

requirements.in

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,5 @@
33
# 1) pip install pip-tools
44
# 2) pip-compile --generate-hashes requirements.in
55

6-
# We don't need to add Python version restrictions
7-
# since we don't support anything older than 3.6 anymore,
8-
# However, make sure to use Python 3.6 when running pip-compile,
9-
# so that all Python 3.6-specific requirements are captured when generating requirements.txt.
10-
116
# Sort Imports
127
isort==5.9.3
13-
14-
# Jedi behind LSP
15-
jedi-language-server>=0.34.3
16-
pygls>=0.10.3
17-
dataclasses==0.8;python_version<="3.6"

requirements.txt

Lines changed: 0 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -4,80 +4,7 @@
44
#
55
# pip-compile --generate-hashes requirements.in
66
#
7-
dataclasses==0.8 ; python_version <= "3.6" \
8-
--hash=sha256:0201d89fa866f68c8ebd9d08ee6ff50c0b255f8ec63a71c16fda7af82bb887bf \
9-
--hash=sha256:8479067f342acf957dc82ec415d355ab5edb7e7646b90dc6e2fd1d96ad084c97
10-
# via
11-
# -r requirements.in
12-
# pydantic
13-
docstring-to-markdown==0.9 \
14-
--hash=sha256:0b810e6e16737d2d0ede6182f66f513f814a11fad1222e645fbc14acde78e171 \
15-
--hash=sha256:488b9f26339651edc7fc9386caeffd3924569072a8b67b727e253f83d5b18c59
16-
# via jedi-language-server
17-
importlib-metadata==3.10.1 \
18-
--hash=sha256:2ec0faae539743ae6aaa84b49a169670a465f7f5d64e6add98388cc29fd1f2f6 \
19-
--hash=sha256:c9356b657de65c53744046fa8f7358afe0714a1af7d570c00c3835c2d724a7c1
20-
# via jedi-language-server
217
isort==5.9.3 \
228
--hash=sha256:9c2ea1e62d871267b78307fe511c0838ba0da28698c5732d54e2790bf3ba9899 \
239
--hash=sha256:e17d6e2b81095c9db0a03a8025a957f334d6ea30b26f9ec70805411e5c7c81f2
2410
# via -r requirements.in
25-
jedi==0.18.0 \
26-
--hash=sha256:18456d83f65f400ab0c2d3319e48520420ef43b23a086fdc05dff34132f0fb93 \
27-
--hash=sha256:92550a404bad8afed881a137ec9a461fed49eca661414be45059329614ed0707
28-
# via jedi-language-server
29-
jedi-language-server==0.34.3 \
30-
--hash=sha256:103296591fdfe8a8dc6277f54d31ef4ddf41cee81e7af2cc04b2b1f66349cf6a \
31-
--hash=sha256:8356a208b877ba48bdbe7df8373716702446b47e39b925b0e10deed4d52bcb01
32-
# via -r requirements.in
33-
parso==0.8.2 \
34-
--hash=sha256:12b83492c6239ce32ff5eed6d3639d6a536170723c6f3f1506869f1ace413398 \
35-
--hash=sha256:a8c4922db71e4fdb90e0d0bc6e50f9b273d3397925e5e60a717e719201778d22
36-
# via jedi
37-
pydantic==1.8.2 \
38-
--hash=sha256:021ea0e4133e8c824775a0cfe098677acf6fa5a3cbf9206a376eed3fc09302cd \
39-
--hash=sha256:05ddfd37c1720c392f4e0d43c484217b7521558302e7069ce8d318438d297739 \
40-
--hash=sha256:05ef5246a7ffd2ce12a619cbb29f3307b7c4509307b1b49f456657b43529dc6f \
41-
--hash=sha256:10e5622224245941efc193ad1d159887872776df7a8fd592ed746aa25d071840 \
42-
--hash=sha256:18b5ea242dd3e62dbf89b2b0ec9ba6c7b5abaf6af85b95a97b00279f65845a23 \
43-
--hash=sha256:234a6c19f1c14e25e362cb05c68afb7f183eb931dd3cd4605eafff055ebbf287 \
44-
--hash=sha256:244ad78eeb388a43b0c927e74d3af78008e944074b7d0f4f696ddd5b2af43c62 \
45-
--hash=sha256:26464e57ccaafe72b7ad156fdaa4e9b9ef051f69e175dbbb463283000c05ab7b \
46-
--hash=sha256:41b542c0b3c42dc17da70554bc6f38cbc30d7066d2c2815a94499b5684582ecb \
47-
--hash=sha256:4a03cbbe743e9c7247ceae6f0d8898f7a64bb65800a45cbdc52d65e370570820 \
48-
--hash=sha256:4be75bebf676a5f0f87937c6ddb061fa39cbea067240d98e298508c1bda6f3f3 \
49-
--hash=sha256:54cd5121383f4a461ff7644c7ca20c0419d58052db70d8791eacbbe31528916b \
50-
--hash=sha256:589eb6cd6361e8ac341db97602eb7f354551482368a37f4fd086c0733548308e \
51-
--hash=sha256:8621559dcf5afacf0069ed194278f35c255dc1a1385c28b32dd6c110fd6531b3 \
52-
--hash=sha256:8b223557f9510cf0bfd8b01316bf6dd281cf41826607eada99662f5e4963f316 \
53-
--hash=sha256:99a9fc39470010c45c161a1dc584997f1feb13f689ecf645f59bb4ba623e586b \
54-
--hash=sha256:a7c6002203fe2c5a1b5cbb141bb85060cbff88c2d78eccbc72d97eb7022c43e4 \
55-
--hash=sha256:a83db7205f60c6a86f2c44a61791d993dff4b73135df1973ecd9eed5ea0bda20 \
56-
--hash=sha256:ac8eed4ca3bd3aadc58a13c2aa93cd8a884bcf21cb019f8cfecaae3b6ce3746e \
57-
--hash=sha256:e710876437bc07bd414ff453ac8ec63d219e7690128d925c6e82889d674bb505 \
58-
--hash=sha256:ea5cb40a3b23b3265f6325727ddfc45141b08ed665458be8c6285e7b85bd73a1 \
59-
--hash=sha256:fec866a0b59f372b7e776f2d7308511784dace622e0992a0b59ea3ccee0ae833
60-
# via
61-
# jedi-language-server
62-
# pygls
63-
pygls==0.11.2 \
64-
--hash=sha256:1ade26fc9cf0d7c0700fa5430e8dc8411b1108d1eb21565adbe480b64f721a84 \
65-
--hash=sha256:5c5b1c8717a39b97462b197f6186c12d2e16455da00631cdaaca91d25736ffcd
66-
# via
67-
# -r requirements.in
68-
# jedi-language-server
69-
typeguard==2.12.1 \
70-
--hash=sha256:c2af8b9bdd7657f4bd27b45336e7930171aead796711bc4cfc99b4731bb9d051 \
71-
--hash=sha256:cc15ef2704c9909ef9c80e19c62fb8468c01f75aad12f651922acf4dbe822e02
72-
# via pygls
73-
typing-extensions==3.10.0.2 \
74-
--hash=sha256:49f75d16ff11f1cd258e1b988ccff82a3ca5570217d7ad8c5f48205dd99a677e \
75-
--hash=sha256:d8226d10bc02a29bcc81df19a26e56a9647f8b0a6d4a83924139f4a8b01f17b7 \
76-
--hash=sha256:f1d25edafde516b146ecd0613dabcc61409817af4766fbbcfb8d1ad4ec441a34
77-
# via
78-
# importlib-metadata
79-
# pydantic
80-
zipp==3.5.0 \
81-
--hash=sha256:957cfda87797e389580cb8b9e3870841ca991e2125350677b2ca83a0e99390a3 \
82-
--hash=sha256:f5812b1e007e48cff63449a5e9f4e7ebea716b4111f9c4f9a645f91d579bf0c4
83-
# via importlib-metadata

0 commit comments

Comments
 (0)