From cc8f7700978a2bfc34a9c19cbb036a4f297e56ce Mon Sep 17 00:00:00 2001 From: Kim-Adeline Miguel Date: Mon, 3 May 2021 16:35:55 -0700 Subject: [PATCH 1/8] Add license update --- build/license-header.txt | 9 +++++++++ gulpfile.js | 11 +++++++++++ 2 files changed, 20 insertions(+) create mode 100644 build/license-header.txt diff --git a/build/license-header.txt b/build/license-header.txt new file mode 100644 index 000000000000..19ba9f29d499 --- /dev/null +++ b/build/license-header.txt @@ -0,0 +1,9 @@ +This license applies to the Python extension for Visual Studio Code. + +By installing this extension, you may also cause the automatic installation of +the following extensions, which have their own licenses and can be uninstalled if you wish: + +- ms-python.vscode-pylance: https://marketplace.visualstudio.com/items?itemName=ms-python.vscode-pylance +- ms-toolsai.jupyter: https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter + +------------------------------------------------------------------------------ diff --git a/gulpfile.js b/gulpfile.js index 9c7c16e9a28f..9d514473aef2 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -82,6 +82,7 @@ gulp.task('addExtensionDependencies', async () => { }); gulp.task('addExtensionPackDependencies', async () => { + await buildLicense(); await addExtensionPackDependencies(); }); @@ -107,6 +108,16 @@ async function addExtensionPackDependencies() { await fsExtra.writeFile('package.json', JSON.stringify(packageJson, null, 4), 'utf-8'); } +async function buildLicense() { + const headerPath = path.join(__dirname, 'build', 'license-header.txt'); + const licenseHeader = await fsExtra.readFile(headerPath, 'utf-8'); + + let license = await fsExtra.readFile('LICENSE', 'utf-8'); + license = `${licenseHeader}\n${license}`; + + await fsExtra.writeFile('LICENSE', license, 'utf-8'); +} + gulp.task('updateBuildNumber', async () => { await updateBuildNumber(argv); }); From f9607c99e88d61d3f7a25497ef459dc913311766 Mon Sep 17 00:00:00 2001 From: Kim-Adeline Miguel Date: Mon, 3 May 2021 16:37:17 -0700 Subject: [PATCH 2/8] Update package.json description --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1d3b03029875..9315aa776ab9 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "python", "displayName": "Python", - "description": "Linting, Debugging (multi-threaded, remote), Intellisense, Jupyter Notebooks, code formatting, refactoring, unit tests, and more.", + "description": "IntelliSense (Pylance), Linting, Debugging (multi-threaded, remote), Jupyter Notebooks, code formatting, refactoring, unit tests, and more.", "version": "2021.5.0-dev", "featureFlags": { "usingNewInterpreterStorage": true From 0fd3864f42e96c2816f3154a30d72d55a608201b Mon Sep 17 00:00:00 2001 From: Kim-Adeline Miguel Date: Mon, 3 May 2021 16:46:19 -0700 Subject: [PATCH 3/8] Update readme --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 68058b036d86..0423083ff469 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,12 @@ # Python extension for Visual Studio Code -A [Visual Studio Code](https://code.visualstudio.com/) [extension](https://marketplace.visualstudio.com/VSCode) with rich support for the [Python language](https://www.python.org/) (for all [actively supported versions](https://devguide.python.org/#status-of-python-branches) of the language: >=3.6), including features such as IntelliSense, linting, debugging, code navigation, code formatting, refactoring, variable explorer, test explorer, and more! +A [Visual Studio Code](https://code.visualstudio.com/) [extension](https://marketplace.visualstudio.com/VSCode) with rich support for the [Python language](https://www.python.org/) (for all [actively supported versions](https://devguide.python.org/#status-of-python-branches) of the language: >=3.6), including features such as IntelliSense (Pylance), linting, debugging, code navigation, code formatting, refactoring, variable explorer, test explorer, and more! -Additionally, the Python extension gives you an optimal and feature-rich experience for working with Jupyter notebooks through the [Jupyter extension](https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter). +## Installed extensions +The Python extension will automatically install the [Pylance](https://marketplace.visualstudio.com/items?itemName=ms-python.vscode-pylance) and [Jupyter](https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter) extensions to give you the best experience when working with Python files and Jupyter notebooks. However, Pylance is an optional dependency, meaning the Python extension will remain fully functional if it fails to be installed. You can also [uninstall](https://code.visualstudio.com/docs/editor/extension-marketplace#_uninstall-an-extension) it at the expense of some features if you’re using a different language server. + +Extensions installed through the marketplace are subject to the [Marketplace Terms of Use](https://cdn.vsassets.io/v/M146_20190123.39/_content/Microsoft-Visual-Studio-Marketplace-Terms-of-Use.pdf). ## Quick start From 7214f57629dcfc1305f6b6af39a4d7adf8c5fb38 Mon Sep 17 00:00:00 2001 From: Kim-Adeline Miguel Date: Tue, 4 May 2021 09:35:25 -0700 Subject: [PATCH 4/8] Add news file --- news/1 Enhancements/16116.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 news/1 Enhancements/16116.md diff --git a/news/1 Enhancements/16116.md b/news/1 Enhancements/16116.md new file mode 100644 index 000000000000..f52f66a0b1d3 --- /dev/null +++ b/news/1 Enhancements/16116.md @@ -0,0 +1 @@ +Bundle Pylance with the extension as an optional dependency. From 3b13ec436e10f9b3dfecd08a0aac68754c9a5a30 Mon Sep 17 00:00:00 2001 From: Kim-Adeline Miguel Date: Tue, 4 May 2021 11:18:29 -0700 Subject: [PATCH 5/8] Update header wording --- build/license-header.txt | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/build/license-header.txt b/build/license-header.txt index 19ba9f29d499..257f327ac817 100644 --- a/build/license-header.txt +++ b/build/license-header.txt @@ -1,9 +1,5 @@ -This license applies to the Python extension for Visual Studio Code. +PLEASE NOTE: This Python extension for Visual Studio Code has a hard dependency on the Jupyter project which is installed automatically alongside it. The Python extension for VS Code also holds an optional dependency on the Pylance extension for Visual Studio Code, which is also installed automatically but is separately licensed. -By installing this extension, you may also cause the automatic installation of -the following extensions, which have their own licenses and can be uninstalled if you wish: - -- ms-python.vscode-pylance: https://marketplace.visualstudio.com/items?itemName=ms-python.vscode-pylance -- ms-toolsai.jupyter: https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter +All the source code for the Python extension for VS Code is available under the MIT License (given below) as is the source code for the Jupyter extension. But the optional Pylance extension for Visual Studio Code is only available in binary form and it is not licensed under the MIT License. The Pylance extension for Visual Studio Code is licensed under a Microsoft proprietary license, the terms of which are available here: https://marketplace.visualstudio.com/items/ms-python.vscode-pylance/license. ------------------------------------------------------------------------------ From 51426cbb9466b2cb7c53e1940b19a86650a3936b Mon Sep 17 00:00:00 2001 From: Kim-Adeline Miguel Date: Tue, 4 May 2021 11:20:44 -0700 Subject: [PATCH 6/8] let -> const --- gulpfile.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 9d514473aef2..c2aa43f4aceb 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -111,11 +111,9 @@ async function addExtensionPackDependencies() { async function buildLicense() { const headerPath = path.join(__dirname, 'build', 'license-header.txt'); const licenseHeader = await fsExtra.readFile(headerPath, 'utf-8'); + const license = await fsExtra.readFile('LICENSE', 'utf-8'); - let license = await fsExtra.readFile('LICENSE', 'utf-8'); - license = `${licenseHeader}\n${license}`; - - await fsExtra.writeFile('LICENSE', license, 'utf-8'); + await fsExtra.writeFile('LICENSE', `${licenseHeader}\n${license}`, 'utf-8'); } gulp.task('updateBuildNumber', async () => { From 717e65d4279334b6cd49224a892c6a1ef5825571 Mon Sep 17 00:00:00 2001 From: Kim-Adeline Miguel Date: Tue, 4 May 2021 11:44:36 -0700 Subject: [PATCH 7/8] Wording --- build/license-header.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/license-header.txt b/build/license-header.txt index 257f327ac817..bea27fd7a442 100644 --- a/build/license-header.txt +++ b/build/license-header.txt @@ -1,4 +1,4 @@ -PLEASE NOTE: This Python extension for Visual Studio Code has a hard dependency on the Jupyter project which is installed automatically alongside it. The Python extension for VS Code also holds an optional dependency on the Pylance extension for Visual Studio Code, which is also installed automatically but is separately licensed. +PLEASE NOTE: This Python extension for Visual Studio Code has a hard dependency on the Jupyter extension for Visual Studio Code which is installed automatically alongside it. The Python extension for VS Code also holds an optional dependency on the Pylance extension for Visual Studio Code, which is also installed automatically but is separately licensed. All the source code for the Python extension for VS Code is available under the MIT License (given below) as is the source code for the Jupyter extension. But the optional Pylance extension for Visual Studio Code is only available in binary form and it is not licensed under the MIT License. The Pylance extension for Visual Studio Code is licensed under a Microsoft proprietary license, the terms of which are available here: https://marketplace.visualstudio.com/items/ms-python.vscode-pylance/license. From 813ff1ded83badf80281c41ec81dd08800673ebc Mon Sep 17 00:00:00 2001 From: Kim-Adeline Miguel Date: Tue, 4 May 2021 11:57:58 -0700 Subject: [PATCH 8/8] Consistenly use VS Code long form --- build/license-header.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/license-header.txt b/build/license-header.txt index bea27fd7a442..d1575272d318 100644 --- a/build/license-header.txt +++ b/build/license-header.txt @@ -1,5 +1,5 @@ -PLEASE NOTE: This Python extension for Visual Studio Code has a hard dependency on the Jupyter extension for Visual Studio Code which is installed automatically alongside it. The Python extension for VS Code also holds an optional dependency on the Pylance extension for Visual Studio Code, which is also installed automatically but is separately licensed. +PLEASE NOTE: This Python extension for Visual Studio Code has a hard dependency on the Jupyter extension for Visual Studio Code which is installed automatically alongside it. The Python extension for Visual Studio Code also holds an optional dependency on the Pylance extension for Visual Studio Code, which is also installed automatically but is separately licensed. -All the source code for the Python extension for VS Code is available under the MIT License (given below) as is the source code for the Jupyter extension. But the optional Pylance extension for Visual Studio Code is only available in binary form and it is not licensed under the MIT License. The Pylance extension for Visual Studio Code is licensed under a Microsoft proprietary license, the terms of which are available here: https://marketplace.visualstudio.com/items/ms-python.vscode-pylance/license. +All the source code for the Python extension for Visual Studio Code is available under the MIT License (given below) as is the source code for the Jupyter extension for Visual Studio Code. But the optional Pylance extension for Visual Studio Code is only available in binary form and it is not licensed under the MIT License. The Pylance extension for Visual Studio Code is licensed under a Microsoft proprietary license, the terms of which are available here: https://marketplace.visualstudio.com/items/ms-python.vscode-pylance/license. ------------------------------------------------------------------------------