Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,66 @@
# Changelog

## 2022.0.1 (8 February 2022)

### Fixes

1. Fix `invalid patch string` error when using conda.
([#18455](https://github.com/Microsoft/vscode-python/issues/18455))
1. Revert to old way of running debugger if conda version less than 4.9.0.
([#18436](https://github.com/Microsoft/vscode-python/issues/18436))

### Thanks

Thanks to the following projects which we fully rely on to provide some of
our features:

- [debugpy](https://pypi.org/project/debugpy/)
- [isort](https://pypi.org/project/isort/)
- [jedi](https://pypi.org/project/jedi/)
and [parso](https://pypi.org/project/parso/)
- [jedi-language-server](https://pypi.org/project/jedi-language-server/)
- [Pylance](https://github.com/microsoft/pylance-release)

Also thanks to the various projects we provide integrations with which help
make this extension useful:

- Debugging support:
[Django](https://pypi.org/project/Django/),
[Flask](https://pypi.org/project/Flask/),
[gevent](https://pypi.org/project/gevent/),
[Jinja](https://pypi.org/project/Jinja/),
[Pyramid](https://pypi.org/project/pyramid/),
[PySpark](https://pypi.org/project/pyspark/),
[Scrapy](https://pypi.org/project/Scrapy/),
[Watson](https://pypi.org/project/Watson/)
- Formatting:
[autopep8](https://pypi.org/project/autopep8/),
[black](https://pypi.org/project/black/),
[yapf](https://pypi.org/project/yapf/)
- Interpreter support:
[conda](https://conda.io/),
[direnv](https://direnv.net/),
[pipenv](https://pypi.org/project/pipenv/),
[poetry](https://pypi.org/project/poetry/),
[pyenv](https://github.com/pyenv/pyenv),
[venv](https://docs.python.org/3/library/venv.html#module-venv),
[virtualenv](https://pypi.org/project/virtualenv/)
- Linting:
[bandit](https://pypi.org/project/bandit/),
[flake8](https://pypi.org/project/flake8/),
[mypy](https://pypi.org/project/mypy/),
[prospector](https://pypi.org/project/prospector/),
[pylint](https://pypi.org/project/pylint/),
[pydocstyle](https://pypi.org/project/pydocstyle/),
[pylama](https://pypi.org/project/pylama/)
- Testing:
[pytest](https://pypi.org/project/pytest/),
[unittest](https://docs.python.org/3/library/unittest.html#module-unittest)

And finally thanks to the [Python](https://www.python.org/) development team and
community for creating a fantastic programming language and community to be a
part of!

## 2022.0.0 (3 February 2022)

### Enhancements
Expand Down
1 change: 0 additions & 1 deletion news/2 Fixes/18436.md

This file was deleted.

4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "python",
"displayName": "Python",
"description": "IntelliSense (Pylance), Linting, Debugging (multi-threaded, remote), Jupyter Notebooks, code formatting, refactoring, unit tests, and more.",
"version": "2022.0.0",
"version": "2022.0.1",
"featureFlags": {
"usingNewInterpreterStorage": true
},
Expand Down
4 changes: 2 additions & 2 deletions src/client/common/process/rawProcessApis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ function filterOutputUsingCondaRunMarkers(stdout: string) {
}

function removeCondaRunMarkers(out: string) {
out = out.replace('>>>PYTHON-EXEC-OUTPUT', '');
return out.replace('<<<PYTHON-EXEC-OUTPUT', '');
out = out.replace('>>>PYTHON-EXEC-OUTPUT\r\n', '').replace('>>>PYTHON-EXEC-OUTPUT\n', '');
return out.replace('<<<PYTHON-EXEC-OUTPUT\r\n', '').replace('<<<PYTHON-EXEC-OUTPUT\n', '');
}

export function execObservable(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ export class Conda {
} else {
args.push('-p', env.prefix);
}
return [this.command, 'run', ...args, '--no-capture-output', 'python', OUTPUT_MARKER_SCRIPT];
return [this.command, 'run', ...args, '--no-capture-output', '--live-stream', 'python', OUTPUT_MARKER_SCRIPT];
}

/**
Expand Down
88 changes: 80 additions & 8 deletions src/test/common/process/pythonEnvironment.unit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,26 @@ suite('CondaEnvironment', () => {

expect(result).to.deep.equal({
command: condaFile,
args: ['run', '-n', condaInfo.name, '--no-capture-output', 'python', OUTPUT_MARKER_SCRIPT, ...args],
python: [condaFile, 'run', '-n', condaInfo.name, '--no-capture-output', 'python', OUTPUT_MARKER_SCRIPT],
args: [
'run',
'-n',
condaInfo.name,
'--no-capture-output',
'--live-stream',
'python',
OUTPUT_MARKER_SCRIPT,
...args,
],
python: [
condaFile,
'run',
'-n',
condaInfo.name,
'--no-capture-output',
'--live-stream',
'python',
OUTPUT_MARKER_SCRIPT,
],
pythonExecutable: pythonPath,
});
});
Expand All @@ -307,8 +325,26 @@ suite('CondaEnvironment', () => {

expect(result).to.deep.equal({
command: condaFile,
args: ['run', '-p', condaInfo.path, '--no-capture-output', 'python', OUTPUT_MARKER_SCRIPT, ...args],
python: [condaFile, 'run', '-p', condaInfo.path, '--no-capture-output', 'python', OUTPUT_MARKER_SCRIPT],
args: [
'run',
'-p',
condaInfo.path,
'--no-capture-output',
'--live-stream',
'python',
OUTPUT_MARKER_SCRIPT,
...args,
],
python: [
condaFile,
'run',
'-p',
condaInfo.path,
'--no-capture-output',
'--live-stream',
'python',
OUTPUT_MARKER_SCRIPT,
],
pythonExecutable: pythonPath,
});
});
Expand All @@ -317,8 +353,26 @@ suite('CondaEnvironment', () => {
const condaInfo = { name: 'foo', path: 'bar' };
const expected = {
command: condaFile,
args: ['run', '-n', condaInfo.name, '--no-capture-output', 'python', OUTPUT_MARKER_SCRIPT, ...args],
python: [condaFile, 'run', '-n', condaInfo.name, '--no-capture-output', 'python', OUTPUT_MARKER_SCRIPT],
args: [
'run',
'-n',
condaInfo.name,
'--no-capture-output',
'--live-stream',
'python',
OUTPUT_MARKER_SCRIPT,
...args,
],
python: [
condaFile,
'run',
'-n',
condaInfo.name,
'--no-capture-output',
'--live-stream',
'python',
OUTPUT_MARKER_SCRIPT,
],
pythonExecutable: pythonPath,
};
const env = await createCondaEnv(condaInfo, pythonPath, processService.object, fileSystem.object);
Expand All @@ -332,8 +386,26 @@ suite('CondaEnvironment', () => {
const condaInfo = { name: '', path: 'bar' };
const expected = {
command: condaFile,
args: ['run', '-p', condaInfo.path, '--no-capture-output', 'python', OUTPUT_MARKER_SCRIPT, ...args],
python: [condaFile, 'run', '-p', condaInfo.path, '--no-capture-output', 'python', OUTPUT_MARKER_SCRIPT],
args: [
'run',
'-p',
condaInfo.path,
'--no-capture-output',
'--live-stream',
'python',
OUTPUT_MARKER_SCRIPT,
...args,
],
python: [
condaFile,
'run',
'-p',
condaInfo.path,
'--no-capture-output',
'--live-stream',
'python',
OUTPUT_MARKER_SCRIPT,
],
pythonExecutable: pythonPath,
};
const env = await createCondaEnv(condaInfo, pythonPath, processService.object, fileSystem.object);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -481,14 +481,14 @@ suite('Conda and its environments are located correctly', () => {
expect(args).to.not.equal(undefined);
assert.deepStrictEqual(
args,
['conda', 'run', '-n', 'envName', '--no-capture-output', 'python', OUTPUT_MARKER_SCRIPT],
['conda', 'run', '-n', 'envName', '--no-capture-output', '--live-stream', 'python', OUTPUT_MARKER_SCRIPT],
'Incorrect args for case 1',
);

args = await conda?.getRunPythonArgs({ name: '', prefix: 'envPrefix' });
assert.deepStrictEqual(
args,
['conda', 'run', '-p', 'envPrefix', '--no-capture-output', 'python', OUTPUT_MARKER_SCRIPT],
['conda', 'run', '-p', 'envPrefix', '--no-capture-output', '--live-stream', 'python', OUTPUT_MARKER_SCRIPT],
'Incorrect args for case 2',
);
});
Expand Down