From d7e2113b2dba8dec2868eb2d86112b4cefdb8fc8 Mon Sep 17 00:00:00 2001 From: Karthik Nadig Date: Mon, 4 Oct 2021 14:29:02 -0700 Subject: [PATCH 1/2] pin to debugpy verion 1.4.3 --- pythonFiles/install_debugpy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pythonFiles/install_debugpy.py b/pythonFiles/install_debugpy.py index a74a860cbbf6..0033ac498115 100644 --- a/pythonFiles/install_debugpy.py +++ b/pythonFiles/install_debugpy.py @@ -53,7 +53,7 @@ def _download_and_extract(root, url, version): def main(root): data = _get_package_data() - latest_version = max(data["releases"].keys(), key=version_parser) + latest_version = "1.4.3" for url in _get_debugger_wheel_urls(data, latest_version): _download_and_extract(root, url, latest_version) From fbf4fa995d68db6a7e05e9ba58685f47e87d817f Mon Sep 17 00:00:00 2001 From: Karthik Nadig Date: Mon, 4 Oct 2021 14:54:13 -0700 Subject: [PATCH 2/2] Pin to particular version of debugpy. --- .github/release_plan.md | 127 ++++++++++++++++----------------- pythonFiles/install_debugpy.py | 15 ++-- 2 files changed, 73 insertions(+), 69 deletions(-) diff --git a/.github/release_plan.md b/.github/release_plan.md index 2e77f2e47736..599ab27ed4c3 100644 --- a/.github/release_plan.md +++ b/.github/release_plan.md @@ -2,84 +2,83 @@ All dates should align with VS Code's [iteration](https://github.com/microsoft/v # Feature freeze ([Monday @ 17:00 America/Vancouver](XXX), XXX XX) -- [ ] 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. - +- [ ] 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. # Release candidate (Monday, XXX XX) -- [ ] Update `main` for the release - - [ ] Change the version in [`package.json`](https://github.com/Microsoft/vscode-python/blob/main/package.json) from a `-dev` suffix to `-rc` (🤖) - - [ ] Run `npm install` to make sure [`package-lock.json`](https://github.com/Microsoft/vscode-python/blob/main/package.json) is up-to-date (🤖) - - [ ] Extension will pick up latest version of `debugpy`. If you need to pin to a particular version see `install_debugpy.py`. - - [ ] 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. - - [ ] Update [`CHANGELOG.md`](https://github.com/Microsoft/vscode-python/blob/main/CHANGELOG.md) (🤖) - - [ ] Run [`news`](https://github.com/Microsoft/vscode-python/tree/main/news) (typically `python news --final --update CHANGELOG.md | code-insiders -`) - - [ ] Copy over the "Thanks" section from the previous release into the "Thanks" section for the new release - - [ ] 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)) - - [ ] Touch up news entries (e.g. add missing periods) - - [ ] Check the Markdown rendering to make sure everything looks good - - [ ] Add any relevant news entries for `debugpy` and the language server if they were updated - - [ ] 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) - - [ ] 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. - - [ ] Merge pull request into `main` -- [ ] Create the [`release` branch](https://github.com/microsoft/vscode-python/branches) - - [ ] If there are `release` branches that are two versions old (e.g. release-2020.[current month - 2]) you can delete them at this time - - [ ] Create a new `release/YYYY.MM` branch from `main` -- [ ] Update `main` post-release (🤖) - - [ ] Bump the version number to the next monthly ("YYYY.MM.0-dev") release in the `main` branch - - [ ] `package.json` - - [ ] `package-lock.json` - - [ ] Create a pull request against `main` - - [ ] Merge pull request into `main` -- [ ] Announce the code freeze is over on the same channels -- [ ] Update Component Governance (Notes are in the team OneNote under Python VS Code → Dev Process → Component Governance). - - [ ] Make sure there are no active alerts - - [ ] Manually add any repository/embedded/CG-incompatible dependencies -- [ ] GDPR bookkeeping (@brettcannon) (🤖; Notes in OneNote under Python VS Code → Dev Process → GDPR) -- [ ] Open appropriate [documentation issues](https://github.com/microsoft/vscode-docs/issues?q=is%3Aissue+is%3Aopen+label%3Apython) -- [ ] Begin drafting a [blog](http://aka.ms/pythonblog) post. Contact the PM team for this. -- [ ] Ask CTI to test the release candidate +- [ ] Update `main` for the release + - [ ] Change the version in [`package.json`](https://github.com/Microsoft/vscode-python/blob/main/package.json) from a `-dev` suffix to `-rc` (🤖) + - [ ] Run `npm install` to make sure [`package-lock.json`](https://github.com/Microsoft/vscode-python/blob/main/package.json) is up-to-date (🤖) + - [ ] Check `pypi.org` and update the version of `debugpy` in `install_debugpy.py`. + - [ ] 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. + - [ ] Update [`CHANGELOG.md`](https://github.com/Microsoft/vscode-python/blob/main/CHANGELOG.md) (🤖) + - [ ] Run [`news`](https://github.com/Microsoft/vscode-python/tree/main/news) (typically `python news --final --update CHANGELOG.md | code-insiders -`) + - [ ] Copy over the "Thanks" section from the previous release into the "Thanks" section for the new release + - [ ] 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)) + - [ ] Touch up news entries (e.g. add missing periods) + - [ ] Check the Markdown rendering to make sure everything looks good + - [ ] Add any relevant news entries for `debugpy` and the language server if they were updated + - [ ] 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) + - [ ] 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. + - [ ] Merge pull request into `main` +- [ ] Create the [`release` branch](https://github.com/microsoft/vscode-python/branches) + - [ ] If there are `release` branches that are two versions old (e.g. release-2020.[current month - 2]) you can delete them at this time + - [ ] Create a new `release/YYYY.MM` branch from `main` +- [ ] Update `main` post-release (🤖) + - [ ] Bump the version number to the next monthly ("YYYY.MM.0-dev") release in the `main` branch + - [ ] `package.json` + - [ ] `package-lock.json` + - [ ] Create a pull request against `main` + - [ ] Merge pull request into `main` +- [ ] Announce the code freeze is over on the same channels +- [ ] Update Component Governance (Notes are in the team OneNote under Python VS Code → Dev Process → Component Governance). + - [ ] Make sure there are no active alerts + - [ ] Manually add any repository/embedded/CG-incompatible dependencies +- [ ] GDPR bookkeeping (@brettcannon) (🤖; Notes in OneNote under Python VS Code → Dev Process → GDPR) +- [ ] Open appropriate [documentation issues](https://github.com/microsoft/vscode-docs/issues?q=is%3Aissue+is%3Aopen+label%3Apython) +- [ ] Begin drafting a [blog](http://aka.ms/pythonblog) post. Contact the PM team for this. +- [ ] Ask CTI to test the release candidate # Release (Wednesday, XXX XX) ## Preparation -- [ ] 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 -- [ ] Final updates to the `release-YYYY.MM` branch - - [ ] Create a branch against `release-YYYY.MM` for a pull request - - [ ] Update the version in [`package.json`](https://github.com/Microsoft/vscode-python/blob/main/package.json) to remove the `-rc` (🤖) - - [ ] 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) (🤖) - - [ ] Update [`CHANGELOG.md`](https://github.com/Microsoft/vscode-python/blob/main/CHANGELOG.md) (🤖) - - [ ] Update version and date for the release section - - [ ] 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) - - [ ] 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) - - [ ] Update [`ThirdPartyNotices-Repository.txt`](https://github.com/Microsoft/vscode-python/blob/main/ThirdPartyNotices-Repository.txt) manually if necessary - - [ ] Create pull request against `release-YYYY.MM` (🤖) - - [ ] Merge pull request into `release-YYYY.MM` -- [ ] Make sure component governance is happy +- [ ] 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 +- [ ] Final updates to the `release-YYYY.MM` branch + - [ ] Create a branch against `release-YYYY.MM` for a pull request + - [ ] Update the version in [`package.json`](https://github.com/Microsoft/vscode-python/blob/main/package.json) to remove the `-rc` (🤖) + - [ ] 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) (🤖) + - [ ] Update [`CHANGELOG.md`](https://github.com/Microsoft/vscode-python/blob/main/CHANGELOG.md) (🤖) + - [ ] Update version and date for the release section + - [ ] 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) + - [ ] 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) + - [ ] Update [`ThirdPartyNotices-Repository.txt`](https://github.com/Microsoft/vscode-python/blob/main/ThirdPartyNotices-Repository.txt) manually if necessary + - [ ] Create pull request against `release-YYYY.MM` (🤖) + - [ ] Merge pull request into `release-YYYY.MM` +- [ ] Make sure component governance is happy ## Release -- [ ] Publish the release (🤖) - - [ ] Make sure [CI](https://github.com/microsoft/vscode-python/actions?query=workflow%3A%22Insiders+Build%22) is passing - - [ ] 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) - - [ ] [Update the Marketplace](https://marketplace.visualstudio.com/manage/publishers/ms-python) - - [ ] 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. -- [ ] Create a [GitHub release](https://github.com/microsoft/vscode-python/releases) (🤖) - - [ ] Start creating a new release - - [ ] Make the tag match the version of the released extension - - [ ] Copy the changelog entry into the release as the description -- [ ] Publish [documentation changes](https://github.com/Microsoft/vscode-docs/pulls?q=is%3Apr+is%3Aopen+label%3Apython) -- [ ] Publish the [blog](http://aka.ms/pythonblog) post -- [ ] Determine if a hotfix is needed -- [ ] Merge `release-YYYY.MM` back into `main`. Don't overwrite the `-dev` version in package.json. (🤖) +- [ ] Publish the release (🤖) + - [ ] Make sure [CI](https://github.com/microsoft/vscode-python/actions?query=workflow%3A%22Insiders+Build%22) is passing + - [ ] 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) + - [ ] [Update the Marketplace](https://marketplace.visualstudio.com/manage/publishers/ms-python) + - [ ] 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. +- [ ] Create a [GitHub release](https://github.com/microsoft/vscode-python/releases) (🤖) + - [ ] Start creating a new release + - [ ] Make the tag match the version of the released extension + - [ ] Copy the changelog entry into the release as the description +- [ ] Publish [documentation changes](https://github.com/Microsoft/vscode-docs/pulls?q=is%3Apr+is%3Aopen+label%3Apython) +- [ ] Publish the [blog](http://aka.ms/pythonblog) post +- [ ] Determine if a hotfix is needed +- [ ] Merge `release-YYYY.MM` back into `main`. Don't overwrite the `-dev` version in package.json. (🤖) ## Clean up after _this_ release -- [ ] 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 (🤖) -- [ ] GDPR bookkeeping (🤖) +- [ ] 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 (🤖) +- [ ] GDPR bookkeeping (🤖) ## Prep for the _next_ release -- [ ] Create a new [release plan](https://raw.githubusercontent.com/microsoft/vscode-python/main/.github/release_plan.md) (🤖) -- [ ] [(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) (🤖) +- [ ] Create a new [release plan](https://raw.githubusercontent.com/microsoft/vscode-python/main/.github/release_plan.md) (🤖) +- [ ] [(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) (🤖) diff --git a/pythonFiles/install_debugpy.py b/pythonFiles/install_debugpy.py index 0033ac498115..3aa3a60c3091 100644 --- a/pythonFiles/install_debugpy.py +++ b/pythonFiles/install_debugpy.py @@ -9,7 +9,8 @@ EXTENSION_ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) DEBUGGER_DEST = os.path.join(EXTENSION_ROOT, "pythonFiles", "lib", "python") DEBUGGER_PACKAGE = "debugpy" -DEBUGGER_PYTHON_VERSIONS = ("cp39",) +DEBUGGER_PYTHON_ABI_VERSIONS = ("cp39",) +DEBUGGER_VERSION = "1.4.3" # can also be "latest" def _contains(s, parts=()): @@ -28,7 +29,7 @@ def _get_debugger_wheel_urls(data, version): return list( r["url"] for r in data["releases"][version] - if _contains(r["url"], DEBUGGER_PYTHON_VERSIONS) + if _contains(r["url"], DEBUGGER_PYTHON_ABI_VERSIONS) ) @@ -53,10 +54,14 @@ def _download_and_extract(root, url, version): def main(root): data = _get_package_data() - latest_version = "1.4.3" - for url in _get_debugger_wheel_urls(data, latest_version): - _download_and_extract(root, url, latest_version) + if DEBUGGER_VERSION == "latest": + use_version = max(data["releases"].keys(), key=version_parser) + else: + use_version = DEBUGGER_VERSION + + for url in _get_debugger_wheel_urls(data, use_version): + _download_and_extract(root, url, use_version) if __name__ == "__main__":