From 73ed4ee3961c1bc4a61ebea4aef56233584f5079 Mon Sep 17 00:00:00 2001 From: Kim-Adeline Miguel Date: Fri, 17 Sep 2021 09:38:43 -0700 Subject: [PATCH 1/9] Jedi behind LSP reqs in main reqs files --- requirements.in | 5 +++++ requirements.txt | 57 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+) diff --git a/requirements.in b/requirements.in index ea095bb9d934..29e600f60147 100644 --- a/requirements.in +++ b/requirements.in @@ -5,3 +5,8 @@ # Sort Imports isort==5.9.3; python_version >= '3.6' + +# Jedi behind LSP +jedi-language-server>=0.34.3; python_version >= '3.6' +pygls>=0.10.3; python_version >= '3.6' +dataclasses==0.8;python_version<="3.6" diff --git a/requirements.txt b/requirements.txt index 022d77c6e20d..3bd7585e282e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,7 +4,64 @@ # # pip-compile --generate-hashes requirements.in # +docstring-to-markdown==0.9 \ + --hash=sha256:0b810e6e16737d2d0ede6182f66f513f814a11fad1222e645fbc14acde78e171 \ + --hash=sha256:488b9f26339651edc7fc9386caeffd3924569072a8b67b727e253f83d5b18c59 + # via jedi-language-server isort==5.9.3 ; python_version >= "3.6" \ --hash=sha256:9c2ea1e62d871267b78307fe511c0838ba0da28698c5732d54e2790bf3ba9899 \ --hash=sha256:e17d6e2b81095c9db0a03a8025a957f334d6ea30b26f9ec70805411e5c7c81f2 # via -r requirements.in +jedi-language-server==0.34.3 ; python_version >= "3.6" \ + --hash=sha256:103296591fdfe8a8dc6277f54d31ef4ddf41cee81e7af2cc04b2b1f66349cf6a \ + --hash=sha256:8356a208b877ba48bdbe7df8373716702446b47e39b925b0e10deed4d52bcb01 + # via -r requirements.in +jedi==0.18.0 \ + --hash=sha256:18456d83f65f400ab0c2d3319e48520420ef43b23a086fdc05dff34132f0fb93 \ + --hash=sha256:92550a404bad8afed881a137ec9a461fed49eca661414be45059329614ed0707 + # via jedi-language-server +parso==0.8.2 \ + --hash=sha256:12b83492c6239ce32ff5eed6d3639d6a536170723c6f3f1506869f1ace413398 \ + --hash=sha256:a8c4922db71e4fdb90e0d0bc6e50f9b273d3397925e5e60a717e719201778d22 + # via jedi +pydantic==1.8.2 \ + --hash=sha256:021ea0e4133e8c824775a0cfe098677acf6fa5a3cbf9206a376eed3fc09302cd \ + --hash=sha256:05ddfd37c1720c392f4e0d43c484217b7521558302e7069ce8d318438d297739 \ + --hash=sha256:05ef5246a7ffd2ce12a619cbb29f3307b7c4509307b1b49f456657b43529dc6f \ + --hash=sha256:10e5622224245941efc193ad1d159887872776df7a8fd592ed746aa25d071840 \ + --hash=sha256:18b5ea242dd3e62dbf89b2b0ec9ba6c7b5abaf6af85b95a97b00279f65845a23 \ + --hash=sha256:234a6c19f1c14e25e362cb05c68afb7f183eb931dd3cd4605eafff055ebbf287 \ + --hash=sha256:244ad78eeb388a43b0c927e74d3af78008e944074b7d0f4f696ddd5b2af43c62 \ + --hash=sha256:26464e57ccaafe72b7ad156fdaa4e9b9ef051f69e175dbbb463283000c05ab7b \ + --hash=sha256:41b542c0b3c42dc17da70554bc6f38cbc30d7066d2c2815a94499b5684582ecb \ + --hash=sha256:4a03cbbe743e9c7247ceae6f0d8898f7a64bb65800a45cbdc52d65e370570820 \ + --hash=sha256:4be75bebf676a5f0f87937c6ddb061fa39cbea067240d98e298508c1bda6f3f3 \ + --hash=sha256:54cd5121383f4a461ff7644c7ca20c0419d58052db70d8791eacbbe31528916b \ + --hash=sha256:589eb6cd6361e8ac341db97602eb7f354551482368a37f4fd086c0733548308e \ + --hash=sha256:8621559dcf5afacf0069ed194278f35c255dc1a1385c28b32dd6c110fd6531b3 \ + --hash=sha256:8b223557f9510cf0bfd8b01316bf6dd281cf41826607eada99662f5e4963f316 \ + --hash=sha256:99a9fc39470010c45c161a1dc584997f1feb13f689ecf645f59bb4ba623e586b \ + --hash=sha256:a7c6002203fe2c5a1b5cbb141bb85060cbff88c2d78eccbc72d97eb7022c43e4 \ + --hash=sha256:a83db7205f60c6a86f2c44a61791d993dff4b73135df1973ecd9eed5ea0bda20 \ + --hash=sha256:ac8eed4ca3bd3aadc58a13c2aa93cd8a884bcf21cb019f8cfecaae3b6ce3746e \ + --hash=sha256:e710876437bc07bd414ff453ac8ec63d219e7690128d925c6e82889d674bb505 \ + --hash=sha256:ea5cb40a3b23b3265f6325727ddfc45141b08ed665458be8c6285e7b85bd73a1 \ + --hash=sha256:fec866a0b59f372b7e776f2d7308511784dace622e0992a0b59ea3ccee0ae833 + # via + # jedi-language-server + # pygls +pygls==0.11.2 ; python_version >= "3.6" \ + --hash=sha256:1ade26fc9cf0d7c0700fa5430e8dc8411b1108d1eb21565adbe480b64f721a84 \ + --hash=sha256:5c5b1c8717a39b97462b197f6186c12d2e16455da00631cdaaca91d25736ffcd + # via + # -r requirements.in + # jedi-language-server +typeguard==2.12.1 \ + --hash=sha256:c2af8b9bdd7657f4bd27b45336e7930171aead796711bc4cfc99b4731bb9d051 \ + --hash=sha256:cc15ef2704c9909ef9c80e19c62fb8468c01f75aad12f651922acf4dbe822e02 + # via pygls +typing-extensions==3.10.0.2 \ + --hash=sha256:49f75d16ff11f1cd258e1b988ccff82a3ca5570217d7ad8c5f48205dd99a677e \ + --hash=sha256:d8226d10bc02a29bcc81df19a26e56a9647f8b0a6d4a83924139f4a8b01f17b7 \ + --hash=sha256:f1d25edafde516b146ecd0613dabcc61409817af4766fbbcfb8d1ad4ec441a34 + # via pydantic From be1e603c6f70725b947301bb66418410e99e0d1a Mon Sep 17 00:00:00 2001 From: Kim-Adeline Miguel Date: Fri, 17 Sep 2021 10:55:22 -0700 Subject: [PATCH 2/9] Update requirements to be Python 3 only --- requirements.in | 12 ++++++++---- requirements.txt | 30 ++++++++++++++++++++++-------- 2 files changed, 30 insertions(+), 12 deletions(-) diff --git a/requirements.in b/requirements.in index 29e600f60147..4e35490f7055 100644 --- a/requirements.in +++ b/requirements.in @@ -3,10 +3,14 @@ # 1) pip install pip-tools # 2) pip-compile --generate-hashes requirements.in +# We don't need to add Python version restrictions +# since we don't support anything older than 3.6 anymore, +# However, make sure to use Python 3.6 when running pip-compile, +# so that all Python 3.6-specific requirements are captured when generating requirements.txt. + # Sort Imports -isort==5.9.3; python_version >= '3.6' +isort==5.9.3 # Jedi behind LSP -jedi-language-server>=0.34.3; python_version >= '3.6' -pygls>=0.10.3; python_version >= '3.6' -dataclasses==0.8;python_version<="3.6" +jedi-language-server>=0.34.3 +pygls>=0.10.3 diff --git a/requirements.txt b/requirements.txt index 3bd7585e282e..2e79c2b7e00a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,25 +1,33 @@ # -# This file is autogenerated by pip-compile +# This file is autogenerated by pip-compile with python 3.6 # To update, run: # # pip-compile --generate-hashes requirements.in # +dataclasses==0.8 \ + --hash=sha256:0201d89fa866f68c8ebd9d08ee6ff50c0b255f8ec63a71c16fda7af82bb887bf \ + --hash=sha256:8479067f342acf957dc82ec415d355ab5edb7e7646b90dc6e2fd1d96ad084c97 + # via pydantic docstring-to-markdown==0.9 \ --hash=sha256:0b810e6e16737d2d0ede6182f66f513f814a11fad1222e645fbc14acde78e171 \ --hash=sha256:488b9f26339651edc7fc9386caeffd3924569072a8b67b727e253f83d5b18c59 # via jedi-language-server -isort==5.9.3 ; python_version >= "3.6" \ +importlib-metadata==3.10.1 \ + --hash=sha256:2ec0faae539743ae6aaa84b49a169670a465f7f5d64e6add98388cc29fd1f2f6 \ + --hash=sha256:c9356b657de65c53744046fa8f7358afe0714a1af7d570c00c3835c2d724a7c1 + # via jedi-language-server +isort==5.9.3 \ --hash=sha256:9c2ea1e62d871267b78307fe511c0838ba0da28698c5732d54e2790bf3ba9899 \ --hash=sha256:e17d6e2b81095c9db0a03a8025a957f334d6ea30b26f9ec70805411e5c7c81f2 # via -r requirements.in -jedi-language-server==0.34.3 ; python_version >= "3.6" \ - --hash=sha256:103296591fdfe8a8dc6277f54d31ef4ddf41cee81e7af2cc04b2b1f66349cf6a \ - --hash=sha256:8356a208b877ba48bdbe7df8373716702446b47e39b925b0e10deed4d52bcb01 - # via -r requirements.in jedi==0.18.0 \ --hash=sha256:18456d83f65f400ab0c2d3319e48520420ef43b23a086fdc05dff34132f0fb93 \ --hash=sha256:92550a404bad8afed881a137ec9a461fed49eca661414be45059329614ed0707 # via jedi-language-server +jedi-language-server==0.34.3 \ + --hash=sha256:103296591fdfe8a8dc6277f54d31ef4ddf41cee81e7af2cc04b2b1f66349cf6a \ + --hash=sha256:8356a208b877ba48bdbe7df8373716702446b47e39b925b0e10deed4d52bcb01 + # via -r requirements.in parso==0.8.2 \ --hash=sha256:12b83492c6239ce32ff5eed6d3639d6a536170723c6f3f1506869f1ace413398 \ --hash=sha256:a8c4922db71e4fdb90e0d0bc6e50f9b273d3397925e5e60a717e719201778d22 @@ -50,7 +58,7 @@ pydantic==1.8.2 \ # via # jedi-language-server # pygls -pygls==0.11.2 ; python_version >= "3.6" \ +pygls==0.11.2 \ --hash=sha256:1ade26fc9cf0d7c0700fa5430e8dc8411b1108d1eb21565adbe480b64f721a84 \ --hash=sha256:5c5b1c8717a39b97462b197f6186c12d2e16455da00631cdaaca91d25736ffcd # via @@ -64,4 +72,10 @@ typing-extensions==3.10.0.2 \ --hash=sha256:49f75d16ff11f1cd258e1b988ccff82a3ca5570217d7ad8c5f48205dd99a677e \ --hash=sha256:d8226d10bc02a29bcc81df19a26e56a9647f8b0a6d4a83924139f4a8b01f17b7 \ --hash=sha256:f1d25edafde516b146ecd0613dabcc61409817af4766fbbcfb8d1ad4ec441a34 - # via pydantic + # via + # importlib-metadata + # pydantic +zipp==3.5.0 \ + --hash=sha256:957cfda87797e389580cb8b9e3870841ca991e2125350677b2ca83a0e99390a3 \ + --hash=sha256:f5812b1e007e48cff63449a5e9f4e7ebea716b4111f9c4f9a645f91d579bf0c4 + # via importlib-metadata From 3c972d8104801a8facffd138e910062153f6478f Mon Sep 17 00:00:00 2001 From: Kim-Adeline Miguel Date: Fri, 17 Sep 2021 10:55:39 -0700 Subject: [PATCH 3/9] Update workflows to install reqs only for Python 3 --- .github/actions/build-vsix/action.yml | 7 +------ .github/workflows/build.yml | 5 ++--- .github/workflows/nightly-coverage.yml | 1 - .github/workflows/pr-check.yml | 6 ++---- 4 files changed, 5 insertions(+), 14 deletions(-) diff --git a/.github/actions/build-vsix/action.yml b/.github/actions/build-vsix/action.yml index 6391fb8c3398..27d57cfca9de 100644 --- a/.github/actions/build-vsix/action.yml +++ b/.github/actions/build-vsix/action.yml @@ -44,7 +44,7 @@ runs: run: python -m pip install wheel shell: bash - - name: Install python dependencies + - name: Install Python dependencies run: python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade -r requirements.txt shell: bash @@ -54,11 +54,6 @@ runs: python ./pythonFiles/install_debugpy.py shell: bash - - name: Install Jedi LSP - run: | - 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 - shell: bash - - name: Run npm ci run: npm ci --prefer-offline shell: bash diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index eb5527bf2437..13bda617f8c6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -113,12 +113,11 @@ jobs: - name: Install Python requirements run: | - python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade -r requirements.txt # 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. python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade --pre debugpy - - name: Install Jedi LSP requirements - 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 + - name: Install Python 3 requirements + run: python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade -r requirements.txt if: startsWith(matrix.python, 3.) - name: Install test requirements diff --git a/.github/workflows/nightly-coverage.yml b/.github/workflows/nightly-coverage.yml index e64cdff6abeb..5844582e8143 100644 --- a/.github/workflows/nightly-coverage.yml +++ b/.github/workflows/nightly-coverage.yml @@ -52,7 +52,6 @@ jobs: 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 # 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. python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade --pre debugpy - python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/jedilsp --no-cache-dir --implementation py --no-deps --upgrade -r ./jedils_requirements.txt - name: Install test requirements run: python -m pip install --upgrade -r build/test-requirements.txt diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index e94c35e5d3a5..fffa21721c9a 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -93,12 +93,11 @@ jobs: - name: Install Python requirements 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 # 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. python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade --pre debugpy - - name: Install Jedi LSP requirements - 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 + - name: Install Python 3 requirements + 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 if: startsWith(matrix.python, 3.) - name: Install test requirements @@ -386,7 +385,6 @@ jobs: 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 # 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. python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade --pre debugpy - python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/jedilsp --no-cache-dir --implementation py --no-deps --upgrade -r ./jedils_requirements.txt - name: Install test requirements run: python -m pip install --upgrade -r build/test-requirements.txt From 4dc0b6156c51e20dcb36701dd54231ed95065a3d Mon Sep 17 00:00:00 2001 From: Kim-Adeline Miguel Date: Fri, 17 Sep 2021 10:55:46 -0700 Subject: [PATCH 4/9] Update gulpfile --- gulpfile.js | 34 ++-------------------------------- 1 file changed, 2 insertions(+), 32 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index e5b91a15b546..f6a282d82b7e 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -223,7 +223,7 @@ gulp.task('checkDependencies', gulp.series('checkNativeDependencies')); gulp.task('prePublishNonBundle', gulp.series('compile')); gulp.task('installPythonRequirements', async () => { - let args = [ + const args = [ '-m', 'pip', '--disable-pip-version-check', @@ -239,37 +239,7 @@ gulp.task('installPythonRequirements', async () => { '-r', './requirements.txt', ]; - let success = await spawnAsync(process.env.CI_PYTHON_PATH || 'python3', args, undefined, true) - .then(() => true) - .catch((ex) => { - console.error("Failed to install Python Libs using 'python3'", ex); - return false; - }); - if (!success) { - console.info("Failed to install Python Libs using 'python3', attempting to install using 'python'"); - await spawnAsync('python', args).catch((ex) => - console.error("Failed to install Python Libs using 'python'", ex), - ); - return; - } - - args = [ - '-m', - 'pip', - '--disable-pip-version-check', - 'install', - '--no-user', - '-t', - './pythonFiles/lib/jedilsp', - '--no-cache-dir', - '--implementation', - 'py', - '--no-deps', - '--upgrade', - '-r', - './jedils_requirements.txt', - ]; - success = await spawnAsync(process.env.CI_PYTHON_PATH || 'python3', args, undefined, true) + const success = await spawnAsync(process.env.CI_PYTHON_PATH || 'python3', args, undefined, true) .then(() => true) .catch((ex) => { console.error("Failed to install Python Libs using 'python3'", ex); From ea7a7ab76781176a98bc6d5e925d874191201a06 Mon Sep 17 00:00:00 2001 From: Kim-Adeline Miguel Date: Fri, 17 Sep 2021 10:55:55 -0700 Subject: [PATCH 5/9] Delete jedils_requirements files --- jedils_requirements.in | 9 ----- jedils_requirements.txt | 79 ----------------------------------------- 2 files changed, 88 deletions(-) delete mode 100644 jedils_requirements.in delete mode 100644 jedils_requirements.txt diff --git a/jedils_requirements.in b/jedils_requirements.in deleted file mode 100644 index 48e84556d177..000000000000 --- a/jedils_requirements.in +++ /dev/null @@ -1,9 +0,0 @@ -# This file is used to generate requirements.txt. -# To update requirements.txt, run the following commands. -# Use Python 3.6 when creating the environment or using pip-tools -# 1) pip install pip-tools -# 2) pip-compile --generate-hashes jedils_requirements.in - -jedi-language-server>=0.34.3 -pygls>=0.10.3 -dataclasses==0.8;python_version<="3.6" diff --git a/jedils_requirements.txt b/jedils_requirements.txt deleted file mode 100644 index a10ac094b481..000000000000 --- a/jedils_requirements.txt +++ /dev/null @@ -1,79 +0,0 @@ -# -# This file is autogenerated by pip-compile with python 3.6 -# To update, run: -# -# pip-compile --generate-hashes jedils_requirements.in -# -dataclasses==0.8 ; python_version <= "3.6" \ - --hash=sha256:0201d89fa866f68c8ebd9d08ee6ff50c0b255f8ec63a71c16fda7af82bb887bf \ - --hash=sha256:8479067f342acf957dc82ec415d355ab5edb7e7646b90dc6e2fd1d96ad084c97 - # via - # -r jedils_requirements.in - # pydantic -docstring-to-markdown==0.9 \ - --hash=sha256:0b810e6e16737d2d0ede6182f66f513f814a11fad1222e645fbc14acde78e171 \ - --hash=sha256:488b9f26339651edc7fc9386caeffd3924569072a8b67b727e253f83d5b18c59 - # via jedi-language-server -importlib-metadata==3.10.1 \ - --hash=sha256:2ec0faae539743ae6aaa84b49a169670a465f7f5d64e6add98388cc29fd1f2f6 \ - --hash=sha256:c9356b657de65c53744046fa8f7358afe0714a1af7d570c00c3835c2d724a7c1 - # via jedi-language-server -jedi==0.18.0 \ - --hash=sha256:18456d83f65f400ab0c2d3319e48520420ef43b23a086fdc05dff34132f0fb93 \ - --hash=sha256:92550a404bad8afed881a137ec9a461fed49eca661414be45059329614ed0707 - # via jedi-language-server -jedi-language-server==0.34.3 \ - --hash=sha256:103296591fdfe8a8dc6277f54d31ef4ddf41cee81e7af2cc04b2b1f66349cf6a \ - --hash=sha256:8356a208b877ba48bdbe7df8373716702446b47e39b925b0e10deed4d52bcb01 - # via -r jedils_requirements.in -parso==0.8.2 \ - --hash=sha256:12b83492c6239ce32ff5eed6d3639d6a536170723c6f3f1506869f1ace413398 \ - --hash=sha256:a8c4922db71e4fdb90e0d0bc6e50f9b273d3397925e5e60a717e719201778d22 - # via jedi -pydantic==1.8.2 \ - --hash=sha256:021ea0e4133e8c824775a0cfe098677acf6fa5a3cbf9206a376eed3fc09302cd \ - --hash=sha256:05ddfd37c1720c392f4e0d43c484217b7521558302e7069ce8d318438d297739 \ - --hash=sha256:05ef5246a7ffd2ce12a619cbb29f3307b7c4509307b1b49f456657b43529dc6f \ - --hash=sha256:10e5622224245941efc193ad1d159887872776df7a8fd592ed746aa25d071840 \ - --hash=sha256:18b5ea242dd3e62dbf89b2b0ec9ba6c7b5abaf6af85b95a97b00279f65845a23 \ - --hash=sha256:234a6c19f1c14e25e362cb05c68afb7f183eb931dd3cd4605eafff055ebbf287 \ - --hash=sha256:244ad78eeb388a43b0c927e74d3af78008e944074b7d0f4f696ddd5b2af43c62 \ - --hash=sha256:26464e57ccaafe72b7ad156fdaa4e9b9ef051f69e175dbbb463283000c05ab7b \ - --hash=sha256:41b542c0b3c42dc17da70554bc6f38cbc30d7066d2c2815a94499b5684582ecb \ - --hash=sha256:4a03cbbe743e9c7247ceae6f0d8898f7a64bb65800a45cbdc52d65e370570820 \ - --hash=sha256:4be75bebf676a5f0f87937c6ddb061fa39cbea067240d98e298508c1bda6f3f3 \ - --hash=sha256:54cd5121383f4a461ff7644c7ca20c0419d58052db70d8791eacbbe31528916b \ - --hash=sha256:589eb6cd6361e8ac341db97602eb7f354551482368a37f4fd086c0733548308e \ - --hash=sha256:8621559dcf5afacf0069ed194278f35c255dc1a1385c28b32dd6c110fd6531b3 \ - --hash=sha256:8b223557f9510cf0bfd8b01316bf6dd281cf41826607eada99662f5e4963f316 \ - --hash=sha256:99a9fc39470010c45c161a1dc584997f1feb13f689ecf645f59bb4ba623e586b \ - --hash=sha256:a7c6002203fe2c5a1b5cbb141bb85060cbff88c2d78eccbc72d97eb7022c43e4 \ - --hash=sha256:a83db7205f60c6a86f2c44a61791d993dff4b73135df1973ecd9eed5ea0bda20 \ - --hash=sha256:ac8eed4ca3bd3aadc58a13c2aa93cd8a884bcf21cb019f8cfecaae3b6ce3746e \ - --hash=sha256:e710876437bc07bd414ff453ac8ec63d219e7690128d925c6e82889d674bb505 \ - --hash=sha256:ea5cb40a3b23b3265f6325727ddfc45141b08ed665458be8c6285e7b85bd73a1 \ - --hash=sha256:fec866a0b59f372b7e776f2d7308511784dace622e0992a0b59ea3ccee0ae833 - # via - # jedi-language-server - # pygls -pygls==0.11.2 \ - --hash=sha256:1ade26fc9cf0d7c0700fa5430e8dc8411b1108d1eb21565adbe480b64f721a84 \ - --hash=sha256:5c5b1c8717a39b97462b197f6186c12d2e16455da00631cdaaca91d25736ffcd - # via - # -r jedils_requirements.in - # jedi-language-server -typeguard==2.12.1 \ - --hash=sha256:c2af8b9bdd7657f4bd27b45336e7930171aead796711bc4cfc99b4731bb9d051 \ - --hash=sha256:cc15ef2704c9909ef9c80e19c62fb8468c01f75aad12f651922acf4dbe822e02 - # via pygls -typing-extensions==3.10.0.0 \ - --hash=sha256:0ac0f89795dd19de6b97debb0c6af1c70987fd80a2d62d1958f7e56fcc31b497 \ - --hash=sha256:50b6f157849174217d0656f99dc82fe932884fb250826c18350e159ec6cdf342 \ - --hash=sha256:779383f6086d90c99ae41cf0ff39aac8a7937a9283ce0a414e5dd782f4c94a84 - # via - # importlib-metadata - # pydantic -zipp==3.5.0 \ - --hash=sha256:957cfda87797e389580cb8b9e3870841ca991e2125350677b2ca83a0e99390a3 \ - --hash=sha256:f5812b1e007e48cff63449a5e9f4e7ebea716b4111f9c4f9a645f91d579bf0c4 - # via importlib-metadata From 8b11d217b30ad9f6a03c3cfc050c46730fb0bf56 Mon Sep 17 00:00:00 2001 From: Kim-Adeline Miguel Date: Fri, 17 Sep 2021 11:10:33 -0700 Subject: [PATCH 6/9] Re-add dataclasses but for python 3.6 only --- requirements.in | 1 + requirements.txt | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/requirements.in b/requirements.in index 4e35490f7055..57b5051b7ffb 100644 --- a/requirements.in +++ b/requirements.in @@ -14,3 +14,4 @@ isort==5.9.3 # Jedi behind LSP jedi-language-server>=0.34.3 pygls>=0.10.3 +dataclasses==0.8;python_version<="3.6" diff --git a/requirements.txt b/requirements.txt index 2e79c2b7e00a..6154c717891d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,10 +4,12 @@ # # pip-compile --generate-hashes requirements.in # -dataclasses==0.8 \ +dataclasses==0.8 ; python_version <= "3.6" \ --hash=sha256:0201d89fa866f68c8ebd9d08ee6ff50c0b255f8ec63a71c16fda7af82bb887bf \ --hash=sha256:8479067f342acf957dc82ec415d355ab5edb7e7646b90dc6e2fd1d96ad084c97 - # via pydantic + # via + # -r requirements.in + # pydantic docstring-to-markdown==0.9 \ --hash=sha256:0b810e6e16737d2d0ede6182f66f513f814a11fad1222e645fbc14acde78e171 \ --hash=sha256:488b9f26339651edc7fc9386caeffd3924569072a8b67b727e253f83d5b18c59 From 9d0867423fbbc92593f64fb4fed1ab2e18267e49 Mon Sep 17 00:00:00 2001 From: Kim-Adeline Miguel Date: Fri, 17 Sep 2021 11:18:05 -0700 Subject: [PATCH 7/9] Update file path in JediLanguageServerManager --- src/client/activation/jedi/manager.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/client/activation/jedi/manager.ts b/src/client/activation/jedi/manager.ts index 91a6559f99a6..920804e039d3 100644 --- a/src/client/activation/jedi/manager.ts +++ b/src/client/activation/jedi/manager.ts @@ -86,10 +86,7 @@ export class JediLanguageServerManager implements ILanguageServerManager { try { // Version is actually hardcoded in our requirements.txt. - const requirementsTxt = await fs.readFile( - path.join(EXTENSION_ROOT_DIR, 'jedils_requirements.txt'), - 'utf-8', - ); + const requirementsTxt = await fs.readFile(path.join(EXTENSION_ROOT_DIR, 'requirements.txt'), 'utf-8'); // Search using a regex in the text const match = /jedi-language-server==([0-9\.]*)/.exec(requirementsTxt); From 68fb8cb0702f138e235bf6f6ff8130a3594c706a Mon Sep 17 00:00:00 2001 From: Kim-Adeline Miguel Date: Fri, 17 Sep 2021 11:27:55 -0700 Subject: [PATCH 8/9] jedi lsp now lives under pythonFiles/lib directly --- pythonFiles/run-jedi-language-server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pythonFiles/run-jedi-language-server.py b/pythonFiles/run-jedi-language-server.py index 31095121409f..06d6dc25e573 100644 --- a/pythonFiles/run-jedi-language-server.py +++ b/pythonFiles/run-jedi-language-server.py @@ -3,7 +3,7 @@ # Add the lib path to our sys path so jedi_language_server can find its references EXTENSION_ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) -sys.path.insert(0, os.path.join(EXTENSION_ROOT, "pythonFiles", "lib", "jedilsp")) +sys.path.insert(0, os.path.join(EXTENSION_ROOT, "pythonFiles", "lib")) from jedi_language_server.cli import cli From fb6be255c703372020e880f88882e85d9d37e654 Mon Sep 17 00:00:00 2001 From: Kim-Adeline Miguel Date: Fri, 17 Sep 2021 11:31:11 -0700 Subject: [PATCH 9/9] lol --- pythonFiles/run-jedi-language-server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pythonFiles/run-jedi-language-server.py b/pythonFiles/run-jedi-language-server.py index 06d6dc25e573..cf1aaace196c 100644 --- a/pythonFiles/run-jedi-language-server.py +++ b/pythonFiles/run-jedi-language-server.py @@ -3,7 +3,7 @@ # Add the lib path to our sys path so jedi_language_server can find its references EXTENSION_ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) -sys.path.insert(0, os.path.join(EXTENSION_ROOT, "pythonFiles", "lib")) +sys.path.insert(0, os.path.join(EXTENSION_ROOT, "pythonFiles", "lib", "python")) from jedi_language_server.cli import cli