Skip to content

Commit 8fef418

Browse files
committed
Merge remote-tracking branch 'upstream/main' into unittest1
2 parents 40b0d52 + f32f3b8 commit 8fef418

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+2075
-2622
lines changed

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

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ runs:
2929
cache: 'pip'
3030
cache-dependency-path: |
3131
requirements.txt
32-
build/build-install-requirements.txt
3332
python_files/jedilsp_requirements/requirements.txt
3433
3534
- name: Upgrade Pip
@@ -38,27 +37,13 @@ runs:
3837

3938
# For faster/better builds of sdists.
4039
- name: Install build pre-requisite
41-
run: python -m pip install wheel
40+
run: python -m pip install wheel nox
4241
shell: bash
4342

44-
- name: Install Python dependencies
45-
uses: brettcannon/pip-secure-install@v1
46-
with:
47-
options: '-t ./python_files/lib/python --implementation py'
48-
49-
- name: Install debugpy and get-pip
50-
run: |
51-
python -m pip --disable-pip-version-check install packaging
52-
python ./python_files/install_debugpy.py
53-
python ./python_files/download_get_pip.py
43+
- name: Install Python Extension dependencies (jedi, debugpy, etc.)
44+
run: nox --session install_python_libs
5445
shell: bash
5546

56-
- name: Install Jedi LSP
57-
uses: brettcannon/pip-secure-install@v1
58-
with:
59-
requirements-file: './python_files/jedilsp_requirements/requirements.txt'
60-
options: '-t ./python_files/lib/jedilsp --implementation py --platform any --abi none'
61-
6247
- name: Run npm ci
6348
run: npm ci --prefer-offline
6449
shell: bash

.github/workflows/build.yml

Lines changed: 7 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -188,43 +188,19 @@ jobs:
188188
with:
189189
python-version: ${{ matrix.python }}
190190

191-
- name: Download get-pip.py
192-
run: |
193-
python -m pip install wheel
194-
python -m pip install -r build/build-install-requirements.txt
195-
python ./python_files/download_get_pip.py
196-
shell: bash
191+
- name: Upgrade Pip
192+
run: python -m pip install -U pip
197193

198-
- name: Install debugpy
199-
run: |
200-
# 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.
201-
python -m pip --disable-pip-version-check install -t ./python_files/lib/python --no-cache-dir --implementation py --no-deps --upgrade --pre debugpy
194+
# For faster/better builds of sdists.
195+
- name: Install build pre-requisite
196+
run: python -m pip install wheel nox
202197

203-
- name: Install core Python requirements
204-
uses: brettcannon/pip-secure-install@v1
205-
with:
206-
requirements-file: '"${{ env.special-working-directory-relative }}/requirements.txt"'
207-
options: '-t "${{ env.special-working-directory-relative }}/python_files/lib/python" --no-cache-dir --implementation py'
208-
if: startsWith(matrix.python, 3.)
209-
210-
- name: Install Jedi requirements
211-
uses: brettcannon/pip-secure-install@v1
212-
with:
213-
requirements-file: '"${{ env.special-working-directory-relative }}/python_files/jedilsp_requirements/requirements.txt"'
214-
options: '-t "${{ env.special-working-directory-relative }}/python_files/lib/jedilsp" --no-cache-dir --implementation py'
215-
if: startsWith(matrix.python, 3.)
198+
- name: Install Python Extension dependencies (jedi, debugpy, etc.)
199+
run: nox --session install_python_libs
216200

217201
- name: Install test requirements
218202
run: python -m pip install --upgrade -r build/test-requirements.txt
219203

220-
- name: Install debugpy wheels (Python ${{ matrix.python }})
221-
run: |
222-
python -m pip install wheel
223-
python -m pip install -r build/build-install-requirements.txt
224-
python ./python_files/install_debugpy.py
225-
shell: bash
226-
if: matrix.test-suite == 'debugger'
227-
228204
- name: Install functional test requirements
229205
run: python -m pip install --upgrade -r ./build/functional-test-requirements.txt
230206
if: matrix.test-suite == 'functional'

.github/workflows/pr-check.yml

Lines changed: 7 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -176,41 +176,19 @@ jobs:
176176
with:
177177
python-version: ${{ matrix.python }}
178178

179-
- name: Install debugpy
180-
run: |
181-
# 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.
182-
python -m pip --disable-pip-version-check install -t ./python_files/lib/python --no-cache-dir --implementation py --no-deps --upgrade --pre debugpy
179+
- name: Upgrade Pip
180+
run: python -m pip install -U pip
183181

184-
- name: Download get-pip.py
185-
run: |
186-
python -m pip install wheel
187-
python -m pip install -r build/build-install-requirements.txt
188-
python ./python_files/download_get_pip.py
189-
shell: bash
182+
# For faster/better builds of sdists.
183+
- name: Install build pre-requisite
184+
run: python -m pip install wheel nox
190185

191-
- name: Install base Python requirements
192-
uses: brettcannon/pip-secure-install@v1
193-
with:
194-
requirements-file: '"${{ env.special-working-directory-relative }}/requirements.txt"'
195-
options: '-t "${{ env.special-working-directory-relative }}/python_files/lib/python" --no-cache-dir --implementation py'
196-
197-
- name: Install Jedi requirements
198-
uses: brettcannon/pip-secure-install@v1
199-
with:
200-
requirements-file: '"${{ env.special-working-directory-relative }}/python_files/jedilsp_requirements/requirements.txt"'
201-
options: '-t "${{ env.special-working-directory-relative }}/python_files/lib/jedilsp" --no-cache-dir --implementation py'
186+
- name: Install Python Extension dependencies (jedi, debugpy, etc.)
187+
run: nox --session install_python_libs
202188

203189
- name: Install test requirements
204190
run: python -m pip install --upgrade -r build/test-requirements.txt
205191

206-
- name: Install debugpy wheels (Python ${{ matrix.python }})
207-
run: |
208-
python -m pip install wheel
209-
python -m pip --disable-pip-version-check install -r build/build-install-requirements.txt
210-
python ./python_files/install_debugpy.py
211-
shell: bash
212-
if: matrix.test-suite == 'debugger'
213-
214192
- name: Install functional test requirements
215193
run: python -m pip install --upgrade -r ./build/functional-test-requirements.txt
216194
if: matrix.test-suite == 'functional'

.vscodeignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ precommit.hook
5959
python_files/**/*.pyc
6060
python_files/lib/**/*.egg-info/**
6161
python_files/lib/python/bin/**
62-
python_files/jedilsp_requirements/**
6362
python_files/tests/**
6463
scripts/**
6564
src/**

build/azure-pipeline.pre-release.yml

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -49,22 +49,12 @@ extends:
4949
- script: python -m pip install -U pip
5050
displayName: Upgrade pip
5151

52-
- script: python -m pip install wheel
53-
displayName: Install wheel
52+
- script: python -m pip install wheel nox
53+
displayName: Install wheel and nox
5454

5555
- script: |
56-
python -m pip --disable-pip-version-check install -r build/build-install-requirements.txt
57-
python ./python_files/install_debugpy.py
58-
python ./python_files/download_get_pip.py
59-
displayName: Install debugpy and get-pip.py
60-
61-
- script: |
62-
python -m pip install --no-deps --require-hashes --only-binary :all: -t ./python_files/lib/python --implementation py -r ./requirements.txt
63-
displayName: Install Python dependencies
64-
65-
- script: |
66-
python -m pip install --no-deps --require-hashes --only-binary :all: -t ./python_files/lib/jedilsp --implementation py --platform any --abi none -r ./python_files/jedilsp_requirements/requirements.txt
67-
displayName: Install Jedi Language Server
56+
nox --session install_python_libs
57+
displayName: Install debugpy, Jedi, get-pip, etc
6858
6959
- script: |
7060
python ./build/update_ext_version.py --for-publishing

build/azure-pipeline.stable.yml

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -44,22 +44,12 @@ extends:
4444
- script: python -m pip install -U pip
4545
displayName: Upgrade pip
4646

47-
- script: python -m pip install wheel
48-
displayName: Install wheel
47+
- script: python -m pip install wheel nox
48+
displayName: Install wheel and nox
4949

5050
- script: |
51-
python -m pip --disable-pip-version-check install -r build/build-install-requirements.txt
52-
python ./python_files/install_debugpy.py
53-
python ./python_files/download_get_pip.py
54-
displayName: Install debugpy and get-pip.py
55-
56-
- script: |
57-
python -m pip install --no-deps --require-hashes --only-binary :all: -t ./python_files/lib/python --implementation py -r ./requirements.txt
58-
displayName: Install Python dependencies
59-
60-
- script: |
61-
python -m pip install --no-deps --require-hashes --only-binary :all: -t ./python_files/lib/jedilsp --implementation py --platform any --abi none -r ./python_files/jedilsp_requirements/requirements.txt
62-
displayName: Install Jedi Language Server
51+
nox --session install_python_libs
52+
displayName: Install debugpy, Jedi, get-pip, etc
6353
6454
- script: |
6555
python ./build/update_ext_version.py --release --for-publishing

build/test-requirements.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,6 @@ torch-tb-profiler
1919

2020
# extension build tests
2121
freezegun
22+
23+
# testing custom pytest plugin require the use of named pipes
24+
namedpipe; platform_system == "Windows"

package.json

Lines changed: 14 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -84,15 +84,24 @@
8484
"description": "%walkthrough.pythonWelcome.description%",
8585
"when": "workspacePlatform != webworker",
8686
"steps": [
87+
{
88+
"id": "python.createPythonFolder",
89+
"title": "%walkthrough.step.python.createPythonFolder.title%",
90+
"description": "%walkthrough.step.python.createPythonFolder.description%",
91+
"media": {
92+
"svg": "resources/walkthrough/open-folder.svg",
93+
"altText": "%walkthrough.step.python.createPythonFile.altText%"
94+
},
95+
"when": "workspaceFolderCount = 0"
96+
},
8797
{
8898
"id": "python.createPythonFile",
8999
"title": "%walkthrough.step.python.createPythonFile.title%",
90100
"description": "%walkthrough.step.python.createPythonFile.description%",
91101
"media": {
92102
"svg": "resources/walkthrough/open-folder.svg",
93103
"altText": "%walkthrough.step.python.createPythonFile.altText%"
94-
},
95-
"when": ""
104+
}
96105
},
97106
{
98107
"id": "python.installPythonWin8",
@@ -123,25 +132,14 @@
123132
"when": "workspacePlatform == linux && showInstallPythonTile",
124133
"command": "workbench.action.terminal.new"
125134
},
126-
{
127-
"id": "python.selectInterpreter",
128-
"title": "%walkthrough.step.python.selectInterpreter.title%",
129-
"description": "%walkthrough.step.python.selectInterpreter.description%",
130-
"media": {
131-
"svg": "resources/walkthrough/python-interpreter.svg",
132-
"altText": "%walkthrough.step.python.selectInterpreter.altText%"
133-
},
134-
"when": "workspaceFolderCount == 0"
135-
},
136135
{
137136
"id": "python.createEnvironment",
138137
"title": "%walkthrough.step.python.createEnvironment.title%",
139138
"description": "%walkthrough.step.python.createEnvironment.description%",
140139
"media": {
141140
"svg": "resources/walkthrough/create-environment.svg",
142141
"altText": "%walkthrough.step.python.createEnvironment.altText%"
143-
},
144-
"when": "workspaceFolderCount > 0"
142+
}
145143
},
146144
{
147145
"id": "python.runAndDebug",
@@ -150,8 +148,7 @@
150148
"media": {
151149
"svg": "resources/walkthrough/rundebug2.svg",
152150
"altText": "%walkthrough.step.python.runAndDebug.altText%"
153-
},
154-
"when": ""
151+
}
155152
},
156153
{
157154
"id": "python.learnMoreWithDS",
@@ -160,85 +157,7 @@
160157
"media": {
161158
"altText": "%walkthrough.step.python.learnMoreWithDS.altText%",
162159
"svg": "resources/walkthrough/learnmore.svg"
163-
},
164-
"when": ""
165-
}
166-
]
167-
},
168-
{
169-
"id": "pythonWelcome2",
170-
"title": "%walkthrough.pythonWelcome.title%",
171-
"description": "%walkthrough.pythonWelcome.description%",
172-
"when": "false",
173-
"steps": [
174-
{
175-
"id": "python.createPythonFile",
176-
"title": "%walkthrough.step.python.createPythonFile.title%",
177-
"description": "%walkthrough.step.python.createPythonFile.description%",
178-
"media": {
179-
"svg": "resources/walkthrough/open-folder.svg",
180-
"altText": "%walkthrough.step.python.createPythonFile.altText%"
181-
},
182-
"when": ""
183-
},
184-
{
185-
"id": "python.installPythonWin8",
186-
"title": "%walkthrough.step.python.installPythonWin8.title%",
187-
"description": "%walkthrough.step.python.installPythonWin8.description%",
188-
"media": {
189-
"markdown": "resources/walkthrough/install-python-windows-8.md"
190-
},
191-
"when": "workspacePlatform == windows && showInstallPythonTile"
192-
},
193-
{
194-
"id": "python.installPythonMac",
195-
"title": "%walkthrough.step.python.installPythonMac.title%",
196-
"description": "%walkthrough.step.python.installPythonMac.description%",
197-
"media": {
198-
"markdown": "resources/walkthrough/install-python-macos.md"
199-
},
200-
"when": "workspacePlatform == mac && showInstallPythonTile",
201-
"command": "workbench.action.terminal.new"
202-
},
203-
{
204-
"id": "python.installPythonLinux",
205-
"title": "%walkthrough.step.python.installPythonLinux.title%",
206-
"description": "%walkthrough.step.python.installPythonLinux.description%",
207-
"media": {
208-
"markdown": "resources/walkthrough/install-python-linux.md"
209-
},
210-
"when": "workspacePlatform == linux && showInstallPythonTile",
211-
"command": "workbench.action.terminal.new"
212-
},
213-
{
214-
"id": "python.createEnvironment2",
215-
"title": "%walkthrough.step.python.createEnvironment.title2%",
216-
"description": "%walkthrough.step.python.createEnvironment.description2%",
217-
"media": {
218-
"svg": "resources/walkthrough/create-environment.svg",
219-
"altText": "%walkthrough.step.python.createEnvironment.altText%"
220-
},
221-
"when": ""
222-
},
223-
{
224-
"id": "python.runAndDebug2",
225-
"title": "%walkthrough.step.python.runAndDebug2.title%",
226-
"description": "%walkthrough.step.python.runAndDebug2.description%",
227-
"media": {
228-
"svg": "resources/walkthrough/rundebug2.svg",
229-
"altText": "%walkthrough.step.python.runAndDebug.altText%"
230-
},
231-
"when": ""
232-
},
233-
{
234-
"id": "python.learnMoreWithDS2",
235-
"title": "%walkthrough.step.python.learnMoreWithDS2.title%",
236-
"description": "%walkthrough.step.python.learnMoreWithDS.description2%",
237-
"media": {
238-
"altText": "%walkthrough.step.python.learnMoreWithDS.altText%",
239-
"svg": "resources/walkthrough/learnmore.svg"
240-
},
241-
"when": ""
160+
}
242161
}
243162
]
244163
},

0 commit comments

Comments
 (0)