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 diff --git a/build/license-header.txt b/build/license-header.txt new file mode 100644 index 000000000000..d1575272d318 --- /dev/null +++ b/build/license-header.txt @@ -0,0 +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 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 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. + +------------------------------------------------------------------------------ diff --git a/gulpfile.js b/gulpfile.js index 9c7c16e9a28f..c2aa43f4aceb 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,14 @@ 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'); + const license = await fsExtra.readFile('LICENSE', 'utf-8'); + + await fsExtra.writeFile('LICENSE', `${licenseHeader}\n${license}`, 'utf-8'); +} + gulp.task('updateBuildNumber', async () => { await updateBuildNumber(argv); }); 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. 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