Skip to content

Commit 88fefe2

Browse files
authored
Pin debugpy (#17619)
* pin to debugpy verion 1.4.3 * Pin to particular version of debugpy.
1 parent 63117fc commit 88fefe2

File tree

2 files changed

+73
-69
lines changed

2 files changed

+73
-69
lines changed

.github/release_plan.md

+63-64
Original file line numberDiff line numberDiff line change
@@ -2,84 +2,83 @@ All dates should align with VS Code's [iteration](https://github.com/microsoft/v
22

33
# Feature freeze ([Monday @ 17:00 America/Vancouver](XXX), XXX XX)
44

5-
- [ ] Announce the feature freeze on both Teams and e-mail, leave enough time for teams to surface any last minute issues that need to get in before freeze. Make sure debugger and Language Server teams are looped in as well.
6-
5+
- [ ] Announce the feature freeze on both Teams and e-mail, leave enough time for teams to surface any last minute issues that need to get in before freeze. Make sure debugger and Language Server teams are looped in as well.
76

87
# Release candidate (Monday, XXX XX)
98

10-
- [ ] Update `main` for the release
11-
- [ ] Change the version in [`package.json`](https://github.com/Microsoft/vscode-python/blob/main/package.json) from a `-dev` suffix to `-rc` (🤖)
12-
- [ ] Run `npm install` to make sure [`package-lock.json`](https://github.com/Microsoft/vscode-python/blob/main/package.json) is up-to-date (🤖)
13-
- [ ] Extension will pick up latest version of `debugpy`. If you need to pin to a particular version see `install_debugpy.py`.
14-
- [ ] Update `languageServerVersion` in `package.json` to point to the latest version of the [Language Server](https://github.com/Microsoft/python-language-server). Check with the language server team if this needs updating.
15-
- [ ] Update [`CHANGELOG.md`](https://github.com/Microsoft/vscode-python/blob/main/CHANGELOG.md) (🤖)
16-
- [ ] Run [`news`](https://github.com/Microsoft/vscode-python/tree/main/news) (typically `python news --final --update CHANGELOG.md | code-insiders -`)
17-
- [ ] Copy over the "Thanks" section from the previous release into the "Thanks" section for the new release
18-
- [ ] Make sure the "Thanks" section is up-to-date (e.g. compare to versions in [`requirements.txt`](https://github.com/microsoft/vscode-python/blob/main/requirements.txt))
19-
- [ ] Touch up news entries (e.g. add missing periods)
20-
- [ ] Check the Markdown rendering to make sure everything looks good
21-
- [ ] Add any relevant news entries for `debugpy` and the language server if they were updated
22-
- [ ] Update [`ThirdPartyNotices-Distribution.txt`](https://github.com/Microsoft/vscode-python/blob/main/ThirdPartyNotices-Distribution.txt) by using https://tools.opensource.microsoft.com/notice (Notes for this process are in the Team OneNote under Python VS Code → Dev Process → Third-Party Notices / TPN file)
23-
- [ ] Update [`ThirdPartyNotices-Repository.txt`](https://github.com/Microsoft/vscode-python/blob/main/ThirdPartyNotices-Repository.txt) as appropriate. This file is manually edited so you can check with the teams if anything needs to be added here.
24-
- [ ] Merge pull request into `main`
25-
- [ ] Create the [`release` branch](https://github.com/microsoft/vscode-python/branches)
26-
- [ ] If there are `release` branches that are two versions old (e.g. release-2020.[current month - 2]) you can delete them at this time
27-
- [ ] Create a new `release/YYYY.MM` branch from `main`
28-
- [ ] Update `main` post-release (🤖)
29-
- [ ] Bump the version number to the next monthly ("YYYY.MM.0-dev") release in the `main` branch
30-
- [ ] `package.json`
31-
- [ ] `package-lock.json`
32-
- [ ] Create a pull request against `main`
33-
- [ ] Merge pull request into `main`
34-
- [ ] Announce the code freeze is over on the same channels
35-
- [ ] Update Component Governance (Notes are in the team OneNote under Python VS Code → Dev Process → Component Governance).
36-
- [ ] Make sure there are no active alerts
37-
- [ ] Manually add any repository/embedded/CG-incompatible dependencies
38-
- [ ] GDPR bookkeeping (@brettcannon) (🤖; Notes in OneNote under Python VS Code → Dev Process → GDPR)
39-
- [ ] Open appropriate [documentation issues](https://github.com/microsoft/vscode-docs/issues?q=is%3Aissue+is%3Aopen+label%3Apython)
40-
- [ ] Begin drafting a [blog](http://aka.ms/pythonblog) post. Contact the PM team for this.
41-
- [ ] Ask CTI to test the release candidate
9+
- [ ] Update `main` for the release
10+
- [ ] Change the version in [`package.json`](https://github.com/Microsoft/vscode-python/blob/main/package.json) from a `-dev` suffix to `-rc` (🤖)
11+
- [ ] Run `npm install` to make sure [`package-lock.json`](https://github.com/Microsoft/vscode-python/blob/main/package.json) is up-to-date (🤖)
12+
- [ ] Check `pypi.org` and update the version of `debugpy` in `install_debugpy.py`.
13+
- [ ] Update `languageServerVersion` in `package.json` to point to the latest version of the [Language Server](https://github.com/Microsoft/python-language-server). Check with the language server team if this needs updating.
14+
- [ ] Update [`CHANGELOG.md`](https://github.com/Microsoft/vscode-python/blob/main/CHANGELOG.md) (🤖)
15+
- [ ] Run [`news`](https://github.com/Microsoft/vscode-python/tree/main/news) (typically `python news --final --update CHANGELOG.md | code-insiders -`)
16+
- [ ] Copy over the "Thanks" section from the previous release into the "Thanks" section for the new release
17+
- [ ] Make sure the "Thanks" section is up-to-date (e.g. compare to versions in [`requirements.txt`](https://github.com/microsoft/vscode-python/blob/main/requirements.txt))
18+
- [ ] Touch up news entries (e.g. add missing periods)
19+
- [ ] Check the Markdown rendering to make sure everything looks good
20+
- [ ] Add any relevant news entries for `debugpy` and the language server if they were updated
21+
- [ ] Update [`ThirdPartyNotices-Distribution.txt`](https://github.com/Microsoft/vscode-python/blob/main/ThirdPartyNotices-Distribution.txt) by using https://tools.opensource.microsoft.com/notice (Notes for this process are in the Team OneNote under Python VS Code → Dev Process → Third-Party Notices / TPN file)
22+
- [ ] Update [`ThirdPartyNotices-Repository.txt`](https://github.com/Microsoft/vscode-python/blob/main/ThirdPartyNotices-Repository.txt) as appropriate. This file is manually edited so you can check with the teams if anything needs to be added here.
23+
- [ ] Merge pull request into `main`
24+
- [ ] Create the [`release` branch](https://github.com/microsoft/vscode-python/branches)
25+
- [ ] If there are `release` branches that are two versions old (e.g. release-2020.[current month - 2]) you can delete them at this time
26+
- [ ] Create a new `release/YYYY.MM` branch from `main`
27+
- [ ] Update `main` post-release (🤖)
28+
- [ ] Bump the version number to the next monthly ("YYYY.MM.0-dev") release in the `main` branch
29+
- [ ] `package.json`
30+
- [ ] `package-lock.json`
31+
- [ ] Create a pull request against `main`
32+
- [ ] Merge pull request into `main`
33+
- [ ] Announce the code freeze is over on the same channels
34+
- [ ] Update Component Governance (Notes are in the team OneNote under Python VS Code → Dev Process → Component Governance).
35+
- [ ] Make sure there are no active alerts
36+
- [ ] Manually add any repository/embedded/CG-incompatible dependencies
37+
- [ ] GDPR bookkeeping (@brettcannon) (🤖; Notes in OneNote under Python VS Code → Dev Process → GDPR)
38+
- [ ] Open appropriate [documentation issues](https://github.com/microsoft/vscode-docs/issues?q=is%3Aissue+is%3Aopen+label%3Apython)
39+
- [ ] Begin drafting a [blog](http://aka.ms/pythonblog) post. Contact the PM team for this.
40+
- [ ] Ask CTI to test the release candidate
4241

4342
# Release (Wednesday, XXX XX)
4443

4544
## Preparation
4645

47-
- [ ] Make sure the [appropriate pull requests](https://github.com/microsoft/vscode-docs/pulls) for the [documentation](https://code.visualstudio.com/docs/python/python-tutorial) -- including the [WOW](https://code.visualstudio.com/docs/languages/python) page -- are ready
48-
- [ ] Final updates to the `release-YYYY.MM` branch
49-
- [ ] Create a branch against `release-YYYY.MM` for a pull request
50-
- [ ] Update the version in [`package.json`](https://github.com/Microsoft/vscode-python/blob/main/package.json) to remove the `-rc` (🤖)
51-
- [ ] Run `npm install` to make sure [`package-lock.json`](https://github.com/Microsoft/vscode-python/blob/main/package.json) is up-to-date (the only update should be the version number if `package-lock.json` has been kept up-to-date) (🤖)
52-
- [ ] Update [`CHANGELOG.md`](https://github.com/Microsoft/vscode-python/blob/main/CHANGELOG.md) (🤖)
53-
- [ ] Update version and date for the release section
54-
- [ ] Run [`news`](https://github.com/Microsoft/vscode-python/tree/main/news) and copy-and-paste new entries (typically `python news --final | code-insiders -`; quite possibly nothing new to add)
55-
- [ ] Update [`ThirdPartyNotices-Distribution.txt`](https://github.com/Microsoft/vscode-python/blob/main/ThirdPartyNotices-Distribution.txt) by using https://tools.opensource.microsoft.com/notice (🤖; see team notes)
56-
- [ ] Update [`ThirdPartyNotices-Repository.txt`](https://github.com/Microsoft/vscode-python/blob/main/ThirdPartyNotices-Repository.txt) manually if necessary
57-
- [ ] Create pull request against `release-YYYY.MM` (🤖)
58-
- [ ] Merge pull request into `release-YYYY.MM`
59-
- [ ] Make sure component governance is happy
46+
- [ ] Make sure the [appropriate pull requests](https://github.com/microsoft/vscode-docs/pulls) for the [documentation](https://code.visualstudio.com/docs/python/python-tutorial) -- including the [WOW](https://code.visualstudio.com/docs/languages/python) page -- are ready
47+
- [ ] Final updates to the `release-YYYY.MM` branch
48+
- [ ] Create a branch against `release-YYYY.MM` for a pull request
49+
- [ ] Update the version in [`package.json`](https://github.com/Microsoft/vscode-python/blob/main/package.json) to remove the `-rc` (🤖)
50+
- [ ] Run `npm install` to make sure [`package-lock.json`](https://github.com/Microsoft/vscode-python/blob/main/package.json) is up-to-date (the only update should be the version number if `package-lock.json` has been kept up-to-date) (🤖)
51+
- [ ] Update [`CHANGELOG.md`](https://github.com/Microsoft/vscode-python/blob/main/CHANGELOG.md) (🤖)
52+
- [ ] Update version and date for the release section
53+
- [ ] Run [`news`](https://github.com/Microsoft/vscode-python/tree/main/news) and copy-and-paste new entries (typically `python news --final | code-insiders -`; quite possibly nothing new to add)
54+
- [ ] Update [`ThirdPartyNotices-Distribution.txt`](https://github.com/Microsoft/vscode-python/blob/main/ThirdPartyNotices-Distribution.txt) by using https://tools.opensource.microsoft.com/notice (🤖; see team notes)
55+
- [ ] Update [`ThirdPartyNotices-Repository.txt`](https://github.com/Microsoft/vscode-python/blob/main/ThirdPartyNotices-Repository.txt) manually if necessary
56+
- [ ] Create pull request against `release-YYYY.MM` (🤖)
57+
- [ ] Merge pull request into `release-YYYY.MM`
58+
- [ ] Make sure component governance is happy
6059

6160
## Release
6261

63-
- [ ] Publish the release (🤖)
64-
- [ ] Make sure [CI](https://github.com/microsoft/vscode-python/actions?query=workflow%3A%22Insiders+Build%22) is passing
65-
- [ ] Download the artifact containing the VSIX and make sure no extraneous files are being included in the `.vsix` file (make sure to check for hidden files)
66-
- [ ] [Update the Marketplace](https://marketplace.visualstudio.com/manage/publishers/ms-python)
67-
- [ ] From a VS Code instance uninstall the python extension. After the publish see if the new version is available from the extensions tab. Download it and quick sanity check to make sure the extension loads.
68-
- [ ] Create a [GitHub release](https://github.com/microsoft/vscode-python/releases) (🤖)
69-
- [ ] Start creating a new release
70-
- [ ] Make the tag match the version of the released extension
71-
- [ ] Copy the changelog entry into the release as the description
72-
- [ ] Publish [documentation changes](https://github.com/Microsoft/vscode-docs/pulls?q=is%3Apr+is%3Aopen+label%3Apython)
73-
- [ ] Publish the [blog](http://aka.ms/pythonblog) post
74-
- [ ] Determine if a hotfix is needed
75-
- [ ] Merge `release-YYYY.MM` back into `main`. Don't overwrite the `-dev` version in package.json. (🤖)
62+
- [ ] Publish the release (🤖)
63+
- [ ] Make sure [CI](https://github.com/microsoft/vscode-python/actions?query=workflow%3A%22Insiders+Build%22) is passing
64+
- [ ] Download the artifact containing the VSIX and make sure no extraneous files are being included in the `.vsix` file (make sure to check for hidden files)
65+
- [ ] [Update the Marketplace](https://marketplace.visualstudio.com/manage/publishers/ms-python)
66+
- [ ] From a VS Code instance uninstall the python extension. After the publish see if the new version is available from the extensions tab. Download it and quick sanity check to make sure the extension loads.
67+
- [ ] Create a [GitHub release](https://github.com/microsoft/vscode-python/releases) (🤖)
68+
- [ ] Start creating a new release
69+
- [ ] Make the tag match the version of the released extension
70+
- [ ] Copy the changelog entry into the release as the description
71+
- [ ] Publish [documentation changes](https://github.com/Microsoft/vscode-docs/pulls?q=is%3Apr+is%3Aopen+label%3Apython)
72+
- [ ] Publish the [blog](http://aka.ms/pythonblog) post
73+
- [ ] Determine if a hotfix is needed
74+
- [ ] Merge `release-YYYY.MM` back into `main`. Don't overwrite the `-dev` version in package.json. (🤖)
7675

7776
## Clean up after _this_ release
7877

79-
- [ ] Go through [`info needed` issues](https://github.com/Microsoft/vscode-python/issues?q=is%3Aopen+label%3A%22info+needed%22+sort%3Aupdated-asc) and close any that have no activity for over a month (🤖)
80-
- [ ] GDPR bookkeeping (🤖)
78+
- [ ] Go through [`info needed` issues](https://github.com/Microsoft/vscode-python/issues?q=is%3Aopen+label%3A%22info+needed%22+sort%3Aupdated-asc) and close any that have no activity for over a month (🤖)
79+
- [ ] GDPR bookkeeping (🤖)
8180

8281
## Prep for the _next_ release
8382

84-
- [ ] Create a new [release plan](https://raw.githubusercontent.com/microsoft/vscode-python/main/.github/release_plan.md) (🤖)
85-
- [ ] [(Un-)pin](https://help.github.com/en/articles/pinning-an-issue-to-your-repository) [release plan issues](https://github.com/Microsoft/vscode-python/labels/release%20plan) (🤖)
83+
- [ ] Create a new [release plan](https://raw.githubusercontent.com/microsoft/vscode-python/main/.github/release_plan.md) (🤖)
84+
- [ ] [(Un-)pin](https://help.github.com/en/articles/pinning-an-issue-to-your-repository) [release plan issues](https://github.com/Microsoft/vscode-python/labels/release%20plan) (🤖)

pythonFiles/install_debugpy.py

+10-5
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
EXTENSION_ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
1010
DEBUGGER_DEST = os.path.join(EXTENSION_ROOT, "pythonFiles", "lib", "python")
1111
DEBUGGER_PACKAGE = "debugpy"
12-
DEBUGGER_PYTHON_VERSIONS = ("cp39",)
12+
DEBUGGER_PYTHON_ABI_VERSIONS = ("cp39",)
13+
DEBUGGER_VERSION = "1.4.3" # can also be "latest"
1314

1415

1516
def _contains(s, parts=()):
@@ -28,7 +29,7 @@ def _get_debugger_wheel_urls(data, version):
2829
return list(
2930
r["url"]
3031
for r in data["releases"][version]
31-
if _contains(r["url"], DEBUGGER_PYTHON_VERSIONS)
32+
if _contains(r["url"], DEBUGGER_PYTHON_ABI_VERSIONS)
3233
)
3334

3435

@@ -53,10 +54,14 @@ def _download_and_extract(root, url, version):
5354

5455
def main(root):
5556
data = _get_package_data()
56-
latest_version = max(data["releases"].keys(), key=version_parser)
5757

58-
for url in _get_debugger_wheel_urls(data, latest_version):
59-
_download_and_extract(root, url, latest_version)
58+
if DEBUGGER_VERSION == "latest":
59+
use_version = max(data["releases"].keys(), key=version_parser)
60+
else:
61+
use_version = DEBUGGER_VERSION
62+
63+
for url in _get_debugger_wheel_urls(data, use_version):
64+
_download_and_extract(root, url, use_version)
6065

6166

6267
if __name__ == "__main__":

0 commit comments

Comments
 (0)