Skip to content

Commit dca394e

Browse files
committed
merged master
2 parents c7e47e0 + 674fd84 commit dca394e

File tree

440 files changed

+15372
-41661
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

440 files changed

+15372
-41661
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ If you think a GIF of what is happening would be helpful, consider tools like ht
2121
- Type of virtual environment used (N/A | venv | virtualenv | conda | ...): XXX
2222
- Relevant/affected Python packages and their versions: XXX
2323

24-
## Actual behavior
24+
## Expected behaviour
2525

2626
XXX
2727

28-
## Expected behavior
28+
## Actual behaviour
2929

3030
XXX
3131

@@ -39,7 +39,7 @@ Output for `Python` in the `Output` panel (`View`→`Output`, change the drop-do
3939
XXX
4040
```
4141

42-
Output from `Console` under the `Developer Tools` panel (toggle Developer Tools on under `Help`)
42+
Output from `Console` under the `Developer Tools` panel (toggle Developer Tools on under `Help`; turn on source maps to make any tracebacks be useful by running `Enable source map support for extension debugging`)
4343

4444
```
4545
XXX

.github/release_plan.md

Lines changed: 34 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,60 +3,72 @@
33
- [ ] Update the version in [`package.json`](https://github.com/Microsoft/vscode-python/blob/master/package.json)
44
- [ ] Run `npm install` to make sure [`package-lock.json`](https://github.com/Microsoft/vscode-python/blob/master/package.json) is up-to-date
55
- [ ] Update [`CHANGELOG.md`](https://github.com/Microsoft/vscode-python/blob/master/CHANGELOG.md)
6-
- Create a new section for this release
7-
- Run [`news`](https://github.com/Microsoft/vscode-python/tree/master/news) (typically `python news | code-insiders -`)
8-
- Touch up news entries (and corresponding news entry files)
9-
- Copy over the "Thanks" section from the previous release
6+
- [ ] Create a new section for this release
7+
- [ ] Run [`news`](https://github.com/Microsoft/vscode-python/tree/master/news) (typically `python news | code-insiders -`)
8+
- [ ] Touch up news entries (and corresponding news entry files)
9+
- [ ] Copy over the "Thanks" section from the previous release
1010
- [ ] Update [`ThirdPartyNotices-Distribution.txt`](https://github.com/Microsoft/vscode-python/blob/master/ThirdPartyNotices-Distribution.txt)
11-
- Run [`tpn`](https://github.com/Microsoft/vscode-python/tree/master/tpn) (typically `python tpn --npm package-lock.json --config tpn/distribution.toml ThirdPartyNotices-Distribution.txt`)
12-
- Register any Python changes with [OSPO](https://opensource.microsoft.com/)
11+
- [ ] Run [`tpn`](https://github.com/Microsoft/vscode-python/tree/master/tpn) (typically `python tpn --npm package-lock.json --npm-overrides package.datascience-ui.dependencies.json --config tpn/distribution.toml ThirdPartyNotices-Distribution.txt`)
12+
- [ ] Register any Python changes with [OSPO](https://opensource.microsoft.com/)
1313
- [ ] Update [`ThirdPartyNotices-Repository.txt`](https://github.com/Microsoft/vscode-python/blob/master/ThirdPartyNotices-Repository.txt) and register any changes with OSPO
1414
- [ ] Open appropriate [documentation issues](https://github.com/microsoft/vscode-docs/issues?q=is%3Aissue+is%3Aopen+label%3Apython)
15+
- [ ] Check that component governance is happy (requires beta PR to have been merged)
1516

1617

1718
# Release candidate (Monday before release)
1819

19-
- [ ] Ensure all new feature usages are tracked via telemetry
20+
- [ ] Ensure all new features are tracked via telemetry
21+
- [ ] Announce a code freeze
22+
- [ ] Create a branch against `master` for a pull request
2023
- [ ] Update the version in [`package.json`](https://github.com/Microsoft/vscode-python/blob/master/package.json)
2124
- [ ] Run `npm install` to make sure [`package-lock.json`](https://github.com/Microsoft/vscode-python/blob/master/package.json) is up-to-date
2225
- [ ] Update [`CHANGELOG.md`](https://github.com/Microsoft/vscode-python/blob/master/CHANGELOG.md)
23-
- Update version and date for the release section
24-
- Run [`news`](https://github.com/Microsoft/vscode-python/tree/master/news) (typically `python news --final | code-insiders -`)
25-
- Touch up news entries (and corresponding news entry files)
26-
- Check that the "Thanks" section is up-to-date
26+
- [ ] Update version and date for the release section
27+
- [ ] Run [`news`](https://github.com/Microsoft/vscode-python/tree/master/news) (typically `python news --final | code-insiders -`; the `--final` flag is on purpose as no more changes are expected)
28+
- [ ] Touch up news entries (and corresponding news entry files)
29+
- [ ] Check that the "Thanks" section is up-to-date
2730
- [ ] Update [`ThirdPartyNotices-Distribution.txt`](https://github.com/Microsoft/vscode-python/blob/master/ThirdPartyNotices-Distribution.txt)
28-
- Run [`tpn`](https://github.com/Microsoft/vscode-python/tree/master/tpn) (typically `python tpn --npm package-lock.json --config tpn/distribution.toml ThirdPartyNotices-Distribution.txt`)
29-
- Register any Python changes with [OSPO](https://opensource.microsoft.com/)
31+
- [ ] Run [`tpn`](https://github.com/Microsoft/vscode-python/tree/master/tpn) (typically `python tpn --npm package-lock.json --npm-overrides package.datascience-ui.dependencies.json --config tpn/distribution.toml ThirdPartyNotices-Distribution.txt`)
32+
- [ ] Register any Python changes with [OSPO](https://opensource.microsoft.com/)
3033
- [ ] Update [`ThirdPartyNotices-Repository.txt`](https://github.com/Microsoft/vscode-python/blob/master/ThirdPartyNotices-Repository.txt) and register any changes with OSPO
31-
- [ ] Merge into the [`release` branch](https://github.com/microsoft/vscode-python/tree/release)
34+
- [ ] Merge pull request into `master`
35+
- [ ] Delete the `release` branch in the repo
36+
- [ ] Create a new `release` branch from `master`
37+
- [ ] Bump the version number to the next release in the `master` branch
38+
- [ ] `package.json`
39+
- [ ] `package-lock.json`
40+
- [ ] Announce the code freeze is over
3241
- [ ] Open appropriate [documentation issues](https://github.com/microsoft/vscode-docs/issues?q=is%3Aissue+is%3Aopen+label%3Apython)
3342
- [ ] Begin drafting a [blog](http://aka.ms/pythonblog) post
43+
- [ ] Make sure component governance is happy (requires RC PR to have been merged)
3444

3545

3646
# Final (near a VS Code release)
3747

3848
## Preparation
39-
[Final PR should be against the `release` branch]
4049

4150
- [ ] 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
51+
- [ ] Create a branch against `release` for a pull request
4252
- [ ] Update the version in [`package.json`](https://github.com/Microsoft/vscode-python/blob/master/package.json)
4353
- [ ] Run `npm install` to make sure [`package-lock.json`](https://github.com/Microsoft/vscode-python/blob/master/package.json) is up-to-date (the only update should be the version number if `package-lock.json` has been kept up-to-date)
4454
- [ ] Update [`CHANGELOG.md`](https://github.com/Microsoft/vscode-python/blob/master/CHANGELOG.md)
45-
- Update version and date for the release section
46-
- Run [`news`](https://github.com/Microsoft/vscode-python/tree/master/news) (typically `python news --final | code-insiders -`)
55+
- [ ] Update version and date for the release section
56+
- [ ] Run [`news`](https://github.com/Microsoft/vscode-python/tree/master/news) (typically `python news --final | code-insiders -`)
4757
- Check that the "Thanks" section is up-to-date
4858
- [ ] Update [`ThirdPartyNotices-Distribution.txt`](https://github.com/Microsoft/vscode-python/blob/master/ThirdPartyNotices-Distribution.txt)
49-
- Run [`tpn`](https://github.com/Microsoft/vscode-python/tree/master/tpn) (typically `python tpn --npm package-lock.json --config tpn/distribution.toml ThirdPartyNotices-Distribution.txt`)
50-
- Register any Python changes with [OSPO](https://opensource.microsoft.com/)
59+
- [ ] Run [`tpn`](https://github.com/Microsoft/vscode-python/tree/master/tpn) (typically `python tpn --npm package-lock.json --npm-overrides package.datascience-ui.dependencies.json --config tpn/distribution.toml ThirdPartyNotices-Distribution.txt`)
60+
- [ ] Register any Python changes with component governance
5161
- [ ] Update [`ThirdPartyNotices-Repository.txt`](https://github.com/Microsoft/vscode-python/blob/master/ThirdPartyNotices-Repository.txt) and register any changes with OSPO
62+
- [ ] Merge pull request into `release`
63+
- [ ] Make sure component governance is happy
5264

5365
## Release
5466

5567
- [ ] Make sure [CI](https://github.com/Microsoft/vscode-python/blob/master/CONTRIBUTING.md) is passing
5668
- [ ] Generate the final `.vsix` file
5769
- [ ] Make sure no extraneous files are being included in the `.vsix` file (make sure to check for hidden files)
5870
- [ ] Upload the final `.vsix` file to the [marketplace](https://marketplace.visualstudio.com/items?itemName=ms-python.python)
59-
- [ ] Publish [documentation](https://code.visualstudio.com/docs/python/python-tutorial) [changes](https://github.com/microsoft/vscode-docs/pulls)
71+
- [ ] Publish [documentation changes](https://github.com/microsoft/vscode-docs/pulls)
6072
- [ ] Publish the [blog](http://aka.ms/pythonblog) post
6173
- [ ] Create a [release](https://github.com/Microsoft/vscode-python/releases) on GitHub (which creates an appropriate git tag)
6274
- [ ] Determine if a hotfix is needed
@@ -67,5 +79,5 @@
6779
- [ ] Create a new [release plan](https://github.com/Microsoft/vscode-python/edit/master/.github/release_plan.md)
6880

6981
## Clean up after _this_ release
70-
- [ ] Clean up any straggling [fixed issues needing validation](https://github.com/Microsoft/vscode-python/issues?q=label%3A%22validate+fix%22+is%3Aclosed)
71-
- [ ] Go through [`needs more info` issues](https://github.com/Microsoft/vscode-python/issues?q=is%3Aopen+label%3A%22needs+more+info%22+sort%3Aupdated-asc) and close any that have no activity for over a month
82+
- [ ] Clean up any straggling [fixed issues needing validation](https://github.com/Microsoft/vscode-python/issues?q=label%3A%22validate+fix%22)
83+
- [ ] Go through [`needs more info` issues](https://github.com/Microsoft/vscode-python/issues?q=is%3Aopen+label%3A%22info+needed%22+sort%3Acreated-asc) and close any that have no activity for over a month

.github/test_plan.md

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,11 @@
4444
- Make sure that you do not have `python.pythonPath` specified in your `settings.json` when testing automatic detection
4545
- Do note that the `Select Interpreter` drop-down window scrolls
4646

47-
- [ ] Detected a single virtual environment at the top-level of the workspace folder (if you created this _after_ opening VS Code, then run `Reload Window` to pick up the new environment)
47+
- [ ] Detected a single virtual environment at the top-level of the workspace folder on Mac when when `python` command points to default Mac Python installation or `python` command fails in the terminal.
48+
- [ ] Appropriate suffix label specified in status bar (e.g. `(venv)`)
49+
- [ ] Detected a single virtual environment at the top-level of the workspace folder on Windows when `python` fails in the terminal.
50+
- [ ] Appropriate suffix label specified in status bar (e.g. `(venv)`)
51+
- [ ] Detected a single virtual environment at the top-level of the workspace folder
4852
- [ ] Appropriate suffix label specified in status bar (e.g. `(venv)`)
4953
- [ ] [`Create Terminal`](https://code.visualstudio.com/docs/python/environments#_activating-an-environment-in-the-terminal) works
5054
- [ ] Steals focus
@@ -220,6 +224,31 @@ def foo():pass
220224
```python
221225
import unittest
222226

227+
MODULE_SETUP = False
228+
229+
230+
def setUpModule():
231+
global MODULE_SETUP
232+
MODULE_SETUP = True
233+
234+
235+
class PassingSetupTests(unittest.TestCase):
236+
CLASS_SETUP = False
237+
METHOD_SETUP = False
238+
239+
@classmethod
240+
def setUpClass(cls):
241+
cls.CLASS_SETUP = True
242+
243+
def setUp(self):
244+
self.METHOD_SETUP = True
245+
246+
def test_setup(self):
247+
self.assertTrue(MODULE_SETUP)
248+
self.assertTrue(self.CLASS_SETUP)
249+
self.assertTrue(self.METHOD_SETUP)
250+
251+
223252
class PassingTests(unittest.TestCase):
224253

225254
def test_passing(self):
@@ -243,6 +272,7 @@ class FailingTests(unittest.TestCase):
243272
- [ ] Code lens for a method runs just that test
244273
- [ ] `Run Test` works
245274
- [ ] `Debug Test` works
275+
- [ ] Module/suite setup methods are also run (run the `test_setup` method to verify)
246276

247277
#### [`pytest`](https://code.visualstudio.com/docs/python/unit-testing#_pytest-configuration-settings)
248278
```python

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ node_modules
66
**/.vscode/.ropeproject/**
77
**/testFiles/**/.cache/**
88
*.noseids
9+
.nyc_output
910
.vscode-test
1011
__pycache__
1112
npm-debug.log
@@ -16,6 +17,7 @@ coverage/
1617
**/.venv*/
1718
precommit.hook
1819
pythonFiles/experimental/ptvsd/**
20+
pythonFiles/lib/**
1921
debug_coverage*/**
2022
languageServer/**
2123
languageServer.*/**

.mocha-reporter/mocha-vsts-reporter.js

Lines changed: 0 additions & 63 deletions
This file was deleted.

.travis.yml

Lines changed: 22 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ matrix:
66
- os: linux
77
python: "2.7"
88
env: UNIT_TEST=true
9-
- os: linux
10-
python: "2.7"
11-
env: DEBUGGER_TEST=true
129
- os: linux
1310
python: "2.7"
1411
env: DEBUGGER_TEST_RELEASE=true
@@ -18,12 +15,6 @@ matrix:
1815
- os: linux
1916
python: "2.7"
2017
env: MULTIROOT_WORKSPACE_TEST=true
21-
- os: linux
22-
python: "3.6-dev"
23-
env: DEBUGGER_TEST=true
24-
- os: linux
25-
python: "3.6-dev"
26-
env: FUNCTIONAL_TEST=true
2718
- os: linux
2819
python: "3.6-dev"
2920
env: DEBUGGER_TEST_RELEASE=true
@@ -38,19 +29,20 @@ matrix:
3829
env: PERFORMANCE_TEST=true
3930
- os: linux
4031
python: "3.7-dev"
41-
env: DEBUGGER_TEST=true
32+
env: DEBUGGER_TEST_RELEASE=true
4233
- os: linux
4334
python: "3.7-dev"
44-
env: DEBUGGER_TEST_RELEASE=true
35+
env: SINGLE_WORKSPACE_TEST=true
4536
- os: linux
4637
python: "3.7-dev"
47-
env: LANGUAGE_SERVER_TEST=true
38+
env: MULTIROOT_WORKSPACE_TEST=true
4839
- os: linux
4940
python: "3.7-dev"
50-
env: SINGLE_WORKSPACE_TEST=true
41+
env: BUNDLE=true
42+
allow_failures:
5143
- os: linux
5244
python: "3.7-dev"
53-
env: MULTIROOT_WORKSPACE_TEST=true
45+
env: FUNCTIONAL_TEST=true
5446
before_install: |
5547
if [ $TRAVIS_OS_NAME == "linux" ]; then
5648
export CXX="g++-4.9" CC="gcc-4.9" DISPLAY=:99.0;
@@ -68,59 +60,34 @@ before_install: |
6860
install:
6961
- travis_wait 5 npm ci
7062
- npm run clean
71-
- npm run vscode:prepublish
63+
- npx gulp prePublishNonBundle
7264
- npx gulp hygiene-modified
73-
- python -m pip install --upgrade -r requirements.txt
74-
- python -m pip install -t ./pythonFiles/experimental/ptvsd git+https://github.com/Microsoft/ptvsd/
65+
- python -m pip install --upgrade pip
66+
- python -m pip install --upgrade -r ./build/test-requirements.txt
67+
- npx gulp installPythonLibs
7568

7669
script:
7770
- if [ $UNIT_TEST == "true" ]; then
7871
npm run cover:enable;
79-
npm run test:unittests;
80-
fi
81-
- if [ $TRAVIS_UPLOAD_COVERAGE == "true" ]; then
82-
bash <(curl -s https://codecov.io/bash);
83-
fi
84-
- if [ $DEBUGGER_TEST == "true" ]; then
85-
npm run cover:enable;
86-
npm run testDebugger --silent;
87-
fi
88-
- npm run debugger-coverage
89-
- if [ $TRAVIS_UPLOAD_COVERAGE == "true" ]; then
90-
bash <(curl -s https://codecov.io/bash);
72+
npm run test:unittests:cover;
9173
fi
92-
- npm run clean:ptvsd
93-
- pip install -t ./pythonFiles/experimental/ptvsd ptvsd --no-cache-dir;
9474
- if [ $DEBUGGER_TEST_RELEASE == "true" ]; then
9575
npm run cover:enable;
9676
npm run testDebugger --silent;
9777
fi
9878
- npm run debugger-coverage
99-
- if [ $TRAVIS_UPLOAD_COVERAGE == "true" ]; then
100-
bash <(curl -s https://codecov.io/bash);
101-
fi
10279
- if [ $FUNCTIONAL_TEST == "true" ]; then
103-
python -m pip install --upgrade -r functionalTestRequirements.txt;
104-
npm run test:functional;
105-
fi
106-
- if [ $LANGUAGE_SERVER_TEST == "true" ]; then
107-
npm run cover:enable;
108-
npm run testAnalysisEngine --silent;
80+
python -m pip install --upgrade -r ./build/functional-test-requirements.txt;
81+
npm run test:functional:cover;
10982
fi
11083
- if [ $SINGLE_WORKSPACE_TEST == "true" ]; then
11184
npm run cover:enable;
11285
npm run testSingleWorkspace --silent;
11386
fi
114-
- if [ $TRAVIS_UPLOAD_COVERAGE == "true" ]; then
115-
bash <(curl -s https://codecov.io/bash);
116-
fi
11787
- if [ $MULTIROOT_WORKSPACE_TEST == "true" ]; then
11888
npm run cover:enable;
11989
npm run testMultiWorkspace --silent;
12090
fi
121-
- if [ $TRAVIS_UPLOAD_COVERAGE == "true" ]; then
122-
bash <(curl -s https://codecov.io/bash);
123-
fi
12491
- if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" && "$PERFORMANCE_TEST" == "true" ]]; then
12592
npm run testPerformance --silent;
12693
fi
@@ -130,13 +97,18 @@ script:
13097
python3 -m pip install --upgrade -r tpn/requirements.txt;
13198
python3 tpn --npm package-lock.json --config tpn/distribution.toml /dev/null;
13299
fi
133-
- if [[ $AZURE_STORAGE_ACCOUNT && "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" ]]; then
100+
- if [[ $BUNDLE == "true" && $AZURE_STORAGE_ACCOUNT && "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" ]]; then
134101
npm run clean;
135-
vsce package;
102+
npm run package;
103+
npx gulp clean:cleanExceptTests;
104+
npm run testSmoke;
136105
azure storage blob upload python*.vsix $AZURE_STORAGE_CONTAINER ms-python-insiders.vsix --account-name $AZURE_STORAGE_ACCOUNT --account-key $AZURE_STORAGE_ACCESS_KEY --quiet;
137106
fi
138-
- if [[ $AZURE_STORAGE_ACCOUNT && "$TRAVIS_BRANCH" == release* && "$TRAVIS_PULL_REQUEST" == "false" ]]; then
107+
- if [[ $BUNDLE == "true" && $AZURE_STORAGE_ACCOUNT && "$TRAVIS_BRANCH" == release* && "$TRAVIS_PULL_REQUEST" == "false" ]]; then
139108
npm run clean;
140-
vsce package;
109+
npm run package;
110+
npx gulp clean:cleanExceptTests;
111+
npm run testSmoke;
141112
azure storage blob upload python*.vsix $AZURE_STORAGE_CONTAINER ms-python-$TRAVIS_BRANCH.vsix --account-name $AZURE_STORAGE_ACCOUNT --account-key $AZURE_STORAGE_ACCESS_KEY --quiet;
142113
fi
114+
- bash <(curl -s https://codecov.io/bash)

0 commit comments

Comments
 (0)