Skip to content

Commit 0609d3d

Browse files
karthiknadigjakebaileybschnurr
authored
Point release: cherry picks, versions and change log update. (#14775)
* Add new tryPylance banner experiments (#14759) Co-authored-by: Bill Schnurr <bschnurr@microsoft.com> * Put linter prompt behind experiment (#14731) * Add new linter prompt * Tests * Fix typos * Show linter install message only once. * Add more tests and news * Updates for point release. Co-authored-by: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Co-authored-by: Bill Schnurr <bschnurr@microsoft.com>
1 parent dec1039 commit 0609d3d

File tree

14 files changed

+677
-200
lines changed

14 files changed

+677
-200
lines changed

CHANGELOG.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,70 @@
11
# Changelog
22

3+
## 2020.11.2 (19 November 2020)
4+
5+
### Enhancements
6+
7+
1. Put linter prompt behind an experiment flag.
8+
([#14760](https://github.com/Microsoft/vscode-python/issues/14760))
9+
10+
### Thanks
11+
12+
Thanks to the following projects which we fully rely on to provide some of
13+
our features:
14+
15+
- [debugpy](https://pypi.org/project/debugpy/)
16+
- [isort](https://pypi.org/project/isort/)
17+
- [jedi](https://pypi.org/project/jedi/)
18+
and [parso](https://pypi.org/project/parso/)
19+
- [Microsoft Python Language Server](https://github.com/microsoft/python-language-server)
20+
- [Pylance](https://github.com/microsoft/pylance-release)
21+
- [exuberant ctags](http://ctags.sourceforge.net/) (user-installed)
22+
- [rope](https://pypi.org/project/rope/) (user-installed)
23+
24+
Also thanks to the various projects we provide integrations with which help
25+
make this extension useful:
26+
27+
- Debugging support:
28+
[Django](https://pypi.org/project/Django/),
29+
[Flask](https://pypi.org/project/Flask/),
30+
[gevent](https://pypi.org/project/gevent/),
31+
[Jinja](https://pypi.org/project/Jinja/),
32+
[Pyramid](https://pypi.org/project/pyramid/),
33+
[PySpark](https://pypi.org/project/pyspark/),
34+
[Scrapy](https://pypi.org/project/Scrapy/),
35+
[Watson](https://pypi.org/project/Watson/)
36+
- Formatting:
37+
[autopep8](https://pypi.org/project/autopep8/),
38+
[black](https://pypi.org/project/black/),
39+
[yapf](https://pypi.org/project/yapf/)
40+
- Interpreter support:
41+
[conda](https://conda.io/),
42+
[direnv](https://direnv.net/),
43+
[pipenv](https://pypi.org/project/pipenv/),
44+
[pyenv](https://github.com/pyenv/pyenv),
45+
[venv](https://docs.python.org/3/library/venv.html#module-venv),
46+
[virtualenv](https://pypi.org/project/virtualenv/)
47+
- Linting:
48+
[bandit](https://pypi.org/project/bandit/),
49+
[flake8](https://pypi.org/project/flake8/),
50+
[mypy](https://pypi.org/project/mypy/),
51+
[prospector](https://pypi.org/project/prospector/),
52+
[pylint](https://pypi.org/project/pylint/),
53+
[pydocstyle](https://pypi.org/project/pydocstyle/),
54+
[pylama](https://pypi.org/project/pylama/)
55+
- Testing:
56+
[nose](https://pypi.org/project/nose/),
57+
[pytest](https://pypi.org/project/pytest/),
58+
[unittest](https://docs.python.org/3/library/unittest.html#module-unittest)
59+
60+
And finally thanks to the [Python](https://www.python.org/) development team and
61+
community for creating a fantastic programming language and community to be a
62+
part of!
63+
364
## 2020.11.1 (17 November 2020)
465

66+
### Enhancements
67+
568
1. Replaced "pythonPath" debug configuration property with "python".
669
([#12462](https://github.com/Microsoft/vscode-python/issues/12462))
770

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "python",
33
"displayName": "Python",
44
"description": "Linting, Debugging (multi-threaded, remote), Intellisense, Jupyter Notebooks, code formatting, refactoring, unit tests, snippets, and more.",
5-
"version": "2020.11.1",
5+
"version": "2020.11.2",
66
"featureFlags": {
77
"usingNewInterpreterStorage": true
88
},

package.nls.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,10 @@
100100
"Linter.enableLinter": "Enable {0}",
101101
"Linter.enablePylint": "You have a pylintrc file in your workspace. Do you want to enable pylint?",
102102
"Linter.replaceWithSelectedLinter": "Multiple linters are enabled in settings. Replace with '{0}'?",
103+
"Linter.install": "Install a linter to get error reporting.",
104+
"Linter.installPylint": "Install pylint",
105+
"Linter.installFlake8": "Install flake8",
106+
"Linter.selectLinter": "Select Linter",
103107
"Installer.noCondaOrPipInstaller": "There is no Conda or Pip installer available in the selected environment.",
104108
"Installer.noPipInstaller": "There is no Pip installer available in the selected environment.",
105109
"Installer.searchForHelp": "Search for help",

src/client/activation/jedi/multiplexingActivator.ts

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT License.
3-
import { inject, injectable } from 'inversify';
3+
import { inject, injectable, named } from 'inversify';
44
import {
55
CancellationToken,
66
CompletionContext,
@@ -13,9 +13,16 @@ import {
1313
} from 'vscode';
1414
// tslint:disable-next-line: import-name
1515
import { IWorkspaceService } from '../../common/application/types';
16+
import { isTestExecution } from '../../common/constants';
1617
import { JediLSP } from '../../common/experiments/groups';
1718
import { IFileSystem } from '../../common/platform/types';
18-
import { IConfigurationService, IExperimentService, Resource } from '../../common/types';
19+
import {
20+
BANNER_NAME_PROPOSE_LS,
21+
IConfigurationService,
22+
IExperimentService,
23+
IPythonExtensionBanner,
24+
Resource
25+
} from '../../common/types';
1926
import { IServiceManager } from '../../ioc/types';
2027
import { PythonEnvironment } from '../../pythonEnvironments/info';
2128
import { JediExtensionActivator } from '../jedi';
@@ -38,7 +45,10 @@ export class MultiplexingJediLanguageServerActivator implements ILanguageServerA
3845

3946
constructor(
4047
@inject(IServiceManager) private readonly manager: IServiceManager,
41-
@inject(IExperimentService) experimentService: IExperimentService
48+
@inject(IExperimentService) experimentService: IExperimentService,
49+
@inject(IPythonExtensionBanner)
50+
@named(BANNER_NAME_PROPOSE_LS)
51+
private proposePylancePopup: IPythonExtensionBanner
4252
) {
4353
// Check experiment service to see if using new Jedi LSP protocol
4454
this.realLanguageServerPromise = experimentService.inExperiment(JediLSP.experiment).then((inExperiment) => {
@@ -56,6 +66,9 @@ export class MultiplexingJediLanguageServerActivator implements ILanguageServerA
5666
}
5767
public async start(resource: Resource, interpreter: PythonEnvironment | undefined): Promise<void> {
5868
const realServer = await this.realLanguageServerPromise;
69+
if (!isTestExecution()) {
70+
this.proposePylancePopup.showBanner().ignoreErrors();
71+
}
5972
return realServer.start(resource, interpreter);
6073
}
6174
public activate(): void {

src/client/common/experiments/groups.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ export enum DeprecatePythonPath {
5555

5656
// Experiment to offer switch to Pylance language server
5757
export enum TryPylance {
58-
experiment = 'tryPylance'
58+
experiment = 'tryPylance',
59+
jediPrompt1 = 'tryPylancePromptText1',
60+
jediPrompt2 = 'tryPylancePromptText2'
5961
}
6062

6163
// Experiment for the content of the tip being displayed on first extension launch:
@@ -80,3 +82,10 @@ export enum JoinMailingListPromptVariants {
8082
export enum SendSelectionToREPL {
8183
experiment = 'pythonSendEntireLineToREPL'
8284
}
85+
86+
// Experiment to show a prompt asking users to install or select linter
87+
export enum LinterInstallationPromptVariants {
88+
pylintFirst = 'pythonInstallPylintButtonFirst',
89+
flake8First = 'pythonInstallFlake8ButtonFirst',
90+
noPrompt = 'pythonNotDisplayLinterPrompt'
91+
}

0 commit comments

Comments
 (0)