Skip to content

Commit d6b16b1

Browse files
authored
Jedi behind LSP reqs in main reqs files (#17446)
* Jedi behind LSP reqs in main reqs files * Update requirements to be Python 3 only * Update workflows to install reqs only for Python 3 * Update gulpfile * Delete jedils_requirements files * Re-add dataclasses but for python 3.6 only * Update file path in JediLanguageServerManager * jedi lsp now lives under pythonFiles/lib directly * lol
1 parent 2a1e3d3 commit d6b16b1

File tree

11 files changed

+95
-142
lines changed

11 files changed

+95
-142
lines changed

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

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ runs:
4444
run: python -m pip install wheel
4545
shell: bash
4646

47-
- name: Install python dependencies
47+
- name: Install Python dependencies
4848
run: python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade -r requirements.txt
4949
shell: bash
5050

@@ -54,11 +54,6 @@ 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-
6257
- name: Run npm ci
6358
run: npm ci --prefer-offline
6459
shell: bash

.github/workflows/build.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,11 @@ jobs:
113113

114114
- name: Install Python requirements
115115
run: |
116-
python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade -r requirements.txt
117116
# 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.
118117
python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade --pre debugpy
119118
120-
- name: Install Jedi LSP requirements
121-
run: python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/jedilsp --no-cache-dir --implementation py --no-deps --upgrade -r ./jedils_requirements.txt
119+
- 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
122121
if: startsWith(matrix.python, 3.)
123122

124123
- name: Install test requirements

.github/workflows/nightly-coverage.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ 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
5655
5756
- name: Install test requirements
5857
run: python -m pip install --upgrade -r build/test-requirements.txt

.github/workflows/pr-check.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,11 @@ jobs:
9393

9494
- name: Install Python requirements
9595
run: |
96-
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
9796
# 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.
9897
python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade --pre debugpy
9998
100-
- name: Install Jedi LSP requirements
101-
run: python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/jedilsp --no-cache-dir --implementation py --no-deps --upgrade -r ./jedils_requirements.txt
99+
- 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
102101
if: startsWith(matrix.python, 3.)
103102

104103
- name: Install test requirements
@@ -386,7 +385,6 @@ jobs:
386385
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
387386
# 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.
388387
python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade --pre debugpy
389-
python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/jedilsp --no-cache-dir --implementation py --no-deps --upgrade -r ./jedils_requirements.txt
390388
391389
- name: Install test requirements
392390
run: python -m pip install --upgrade -r build/test-requirements.txt

gulpfile.js

Lines changed: 2 additions & 32 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-
let args = [
226+
const args = [
227227
'-m',
228228
'pip',
229229
'--disable-pip-version-check',
@@ -239,37 +239,7 @@ gulp.task('installPythonRequirements', async () => {
239239
'-r',
240240
'./requirements.txt',
241241
];
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)
242+
const success = await spawnAsync(process.env.CI_PYTHON_PATH || 'python3', args, undefined, true)
273243
.then(() => true)
274244
.catch((ex) => {
275245
console.error("Failed to install Python Libs using 'python3'", ex);

jedils_requirements.in

Lines changed: 0 additions & 9 deletions
This file was deleted.

jedils_requirements.txt

Lines changed: 0 additions & 79 deletions
This file was deleted.

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", "jedilsp"))
6+
sys.path.insert(0, os.path.join(EXTENSION_ROOT, "pythonFiles", "lib", "python"))
77

88

99
from jedi_language_server.cli import cli

requirements.in

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,15 @@
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+
611
# Sort Imports
7-
isort==5.9.3; python_version >= '3.6'
12+
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: 75 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,83 @@
11
#
2-
# This file is autogenerated by pip-compile
2+
# This file is autogenerated by pip-compile with python 3.6
33
# To update, run:
44
#
55
# pip-compile --generate-hashes requirements.in
66
#
7-
isort==5.9.3 ; python_version >= "3.6" \
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
21+
isort==5.9.3 \
822
--hash=sha256:9c2ea1e62d871267b78307fe511c0838ba0da28698c5732d54e2790bf3ba9899 \
923
--hash=sha256:e17d6e2b81095c9db0a03a8025a957f334d6ea30b26f9ec70805411e5c7c81f2
1024
# 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)