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
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Changelog

## 2020.3.0-rc (9 March 2020)
## 2020.3.0 (19 March 2020)

### Enhancements

Expand Down Expand Up @@ -114,6 +114,8 @@
([#10311](https://github.com/Microsoft/vscode-python/issues/10311))
1. When you install missing dependencies for Jupyter successfully in an active interpreter also set that interpreter as the Jupyter selected interpreter.
([#10359](https://github.com/Microsoft/vscode-python/issues/10359))
1. Ensure default `host` is not set, if `connect` or `listen` settings are available.
([#10597](https://github.com/Microsoft/vscode-python/issues/10597))

### Code Health

Expand All @@ -135,8 +137,6 @@
([#10182](https://github.com/Microsoft/vscode-python/issues/10182))
1. Use debugpy in the core extension instead of ptvsd.
([#10184](https://github.com/Microsoft/vscode-python/issues/10184))
1. Remove UI Tests.
([#10192](https://github.com/Microsoft/vscode-python/issues/10192))
1. Add telemetry for imports in notebooks.
([#10209](https://github.com/Microsoft/vscode-python/issues/10209))
1. Update data science component to use `debugpy`.
Expand Down
1 change: 0 additions & 1 deletion news/2 Fixes/10597.md

This file was deleted.

2 changes: 1 addition & 1 deletion 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": "Linting, Debugging (multi-threaded, remote), Intellisense, Jupyter Notebooks, code formatting, refactoring, unit tests, snippets, and more.",
"version": "2020.3.0-rc",
"version": "2020.3.0",
"languageServerVersion": "0.5.30",
"publisher": "ms-python",
"author": {
Expand Down
30 changes: 18 additions & 12 deletions src/test/common/platform/filesystem.functional.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ import * as fs from 'fs-extra';
import { convertStat, FileSystem, FileSystemUtils, RawFileSystem } from '../../../client/common/platform/fileSystem';
import { FileSystemPaths, FileSystemPathUtils } from '../../../client/common/platform/fs-paths';
import { FileType } from '../../../client/common/platform/types';
import { sleep } from '../../../client/common/utils/async';
import { createDeferred, sleep } from '../../../client/common/utils/async';
import { noop } from '../../../client/common/utils/misc';
import {
assertDoesNotExist,
assertFileText,
Expand Down Expand Up @@ -267,13 +268,24 @@ suite('FileSystem - raw', () => {
}
});

async function writeToStream(filename: string, write: (str: fs.WriteStream) => void) {
const closeDeferred = createDeferred();
const stream = fileSystem.createWriteStream(filename);
stream.on('close', () => closeDeferred.resolve());
write(stream);
stream.end();
stream.close();
stream.destroy();
await closeDeferred.promise;
return stream;
}

test('returns the correct WriteStream', async () => {
const filename = await fix.resolve('x/y/z/spam.py');
const expected = fs.createWriteStream(filename);
expected.destroy();

const stream = fileSystem.createWriteStream(filename);
stream.destroy();
const stream = await writeToStream(filename, noop);

expect(stream.path).to.deep.equal(expected.path);
});
Expand All @@ -283,9 +295,7 @@ suite('FileSystem - raw', () => {
await assertDoesNotExist(filename);
const data = 'line1\nline2\n';

const stream = fileSystem.createWriteStream(filename);
stream.write(data);
stream.destroy();
await writeToStream(filename, s => s.write(data));

await assertFileText(filename, data);
});
Expand All @@ -294,9 +304,7 @@ suite('FileSystem - raw', () => {
const filename = await fix.resolve('x/y/z/spam.py');
const data = '... 😁 ...';

const stream = fileSystem.createWriteStream(filename);
stream.write(data);
stream.destroy();
await writeToStream(filename, s => s.write(data));

await assertFileText(filename, data);
});
Expand All @@ -305,9 +313,7 @@ suite('FileSystem - raw', () => {
const filename = await fix.createFile('x/y/z/spam.py', '...');
const data = 'line1\nline2\n';

const stream = fileSystem.createWriteStream(filename);
stream.write(data);
stream.destroy();
await writeToStream(filename, s => s.write(data));

await assertFileText(filename, data);
});
Expand Down