Skip to content

Commit 475b046

Browse files
committed
Remove ptvsd install (microsoft#11998)
* Remove ptvsd install and update to debugpy * Remove ptvsd install and switch to debugpy
1 parent 0eff545 commit 475b046

File tree

22 files changed

+30
-94
lines changed

22 files changed

+30
-94
lines changed

.github/release_plan.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,20 @@
55

66
# Release candidate (Monday, XXX XX)
77

8-
- [ ] Announce the code freeze (not just to team but also to ptvsd and language server)
8+
- [ ] Announce the code freeze (not just to team but also to debugger and language server)
99
- [ ] Update master for the release
1010
- [ ] Create a branch against `master` for a pull request
1111
- [ ] Change the version in [`package.json`](https://github.com/Microsoft/vscode-python/blob/master/package.json) from a `-dev` suffix to `-rc` (🤖)
1212
- [ ] Run `npm install` to make sure [`package-lock.json`](https://github.com/Microsoft/vscode-python/blob/master/package.json) is up-to-date (🤖)
13-
- [ ] Update `requirements.txt` to point to latest release version of [ptvsd](https://github.com/microsoft/ptvsd).
13+
- [ ] Extension will pick up latest version of `debugpy`. If you need to pin to a particular version see `install_debugpy.py`.
1414
- [ ] Update `languageServerVersion` in `package.json` to point to the latest version of the [Language Server](https://github.com/Microsoft/python-language-server).
1515
- [ ] Update [`CHANGELOG.md`](https://github.com/Microsoft/vscode-python/blob/master/CHANGELOG.md) (🤖)
1616
- [ ] Run [`news`](https://github.com/Microsoft/vscode-python/tree/master/news) (typically `python news --final --update CHANGELOG.md | code-insiders -`)
1717
- [ ] Copy over the "Thanks" section from the previous release
1818
- [ ] Make sure the "Thanks" section is up-to-date (e.g. compare to versions in requirements.json)
1919
- [ ] Touch up news entries (e.g. add missing periods)
2020
- [ ] Check the Markdown rendering to make sure everything looks good
21-
- [ ] Add any relevant news entries for ptvsd and the language server if they were updated
21+
- [ ] Add any relevant news entries for `debugpy` and the language server if they were updated
2222
- [ ] Update [`ThirdPartyNotices-Distribution.txt`](https://github.com/Microsoft/vscode-python/blob/master/ThirdPartyNotices-Distribution.txt) by using https://tools.opensource.microsoft.com/notice (see team notes)
2323
- [ ] Update [`ThirdPartyNotices-Repository.txt`](https://github.com/Microsoft/vscode-python/blob/master/ThirdPartyNotices-Repository.txt) as appropriate
2424
- [ ] Create a pull request against `master` (🤖)

.github/test_plan.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ class FailingTests(unittest.TestCase):
320320
- [ ] `Debug Test` works
321321
- [ ] Module/suite setup methods are also run (run the `test_setup` method to verify)
322322
- [ ] while debugging tests, an uncaught exception in a test does not
323-
cause ptvsd to raise SystemExit
323+
cause `debugpy` to raise `SystemExit` exception.
324324

325325
#### [`pytest`](https://code.visualstudio.com/docs/python/unit-testing#_pytest-configuration-settings)
326326

.github/workflows/ci.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,8 @@ jobs:
4545
- name: Install Python requirements
4646
run: |
4747
python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade -r requirements.txt
48-
python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python/old_ptvsd --no-cache-dir --implementation py --no-deps --upgrade 'ptvsd==4.3.2'
4948
50-
- name: Install debugpy wheels
49+
- name: Install debugpy with wheels
5150
run: |
5251
python -m pip install wheel
5352
python -m pip --disable-pip-version-check install -r build/debugger-install-requirements.txt
@@ -208,6 +207,7 @@ jobs:
208207
# Something in Node 12.16.0 breaks the TS debug adapter, and ubuntu-latest bundles Node 12.16.1.
209208
# We can remove this when we switch over to the python-based DA in https://github.com/microsoft/vscode-python/issues/7136.
210209
# See https://github.com/microsoft/ptvsd/issues/2068
210+
# At this point pinning is only needed for consistency. We no longer have TS debug adapter.
211211
NODE_VERSION: 12.15.0
212212
steps:
213213
- name: Checkout
@@ -257,7 +257,6 @@ jobs:
257257
- name: Install Python requirements
258258
run: |
259259
python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade -r requirements.txt
260-
python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python/old_ptvsd --no-cache-dir --implementation py --no-deps --upgrade 'ptvsd==4.3.2'
261260
# 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.
262261
python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade --pre debugpy
263262
@@ -457,7 +456,6 @@ jobs:
457456
run: |
458457
python -m pip install --upgrade -r build/test-requirements.txt
459458
python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade -r requirements.txt
460-
python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python/old_ptvsd --no-cache-dir --implementation py --no-deps --upgrade 'ptvsd==4.3.2'
461459
python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade --pre debugpy
462460
shell: bash
463461

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ cucumber-report.json
2222
**/.venv*/
2323
port.txt
2424
precommit.hook
25-
pythonFiles/experimental/ptvsd/**
2625
pythonFiles/lib/**
2726
debug_coverage*/**
2827
languageServer/**
@@ -38,7 +37,7 @@ xunit-test-results.xml
3837
build/ci/performance/performance-results.json
3938
!build/
4039
debug*.log
41-
ptvsd*.log
40+
debugpy*.log
4241
pydevd*.log
4342
nodeLanguageServer/**
4443
nodeLanguageServer.*/**

CONTRIBUTING.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,6 @@ Steps to build the extension on your machine once you've cloned the repo:
335335
# Perform the next steps in the vscode-python folder.
336336
> npm ci
337337
> python3 -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade -r requirements.txt
338-
> python3 -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python/old_ptvsd --no-cache-dir --implementation py --no-deps --upgrade 'ptvsd==4.3.2'
339338
# For python 3.6 and lower use this command to install the debugger
340339
> python3 -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade --pre debugpy
341340
# For python 3.7 and greater use this command to install the debugger

build/ci/templates/steps/build.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ steps:
2020

2121
- bash: |
2222
python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade -r requirements.txt
23-
python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python/old_ptvsd --no-cache-dir --implementation py --no-deps --upgrade 'ptvsd==4.3.2'
2423
failOnStderr: true
2524
displayName: 'pip install requirements'
2625

build/ci/templates/test_phases.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ steps:
8989
- template: steps/generate_upload_coverage.yml
9090

9191
# Install the requirements for the Python or the system tests. This includes the supporting libs that
92-
# we ship in our extension such as PTVSD, DEBUGPY and Jedi.
92+
# we ship in our extension such as DEBUGPY and Jedi.
9393
#
9494
# This task will only run if variable `NeedsPythonTestReqs` is true.
9595
#
@@ -100,7 +100,6 @@ steps:
100100
- bash: |
101101
python -m pip install --upgrade -r build/test-requirements.txt
102102
python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade -r requirements.txt
103-
python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python/old_ptvsd --no-cache-dir --implementation py --no-deps --upgrade 'ptvsd==4.3.2'
104103
python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade --pre debugpy
105104
displayName: 'pip install system test requirements'
106105
condition: and(succeeded(), eq(variables['NeedsPythonTestReqs'], 'true'))

gulpfile.js

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ gulp.task('installPythonRequirements', async () => {
346346
});
347347

348348
// See https://github.com/microsoft/vscode-python/issues/7136
349-
gulp.task('installNewDebugpy', async () => {
349+
gulp.task('installDebugpy', async () => {
350350
// Install dependencies needed for 'install_debugpy.py'
351351
const depsArgs = [
352352
'-m',
@@ -392,37 +392,7 @@ gulp.task('installNewDebugpy', async () => {
392392
rmrf.sync('./pythonFiles/lib/temp');
393393
});
394394

395-
// Install the last stable version of old PTVSD (which includes a middle layer adapter and requires ptvsd_launcher.py)
396-
// until all users have migrated to the new debug adapter + new DEBUGPY (specified in requirements.txt)
397-
// See https://github.com/microsoft/vscode-python/issues/7136
398-
gulp.task('installOldPtvsd', async () => {
399-
const args = [
400-
'-m',
401-
'pip',
402-
'--disable-pip-version-check',
403-
'install',
404-
'-t',
405-
'./pythonFiles/lib/python/old_ptvsd',
406-
'--no-cache-dir',
407-
'--implementation',
408-
'py',
409-
'--no-deps',
410-
'--upgrade',
411-
'ptvsd==4.3.2'
412-
];
413-
const success = await spawnAsync(process.env.CI_PYTHON_PATH || 'python3', args, undefined, true)
414-
.then(() => true)
415-
.catch((ex) => {
416-
console.error("Failed to install PTVSD using 'python3'", ex);
417-
return false;
418-
});
419-
if (!success) {
420-
console.info("Failed to install PTVSD using 'python3', attempting to install using 'python'");
421-
await spawnAsync('python', args).catch((ex) => console.error("Failed to install PTVSD using 'python'", ex));
422-
}
423-
});
424-
425-
gulp.task('installPythonLibs', gulp.series('installPythonRequirements', 'installOldPtvsd', 'installNewDebugpy'));
395+
gulp.task('installPythonLibs', gulp.series('installPythonRequirements', 'installDebugpy'));
426396

427397
function uploadExtension(uploadBlobName) {
428398
const azure = require('gulp-azure-storage');

package.nls.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@
492492
"DataScience.createdNewNotebook": "{0}: Creating new notebook ",
493493
"DataScience.createdNewKernel": "{0}: Kernel started: {1}",
494494
"DataScience.kernelInvalid": "Kernel {0} is not usable. Check the Jupyter output tab for more information.",
495-
"OutdatedDebugger.updateDebuggerMessage": "We noticed you are attaching to ptvsd (Python debugger), which will be deprecated on May 1st, 2020. Please switch to [debugpy](https://aka.ms/migrateToDebugpy).",
495+
"OutdatedDebugger.updateDebuggerMessage": "We noticed you are attaching to ptvsd (Python debugger), which was deprecated on May 1st, 2020. Please switch to [debugpy](https://aka.ms/migrateToDebugpy).",
496496
"DataScience.nativeDependencyFail": "We cannot launch a jupyter server because your OS is not supported. Select an already running server if you wish to continue. {0}",
497497
"DataScience.selectNewServer": "Pick Running Server",
498498
"DataScience.jupyterSelectURIRemoteLabel": "Existing",

src/client/api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export interface IExtensionApi {
2626
/**
2727
* Generate an array of strings for commands to pass to the Python executable to launch the debugger for remote debugging.
2828
* Users can append another array of strings of what they want to execute along with relevant arguments to Python.
29-
* E.g `['/Users/..../pythonVSCode/pythonFiles/ptvsd_launcher.py', '--host', 'localhost', '--port', '57039', '--wait']`
29+
* E.g `['/Users/..../pythonVSCode/pythonFiles/lib/python/debugpy', '--listen', 'localhost:57039', '--wait-for-client']`
3030
* @param {string} host
3131
* @param {number} port
3232
* @param {boolean} [waitUntilDebuggerAttaches=true]

0 commit comments

Comments
 (0)