From 5e2cbdd4dbb837351a35d3979f54d40c0a10a290 Mon Sep 17 00:00:00 2001 From: Karthik Nadig Date: Wed, 1 Sep 2021 09:36:53 -0700 Subject: [PATCH 01/23] Update version and change log (#17170) --- CHANGELOG.md | 2 +- package-lock.json | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 593d3eab5a1f..2f594f5467de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## 2021.9.0-rc (30 August 2021) +## 2021.9.0 (1 September 2021) ### Enhancements diff --git a/package-lock.json b/package-lock.json index 2ff4245ba322..c5e0e8255717 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "python", - "version": "2021.9.0-rc", + "version": "2021.9.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index ed11a5617452..ffd472d71975 100644 --- a/package.json +++ b/package.json @@ -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": "2021.9.0-rc", + "version": "2021.9.0", "featureFlags": { "usingNewInterpreterStorage": true }, From aacea595c35726cbc2c97b5a208b4ec48554a561 Mon Sep 17 00:00:00 2001 From: Kartik Raj Date: Mon, 30 Aug 2021 14:21:56 -0700 Subject: [PATCH 02/23] Ensure default python executable to use is 'python' instead of '' (#17161) * Fix Pop-up The argument 'file' cannot be empty. Received '' appears when no Python is installed or when default python is selected * News entry --- news/2 Fixes/17089.md | 1 + src/client/common/configSettings.ts | 7 +------ 2 files changed, 2 insertions(+), 6 deletions(-) create mode 100644 news/2 Fixes/17089.md diff --git a/news/2 Fixes/17089.md b/news/2 Fixes/17089.md new file mode 100644 index 000000000000..16a104039f0e --- /dev/null +++ b/news/2 Fixes/17089.md @@ -0,0 +1 @@ +Ensure default python executable to use is 'python' instead of ''. diff --git a/src/client/common/configSettings.ts b/src/client/common/configSettings.ts index 07437327635a..d68a8c12e2b7 100644 --- a/src/client/common/configSettings.ts +++ b/src/client/common/configSettings.ts @@ -152,7 +152,7 @@ export class PythonSettings implements IPythonSettings { private disposables: Disposable[] = []; - private _pythonPath = ''; + private _pythonPath = 'python'; private _defaultInterpreterPath = ''; @@ -670,11 +670,6 @@ export class PythonSettings implements IPythonSettings { } } } - if (inExperiment && this.pythonPath === DEFAULT_INTERPRETER_SETTING) { - // If no interpreter is selected, set pythonPath to an empty string. - // This is to ensure that we ask users to select an interpreter in case auto selected interpreter is not safe to select - this.pythonPath = ''; - } return getAbsolutePath(this.pythonPath, workspaceRoot); } } From 16152fc3982129c22b8e33f2a210b8ece2d7cb72 Mon Sep 17 00:00:00 2001 From: Kartik Raj Date: Tue, 31 Aug 2021 14:26:00 -0700 Subject: [PATCH 03/23] Ensure workspace interpreters are discovered and watched (#17144) --- news/2 Fixes/17144.md | 1 + src/client/common/platform/fs-paths.ts | 4 ++++ src/client/common/utils/misc.ts | 9 +++++---- .../locators/composite/envsCollectionCache.ts | 2 ++ .../base/locators/lowLevel/fsWatchingLocator.ts | 9 +++++++-- .../base/locators/lowLevel/poetryLocator.ts | 4 +++- .../lowLevel/workspaceVirtualEnvLocator.ts | 17 +++++++++++------ .../common/pythonBinariesWatcher.ts | 2 ++ 8 files changed, 35 insertions(+), 13 deletions(-) create mode 100644 news/2 Fixes/17144.md diff --git a/news/2 Fixes/17144.md b/news/2 Fixes/17144.md new file mode 100644 index 000000000000..5c35a20ae2fd --- /dev/null +++ b/news/2 Fixes/17144.md @@ -0,0 +1 @@ +Ensure workspace interpreters are discovered and watched when in `pythonDiscoveryModuleWithoutWatcher` experiment. diff --git a/src/client/common/platform/fs-paths.ts b/src/client/common/platform/fs-paths.ts index 9a658283c30c..bb86a183b529 100644 --- a/src/client/common/platform/fs-paths.ts +++ b/src/client/common/platform/fs-paths.ts @@ -156,3 +156,7 @@ export function normCasePath(filePath: string): string { export function isParentPath(filePath: string, parentPath: string): boolean { return normCasePath(filePath).startsWith(normCasePath(parentPath)); } + +export function arePathsSame(path1: string, path2: string): boolean { + return normCasePath(path1) === normCasePath(path2); +} diff --git a/src/client/common/utils/misc.ts b/src/client/common/utils/misc.ts index 23d6db2b76d3..f7a2b98f3913 100644 --- a/src/client/common/utils/misc.ts +++ b/src/client/common/utils/misc.ts @@ -4,6 +4,7 @@ import type { TextDocument, Uri } from 'vscode'; import { InteractiveInputScheme, NotebookCellScheme } from '../constants'; import { InterpreterUri } from '../installer/types'; +import { arePathsSame, isParentPath } from '../platform/fs-paths'; import { Resource } from '../types'; import { isPromise } from './async'; import { StopWatch } from './stopWatch'; @@ -126,15 +127,15 @@ export function getURIFilter( while (candidate.path.endsWith('/')) { candidatePath = candidatePath.slice(0, -1); } - if (opts.checkExact && candidatePath === uriPath) { + if (opts.checkExact && arePathsSame(candidatePath, uriPath)) { return true; } - if (opts.checkParent && candidatePath.startsWith(uriRoot)) { + if (opts.checkParent && isParentPath(candidatePath, uriRoot)) { return true; } if (opts.checkChild) { - const candidateRoot = `{candidatePath}/`; - if (uriPath.startsWith(candidateRoot)) { + const candidateRoot = `${candidatePath}/`; + if (isParentPath(uriPath, candidateRoot)) { return true; } } diff --git a/src/client/pythonEnvironments/base/locators/composite/envsCollectionCache.ts b/src/client/pythonEnvironments/base/locators/composite/envsCollectionCache.ts index 897c536c1e74..c6d116792ea1 100644 --- a/src/client/pythonEnvironments/base/locators/composite/envsCollectionCache.ts +++ b/src/client/pythonEnvironments/base/locators/composite/envsCollectionCache.ts @@ -2,6 +2,7 @@ // Licensed under the MIT License. import { Event } from 'vscode'; +import { traceInfo } from '../../../../common/logger'; import { asyncFilter } from '../../../../common/utils/arrayUtils'; import { pathExists } from '../../../common/externalDependencies'; import { PythonEnvInfo } from '../../info'; @@ -112,6 +113,7 @@ export class PythonEnvInfoCache extends PythonEnvsWatcher { if (this.envs.length) { + traceInfo('Environments added to cache', JSON.stringify(this.envs)); await this.persistentStorage.store(this.envs); } } diff --git a/src/client/pythonEnvironments/base/locators/lowLevel/fsWatchingLocator.ts b/src/client/pythonEnvironments/base/locators/lowLevel/fsWatchingLocator.ts index 6086a9584f00..fab78d42de05 100644 --- a/src/client/pythonEnvironments/base/locators/lowLevel/fsWatchingLocator.ts +++ b/src/client/pythonEnvironments/base/locators/lowLevel/fsWatchingLocator.ts @@ -5,6 +5,7 @@ import * as fs from 'fs'; import * as path from 'path'; import { Uri } from 'vscode'; import { DiscoveryVariants } from '../../../../common/experiments/groups'; +import { traceError, traceVerbose } from '../../../../common/logger'; import { FileChangeType } from '../../../../common/platform/fileSystemWatcher'; import { sleep } from '../../../../common/utils/async'; import { logError } from '../../../../logging'; @@ -33,6 +34,7 @@ function checkDirWatchable(dirname: string): DirUnwatchableReason { try { names = fs.readdirSync(dirname); } catch (err) { + traceError('Reading directory to watch failed', err); if (err.code === 'ENOENT') { // We treat a missing directory as watchable since it should // be watchable if created later. @@ -92,12 +94,15 @@ export abstract class FSWatchingLocator extends LazyResourceB // Enable global watchers only if the experiment allows it. const enableGlobalWatchers = await inExperiment(DiscoveryVariants.discoverWithFileWatching); if (!enableGlobalWatchers) { + traceVerbose('Watcher disabled'); return; } } // Start the FS watchers. + traceVerbose('Getting roots'); let roots = await this.getRoots(); + traceVerbose('Found roots'); if (typeof roots === 'string') { roots = [roots]; } @@ -106,13 +111,12 @@ export abstract class FSWatchingLocator extends LazyResourceB // that might be watched due to a glob are not checked. const unwatchable = await checkDirWatchable(root); if (unwatchable) { - logError(`dir "${root}" is not watchable (${unwatchable})`); + logError(`Dir "${root}" is not watchable (${unwatchable})`); return undefined; } return root; }); const watchableRoots = (await Promise.all(promises)).filter((root) => !!root) as string[]; - watchableRoots.forEach((root) => this.startWatchers(root)); } @@ -147,6 +151,7 @@ export abstract class FSWatchingLocator extends LazyResourceB // The structure determines which globs are returned. this.opts.envStructure, ); + traceVerbose('Start watching root', root, 'for globs', JSON.stringify(globs)); const watchers = globs.map((g) => watchLocationForPythonBinaries(root, callback, g)); this.disposables.push(...watchers); } diff --git a/src/client/pythonEnvironments/base/locators/lowLevel/poetryLocator.ts b/src/client/pythonEnvironments/base/locators/lowLevel/poetryLocator.ts index 9382ab12cc68..395e3d6352a8 100644 --- a/src/client/pythonEnvironments/base/locators/lowLevel/poetryLocator.ts +++ b/src/client/pythonEnvironments/base/locators/lowLevel/poetryLocator.ts @@ -8,7 +8,7 @@ import { traceError, traceVerbose } from '../../../../common/logger'; import { chain, iterable } from '../../../../common/utils/async'; import { PythonEnvKind } from '../../info'; import { BasicEnvInfo, IPythonEnvsIterator } from '../../locator'; -import { FSWatchingLocator } from './fsWatchingLocator'; +import { FSWatcherKind, FSWatchingLocator } from './fsWatchingLocator'; import { getInterpreterPathFromDir } from '../../../common/commonUtils'; import { pathExists } from '../../../common/externalDependencies'; import { isPoetryEnvironment, localPoetryEnvDirName, Poetry } from '../../../common/environmentManagers/poetry'; @@ -65,6 +65,8 @@ export class PoetryLocator extends FSWatchingLocator { super( () => getRootVirtualEnvDir(root), async () => PythonEnvKind.Poetry, + undefined, + FSWatcherKind.Workspace, ); } diff --git a/src/client/pythonEnvironments/base/locators/lowLevel/workspaceVirtualEnvLocator.ts b/src/client/pythonEnvironments/base/locators/lowLevel/workspaceVirtualEnvLocator.ts index 0b0e60dd94d0..ebee7cbabd11 100644 --- a/src/client/pythonEnvironments/base/locators/lowLevel/workspaceVirtualEnvLocator.ts +++ b/src/client/pythonEnvironments/base/locators/lowLevel/workspaceVirtualEnvLocator.ts @@ -10,7 +10,7 @@ import { isPipenvEnvironment } from '../../../common/environmentManagers/pipenv' import { isVenvEnvironment, isVirtualenvEnvironment } from '../../../common/environmentManagers/simplevirtualenvs'; import { PythonEnvKind } from '../../info'; import { BasicEnvInfo, IPythonEnvsIterator } from '../../locator'; -import { FSWatchingLocator } from './fsWatchingLocator'; +import { FSWatcherKind, FSWatchingLocator } from './fsWatchingLocator'; import '../../../../common/extensions'; import { asyncFilter } from '../../../../common/utils/arrayUtils'; @@ -52,11 +52,16 @@ async function getVirtualEnvKind(interpreterPath: string): Promise { public constructor(private readonly root: string) { - super(() => getWorkspaceVirtualEnvDirs(this.root), getVirtualEnvKind, { - // Note detecting kind of virtual env depends on the file structure around the - // executable, so we need to wait before attempting to detect it. - delayOnCreated: 1000, - }); + super( + () => getWorkspaceVirtualEnvDirs(this.root), + getVirtualEnvKind, + { + // Note detecting kind of virtual env depends on the file structure around the + // executable, so we need to wait before attempting to detect it. + delayOnCreated: 1000, + }, + FSWatcherKind.Workspace, + ); } protected doIterEnvs(): IPythonEnvsIterator { diff --git a/src/client/pythonEnvironments/common/pythonBinariesWatcher.ts b/src/client/pythonEnvironments/common/pythonBinariesWatcher.ts index dc3ca86de559..364157b02fb0 100644 --- a/src/client/pythonEnvironments/common/pythonBinariesWatcher.ts +++ b/src/client/pythonEnvironments/common/pythonBinariesWatcher.ts @@ -5,6 +5,7 @@ import * as minimatch from 'minimatch'; import * as path from 'path'; +import { traceVerbose } from '../../common/logger'; import { FileChangeType, watchLocationForPattern } from '../../common/platform/fileSystemWatcher'; import { getOSType, OSType } from '../../common/utils/platform'; import { IDisposable } from '../../common/utils/resourceLifecycle'; @@ -26,6 +27,7 @@ export function watchLocationForPythonBinaries( const resolvedGlob = path.posix.normalize(executableGlob); const [baseGlob] = resolvedGlob.split('/').slice(-1); function callbackClosure(type: FileChangeType, e: string) { + traceVerbose('Received event', JSON.stringify(e), 'for baseglob', baseGlob); const isMatch = minimatch(path.basename(e), baseGlob, { nocase: getOSType() === OSType.Windows }); if (!isMatch) { // When deleting the file for some reason path to all directories leading up to python are reported From 71bc8151e8d74f4ce2a0c1b8ef9e8bcbd01b0081 Mon Sep 17 00:00:00 2001 From: Kartik Raj Date: Tue, 7 Sep 2021 14:32:11 -0700 Subject: [PATCH 04/23] Cherry pick discovery related fixes to release (#17310) * Do path comparisons appropriately in the discovery component (#17244) * Do path comparisons appropriately in the discovery component * News entry * Fix some tests * Some more fixes * Fix poetry unit tests * Ensure we trigger discovery for the first time as part of extension activation (#17304) * Ensure we trigger discovery for the first time as part of extension activation * Oops * Fix parent path check (#17274) * Fix parent path check * only buiild vsix * More verbose logging * Revert "only buiild vsix" This reverts commit b601e59f17293bd5c6b1518ff58ab52b6cb8dd7e. --- news/2 Fixes/17244.md | 1 + news/2 Fixes/17303.md | 1 + .../pythonEnvironments/base/info/executable.ts | 2 ++ .../locators/composite/envsCollectionService.ts | 3 +++ .../base/locators/composite/resolverUtils.ts | 4 ++-- .../base/locators/lowLevel/fsWatchingLocator.ts | 1 + .../pythonEnvironments/common/commonUtils.ts | 3 ++- .../common/environmentManagers/conda.ts | 4 ++-- .../common/environmentManagers/pipenv.ts | 6 +++--- .../common/environmentManagers/pyenv.ts | 17 ++++------------- .../environmentManagers/simplevirtualenvs.ts | 11 ++--------- .../common/externalDependencies.ts | 6 ++++++ .../common/pythonBinariesWatcher.ts | 2 +- src/client/pythonEnvironments/index.ts | 7 ++----- src/client/pythonEnvironments/legacyIOC.ts | 3 ++- .../environmentManagers/poetry.unit.test.ts | 13 +++++++++++-- 16 files changed, 45 insertions(+), 39 deletions(-) create mode 100644 news/2 Fixes/17244.md create mode 100644 news/2 Fixes/17303.md diff --git a/news/2 Fixes/17244.md b/news/2 Fixes/17244.md new file mode 100644 index 000000000000..bbdacb744060 --- /dev/null +++ b/news/2 Fixes/17244.md @@ -0,0 +1 @@ +Do path comparisons appropriately in the new discovery component. diff --git a/news/2 Fixes/17303.md b/news/2 Fixes/17303.md new file mode 100644 index 000000000000..b995c190008f --- /dev/null +++ b/news/2 Fixes/17303.md @@ -0,0 +1 @@ +Ensure we trigger discovery for the first time as part of extension activation. diff --git a/src/client/pythonEnvironments/base/info/executable.ts b/src/client/pythonEnvironments/base/info/executable.ts index 9d1beef317f2..ab5a67d79315 100644 --- a/src/client/pythonEnvironments/base/info/executable.ts +++ b/src/client/pythonEnvironments/base/info/executable.ts @@ -6,6 +6,7 @@ import { getOSType, OSType } from '../../../common/utils/platform'; import { getEmptyVersion, parseVersion } from './pythonVersion'; import { PythonVersion } from '.'; +import { normCasePath } from '../../common/externalDependencies'; /** * Determine a best-effort Python version based on the given filename. @@ -21,6 +22,7 @@ export function parseVersionFromExecutable(filename: string): PythonVersion { } function parseBasename(basename: string): PythonVersion { + basename = normCasePath(basename); if (getOSType() === OSType.Windows) { if (basename === 'python.exe') { // On Windows we can't assume it is 2.7. diff --git a/src/client/pythonEnvironments/base/locators/composite/envsCollectionService.ts b/src/client/pythonEnvironments/base/locators/composite/envsCollectionService.ts index 49d95f55bd97..61eb61a451d1 100644 --- a/src/client/pythonEnvironments/base/locators/composite/envsCollectionService.ts +++ b/src/client/pythonEnvironments/base/locators/composite/envsCollectionService.ts @@ -55,6 +55,9 @@ export class EnvsCollectionService extends PythonEnvsWatcher { traceError('Expected registry interpreter cache to be initialized already'); interpreters = await getRegistryInterpreters(); } - const data = interpreters.find((i) => i.interpreterPath.toUpperCase() === env.executable.filename.toUpperCase()); + const data = interpreters.find((i) => arePathsSame(i.interpreterPath, env.executable.filename)); if (data) { const versionStr = data.versionStr ?? data.sysVersionStr ?? data.interpreterPath; let version; diff --git a/src/client/pythonEnvironments/base/locators/lowLevel/fsWatchingLocator.ts b/src/client/pythonEnvironments/base/locators/lowLevel/fsWatchingLocator.ts index fab78d42de05..7181ec975eea 100644 --- a/src/client/pythonEnvironments/base/locators/lowLevel/fsWatchingLocator.ts +++ b/src/client/pythonEnvironments/base/locators/lowLevel/fsWatchingLocator.ts @@ -143,6 +143,7 @@ export abstract class FSWatchingLocator extends LazyResourceB const searchLocation = Uri.file( this.opts.searchLocation ?? path.dirname(getEnvironmentDirFromPath(executable)), ); + traceVerbose('Fired event ', JSON.stringify({ type, kind, searchLocation }), 'from locator'); this.emitter.fire({ type, kind, searchLocation }); }; diff --git a/src/client/pythonEnvironments/common/commonUtils.ts b/src/client/pythonEnvironments/common/commonUtils.ts index 196d21442f99..531d20c537f2 100644 --- a/src/client/pythonEnvironments/common/commonUtils.ts +++ b/src/client/pythonEnvironments/common/commonUtils.ts @@ -11,6 +11,7 @@ import { comparePythonVersionSpecificity } from '../base/info/env'; import { parseVersion } from '../base/info/pythonVersion'; import { getPythonVersionFromConda } from './environmentManagers/conda'; import { getPythonVersionFromPyvenvCfg } from './environmentManagers/simplevirtualenvs'; +import { normCasePath } from './externalDependencies'; import * as posix from './posixUtils'; import * as windows from './windowsUtils'; @@ -362,7 +363,7 @@ export function getEnvironmentDirFromPath(interpreterPath: string): string { // env <--- Return this directory if it is not 'bin' or 'scripts' // |__ python <--- interpreterPath const dir = path.basename(path.dirname(interpreterPath)); - if (!skipDirs.includes(dir.toLowerCase())) { + if (!skipDirs.map((e) => normCasePath(e)).includes(normCasePath(dir))) { return path.dirname(interpreterPath); } diff --git a/src/client/pythonEnvironments/common/environmentManagers/conda.ts b/src/client/pythonEnvironments/common/environmentManagers/conda.ts index 30359a06fda7..540325eae5c9 100644 --- a/src/client/pythonEnvironments/common/environmentManagers/conda.ts +++ b/src/client/pythonEnvironments/common/environmentManagers/conda.ts @@ -2,7 +2,7 @@ import * as fsapi from 'fs-extra'; import * as path from 'path'; import { traceVerbose } from '../../../common/logger'; import { getEnvironmentVariable, getOSType, getUserHomeDir, OSType } from '../../../common/utils/platform'; -import { exec, getPythonSetting, pathExists, readFile } from '../externalDependencies'; +import { arePathsSame, exec, getPythonSetting, pathExists, readFile } from '../externalDependencies'; import { PythonVersion, UNKNOWN_PYTHON_VERSION } from '../../base/info'; import { parseVersion } from '../../base/info/pythonVersion'; @@ -373,7 +373,7 @@ export class Conda { } function getName(prefix: string) { - if (prefix === info.root_prefix) { + if (info.root_prefix && arePathsSame(prefix, info.root_prefix)) { return 'base'; } diff --git a/src/client/pythonEnvironments/common/environmentManagers/pipenv.ts b/src/client/pythonEnvironments/common/environmentManagers/pipenv.ts index b17f99d6efa0..9bfbbcea4d08 100644 --- a/src/client/pythonEnvironments/common/environmentManagers/pipenv.ts +++ b/src/client/pythonEnvironments/common/environmentManagers/pipenv.ts @@ -4,7 +4,7 @@ import * as path from 'path'; import { traceError } from '../../../common/logger'; import { getEnvironmentVariable } from '../../../common/utils/platform'; -import { arePathsSame, pathExists, readFile } from '../externalDependencies'; +import { arePathsSame, normCasePath, pathExists, readFile } from '../externalDependencies'; function getSearchHeight() { // PIPENV_MAX_DEPTH tells pipenv the maximum number of directories to recursively search for @@ -108,8 +108,8 @@ async function getPipfileIfGlobal(interpreterPath: string): Promise { - let pathToCheck = interpreterPath; - let pyenvDir = getPyenvDir(); + const pathToCheck = interpreterPath; + const pyenvDir = getPyenvDir(); if (!(await pathExists(pyenvDir))) { return false; } - if (!pyenvDir.endsWith(path.sep)) { - pyenvDir += path.sep; - } - - if (getOSType() === OSType.Windows) { - pyenvDir = pyenvDir.toUpperCase(); - pathToCheck = pathToCheck.toUpperCase(); - } - - return pathToCheck.startsWith(pyenvDir); + return isParentPath(pathToCheck, pyenvDir); } export interface IPyenvVersionStrings { diff --git a/src/client/pythonEnvironments/common/environmentManagers/simplevirtualenvs.ts b/src/client/pythonEnvironments/common/environmentManagers/simplevirtualenvs.ts index 824c540689ed..915bc8950a01 100644 --- a/src/client/pythonEnvironments/common/environmentManagers/simplevirtualenvs.ts +++ b/src/client/pythonEnvironments/common/environmentManagers/simplevirtualenvs.ts @@ -8,7 +8,7 @@ import { getEnvironmentVariable, getOSType, getUserHomeDir, OSType } from '../.. import { PythonVersion, UNKNOWN_PYTHON_VERSION } from '../../base/info'; import { comparePythonVersionSpecificity } from '../../base/info/env'; import { parseBasicVersion, parseRelease, parseVersion } from '../../base/info/pythonVersion'; -import { pathExists, readFile } from '../externalDependencies'; +import { isParentPath, pathExists, readFile } from '../externalDependencies'; function getPyvenvConfigPathsFrom(interpreterPath: string): string[] { const pyvenvConfigFile = 'pyvenv.cfg'; @@ -99,20 +99,13 @@ function getWorkOnHome(): Promise { */ export async function isVirtualenvwrapperEnvironment(interpreterPath: string): Promise { const workOnHomeDir = await getWorkOnHome(); - let pathToCheck = interpreterPath; - let workOnRoot = workOnHomeDir; - - if (getOSType() === OSType.Windows) { - workOnRoot = workOnHomeDir.toUpperCase(); - pathToCheck = interpreterPath.toUpperCase(); - } // For environment to be a virtualenvwrapper based it has to follow these two rules: // 1. It should be in a sub-directory under the WORKON_HOME // 2. It should be a valid virtualenv environment return ( (await pathExists(workOnHomeDir)) && - pathToCheck.startsWith(`${workOnRoot}${path.sep}`) && + isParentPath(interpreterPath, workOnHomeDir) && isVirtualenvEnvironment(interpreterPath) ); } diff --git a/src/client/pythonEnvironments/common/externalDependencies.ts b/src/client/pythonEnvironments/common/externalDependencies.ts index bae4b7a0b774..058f0fb59d15 100644 --- a/src/client/pythonEnvironments/common/externalDependencies.ts +++ b/src/client/pythonEnvironments/common/externalDependencies.ts @@ -82,6 +82,12 @@ export const untildify: (value: string) => string = require('untildify'); * @param parentPath The potential parent path to check for */ export function isParentPath(filePath: string, parentPath: string): boolean { + if (!parentPath.endsWith(path.sep)) { + parentPath += path.sep; + } + if (!filePath.endsWith(path.sep)) { + filePath += path.sep; + } return normCasePath(filePath).startsWith(normCasePath(parentPath)); } diff --git a/src/client/pythonEnvironments/common/pythonBinariesWatcher.ts b/src/client/pythonEnvironments/common/pythonBinariesWatcher.ts index 364157b02fb0..3cdf9860814b 100644 --- a/src/client/pythonEnvironments/common/pythonBinariesWatcher.ts +++ b/src/client/pythonEnvironments/common/pythonBinariesWatcher.ts @@ -27,7 +27,7 @@ export function watchLocationForPythonBinaries( const resolvedGlob = path.posix.normalize(executableGlob); const [baseGlob] = resolvedGlob.split('/').slice(-1); function callbackClosure(type: FileChangeType, e: string) { - traceVerbose('Received event', JSON.stringify(e), 'for baseglob', baseGlob); + traceVerbose('Received event', type, JSON.stringify(e), 'for baseglob', baseGlob); const isMatch = minimatch(path.basename(e), baseGlob, { nocase: getOSType() === OSType.Windows }); if (!isMatch) { // When deleting the file for some reason path to all directories leading up to python are reported diff --git a/src/client/pythonEnvironments/index.ts b/src/client/pythonEnvironments/index.ts index b76654188e61..e0adb383bf65 100644 --- a/src/client/pythonEnvironments/index.ts +++ b/src/client/pythonEnvironments/index.ts @@ -30,7 +30,6 @@ import { IEnvsCollectionCache, } from './base/locators/composite/envsCollectionCache'; import { EnvsCollectionService } from './base/locators/composite/envsCollectionService'; -import { addItemsToRunAfterActivation } from '../common/utils/runAfterActivation'; /** * Set up the Python environments component (during extension activation).' @@ -62,10 +61,8 @@ export async function activate(api: IDiscoveryAPI): Promise { }; } - addItemsToRunAfterActivation(() => { - // Force an initial background refresh of the environments. - api.triggerRefresh().ignoreErrors(); - }); + // Force an initial background refresh of the environments. + api.triggerRefresh().ignoreErrors(); return { fullyReady: Promise.resolve(), diff --git a/src/client/pythonEnvironments/legacyIOC.ts b/src/client/pythonEnvironments/legacyIOC.ts index 25ea840d8976..0b18fb2c11e3 100644 --- a/src/client/pythonEnvironments/legacyIOC.ts +++ b/src/client/pythonEnvironments/legacyIOC.ts @@ -5,7 +5,7 @@ import { injectable } from 'inversify'; import { intersection } from 'lodash'; import * as vscode from 'vscode'; import { DiscoveryVariants } from '../common/experiments/groups'; -import { traceError } from '../common/logger'; +import { traceError, traceVerbose } from '../common/logger'; import { FileChangeType } from '../common/platform/fileSystemWatcher'; import { Resource } from '../common/types'; import { @@ -177,6 +177,7 @@ class ComponentAdapter implements IComponentAdapter { if (!workspaceFolder || !e.searchLocation) { return; } + traceVerbose(`Recieved event ${JSON.stringify(e)} file change event`); if ( e.type === FileChangeType.Created && isParentPath(e.searchLocation.fsPath, workspaceFolder.uri.fsPath) diff --git a/src/test/pythonEnvironments/common/environmentManagers/poetry.unit.test.ts b/src/test/pythonEnvironments/common/environmentManagers/poetry.unit.test.ts index 2355936b8f49..355a1251d118 100644 --- a/src/test/pythonEnvironments/common/environmentManagers/poetry.unit.test.ts +++ b/src/test/pythonEnvironments/common/environmentManagers/poetry.unit.test.ts @@ -5,7 +5,7 @@ import { assert, expect } from 'chai'; import * as path from 'path'; import * as sinon from 'sinon'; import { ExecutionResult, ShellOptions } from '../../../../client/common/process/types'; -import { getUserHomeDir } from '../../../../client/common/utils/platform'; +import * as platformApis from '../../../../client/common/utils/platform'; import * as externalDependencies from '../../../../client/pythonEnvironments/common/externalDependencies'; import { isPoetryEnvironment, Poetry } from '../../../../client/pythonEnvironments/common/environmentManagers/poetry'; import { TEST_LAYOUT_ROOT } from '../commonTestConstants'; @@ -20,6 +20,12 @@ suite('isPoetryEnvironment Tests', () => { let getPythonSetting: sinon.SinonStub; suite('Global poetry environment', async () => { + setup(() => { + sinon.stub(platformApis, 'getOSType').callsFake(() => platformApis.OSType.Windows); + }); + teardown(() => { + sinon.restore(); + }); test('Return true if environment folder name matches global env pattern and environment is of virtual env type', async () => { const result = await isPoetryEnvironment( path.join(testPoetryDir, 'poetry-tutorial-project-6hnqYwvD-py3.8', 'Scripts', 'python.exe'), @@ -60,16 +66,19 @@ suite('isPoetryEnvironment Tests', () => { }); test('Return true if environment folder name matches criteria for local envs', async () => { + sinon.stub(platformApis, 'getOSType').callsFake(() => platformApis.OSType.Windows); const result = await isPoetryEnvironment(path.join(project1, '.venv', 'Scripts', 'python.exe')); expect(result).to.equal(true); }); test(`Return false if environment folder name is not named '.venv' for local envs`, async () => { + sinon.stub(platformApis, 'getOSType').callsFake(() => platformApis.OSType.Windows); const result = await isPoetryEnvironment(path.join(project1, '.venv2', 'Scripts', 'python.exe')); expect(result).to.equal(false); }); test(`Return false if running poetry for project dir as cwd fails (pyproject.toml file is invalid)`, async () => { + sinon.stub(platformApis, 'getOSType').callsFake(() => platformApis.OSType.Linux); const result = await isPoetryEnvironment(path.join(project4, '.venv', 'bin', 'python')); expect(result).to.equal(false); }); @@ -148,7 +157,7 @@ suite('Poetry binary is located correctly', async () => { }); test('When poetry is not available on PATH, try using the default poetry location if valid', async () => { - const home = getUserHomeDir(); + const home = platformApis.getUserHomeDir(); if (!home) { assert(true); return; From f8e4f804fecaa13e0c3953302afc68ae6f44ec55 Mon Sep 17 00:00:00 2001 From: Karthik Nadig Date: Tue, 7 Sep 2021 14:39:00 -0700 Subject: [PATCH 05/23] Fix for multiple directories in pytest args. (#17306) --- news/2 Fixes/17281.md | 1 + .../testController/pytest/pytestController.ts | 25 +++++++++++++------ 2 files changed, 18 insertions(+), 8 deletions(-) create mode 100644 news/2 Fixes/17281.md diff --git a/news/2 Fixes/17281.md b/news/2 Fixes/17281.md new file mode 100644 index 000000000000..7c8d48329d0b --- /dev/null +++ b/news/2 Fixes/17281.md @@ -0,0 +1 @@ +Fix for multiple folders in `pytest` args. diff --git a/src/client/testing/testController/pytest/pytestController.ts b/src/client/testing/testController/pytest/pytestController.ts index bb938222ea84..cd9f62e2df64 100644 --- a/src/client/testing/testController/pytest/pytestController.ts +++ b/src/client/testing/testController/pytest/pytestController.ts @@ -87,21 +87,30 @@ export class PytestController implements ITestFrameworkController { item.children.forEach((c) => subRootWithNoData.push(c.id)); rawTestData.forEach((data) => { + let subRootId = data.root; + let rawId; + if (data.root === root) { + const subRoot = data.parents.filter((p) => p.parentid === '.' || p.parentid === root); + subRootId = path.join(data.root, subRoot.length > 0 ? subRoot[0].id : ''); + rawId = subRoot.length > 0 ? subRoot[0].id : undefined; + } + if (data.tests.length > 0) { - let subRootItem = item.children.get(data.root); + let subRootItem = item.children.get(subRootId); if (!subRootItem) { subRootItem = createWorkspaceRootTestItem(testController, this.idToRawData, { - id: data.root, - label: path.basename(data.root), - uri: Uri.file(data.root), - runId: data.root, + id: subRootId, + label: path.basename(subRootId), + uri: Uri.file(subRootId), + runId: subRootId, parentId: item.id, + rawId, }); item.children.add(subRootItem); } - // We found data for a node. Remove its id for the no-data list. - subRootWithNoData = subRootWithNoData.filter((s) => s !== data.root); + // We found data for a node. Remove its id from the no-data list. + subRootWithNoData = subRootWithNoData.filter((s) => s !== subRootId); updateTestItemFromRawData( subRootItem, testController, @@ -111,7 +120,7 @@ export class PytestController implements ITestFrameworkController { ); } else { // This means there are no tests under this node - removeItemByIdFromChildren(this.idToRawData, item, [data.root]); + removeItemByIdFromChildren(this.idToRawData, item, [subRootId]); } }); From b698d2c42a02584ea696960e24bcb510d375c7ed Mon Sep 17 00:00:00 2001 From: Karthik Nadig Date: Tue, 7 Sep 2021 21:35:41 -0700 Subject: [PATCH 06/23] Fix for a bunch of test issues. (#17311) * Fix for a bunch of test issues. * Lint python files. --- news/2 Fixes/17280.md | 1 + news/2 Fixes/17285.md | 1 + news/2 Fixes/17309.md | 1 + .../testing_tools/unittest_discovery.py | 62 +++++++++++++++++++ .../process/internal/scripts/testing_tools.ts | 8 ++- .../unittest/unittestController.ts | 56 +++-------------- 6 files changed, 78 insertions(+), 51 deletions(-) create mode 100644 news/2 Fixes/17280.md create mode 100644 news/2 Fixes/17285.md create mode 100644 news/2 Fixes/17309.md create mode 100644 pythonFiles/testing_tools/unittest_discovery.py diff --git a/news/2 Fixes/17280.md b/news/2 Fixes/17280.md new file mode 100644 index 000000000000..96c7ff86b6d6 --- /dev/null +++ b/news/2 Fixes/17280.md @@ -0,0 +1 @@ +Fix for unable to import when running unittest. diff --git a/news/2 Fixes/17285.md b/news/2 Fixes/17285.md new file mode 100644 index 000000000000..bf62892a08e8 --- /dev/null +++ b/news/2 Fixes/17285.md @@ -0,0 +1 @@ +Improve detecting lines when using testing wrappers. diff --git a/news/2 Fixes/17309.md b/news/2 Fixes/17309.md new file mode 100644 index 000000000000..96607b7d223b --- /dev/null +++ b/news/2 Fixes/17309.md @@ -0,0 +1 @@ +Missing location info for `async def` functions. diff --git a/pythonFiles/testing_tools/unittest_discovery.py b/pythonFiles/testing_tools/unittest_discovery.py new file mode 100644 index 000000000000..6e02f53d240a --- /dev/null +++ b/pythonFiles/testing_tools/unittest_discovery.py @@ -0,0 +1,62 @@ +import unittest +import inspect +import sys +import traceback + +start_dir = sys.argv[1] +pattern = sys.argv[2] + + +def get_sourceline(obj): + try: + s, n = inspect.getsourcelines(obj) + except: + try: + # this handles `tornado` case we need a better + # way to get to the wrapped function. + # This is a temporary solution + s, n = inspect.getsourcelines(obj.orig_method) + except: + return "*" + + for i, v in enumerate(s): + if v.strip().startswith(("def", "async def")): + return str(n + i) + return "*" + + +def generate_test_cases(suite): + for test in suite: + if isinstance(test, unittest.TestCase): + yield test + else: + for test_case in generate_test_cases(test): + yield test_case + + +try: + loader = unittest.TestLoader() + suite = loader.discover(start_dir, pattern=pattern) + + print("start") # Don't remove this line + loader_errors = [] + for s in generate_test_cases(suite): + tm = getattr(s, s._testMethodName) + testId = s.id() + if testId.startswith("unittest.loader._FailedTest"): + loader_errors.append(s._exception) + else: + print(testId.replace(".", ":") + ":" + get_sourceline(tm)) +except: + print("=== exception start ===") + traceback.print_exc() + print("=== exception end ===") + + +for error in loader_errors: + try: + print("=== exception start ===") + print(error.msg) + print("=== exception end ===") + except: + pass diff --git a/src/client/common/process/internal/scripts/testing_tools.ts b/src/client/common/process/internal/scripts/testing_tools.ts index f496147a120b..60dd21b698b6 100644 --- a/src/client/common/process/internal/scripts/testing_tools.ts +++ b/src/client/common/process/internal/scripts/testing_tools.ts @@ -11,8 +11,10 @@ const SCRIPTS_DIR = path.join(_SCRIPTS_DIR, 'testing_tools'); export function runAdapter(adapterArgs: string[]): string[] { const script = path.join(SCRIPTS_DIR, 'run_adapter.py'); - // Note that we for now we do not run this "isolated". The - // script relies on some magic that conflicts with the - // isolated script. return [script, ...adapterArgs]; } + +export function unittestDiscovery(args: string[]): string[] { + const script = path.join(SCRIPTS_DIR, 'unittest_discovery.py'); + return [script, ...args]; +} diff --git a/src/client/testing/testController/unittest/unittestController.ts b/src/client/testing/testController/unittest/unittestController.ts index f0baf6f0cf6c..130181819ebc 100644 --- a/src/client/testing/testController/unittest/unittestController.ts +++ b/src/client/testing/testController/unittest/unittestController.ts @@ -20,7 +20,6 @@ import { TestData, } from '../common/types'; import { unittestGetTestFolders, unittestGetTestPattern } from './arguments'; -import { execCode } from '../../../common/process/internal/python'; import { createErrorTestItem, createWorkspaceRootTestItem, @@ -31,6 +30,7 @@ import { import { traceError } from '../../../common/logger'; import { sendTelemetryEvent } from '../../../telemetry'; import { EventName } from '../../../telemetry/constants'; +import { unittestDiscovery } from '../../../common/process/internal/scripts/testing_tools'; @injectable() export class UnittestController implements ITestFrameworkController { @@ -111,51 +111,16 @@ export class UnittestController implements ITestFrameworkController { const startDir = unittestGetTestFolders(options.args)[0]; const pattern = unittestGetTestPattern(options.args); - const discoveryScript = ` -import unittest -import inspect - -def get_sourceline(obj): - s, n = inspect.getsourcelines(obj) - for i, v in enumerate(s): - if v.strip().startswith('def'): - return str(n+i) - return '*' - -def generate_test_cases(suite): - for test in suite: - if isinstance(test, unittest.TestCase): - yield test - else: - for test_case in generate_test_cases(test): - yield test_case - -loader = unittest.TestLoader() -suite = loader.discover("${startDir}", pattern="${pattern}") - -print("start") # Don't remove this line -loader_errors = [] -for s in generate_test_cases(suite): - tm = getattr(s, s._testMethodName) - testId = s.id() - if testId.startswith("unittest.loader._FailedTest"): - loader_errors.append(s._exception) - else: - print(testId.replace(".", ":") + ":" + get_sourceline(tm)) - -for error in loader_errors: - try: - print("=== exception start ===") - print(error.msg) - print("=== exception end ===") - except: - pass -`; + let testDir = startDir; + if (path.isAbsolute(startDir)) { + const relative = path.relative(options.cwd, startDir); + testDir = relative.length > 0 ? relative : '.'; + } const runOptions: Options = { // unittest needs to load modules in the workspace // isolating it breaks unittest discovery - args: execCode(discoveryScript), + args: unittestDiscovery([startDir, pattern]), cwd: options.cwd, workspaceFolder: options.workspaceFolder, token: options.token, @@ -168,12 +133,7 @@ for error in loader_errors: let rawTestData: RawDiscoveredTests | undefined; try { const content = await this.discoveryRunner.run(UNITTEST_PROVIDER, runOptions); - rawTestData = await testDiscoveryParser( - options.cwd, - path.isAbsolute(startDir) ? path.relative(options.cwd, startDir) : startDir, - getTestIds(content), - options.token, - ); + rawTestData = await testDiscoveryParser(options.cwd, testDir, getTestIds(content), options.token); this.testData.set(workspace.uri.fsPath, rawTestData); const exceptions = getTestDiscoveryExceptions(content); From 792494d8e5db135633b9cb9735e6916aa5d7e213 Mon Sep 17 00:00:00 2001 From: Karthik Nadig Date: Tue, 7 Sep 2021 21:36:12 -0700 Subject: [PATCH 07/23] Fix issue with in complete unittest runs. (#17313) --- news/2 Fixes/17282.md | 1 + pythonFiles/visualstudio_py_testlauncher.py | 8 ++- .../testing/testController/unittest/runner.ts | 60 ++++++++++++------- 3 files changed, 44 insertions(+), 25 deletions(-) create mode 100644 news/2 Fixes/17282.md diff --git a/news/2 Fixes/17282.md b/news/2 Fixes/17282.md new file mode 100644 index 000000000000..444bdaa0e892 --- /dev/null +++ b/news/2 Fixes/17282.md @@ -0,0 +1 @@ +Fix issue with incomplete `unittest` runs. diff --git a/pythonFiles/visualstudio_py_testlauncher.py b/pythonFiles/visualstudio_py_testlauncher.py index 13a34bf6f91e..c22c0d5d2eda 100644 --- a/pythonFiles/visualstudio_py_testlauncher.py +++ b/pythonFiles/visualstudio_py_testlauncher.py @@ -340,9 +340,11 @@ def main(): testId = m.id() if testId.startswith(opts.tests[0]): suite = cls - if testId == opts.tests[0]: - tests = unittest.TestSuite([m]) - break + if testId in opts.tests: + if tests is None: + tests = unittest.TestSuite([m]) + else: + tests.addTest(m) except Exception as err: errorMessage = traceback.format_exc() if tests is None: diff --git a/src/client/testing/testController/unittest/runner.ts b/src/client/testing/testController/unittest/runner.ts index 1a7008718edc..9e053893740a 100644 --- a/src/client/testing/testController/unittest/runner.ts +++ b/src/client/testing/testController/unittest/runner.ts @@ -6,7 +6,6 @@ import { Location, TestItem, TestMessage, TestRun, TestRunProfileKind } from 'vs import { traceError, traceInfo } from '../../../common/logger'; import * as internalScripts from '../../../common/process/internal/scripts'; import { IOutputChannel } from '../../../common/types'; -import { createDeferred, Deferred } from '../../../common/utils/async'; import { noop } from '../../../common/utils/misc'; import { UNITTEST_PROVIDER } from '../../common/constants'; import { ITestRunner, ITestDebugLauncher, IUnitTestSocketServer, LaunchOptions, Options } from '../../common/types'; @@ -57,7 +56,23 @@ export class UnittestRunner implements ITestsRunner { ): Promise { runInstance.appendOutput(`Running tests (unittest): ${testNodes.map((t) => t.id).join(' ; ')}\r\n`); const testCaseNodes: TestItem[] = []; - testNodes.forEach((t) => testCaseNodes.push(...getTestCaseNodes(t))); + const fileToTestCases: Map = new Map(); + + testNodes.forEach((t) => { + const nodes = getTestCaseNodes(t); + nodes.forEach((n) => { + if (n.uri) { + const fsRunIds = fileToTestCases.get(n.uri.fsPath); + if (fsRunIds) { + fsRunIds.push(n); + } else { + fileToTestCases.set(n.uri.fsPath, [n]); + } + } + }); + testCaseNodes.push(...nodes); + }); + const tested: string[] = []; const counts = { @@ -70,10 +85,8 @@ export class UnittestRunner implements ITestsRunner { let failFast = false; let stopTesting = false; - let testCasePromise: Deferred; this.server.on('error', (message: string, ...data: string[]) => { traceError(`${message} ${data.join(' ')}`); - testCasePromise.reject(); }); this.server.on('log', (message: string, ...data: string[]) => { traceInfo(`${message} ${data.join(' ')}`); @@ -81,7 +94,6 @@ export class UnittestRunner implements ITestsRunner { this.server.on('connect', noop); this.server.on('start', noop); this.server.on('result', (data: ITestData) => { - testCasePromise.resolve(); const testCase = testCaseNodes.find((node) => idToRawData.get(node.id)?.runId === data.test); const rawTestCase = idToRawData.get(testCase?.id ?? ''); if (testCase && rawTestCase) { @@ -147,18 +159,15 @@ export class UnittestRunner implements ITestsRunner { }); const port = await this.server.start(); - const runTestInternal = async (testFile = '', testId = ''): Promise => { + const runTestInternal = async (testFilePath: string, testRunIds: string[]): Promise => { let testArgs = getTestRunArgs(options.args); failFast = testArgs.indexOf('--uf') >= 0; testArgs = testArgs.filter((arg) => arg !== '--uf'); testArgs.push(`--result-port=${port}`); - if (testId.length > 0) { - testArgs.push(`-t${testId}`); - } - if (testFile.length > 0) { - testArgs.push(`--testFile=${testFile}`); - } + testRunIds.forEach((i) => testArgs.push(`-t${i}`)); + testArgs.push(`--testFile=${testFilePath}`); + if (options.debug === true) { testArgs.push('--debug'); const launchOptions: LaunchOptions = { @@ -179,23 +188,30 @@ export class UnittestRunner implements ITestsRunner { token: options.token, workspaceFolder: options.workspaceFolder, }; - testCasePromise = createDeferred(); await this.runner.run(UNITTEST_PROVIDER, runOptions); - return testCasePromise.promise; + return Promise.resolve(); }; try { - for (const testCaseNode of testCaseNodes) { + for (const testFile of fileToTestCases.keys()) { if (stopTesting || options.token.isCancellationRequested) { break; } - runInstance.appendOutput(`Running tests: ${testCaseNode.id}\r\n`); - const rawTestCaseNode = idToRawData.get(testCaseNode.id); - if (rawTestCaseNode) { - // VS Code API requires that we set the run state on the leaf nodes. The state of the - // parent nodes are computed based on the state of child nodes. - runInstance.started(testCaseNode); - await runTestInternal(testCaseNode.uri?.fsPath, rawTestCaseNode.runId); + + const nodes = fileToTestCases.get(testFile); + if (nodes) { + runInstance.appendOutput(`Running tests: ${nodes.join('\r\n')}\r\n`); + const runIds: string[] = []; + nodes.forEach((n) => { + const rawNode = idToRawData.get(n.id); + if (rawNode) { + // VS Code API requires that we set the run state on the leaf nodes. The state of the + // parent nodes are computed based on the state of child nodes. + runInstance.started(n); + runIds.push(rawNode.runId); + } + }); + await runTestInternal(testFile, runIds); } } } catch (ex) { From 89f73ab6100ba9c781cb915a9ebedf87cf28e0cd Mon Sep 17 00:00:00 2001 From: Karthik Nadig Date: Wed, 8 Sep 2021 12:18:32 -0700 Subject: [PATCH 08/23] Fix27ci (#17327) (#17328) * Ensure tensorboard is not installed for python 2.7 * Add news item --- build/test-requirements.txt | 2 +- news/2 Fixes/17325.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 news/2 Fixes/17325.md diff --git a/build/test-requirements.txt b/build/test-requirements.txt index 9bb14d923427..04366eb8f0c7 100644 --- a/build/test-requirements.txt +++ b/build/test-requirements.txt @@ -18,7 +18,7 @@ django isort # Integrated TensorBoard tests -tensorboard +tensorboard ; python_version > '2.7' # Python 2.7 support. pytest==4.6.9 ; python_version == '2.7' diff --git a/news/2 Fixes/17325.md b/news/2 Fixes/17325.md new file mode 100644 index 000000000000..0029466dcf3f --- /dev/null +++ b/news/2 Fixes/17325.md @@ -0,0 +1 @@ +For CI ensure `tensorboard` is installed in python 3 environments only. From f4c8588f0eb42d01cec8d69a21d4ce0042c11843 Mon Sep 17 00:00:00 2001 From: Karthik Nadig Date: Wed, 8 Sep 2021 15:05:43 -0700 Subject: [PATCH 09/23] Point release version, change log, and TPN updates (#17333) * Update version * Change log updates for point release * Third part notice update --- CHANGELOG.md | 80 +++ ThirdPartyNotices-Distribution.txt | 1072 +++++++++++----------------- news/2 Fixes/17089.md | 1 - news/2 Fixes/17144.md | 1 - news/2 Fixes/17244.md | 1 - news/2 Fixes/17280.md | 1 - news/2 Fixes/17281.md | 1 - news/2 Fixes/17282.md | 1 - news/2 Fixes/17285.md | 1 - news/2 Fixes/17303.md | 1 - news/2 Fixes/17309.md | 1 - news/2 Fixes/17325.md | 1 - package-lock.json | 2 +- package.json | 2 +- 14 files changed, 513 insertions(+), 653 deletions(-) delete mode 100644 news/2 Fixes/17089.md delete mode 100644 news/2 Fixes/17144.md delete mode 100644 news/2 Fixes/17244.md delete mode 100644 news/2 Fixes/17280.md delete mode 100644 news/2 Fixes/17281.md delete mode 100644 news/2 Fixes/17282.md delete mode 100644 news/2 Fixes/17285.md delete mode 100644 news/2 Fixes/17303.md delete mode 100644 news/2 Fixes/17309.md delete mode 100644 news/2 Fixes/17325.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f594f5467de..e0aefec4c836 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,85 @@ # Changelog +## 2021.9.1 (9 September 2021) + +### Fixes + +1. Ensure default python executable to use is 'python' instead of ''. + ([#17089](https://github.com/Microsoft/vscode-python/issues/17089)) +1. Ensure workspace interpreters are discovered and watched when in `pythonDiscoveryModuleWithoutWatcher` experiment. + ([#17144](https://github.com/Microsoft/vscode-python/issues/17144)) +1. Do path comparisons appropriately in the new discovery component. + ([#17244](https://github.com/Microsoft/vscode-python/issues/17244)) +1. Fix for unable to import when running unittest. + ([#17280](https://github.com/Microsoft/vscode-python/issues/17280)) +1. Fix for multiple folders in `pytest` args. + ([#17281](https://github.com/Microsoft/vscode-python/issues/17281)) +1. Fix issue with incomplete `unittest` runs. + ([#17282](https://github.com/Microsoft/vscode-python/issues/17282)) +1. Improve detecting lines when using testing wrappers. + ([#17285](https://github.com/Microsoft/vscode-python/issues/17285)) +1. Ensure we trigger discovery for the first time as part of extension activation. + ([#17303](https://github.com/Microsoft/vscode-python/issues/17303)) +1. Missing location info for `async def` functions. + ([#17309](https://github.com/Microsoft/vscode-python/issues/17309)) +1. For CI ensure `tensorboard` is installed in python 3 environments only. + ([#17325](https://github.com/Microsoft/vscode-python/issues/17325)) + +### 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/) +- [Microsoft Python Language Server](https://github.com/microsoft/python-language-server) +- [Pylance](https://github.com/microsoft/pylance-release) +- [exuberant ctags](http://ctags.sourceforge.net/) (user-installed) +- [rope](https://pypi.org/project/rope/) (user-installed) + +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! + ## 2021.9.0 (1 September 2021) ### Enhancements diff --git a/ThirdPartyNotices-Distribution.txt b/ThirdPartyNotices-Distribution.txt index 64e6103c7151..4d907acd8e0a 100644 --- a/ThirdPartyNotices-Distribution.txt +++ b/ThirdPartyNotices-Distribution.txt @@ -808,208 +808,103 @@ importlib-metadata 3.10.0 - Apache-2.0 Copyright 2017-2019 Jason R. Coombs, Barry Warsaw +Apache License - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ +Version 2.0, January 2004 - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION +http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. + "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. + "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." + "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. + "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and + "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. + "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. + "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - END OF TERMS AND CONDITIONS + "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. - APPENDIX: How to apply the Apache License to your work. - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - Copyright [yyyy] [name of copyright owner] + "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + + (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. + + You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + +To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. + +Copyright [yyyy] [name of copyright owner] + +Licensed under the Apache License, Version 2.0 (the "License"); + +you may not use this file except in compliance with the License. + +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software + +distributed under the License is distributed on an "AS IS" BASIS, + +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + +See the License for the specific language governing permissions and + +limitations under the License. --------------------------------------------------------- @@ -1110,208 +1005,103 @@ Copyright (c) Microsoft Corporation. Copyright 2017 Palantir Technologies, Inc. Copyright 2018 Palantir Technologies, Inc. +Apache License - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ +Version 2.0, January 2004 - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION +http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. + "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. + "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." + "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. + "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and + "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. + "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. + "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - END OF TERMS AND CONDITIONS + "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. - APPENDIX: How to apply the Apache License to your work. - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - Copyright [yyyy] [name of copyright owner] + "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + + (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. + + You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + +To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. + +Copyright [yyyy] [name of copyright owner] + +Licensed under the Apache License, Version 2.0 (the "License"); + +you may not use this file except in compliance with the License. + +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software + +distributed under the License is distributed on an "AS IS" BASIS, + +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + +See the License for the specific language governing permissions and + +limitations under the License. --------------------------------------------------------- @@ -3156,80 +2946,323 @@ If the Work includes a "NOTICE" text file as part of its distribution, then any 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. -6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. +6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + + +--------------------------------------------------------- + +--------------------------------------------------------- + +tunnel-agent 0.6.0 - Apache-2.0 +https://github.com/mikeal/tunnel-agent#readme + + +Apache License + +Version 2.0, January 2004 + +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. + +"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of this License; and + +You must cause any modified files to carry prominent notices stating that You changed the files; and + +You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + +If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +--------------------------------------------------------- + +--------------------------------------------------------- + +atob 2.1.2 - Apache-2.0 OR MIT OR (Apache-2.0 AND MIT) +https://git.coolaj86.com/coolaj86/atob.js.git + +Copyright 2015 AJ ONeal +Copyright (c) 2015 AJ ONeal +copyright 2012-2018 AJ ONeal + +At your option you may choose either of the following licenses: + + * The MIT License (MIT) + * The Apache License 2.0 (Apache-2.0) + + +The MIT License (MIT) + +Copyright (c) 2015 AJ ONeal + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: -7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. -8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. -9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. -END OF TERMS AND CONDITIONS + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION ---------------------------------------------------------- + 1. Definitions. ---------------------------------------------------------- + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. -tunnel-agent 0.6.0 - Apache-2.0 -https://github.com/mikeal/tunnel-agent#readme + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. -Apache License + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. -Version 2.0, January 2004 + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. -http://www.apache.org/licenses/ + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). -1. Definitions. + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. -"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." -"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. -"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. -"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. -"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: -"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and -"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and -"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and -"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. -2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. -3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. -4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. -You must give any other recipients of the Work or Derivative Works a copy of this License; and + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. -You must cause any modified files to carry prominent notices stating that You changed the files; and + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. -You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + END OF TERMS AND CONDITIONS -If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + APPENDIX: How to apply the Apache License to your work. -5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. -6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + Copyright 2015 AJ ONeal -7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at -8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + http://www.apache.org/licenses/LICENSE-2.0 -9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. -END OF TERMS AND CONDITIONS --------------------------------------------------------- @@ -4297,7 +4330,7 @@ IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. --------------------------------------------------------- -yallist 2.1.2 - ISC +yallist 4.0.0 - ISC https://github.com/isaacs/yallist#readme Copyright (c) Isaac Z. Schlueter and Contributors @@ -4323,7 +4356,7 @@ IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. --------------------------------------------------------- -yallist 4.0.0 - ISC +yallist 2.1.2 - ISC https://github.com/isaacs/yallist#readme Copyright (c) Isaac Z. Schlueter and Contributors @@ -4541,7 +4574,7 @@ That's all there is to it! --------------------------------------------------------- -@vscode/jupyter-lsp-middleware 0.2.3 - MIT +@vscode/jupyter-lsp-middleware 0.2.5 - MIT Copyright (c) TypeFox and others. @@ -5118,11 +5151,11 @@ SOFTWARE. --------------------------------------------------------- -braces 3.0.2 - MIT +braces 2.3.2 - MIT https://github.com/micromatch/braces Copyright (c) 2014-2018, Jon Schlinkert. -Copyright (c) 2019, Jon Schlinkert (https://github.com/jonschlinkert). +Copyright (c) 2018, Jon Schlinkert (https://github.com/jonschlinkert). The MIT License (MIT) @@ -5151,11 +5184,11 @@ THE SOFTWARE. --------------------------------------------------------- -braces 2.3.2 - MIT +braces 3.0.2 - MIT https://github.com/micromatch/braces Copyright (c) 2014-2018, Jon Schlinkert. -Copyright (c) 2018, Jon Schlinkert (https://github.com/jonschlinkert). +Copyright (c) 2019, Jon Schlinkert (https://github.com/jonschlinkert). The MIT License (MIT) @@ -5754,7 +5787,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --------------------------------------------------------- -date-format 3.0.0 - MIT +date-format 2.1.0 - MIT https://github.com/nomiddlename/date-format#readme Copyright (c) 2013 Gareth Jones @@ -5785,7 +5818,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --------------------------------------------------------- -date-format 2.1.0 - MIT +date-format 3.0.0 - MIT https://github.com/nomiddlename/date-format#readme Copyright (c) 2013 Gareth Jones @@ -6732,11 +6765,12 @@ THE SOFTWARE. --------------------------------------------------------- -fs-extra 8.1.0 - MIT +fs-extra 9.1.0 - MIT https://github.com/jprichardson/node-fs-extra Copyright (c) 2011-2017 JP Richardson Copyright (c) 2011-2017 JP Richardson (https://github.com/jprichardson) +Copyright (c) Sindre Sorhus (sindresorhus.com) Copyright (c) 2014-2016 Jonathan Ong me@jongleberry.com and Contributors (The MIT License) @@ -6760,12 +6794,11 @@ OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHE --------------------------------------------------------- -fs-extra 9.1.0 - MIT +fs-extra 8.1.0 - MIT https://github.com/jprichardson/node-fs-extra Copyright (c) 2011-2017 JP Richardson Copyright (c) 2011-2017 JP Richardson (https://github.com/jprichardson) -Copyright (c) Sindre Sorhus (sindresorhus.com) Copyright (c) 2014-2016 Jonathan Ong me@jongleberry.com and Contributors (The MIT License) @@ -7991,11 +8024,12 @@ THE SOFTWARE. --------------------------------------------------------- -jedi 0.18.0 - MIT +jedi 0.17.2 - MIT Copyright (c) <2013> Copyright (c) Maxim Kurnikov. +copyright u'jedi contributors copyright (c) 2014 by Armin Ronacher. Copyright (c) 2015 Jukka Lehtosalo and contributors @@ -8013,12 +8047,11 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI --------------------------------------------------------- -jedi 0.17.2 - MIT +jedi 0.18.0 - MIT Copyright (c) <2013> Copyright (c) Maxim Kurnikov. -copyright u'jedi contributors copyright (c) 2014 by Armin Ronacher. Copyright (c) 2015 Jukka Lehtosalo and contributors @@ -8325,15 +8358,15 @@ THE SOFTWARE --------------------------------------------------------- -kind-of 3.2.2 - MIT +kind-of 5.1.0 - MIT https://github.com/jonschlinkert/kind-of -Copyright (c) 2014-2017, Jon Schlinkert +Copyright (c) 2014-2017, Jon Schlinkert. Copyright (c) 2017, Jon Schlinkert (https://github.com/jonschlinkert). The MIT License (MIT) -Copyright (c) 2014-2017, Jon Schlinkert +Copyright (c) 2014-2017, Jon Schlinkert. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -8358,15 +8391,15 @@ THE SOFTWARE. --------------------------------------------------------- -kind-of 5.1.0 - MIT +kind-of 3.2.2 - MIT https://github.com/jonschlinkert/kind-of -Copyright (c) 2014-2017, Jon Schlinkert. +Copyright (c) 2014-2017, Jon Schlinkert Copyright (c) 2017, Jon Schlinkert (https://github.com/jonschlinkert). The MIT License (MIT) -Copyright (c) 2014-2017, Jon Schlinkert. +Copyright (c) 2014-2017, Jon Schlinkert Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -11315,7 +11348,7 @@ THE SOFTWARE. --------------------------------------------------------- -universalify 0.1.2 - MIT +universalify 2.0.0 - MIT https://github.com/RyanZim/universalify#readme Copyright (c) 2017, Ryan Zimmerman @@ -11346,7 +11379,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --------------------------------------------------------- -universalify 2.0.0 - MIT +universalify 0.1.2 - MIT https://github.com/RyanZim/universalify#readme Copyright (c) 2017, Ryan Zimmerman @@ -11897,7 +11930,7 @@ SOFTWARE. --------------------------------------------------------- -xml2js 0.2.8 - MIT +xml2js 0.4.19 - MIT https://github.com/Leonidas-from-XIV/node-xml2js Copyright 2010, 2011, 2012, 2013. @@ -11927,7 +11960,7 @@ IN THE SOFTWARE. --------------------------------------------------------- -xml2js 0.4.19 - MIT +xml2js 0.2.8 - MIT https://github.com/Leonidas-from-XIV/node-xml2js Copyright 2010, 2011, 2012, 2013. @@ -12004,249 +12037,6 @@ The above copyright notice and this permission notice shall be included in all c THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------------------------------------------------- - ---------------------------------------------------------- - -atob 2.1.2 - MIT OR Apache-2.0 -https://git.coolaj86.com/coolaj86/atob.js.git - -Copyright 2015 AJ ONeal -Copyright (c) 2015 AJ ONeal -copyright 2012-2018 AJ ONeal - -At your option you may choose either of the following licenses: - - * The MIT License (MIT) - * The Apache License 2.0 (Apache-2.0) - - -The MIT License (MIT) - -Copyright (c) 2015 AJ ONeal - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2015 AJ ONeal - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - --------------------------------------------------------- --------------------------------------------------------- diff --git a/news/2 Fixes/17089.md b/news/2 Fixes/17089.md deleted file mode 100644 index 16a104039f0e..000000000000 --- a/news/2 Fixes/17089.md +++ /dev/null @@ -1 +0,0 @@ -Ensure default python executable to use is 'python' instead of ''. diff --git a/news/2 Fixes/17144.md b/news/2 Fixes/17144.md deleted file mode 100644 index 5c35a20ae2fd..000000000000 --- a/news/2 Fixes/17144.md +++ /dev/null @@ -1 +0,0 @@ -Ensure workspace interpreters are discovered and watched when in `pythonDiscoveryModuleWithoutWatcher` experiment. diff --git a/news/2 Fixes/17244.md b/news/2 Fixes/17244.md deleted file mode 100644 index bbdacb744060..000000000000 --- a/news/2 Fixes/17244.md +++ /dev/null @@ -1 +0,0 @@ -Do path comparisons appropriately in the new discovery component. diff --git a/news/2 Fixes/17280.md b/news/2 Fixes/17280.md deleted file mode 100644 index 96c7ff86b6d6..000000000000 --- a/news/2 Fixes/17280.md +++ /dev/null @@ -1 +0,0 @@ -Fix for unable to import when running unittest. diff --git a/news/2 Fixes/17281.md b/news/2 Fixes/17281.md deleted file mode 100644 index 7c8d48329d0b..000000000000 --- a/news/2 Fixes/17281.md +++ /dev/null @@ -1 +0,0 @@ -Fix for multiple folders in `pytest` args. diff --git a/news/2 Fixes/17282.md b/news/2 Fixes/17282.md deleted file mode 100644 index 444bdaa0e892..000000000000 --- a/news/2 Fixes/17282.md +++ /dev/null @@ -1 +0,0 @@ -Fix issue with incomplete `unittest` runs. diff --git a/news/2 Fixes/17285.md b/news/2 Fixes/17285.md deleted file mode 100644 index bf62892a08e8..000000000000 --- a/news/2 Fixes/17285.md +++ /dev/null @@ -1 +0,0 @@ -Improve detecting lines when using testing wrappers. diff --git a/news/2 Fixes/17303.md b/news/2 Fixes/17303.md deleted file mode 100644 index b995c190008f..000000000000 --- a/news/2 Fixes/17303.md +++ /dev/null @@ -1 +0,0 @@ -Ensure we trigger discovery for the first time as part of extension activation. diff --git a/news/2 Fixes/17309.md b/news/2 Fixes/17309.md deleted file mode 100644 index 96607b7d223b..000000000000 --- a/news/2 Fixes/17309.md +++ /dev/null @@ -1 +0,0 @@ -Missing location info for `async def` functions. diff --git a/news/2 Fixes/17325.md b/news/2 Fixes/17325.md deleted file mode 100644 index 0029466dcf3f..000000000000 --- a/news/2 Fixes/17325.md +++ /dev/null @@ -1 +0,0 @@ -For CI ensure `tensorboard` is installed in python 3 environments only. diff --git a/package-lock.json b/package-lock.json index c5e0e8255717..e800411122e9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "python", - "version": "2021.9.0", + "version": "2021.9.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index ffd472d71975..ff5a79883fdd 100644 --- a/package.json +++ b/package.json @@ -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": "2021.9.0", + "version": "2021.9.1", "featureFlags": { "usingNewInterpreterStorage": true }, From 57eaac1914bfc7087faea74b7e919633cfc1a7e0 Mon Sep 17 00:00:00 2001 From: Kartik Raj Date: Wed, 8 Sep 2021 21:51:33 -0700 Subject: [PATCH 10/23] Correctly indicate when a refresh has finished (#17336) --- CHANGELOG.md | 2 ++ .../composite/envsCollectionService.ts | 23 +++++++++++-------- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e0aefec4c836..db28eb6c081a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,8 @@ ([#17285](https://github.com/Microsoft/vscode-python/issues/17285)) 1. Ensure we trigger discovery for the first time as part of extension activation. ([#17303](https://github.com/Microsoft/vscode-python/issues/17303)) +1. Correctly indicate when interpreter refresh has finished. + ([#17335](https://github.com/Microsoft/vscode-python/issues/17335)) 1. Missing location info for `async def` functions. ([#17309](https://github.com/Microsoft/vscode-python/issues/17309)) 1. For CI ensure `tensorboard` is installed in python 3 environments only. diff --git a/src/client/pythonEnvironments/base/locators/composite/envsCollectionService.ts b/src/client/pythonEnvironments/base/locators/composite/envsCollectionService.ts index 61eb61a451d1..1e6c73411e7c 100644 --- a/src/client/pythonEnvironments/base/locators/composite/envsCollectionService.ts +++ b/src/client/pythonEnvironments/base/locators/composite/envsCollectionService.ts @@ -84,20 +84,25 @@ export class EnvsCollectionService extends PythonEnvsWatcher { - this.refreshPromises.delete(query); - sendTelemetryEvent(EventName.PYTHON_INTERPRETER_DISCOVERY, stopWatch.elapsedTime, { - interpreters: this.cache.getAllEnvs().length, - }); - }); + const deferred = createDeferred(); + // Ensure we set this before we trigger the promise to correctly indicate when a refresh has started. + this.refreshPromises.set(query, deferred.promise); + const promise = this.addEnvsToCacheFromIterator(iterator); + return promise + .then(async () => { + deferred.resolve(); + this.refreshPromises.delete(query); + sendTelemetryEvent(EventName.PYTHON_INTERPRETER_DISCOVERY, stopWatch.elapsedTime, { + interpreters: this.cache.getAllEnvs().length, + }); + }) + .catch((ex) => deferred.reject(ex)); } private async addEnvsToCacheFromIterator(iterator: IPythonEnvsIterator) { const seen: PythonEnvInfo[] = []; const state = { - done: true, + done: false, pending: 0, }; const updatesDone = createDeferred(); From ebdea0de2450464cddbaf9d6f547da49a940899b Mon Sep 17 00:00:00 2001 From: Karthik Nadig Date: Thu, 9 Sep 2021 10:22:50 -0700 Subject: [PATCH 11/23] Cherry pick fixes from main (#17348) * Fix for filenames starting with py. (#17275) * Fix for filenames starting with py. * Add news item. * Update change logs for cherry pick --- CHANGELOG.md | 2 ++ src/client/testing/testController/common/resultsHelper.ts | 2 +- .../testing/testController/common/testItemUtilities.ts | 5 ++++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index db28eb6c081a..ddca481e8d29 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,8 @@ ([#17309](https://github.com/Microsoft/vscode-python/issues/17309)) 1. For CI ensure `tensorboard` is installed in python 3 environments only. ([#17325](https://github.com/Microsoft/vscode-python/issues/17325)) +1. Fix for test result not found for files starting with py. + ([#17270](https://github.com/Microsoft/vscode-python/issues/17270)) ### Thanks diff --git a/src/client/testing/testController/common/resultsHelper.ts b/src/client/testing/testController/common/resultsHelper.ts index 0b35d7411c1d..7eaceeb398d0 100644 --- a/src/client/testing/testController/common/resultsHelper.ts +++ b/src/client/testing/testController/common/resultsHelper.ts @@ -97,7 +97,7 @@ export async function updateResultFromJunitXml( } const result = junitSuite.testcase.find((t) => { - const idResult = getRunIdFromRawData(`${t.$.classname}.${t.$.name}`); + const idResult = getRunIdFromRawData(`${t.$.classname}::${t.$.name}`); const idNode = rawTestCaseNode.runId; return idResult === idNode || idNode.endsWith(idResult); }); diff --git a/src/client/testing/testController/common/testItemUtilities.ts b/src/client/testing/testController/common/testItemUtilities.ts index b20b8da4fac4..17bd171bbc50 100644 --- a/src/client/testing/testController/common/testItemUtilities.ts +++ b/src/client/testing/testController/common/testItemUtilities.ts @@ -88,9 +88,12 @@ function getRangeFromRawSource(raw: { source: string }): Range | undefined { } export function getRunIdFromRawData(id: string): string { + // TODO: This is a temporary solution to normalize test ids. + // The current method is error prone and easy to break. When we + // re-write the test adapters we should make sure we consider this. // This is the id that will be used to compare with the results. const runId = id - .replace(/\.py/g, '') + .replace(/\.py[^\w\-]/g, '') // we want to get rid of the `.py` in file names .replace(/[\\\:\/]/g, '.') .replace(/\:\:/g, '.') .replace(/\.\./g, '.'); From 4a2c7d8b6ee7b27058c5e80d1273a00b22b1b626 Mon Sep 17 00:00:00 2001 From: Karthik Nadig Date: Thu, 9 Sep 2021 11:40:09 -0700 Subject: [PATCH 12/23] Update run failed tests icon (#17271) (#17349) Co-authored-by: Luciana Abud <45497113+luabud@users.noreply.github.com> --- package.json | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/package.json b/package.json index ff5a79883fdd..cffccd206418 100644 --- a/package.json +++ b/package.json @@ -426,10 +426,7 @@ { "category": "Test", "command": "testing.reRunFailTests", - "icon": { - "dark": "resources/dark/run-failed-tests.svg", - "light": "resources/light/run-failed-tests.svg" - }, + "icon": "$(run-errors)", "title": "%python.command.testing.rerunFailedTests.title%" }, { From c37dc545daa84f5880a62092f5ebc0d46bd49b40 Mon Sep 17 00:00:00 2001 From: Karthik Nadig Date: Thu, 9 Sep 2021 13:49:02 -0700 Subject: [PATCH 13/23] Cherry pick debug caching fix to release (#17355) * Fix for cached debug configuration (#17354) * Update change log for cherry pick --- CHANGELOG.md | 6 ++++-- .../debugConfigurationService.ts | 21 ++++++++++--------- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ddca481e8d29..3867fcdbfada 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,12 +4,16 @@ ### Fixes +1. Fix for debug configuration used when no launch.json exists is still used after launch.json is created. + ([#17353](https://github.com/Microsoft/vscode-python/issues/17353)) 1. Ensure default python executable to use is 'python' instead of ''. ([#17089](https://github.com/Microsoft/vscode-python/issues/17089)) 1. Ensure workspace interpreters are discovered and watched when in `pythonDiscoveryModuleWithoutWatcher` experiment. ([#17144](https://github.com/Microsoft/vscode-python/issues/17144)) 1. Do path comparisons appropriately in the new discovery component. ([#17244](https://github.com/Microsoft/vscode-python/issues/17244)) +1. Fix for test result not found for files starting with py. + ([#17270](https://github.com/Microsoft/vscode-python/issues/17270)) 1. Fix for unable to import when running unittest. ([#17280](https://github.com/Microsoft/vscode-python/issues/17280)) 1. Fix for multiple folders in `pytest` args. @@ -26,8 +30,6 @@ ([#17309](https://github.com/Microsoft/vscode-python/issues/17309)) 1. For CI ensure `tensorboard` is installed in python 3 environments only. ([#17325](https://github.com/Microsoft/vscode-python/issues/17325)) -1. Fix for test result not found for files starting with py. - ([#17270](https://github.com/Microsoft/vscode-python/issues/17270)) ### Thanks diff --git a/src/client/debugger/extension/configuration/debugConfigurationService.ts b/src/client/debugger/extension/configuration/debugConfigurationService.ts index 11f1b6416891..56fe0746e887 100644 --- a/src/client/debugger/extension/configuration/debugConfigurationService.ts +++ b/src/client/debugger/extension/configuration/debugConfigurationService.ts @@ -80,18 +80,19 @@ export class PythonDebugConfigurationService implements IDebugConfigurationServi // editor context where it was triggered. throw Error('This configuration can only be used as defined by `purpose`.'); } else { - if ((await this.experiments.inExperiment(CacheDebugConfig.experiment)) && this.cacheDebugConfig) { - debugConfiguration = cloneDeep(this.cacheDebugConfig); - } if (Object.keys(debugConfiguration).length === 0) { - const configs = await this.provideDebugConfigurations(folder, token); - if (configs === undefined) { - return; - } - if (Array.isArray(configs) && configs.length === 1) { - debugConfiguration = configs[0]; + if ((await this.experiments.inExperiment(CacheDebugConfig.experiment)) && this.cacheDebugConfig) { + debugConfiguration = cloneDeep(this.cacheDebugConfig); + } else { + const configs = await this.provideDebugConfigurations(folder, token); + if (configs === undefined) { + return; + } + if (Array.isArray(configs) && configs.length === 1) { + debugConfiguration = configs[0]; + } + this.cacheDebugConfig = cloneDeep(debugConfiguration); } - this.cacheDebugConfig = cloneDeep(debugConfiguration); } return this.launchResolver.resolveDebugConfiguration( folder, From e16cb1e8c38a23b0260403fe7b859b8da5907ce9 Mon Sep 17 00:00:00 2001 From: Kartik Raj Date: Fri, 10 Sep 2021 12:12:37 -0700 Subject: [PATCH 14/23] Ensure we block getting active interpreter on auto-selection (#17370) (#17372) * Ensure we block getting active interpreter on autoselection * News entry * Fix single workspace tests * Fix lint --- news/2 Fixes/17370.md | 1 + .../common/process/pythonExecutionFactory.ts | 9 ++++- src/client/interpreter/display/index.ts | 19 +--------- src/test/common/installer.test.ts | 6 +++ src/test/common/moduleInstaller.test.ts | 6 +++ .../pythonExecutionFactory.unit.test.ts | 37 +++++++++++++++++-- src/test/interpreters/display.unit.test.ts | 26 +------------ src/test/linters/lint.functional.test.ts | 16 +++++++- src/test/refactor/rename.test.ts | 16 +++++++- 9 files changed, 85 insertions(+), 51 deletions(-) create mode 100644 news/2 Fixes/17370.md diff --git a/news/2 Fixes/17370.md b/news/2 Fixes/17370.md new file mode 100644 index 000000000000..e3e57aba0c01 --- /dev/null +++ b/news/2 Fixes/17370.md @@ -0,0 +1 @@ +Ensure we block getting active interpreter on auto-selection. diff --git a/src/client/common/process/pythonExecutionFactory.ts b/src/client/common/process/pythonExecutionFactory.ts index a3c74891ef59..fb66ef4f7d09 100644 --- a/src/client/common/process/pythonExecutionFactory.ts +++ b/src/client/common/process/pythonExecutionFactory.ts @@ -12,7 +12,7 @@ import { inDiscoveryExperiment } from '../experiments/helpers'; import { sendTelemetryEvent } from '../../telemetry'; import { EventName } from '../../telemetry/constants'; import { IFileSystem } from '../platform/types'; -import { IConfigurationService, IDisposableRegistry, IExperimentService } from '../types'; +import { IConfigurationService, IDisposableRegistry, IExperimentService, IInterpreterPathProxyService } from '../types'; import { ProcessService } from './proc'; import { createCondaEnv, createPythonEnv, createWindowsStoreEnv } from './pythonEnvironment'; import { createPythonProcessService } from './pythonProcess'; @@ -27,6 +27,7 @@ import { IPythonExecutionService, } from './types'; import { isWindowsStoreInterpreter } from '../../pythonEnvironments/discovery/locators/services/windowsStoreInterpreter'; +import { IInterpreterAutoSelectionService } from '../../interpreter/autoSelection/types'; // Minimum version number of conda required to be able to use 'conda run' export const CONDA_RUN_VERSION = '4.6.0'; @@ -48,6 +49,8 @@ export class PythonExecutionFactory implements IPythonExecutionFactory { @inject(IBufferDecoder) private readonly decoder: IBufferDecoder, @inject(IComponentAdapter) private readonly pyenvs: IComponentAdapter, @inject(IExperimentService) private readonly experimentService: IExperimentService, + @inject(IInterpreterAutoSelectionService) private readonly autoSelection: IInterpreterAutoSelectionService, + @inject(IInterpreterPathProxyService) private readonly interpreterPathExpHelper: IInterpreterPathProxyService, ) { // Acquire other objects here so that if we are called during dispose they are available. this.disposables = this.serviceContainer.get(IDisposableRegistry); @@ -56,6 +59,10 @@ export class PythonExecutionFactory implements IPythonExecutionFactory { } public async create(options: ExecutionFactoryCreationOptions): Promise { + const interpreterPath = this.interpreterPathExpHelper.get(options.resource); + if (!interpreterPath || interpreterPath === 'python') { + await this.autoSelection.autoSelectInterpreter(options.resource); // Block on this only if no interpreter selected. + } const pythonPath = options.pythonPath ? options.pythonPath : this.configService.getSettings(options.resource).pythonPath; diff --git a/src/client/interpreter/display/index.ts b/src/client/interpreter/display/index.ts index 21aa292ffbf0..c7a725887684 100644 --- a/src/client/interpreter/display/index.ts +++ b/src/client/interpreter/display/index.ts @@ -3,17 +3,10 @@ import { Disposable, OutputChannel, StatusBarAlignment, StatusBarItem, Uri } fro import { IApplicationShell, IWorkspaceService } from '../../common/application/types'; import { STANDARD_OUTPUT_CHANNEL } from '../../common/constants'; import '../../common/extensions'; -import { - IDisposableRegistry, - IInterpreterPathProxyService, - IOutputChannel, - IPathUtils, - Resource, -} from '../../common/types'; +import { IDisposableRegistry, IOutputChannel, IPathUtils, Resource } from '../../common/types'; import { Interpreters } from '../../common/utils/localize'; import { IServiceContainer } from '../../ioc/types'; import { PythonEnvironment } from '../../pythonEnvironments/info'; -import { IInterpreterAutoSelectionService } from '../autoSelection/types'; import { IInterpreterDisplay, IInterpreterHelper, @@ -29,10 +22,8 @@ export class InterpreterDisplay implements IInterpreterDisplay { private readonly workspaceService: IWorkspaceService; private readonly pathUtils: IPathUtils; private readonly interpreterService: IInterpreterService; - private readonly interpreterPathExpHelper: IInterpreterPathProxyService; private currentlySelectedInterpreterPath?: string; private currentlySelectedWorkspaceFolder: Resource; - private readonly autoSelection: IInterpreterAutoSelectionService; private interpreterPath: string | undefined; private statusBarCanBeDisplayed?: boolean; private visibilityFilters: IInterpreterStatusbarVisibilityFilter[] = []; @@ -43,14 +34,10 @@ export class InterpreterDisplay implements IInterpreterDisplay { this.workspaceService = serviceContainer.get(IWorkspaceService); this.pathUtils = serviceContainer.get(IPathUtils); this.interpreterService = serviceContainer.get(IInterpreterService); - this.autoSelection = serviceContainer.get(IInterpreterAutoSelectionService); this.python27SupportPrompt = serviceContainer.get(IPython27SupportPrompt); const application = serviceContainer.get(IApplicationShell); const disposableRegistry = serviceContainer.get(IDisposableRegistry); - this.interpreterPathExpHelper = serviceContainer.get( - IInterpreterPathProxyService, - ); this.statusBar = application.createStatusBarItem(StatusBarAlignment.Left, 100); this.statusBar.command = 'python.setInterpreter'; @@ -86,10 +73,6 @@ export class InterpreterDisplay implements IInterpreterDisplay { } } private async updateDisplay(workspaceFolder?: Uri) { - const interpreterPath = this.interpreterPathExpHelper.get(workspaceFolder); - if (!interpreterPath || interpreterPath === 'python') { - await this.autoSelection.autoSelectInterpreter(workspaceFolder); // Block on this only if no interpreter selected. - } const interpreter = await this.interpreterService.getActiveInterpreter(workspaceFolder); this.currentlySelectedWorkspaceFolder = workspaceFolder; if (interpreter) { diff --git a/src/test/common/installer.test.ts b/src/test/common/installer.test.ts index c8f46a1aca4c..93d498fbc594 100644 --- a/src/test/common/installer.test.ts +++ b/src/test/common/installer.test.ts @@ -103,6 +103,7 @@ import { IFileDownloader, IHttpClient, IInstaller, + IInterpreterPathProxyService, IInterpreterPathService, IPathUtils, IPersistentStateFactory, @@ -122,6 +123,7 @@ import { MockModuleInstaller } from '../mocks/moduleInstaller'; import { MockProcessService } from '../mocks/proc'; import { UnitTestIocContainer } from '../testing/serviceRegistry'; import { closeActiveWindows, initializeTest, IS_MULTI_ROOT_TEST } from '../initialize'; +import { InterpreterPathProxyService } from '../../client/common/interpreterPathProxyService'; suite('Installer', () => { let ioc: UnitTestIocContainer; @@ -203,6 +205,10 @@ suite('Installer', () => { ); ioc.serviceManager.addSingleton(IActiveResourceService, ActiveResourceService); ioc.serviceManager.addSingleton(IInterpreterPathService, InterpreterPathService); + ioc.serviceManager.addSingleton( + IInterpreterPathProxyService, + InterpreterPathProxyService, + ); ioc.serviceManager.addSingleton(IExtensions, Extensions); ioc.serviceManager.addSingleton(IRandom, Random); ioc.serviceManager.addSingleton(ITerminalServiceFactory, TerminalServiceFactory); diff --git a/src/test/common/moduleInstaller.test.ts b/src/test/common/moduleInstaller.test.ts index 832003031c8c..91c0afd32997 100644 --- a/src/test/common/moduleInstaller.test.ts +++ b/src/test/common/moduleInstaller.test.ts @@ -102,6 +102,7 @@ import { IFileDownloader, IHttpClient, IInstaller, + IInterpreterPathProxyService, IInterpreterPathService, IPathUtils, IPersistentStateFactory, @@ -131,6 +132,7 @@ import { MockModuleInstaller } from '../mocks/moduleInstaller'; import { MockProcessService } from '../mocks/proc'; import { UnitTestIocContainer } from '../testing/serviceRegistry'; import { closeActiveWindows, initializeTest } from '../initialize'; +import { InterpreterPathProxyService } from '../../client/common/interpreterPathProxyService'; chaiUse(chaiAsPromised); @@ -228,6 +230,10 @@ suite('Module Installer', () => { ioc.serviceManager.addSingleton(IActiveResourceService, ActiveResourceService); ioc.serviceManager.addSingleton(IInterpreterPathService, InterpreterPathService); + ioc.serviceManager.addSingleton( + IInterpreterPathProxyService, + InterpreterPathProxyService, + ); ioc.serviceManager.addSingleton(IExtensions, Extensions); ioc.serviceManager.addSingleton(IRandom, Random); ioc.serviceManager.addSingleton(IApplicationShell, ApplicationShell); diff --git a/src/test/common/process/pythonExecutionFactory.unit.test.ts b/src/test/common/process/pythonExecutionFactory.unit.test.ts index cbf2a0dddbb2..bccda1f8c724 100644 --- a/src/test/common/process/pythonExecutionFactory.unit.test.ts +++ b/src/test/common/process/pythonExecutionFactory.unit.test.ts @@ -7,7 +7,7 @@ import * as assert from 'assert'; import { expect } from 'chai'; import { SemVer } from 'semver'; import * as sinon from 'sinon'; -import { anyString, anything, instance, mock, verify, when } from 'ts-mockito'; +import { anyString, anything, instance, mock, reset, verify, when } from 'ts-mockito'; import * as typemoq from 'typemoq'; import { Uri } from 'vscode'; @@ -24,7 +24,12 @@ import { IProcessServiceFactory, IPythonExecutionService, } from '../../../client/common/process/types'; -import { IConfigurationService, IDisposableRegistry, IExperimentService } from '../../../client/common/types'; +import { + IConfigurationService, + IDisposableRegistry, + IExperimentService, + IInterpreterPathProxyService, +} from '../../../client/common/types'; import { Architecture } from '../../../client/common/utils/platform'; import { EnvironmentActivationService } from '../../../client/interpreter/activation/service'; import { IEnvironmentActivationService } from '../../../client/interpreter/activation/types'; @@ -42,6 +47,7 @@ import * as ExperimentHelpers from '../../../client/common/experiments/helpers'; import * as WindowsStoreInterpreter from '../../../client/pythonEnvironments/discovery/locators/services/windowsStoreInterpreter'; import { ExperimentService } from '../../../client/common/experiments/service'; import { DiscoveryVariants } from '../../../client/common/experiments/groups'; +import { IInterpreterAutoSelectionService } from '../../../client/interpreter/autoSelection/types'; const pythonInterpreter: PythonEnvironment = { path: '/foo/bar/python.exe', @@ -96,7 +102,8 @@ suite('Process - PythonExecutionFactory', () => { let executionService: typemoq.IMock; let isWindowsStoreInterpreterStub: sinon.SinonStub; let inDiscoveryExperimentStub: sinon.SinonStub; - + let autoSelection: IInterpreterAutoSelectionService; + let interpreterPathExpHelper: IInterpreterPathProxyService; setup(() => { bufferDecoder = mock(BufferDecoder); activationHelper = mock(EnvironmentActivationService); @@ -105,6 +112,9 @@ suite('Process - PythonExecutionFactory', () => { condaService = mock(CondaService); condaLocatorService = mock(); processLogger = mock(ProcessLogger); + autoSelection = mock(); + interpreterPathExpHelper = mock(); + when(interpreterPathExpHelper.get(anything())).thenReturn('selected interpreter path'); experimentService = mock(ExperimentService); when(experimentService.inExperiment(DiscoveryVariants.discoverWithFileWatching)).thenResolve(false); when(experimentService.inExperiment(DiscoveryVariants.discoveryWithoutFileWatching)).thenResolve(false); @@ -152,6 +162,8 @@ suite('Process - PythonExecutionFactory', () => { instance(bufferDecoder), instance(pyenvs), instance(experimentService), + instance(autoSelection), + instance(interpreterPathExpHelper), ); isWindowsStoreInterpreterStub = sinon.stub(WindowsStoreInterpreter, 'isWindowsStoreInterpreter'); @@ -175,6 +187,25 @@ suite('Process - PythonExecutionFactory', () => { verify(processFactory.create(resource)).once(); verify(pythonSettings.pythonPath).once(); }); + + test('If no interpreter is explicitly set, ensure we autoselect before PythonExecutionService is created', async () => { + const pythonSettings = mock(PythonSettings); + when(processFactory.create(resource)).thenResolve(processService.object); + when(activationHelper.getActivatedEnvironmentVariables(resource)).thenResolve({ x: '1' }); + when(pythonSettings.pythonPath).thenReturn('HELLO'); + reset(interpreterPathExpHelper); + when(interpreterPathExpHelper.get(anything())).thenReturn('python'); + when(autoSelection.autoSelectInterpreter(anything())).thenResolve(); + when(configService.getSettings(resource)).thenReturn(instance(pythonSettings)); + + const service = await factory.create({ resource }); + + expect(service).to.not.equal(undefined); + verify(autoSelection.autoSelectInterpreter(anything())).once(); + verify(processFactory.create(resource)).once(); + verify(pythonSettings.pythonPath).once(); + }); + test('Ensure we use an existing `create` method if there are no environment variables for the activated env', async () => { const pythonPath = 'path/to/python'; const pythonSettings = mock(PythonSettings); diff --git a/src/test/interpreters/display.unit.test.ts b/src/test/interpreters/display.unit.test.ts index c13f49eff3f3..3aeeb000d11c 100644 --- a/src/test/interpreters/display.unit.test.ts +++ b/src/test/interpreters/display.unit.test.ts @@ -1,7 +1,6 @@ import { expect } from 'chai'; import * as path from 'path'; import { SemVer } from 'semver'; -import { anything, instance, mock, verify, when } from 'ts-mockito'; import * as TypeMoq from 'typemoq'; import { ConfigurationTarget, @@ -15,17 +14,9 @@ import { import { IApplicationShell, IWorkspaceService } from '../../client/common/application/types'; import { STANDARD_OUTPUT_CHANNEL } from '../../client/common/constants'; import { IFileSystem } from '../../client/common/platform/types'; -import { - IInterpreterPathProxyService, - IDisposableRegistry, - IOutputChannel, - IPathUtils, - ReadWrite, -} from '../../client/common/types'; +import { IDisposableRegistry, IOutputChannel, IPathUtils, ReadWrite } from '../../client/common/types'; import { Interpreters } from '../../client/common/utils/localize'; import { Architecture } from '../../client/common/utils/platform'; -import { InterpreterAutoSelectionService } from '../../client/interpreter/autoSelection'; -import { IInterpreterAutoSelectionService } from '../../client/interpreter/autoSelection/types'; import { IInterpreterDisplay, IInterpreterHelper, @@ -57,12 +48,10 @@ suite('Interpreters Display', () => { let fileSystem: TypeMoq.IMock; let disposableRegistry: Disposable[]; let statusBar: TypeMoq.IMock; - let interpreterPathProxyService: TypeMoq.IMock; let interpreterDisplay: IInterpreterDisplay; let interpreterHelper: TypeMoq.IMock; let pathUtils: TypeMoq.IMock; let output: TypeMoq.IMock; - let autoSelection: IInterpreterAutoSelectionService; let python27SupportPrompt: TypeMoq.IMock; setup(() => { @@ -74,11 +63,9 @@ suite('Interpreters Display', () => { interpreterHelper = TypeMoq.Mock.ofType(); disposableRegistry = []; statusBar = TypeMoq.Mock.ofType(); - interpreterPathProxyService = TypeMoq.Mock.ofType(); pathUtils = TypeMoq.Mock.ofType(); output = TypeMoq.Mock.ofType(); python27SupportPrompt = TypeMoq.Mock.ofType(); - autoSelection = mock(InterpreterAutoSelectionService); serviceContainer .setup((c) => c.get(TypeMoq.It.isValue(IOutputChannel), STANDARD_OUTPUT_CHANNEL)) @@ -94,16 +81,10 @@ suite('Interpreters Display', () => { .returns(() => interpreterService.object); serviceContainer.setup((c) => c.get(TypeMoq.It.isValue(IFileSystem))).returns(() => fileSystem.object); serviceContainer.setup((c) => c.get(TypeMoq.It.isValue(IDisposableRegistry))).returns(() => disposableRegistry); - serviceContainer - .setup((c) => c.get(TypeMoq.It.isValue(IInterpreterPathProxyService))) - .returns(() => interpreterPathProxyService.object); serviceContainer .setup((c) => c.get(TypeMoq.It.isValue(IInterpreterHelper))) .returns(() => interpreterHelper.object); serviceContainer.setup((c) => c.get(TypeMoq.It.isValue(IPathUtils))).returns(() => pathUtils.object); - serviceContainer - .setup((c) => c.get(TypeMoq.It.isValue(IInterpreterAutoSelectionService))) - .returns(() => instance(autoSelection)); serviceContainer .setup((c) => c.get(TypeMoq.It.isValue(IPython27SupportPrompt))) .returns(() => python27SupportPrompt.object); @@ -148,7 +129,6 @@ suite('Interpreters Display', () => { path: path.join('user', 'development', 'env', 'bin', 'python'), }; setupWorkspaceFolder(resource, workspaceFolder); - when(autoSelection.autoSelectInterpreter(anything())).thenResolve(); interpreterService .setup((i) => i.getInterpreters(TypeMoq.It.isValue(workspaceFolder))) .returns(() => Promise.resolve([])); @@ -158,7 +138,6 @@ suite('Interpreters Display', () => { await interpreterDisplay.refresh(resource); - verify(autoSelection.autoSelectInterpreter(anything())).once(); statusBar.verify((s) => (s.text = TypeMoq.It.isValue(activeInterpreter.displayName)!), TypeMoq.Times.once()); statusBar.verify((s) => (s.tooltip = TypeMoq.It.isValue(activeInterpreter.path)!), TypeMoq.Times.atLeastOnce()); }); @@ -175,7 +154,6 @@ suite('Interpreters Display', () => { .setup((p) => p.getDisplayName(TypeMoq.It.isAny(), TypeMoq.It.isAny())) .returns(() => activeInterpreter.path); setupWorkspaceFolder(resource, workspaceFolder); - when(autoSelection.autoSelectInterpreter(anything())).thenResolve(); interpreterService .setup((i) => i.getInterpreters(TypeMoq.It.isValue(workspaceFolder))) .returns(() => Promise.resolve([])); @@ -223,7 +201,6 @@ suite('Interpreters Display', () => { interpreterService .setup((i) => i.getActiveInterpreter(TypeMoq.It.isValue(workspaceFolder))) .returns(() => Promise.resolve(undefined)); - interpreterPathProxyService.setup((c) => c.get(TypeMoq.It.isAny())).returns(() => pythonPath); fileSystem.setup((f) => f.fileExists(TypeMoq.It.isValue(pythonPath))).returns(() => Promise.resolve(false)); interpreterHelper .setup((v) => v.getInterpreterInformation(TypeMoq.It.isValue(pythonPath))) @@ -278,7 +255,6 @@ suite('Interpreters Display', () => { path: path.join('user', 'development', 'env', 'bin', 'python'), }; setupWorkspaceFolder(resource, workspaceFolder); - when(autoSelection.autoSelectInterpreter(anything())).thenResolve(); interpreterService .setup((i) => i.getInterpreters(TypeMoq.It.isValue(workspaceFolder))) .returns(() => Promise.resolve([])); diff --git a/src/test/linters/lint.functional.test.ts b/src/test/linters/lint.functional.test.ts index 659a723d8662..0bd5e9ba1a50 100644 --- a/src/test/linters/lint.functional.test.ts +++ b/src/test/linters/lint.functional.test.ts @@ -9,7 +9,7 @@ import * as fs from 'fs-extra'; import * as os from 'os'; import * as path from 'path'; import * as sinon from 'sinon'; -import { instance, mock } from 'ts-mockito'; +import { anything, instance, mock, when } from 'ts-mockito'; import * as TypeMoq from 'typemoq'; import { CancellationTokenSource, TextDocument, TextLine, Uri } from 'vscode'; import { Product } from '../../client/common/installer/productInstaller'; @@ -26,7 +26,12 @@ import { IPythonExecutionFactory, IPythonToolExecutionService, } from '../../client/common/process/types'; -import { IConfigurationService, IDisposableRegistry, IExperimentService } from '../../client/common/types'; +import { + IConfigurationService, + IDisposableRegistry, + IExperimentService, + IInterpreterPathProxyService, +} from '../../client/common/types'; import { IEnvironmentVariablesProvider } from '../../client/common/variables/types'; import { IEnvironmentActivationService } from '../../client/interpreter/activation/types'; import { @@ -42,6 +47,7 @@ import { deleteFile, PYTHON_PATH } from '../common'; import { BaseTestFixture, getLinterID, getProductName, newMockDocument, throwUnknownProduct } from './common'; import * as ExperimentHelpers from '../../client/common/experiments/helpers'; import { DiscoveryVariants } from '../../client/common/experiments/groups'; +import { IInterpreterAutoSelectionService } from '../../client/interpreter/autoSelection/types'; const workspaceDir = path.join(__dirname, '..', '..', '..', 'src', 'test'); const workspaceUri = Uri.file(workspaceDir); @@ -735,6 +741,10 @@ class TestFixture extends BaseTestFixture { const inDiscoveryExperimentStub = sinon.stub(ExperimentHelpers, 'inDiscoveryExperiment'); inDiscoveryExperimentStub.resolves(false); + const autoSelection = mock(); + const interpreterPathExpHelper = mock(); + when(interpreterPathExpHelper.get(anything())).thenReturn('selected interpreter path'); + return new PythonExecutionFactory( serviceContainer.object, envActivationService.object, @@ -744,6 +754,8 @@ class TestFixture extends BaseTestFixture { decoder, instance(pyenvs), experimentService.object, + instance(autoSelection), + instance(interpreterPathExpHelper), ); } diff --git a/src/test/refactor/rename.test.ts b/src/test/refactor/rename.test.ts index 6599e0e36de9..fd91b6e4dea8 100644 --- a/src/test/refactor/rename.test.ts +++ b/src/test/refactor/rename.test.ts @@ -6,7 +6,7 @@ import { expect } from 'chai'; import { EOL } from 'os'; import * as path from 'path'; -import { instance, mock } from 'ts-mockito'; +import { anything, instance, mock, when } from 'ts-mockito'; import * as typeMoq from 'typemoq'; import { Range, @@ -29,8 +29,14 @@ import { IPythonExecutionFactory, IPythonExecutionService, } from '../../client/common/process/types'; -import { IConfigurationService, IExperimentService, IPythonSettings } from '../../client/common/types'; +import { + IConfigurationService, + IExperimentService, + IInterpreterPathProxyService, + IPythonSettings, +} from '../../client/common/types'; import { IEnvironmentActivationService } from '../../client/interpreter/activation/types'; +import { IInterpreterAutoSelectionService } from '../../client/interpreter/autoSelection/types'; import { IComponentAdapter, ICondaService, IInterpreterService } from '../../client/interpreter/contracts'; import { IServiceContainer } from '../../client/ioc/types'; import { RefactorProxy } from '../../client/refactor/proxy'; @@ -96,6 +102,10 @@ suite('Refactor Rename', () => { .setup((e) => e.inExperiment(DiscoveryVariants.discoverWithFileWatching)) .returns(() => Promise.resolve(false)); + const autoSelection = mock(); + const interpreterPathExpHelper = mock(); + when(interpreterPathExpHelper.get(anything())).thenReturn('selected interpreter path'); + serviceContainer .setup((s) => s.get(typeMoq.It.isValue(IPythonExecutionFactory), typeMoq.It.isAny())) .returns( @@ -111,6 +121,8 @@ suite('Refactor Rename', () => { undefined as any, instance(pyenvs), experimentService.object, + instance(autoSelection), + instance(interpreterPathExpHelper), ), ); const processLogger = typeMoq.Mock.ofType(); From 7c51c8c2b4073f14c6ffe2fd818a9123f50c6f2b Mon Sep 17 00:00:00 2001 From: Karthik Nadig Date: Fri, 10 Sep 2021 12:41:52 -0700 Subject: [PATCH 15/23] Fix for `unittest` ModuleNotFoundError when discovering tests (#17369) * Fix for ModuleNotFoundError * Add news * Ensure we use cwd * linting --- news/2 Fixes/17363.md | 1 + pythonFiles/testing_tools/unittest_discovery.py | 2 ++ 2 files changed, 3 insertions(+) create mode 100644 news/2 Fixes/17363.md diff --git a/news/2 Fixes/17363.md b/news/2 Fixes/17363.md new file mode 100644 index 000000000000..9392ef1387b4 --- /dev/null +++ b/news/2 Fixes/17363.md @@ -0,0 +1 @@ +Fix for `unittest` ModuleNotFoundError when discovering tests. diff --git a/pythonFiles/testing_tools/unittest_discovery.py b/pythonFiles/testing_tools/unittest_discovery.py index 6e02f53d240a..d13ea1c10dd9 100644 --- a/pythonFiles/testing_tools/unittest_discovery.py +++ b/pythonFiles/testing_tools/unittest_discovery.py @@ -1,10 +1,12 @@ import unittest import inspect +import os import sys import traceback start_dir = sys.argv[1] pattern = sys.argv[2] +sys.path.insert(0, os.getcwd()) def get_sourceline(obj): From ca3bcc112c75f810655b71a877632d83fd331a3d Mon Sep 17 00:00:00 2001 From: Karthik Nadig Date: Fri, 10 Sep 2021 13:07:38 -0700 Subject: [PATCH 16/23] Improve display of lines in test output. (#17373) * Improve display of lines in test output. * Add news item --- news/2 Fixes/17111.md | 1 + .../testing/testController/common/resultsHelper.ts | 11 ++++++----- src/client/testing/testController/common/utils.ts | 7 +++++++ src/client/testing/testController/unittest/runner.ts | 11 ++++++----- 4 files changed, 20 insertions(+), 10 deletions(-) create mode 100644 news/2 Fixes/17111.md create mode 100644 src/client/testing/testController/common/utils.ts diff --git a/news/2 Fixes/17111.md b/news/2 Fixes/17111.md new file mode 100644 index 000000000000..2e735435b2dc --- /dev/null +++ b/news/2 Fixes/17111.md @@ -0,0 +1 @@ +Ensure line feeds are changed to CRLF in test messages. diff --git a/src/client/testing/testController/common/resultsHelper.ts b/src/client/testing/testController/common/resultsHelper.ts index 7eaceeb398d0..823a87c79df2 100644 --- a/src/client/testing/testController/common/resultsHelper.ts +++ b/src/client/testing/testController/common/resultsHelper.ts @@ -5,6 +5,7 @@ import * as fsapi from 'fs-extra'; import { Location, TestItem, TestMessage, TestRun } from 'vscode'; import { getRunIdFromRawData, getTestCaseNodes } from './testItemUtilities'; import { TestData } from './types'; +import { fixLogLines } from './utils'; type TestSuiteResult = { $: { @@ -113,7 +114,7 @@ export async function updateResultFromJunitXml( } runInstance.errored(node, message); - runInstance.appendOutput(text); + runInstance.appendOutput(fixLogLines(text)); } else if (result.failure) { failures += 1; const failure = result.failure[0]; @@ -125,23 +126,23 @@ export async function updateResultFromJunitXml( } runInstance.failed(node, message); - runInstance.appendOutput(text); + runInstance.appendOutput(fixLogLines(text)); } else if (result.skipped) { skipped += 1; const skip = result.skipped[0]; const text = `${rawTestCaseNode.rawId} Skipped: [${skip.$.type}]${skip.$.message}\r\n`; runInstance.skipped(node); - runInstance.appendOutput(text); + runInstance.appendOutput(fixLogLines(text)); } else { passed += 1; const text = `${rawTestCaseNode.rawId} Passed\r\n`; runInstance.passed(node); - runInstance.appendOutput(text); + runInstance.appendOutput(fixLogLines(text)); } } else { const text = `Test result not found for: ${rawTestCaseNode.rawId}\r\n`; - runInstance.appendOutput(text); + runInstance.appendOutput(fixLogLines(text)); const message = new TestMessage(text); if (node.uri && node.range) { diff --git a/src/client/testing/testController/common/utils.ts b/src/client/testing/testController/common/utils.ts new file mode 100644 index 000000000000..13fc76a37199 --- /dev/null +++ b/src/client/testing/testController/common/utils.ts @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +export function fixLogLines(content: string): string { + const lines = content.split(/\r?\n/g); + return `${lines.join('\r\n')}\r\n`; +} diff --git a/src/client/testing/testController/unittest/runner.ts b/src/client/testing/testController/unittest/runner.ts index 9e053893740a..71f6dd3f57b7 100644 --- a/src/client/testing/testController/unittest/runner.ts +++ b/src/client/testing/testController/unittest/runner.ts @@ -12,6 +12,7 @@ import { ITestRunner, ITestDebugLauncher, IUnitTestSocketServer, LaunchOptions, import { TEST_OUTPUT_CHANNEL } from '../../constants'; import { getTestCaseNodes } from '../common/testItemUtilities'; import { ITestRun, ITestsRunner, TestData, TestRunInstanceOptions, TestRunOptions } from '../common/types'; +import { fixLogLines } from '../common/utils'; import { getTestRunArgs } from './arguments'; interface ITestData { @@ -102,7 +103,7 @@ export class UnittestRunner implements ITestsRunner { if (data.outcome === 'passed' || data.outcome === 'failed-expected') { const text = `${rawTestCase.rawId} Passed\r\n`; runInstance.passed(testCase); - runInstance.appendOutput(text); + runInstance.appendOutput(fixLogLines(text)); counts.passed += 1; } else if (data.outcome === 'failed' || data.outcome === 'passed-unexpected') { const traceback = data.traceback @@ -116,7 +117,7 @@ export class UnittestRunner implements ITestsRunner { } runInstance.failed(testCase, message); - runInstance.appendOutput(text); + runInstance.appendOutput(fixLogLines(text)); counts.failed += 1; if (failFast) { stopTesting = true; @@ -133,7 +134,7 @@ export class UnittestRunner implements ITestsRunner { } runInstance.errored(testCase, message); - runInstance.appendOutput(text); + runInstance.appendOutput(fixLogLines(text)); counts.errored += 1; if (failFast) { stopTesting = true; @@ -144,11 +145,11 @@ export class UnittestRunner implements ITestsRunner { : ''; const text = `${rawTestCase.rawId} Skipped: ${data.message}\r\n${traceback}\r\n`; runInstance.skipped(testCase); - runInstance.appendOutput(text); + runInstance.appendOutput(fixLogLines(text)); counts.skipped += 1; } else { const text = `Unknown outcome type for test ${rawTestCase.rawId}: ${data.outcome}`; - runInstance.appendOutput(text); + runInstance.appendOutput(fixLogLines(text)); const message = new TestMessage(text); if (testCase.uri && testCase.range) { message.location = new Location(testCase.uri, testCase.range); From ce6a11db8851312683b3f8323c8b5af9a5fd1f69 Mon Sep 17 00:00:00 2001 From: Karthik Nadig Date: Fri, 10 Sep 2021 13:07:54 -0700 Subject: [PATCH 17/23] Handle debug in terminai with undefined uri (#17375) --- news/2 Fixes/17374.md | 1 + src/client/debugger/extension/configuration/types.ts | 2 +- src/client/debugger/extension/debugCommands.ts | 10 +++++----- 3 files changed, 7 insertions(+), 6 deletions(-) create mode 100644 news/2 Fixes/17374.md diff --git a/news/2 Fixes/17374.md b/news/2 Fixes/17374.md new file mode 100644 index 000000000000..c6a6a6e9668d --- /dev/null +++ b/news/2 Fixes/17374.md @@ -0,0 +1 @@ +Fix to handle undefined uri in debug in terminal command. diff --git a/src/client/debugger/extension/configuration/types.ts b/src/client/debugger/extension/configuration/types.ts index 1e52ad5bb5d4..0dbf32c8d68b 100644 --- a/src/client/debugger/extension/configuration/types.ts +++ b/src/client/debugger/extension/configuration/types.ts @@ -29,5 +29,5 @@ export interface IDebugConfigurationProviderFactory { export const ILaunchJsonReader = Symbol('ILaunchJsonReader'); export interface ILaunchJsonReader { getConfigurationsForWorkspace(workspace: WorkspaceFolder): Promise; - getConfigurationsByUri(uri: Uri): Promise; + getConfigurationsByUri(uri?: Uri): Promise; } diff --git a/src/client/debugger/extension/debugCommands.ts b/src/client/debugger/extension/debugCommands.ts index dafecd476ab6..5d0e3ab7fbcc 100644 --- a/src/client/debugger/extension/debugCommands.ts +++ b/src/client/debugger/extension/debugCommands.ts @@ -24,7 +24,7 @@ export class DebugCommands implements IExtensionSingleActivationService { public activate(): Promise { this.disposables.push( - this.commandManager.registerCommand(Commands.Debug_In_Terminal, async (file: Uri) => { + this.commandManager.registerCommand(Commands.Debug_In_Terminal, async (file?: Uri) => { sendTelemetryEvent(EventName.DEBUG_IN_TERMINAL_BUTTON); const config = await this.getDebugConfiguration(file); this.debugService.startDebugging(undefined, config); @@ -33,13 +33,13 @@ export class DebugCommands implements IExtensionSingleActivationService { return Promise.resolve(); } - private async getDebugConfiguration(uri: Uri): Promise { + private async getDebugConfiguration(uri?: Uri): Promise { const configs = (await this.launchJsonReader.getConfigurationsByUri(uri)).filter((c) => c.request === 'launch'); for (const config of configs) { if ((config as LaunchRequestArguments).purpose?.includes(DebugPurpose.DebugInTerminal)) { if (!config.program && !config.module && !config.code) { // This is only needed if people reuse debug-test for debug-in-terminal - config.program = uri.fsPath; + config.program = uri?.fsPath ?? '${file}'; } // Ensure that the purpose is cleared, this is so we can track if people accidentally // trigger this via F5 or Start with debugger. @@ -48,10 +48,10 @@ export class DebugCommands implements IExtensionSingleActivationService { } } return { - name: `Debug ${path.basename(uri.fsPath)}`, + name: `Debug ${uri ? path.basename(uri.fsPath) : 'File'}`, type: 'python', request: 'launch', - program: uri.fsPath, + program: uri?.fsPath ?? '${file}', console: 'integratedTerminal', }; } From 246675c8b4dd18f9f125eca3c6b2f0cbece9078b Mon Sep 17 00:00:00 2001 From: Karthik Nadig Date: Mon, 13 Sep 2021 11:24:16 -0700 Subject: [PATCH 18/23] Fix for buttons not showing up for test items. (#17402) --- news/2 Fixes/17378.md | 1 + src/client/testing/testController/pytest/pytestController.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 news/2 Fixes/17378.md diff --git a/news/2 Fixes/17378.md b/news/2 Fixes/17378.md new file mode 100644 index 000000000000..47d47d7fb820 --- /dev/null +++ b/news/2 Fixes/17378.md @@ -0,0 +1 @@ +Fix for missing buttons for tests when using multiple test folders. diff --git a/src/client/testing/testController/pytest/pytestController.ts b/src/client/testing/testController/pytest/pytestController.ts index cd9f62e2df64..0e3cce9f58e5 100644 --- a/src/client/testing/testController/pytest/pytestController.ts +++ b/src/client/testing/testController/pytest/pytestController.ts @@ -115,7 +115,7 @@ export class PytestController implements ITestFrameworkController { subRootItem, testController, this.idToRawData, - subRootItem.id, + root, // All the file paths are based on workspace root. [data], ); } else { From 4bdc8696a847fefc88a4f67bf49e6609dc3e3c80 Mon Sep 17 00:00:00 2001 From: Karthik Nadig Date: Mon, 13 Sep 2021 11:30:16 -0700 Subject: [PATCH 19/23] Update change log and version. --- CHANGELOG.md | 70 +++++++++++++++++++++++++++++++++++++++++++ news/2 Fixes/17111.md | 1 - news/2 Fixes/17363.md | 1 - news/2 Fixes/17370.md | 1 - news/2 Fixes/17374.md | 1 - news/2 Fixes/17378.md | 1 - package-lock.json | 2 +- package.json | 2 +- 8 files changed, 72 insertions(+), 7 deletions(-) delete mode 100644 news/2 Fixes/17111.md delete mode 100644 news/2 Fixes/17363.md delete mode 100644 news/2 Fixes/17370.md delete mode 100644 news/2 Fixes/17374.md delete mode 100644 news/2 Fixes/17378.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 3867fcdbfada..1162bec1bf48 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,75 @@ # Changelog +## 2021.9.2 (13 September 2021) + +### Fixes + +1. Ensure line feeds are changed to CRLF in test messages. + ([#17111](https://github.com/Microsoft/vscode-python/issues/17111)) +1. Fix for `unittest` ModuleNotFoundError when discovering tests. + ([#17363](https://github.com/Microsoft/vscode-python/issues/17363)) +1. Ensure we block getting active interpreter on auto-selection. + ([#17370](https://github.com/Microsoft/vscode-python/issues/17370)) +1. Fix to handle undefined uri in debug in terminal command. + ([#17374](https://github.com/Microsoft/vscode-python/issues/17374)) +1. Fix for missing buttons for tests when using multiple test folders. + ([#17378](https://github.com/Microsoft/vscode-python/issues/17378)) + +### 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/) +- [Microsoft Python Language Server](https://github.com/microsoft/python-language-server) +- [Pylance](https://github.com/microsoft/pylance-release) +- [exuberant ctags](http://ctags.sourceforge.net/) (user-installed) +- [rope](https://pypi.org/project/rope/) (user-installed) + +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! + ## 2021.9.1 (9 September 2021) ### Fixes diff --git a/news/2 Fixes/17111.md b/news/2 Fixes/17111.md deleted file mode 100644 index 2e735435b2dc..000000000000 --- a/news/2 Fixes/17111.md +++ /dev/null @@ -1 +0,0 @@ -Ensure line feeds are changed to CRLF in test messages. diff --git a/news/2 Fixes/17363.md b/news/2 Fixes/17363.md deleted file mode 100644 index 9392ef1387b4..000000000000 --- a/news/2 Fixes/17363.md +++ /dev/null @@ -1 +0,0 @@ -Fix for `unittest` ModuleNotFoundError when discovering tests. diff --git a/news/2 Fixes/17370.md b/news/2 Fixes/17370.md deleted file mode 100644 index e3e57aba0c01..000000000000 --- a/news/2 Fixes/17370.md +++ /dev/null @@ -1 +0,0 @@ -Ensure we block getting active interpreter on auto-selection. diff --git a/news/2 Fixes/17374.md b/news/2 Fixes/17374.md deleted file mode 100644 index c6a6a6e9668d..000000000000 --- a/news/2 Fixes/17374.md +++ /dev/null @@ -1 +0,0 @@ -Fix to handle undefined uri in debug in terminal command. diff --git a/news/2 Fixes/17378.md b/news/2 Fixes/17378.md deleted file mode 100644 index 47d47d7fb820..000000000000 --- a/news/2 Fixes/17378.md +++ /dev/null @@ -1 +0,0 @@ -Fix for missing buttons for tests when using multiple test folders. diff --git a/package-lock.json b/package-lock.json index e800411122e9..f59b7aeff2c8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "python", - "version": "2021.9.1", + "version": "2021.9.2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index cffccd206418..66dc8876b567 100644 --- a/package.json +++ b/package.json @@ -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": "2021.9.1", + "version": "2021.9.2", "featureFlags": { "usingNewInterpreterStorage": true }, From 3b89abae41b2b9930312a629287590394a8fa4c1 Mon Sep 17 00:00:00 2001 From: Don Jayamanne Date: Thu, 16 Sep 2021 10:18:52 -0700 Subject: [PATCH 20/23] DS Product names were inadvertently removed (#17434) --- src/client/common/installer/productNames.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/client/common/installer/productNames.ts b/src/client/common/installer/productNames.ts index bcee1a53a239..89551e4d844e 100644 --- a/src/client/common/installer/productNames.ts +++ b/src/client/common/installer/productNames.ts @@ -20,3 +20,9 @@ ProductNames.set(Product.rope, 'rope'); ProductNames.set(Product.tensorboard, 'tensorboard'); ProductNames.set(Product.torchProfilerInstallName, 'torch-tb-profiler'); ProductNames.set(Product.torchProfilerImportName, 'torch_tb_profiler'); +ProductNames.set(Product.jupyter, 'jupyter'); +ProductNames.set(Product.notebook, 'notebook'); +ProductNames.set(Product.ipykernel, 'ipykernel'); +ProductNames.set(Product.nbconvert, 'nbconvert'); +ProductNames.set(Product.kernelspec, 'kernelspec'); +ProductNames.set(Product.pandas, 'pandas'); From 0a7d60c459afeb4958761f4321a404912cacd464 Mon Sep 17 00:00:00 2001 From: Kartik Raj Date: Fri, 17 Sep 2021 11:03:06 -0700 Subject: [PATCH 21/23] Fix `Python extension loading...` issue for users who have disabled telemetry (#17448) * Enable discovery experiments for all users including those who have opted out of telemetry * News entry * Oops * Ensure we still respect optInto/optOutFrom setting for discovery experiment --- news/2 Fixes/17447.md | 1 + src/client/common/experiments/service.ts | 6 +++++ .../common/experiments/service.unit.test.ts | 23 +++++++++++++++---- 3 files changed, 26 insertions(+), 4 deletions(-) create mode 100644 news/2 Fixes/17447.md diff --git a/news/2 Fixes/17447.md b/news/2 Fixes/17447.md new file mode 100644 index 000000000000..418a8f3b253c --- /dev/null +++ b/news/2 Fixes/17447.md @@ -0,0 +1 @@ +Fix `Python extension loading...` issue for users who have disabled telemetry. diff --git a/src/client/common/experiments/service.ts b/src/client/common/experiments/service.ts index 48f09332cbb8..21444499ae28 100644 --- a/src/client/common/experiments/service.ts +++ b/src/client/common/experiments/service.ts @@ -12,6 +12,7 @@ import { IApplicationEnvironment, IWorkspaceService } from '../application/types import { PVSC_EXTENSION_ID, STANDARD_OUTPUT_CHANNEL } from '../constants'; import { GLOBAL_MEMENTO, IExperimentService, IMemento, IOutputChannel } from '../types'; import { Experiments } from '../utils/localize'; +import { DiscoveryVariants } from './groups'; import { ExperimentationTelemetry } from './telemetry'; const EXP_MEMENTO_KEY = 'VSCode.ABExp.FeatureData'; @@ -126,6 +127,11 @@ export class ExperimentService implements IExperimentService { return true; } + if (experiment === DiscoveryVariants.discoveryWithoutFileWatching) { + // Enable discovery experiment for all users. + return true; + } + // If getTreatmentVariable returns undefined, // it means that the value for this experiment was not found on the server. const treatmentVariable = this.experimentationService.getTreatmentVariable(EXP_CONFIG_ID, experiment); diff --git a/src/test/common/experiments/service.unit.test.ts b/src/test/common/experiments/service.unit.test.ts index 29f5a0af1fdc..e8c8defd4fd8 100644 --- a/src/test/common/experiments/service.unit.test.ts +++ b/src/test/common/experiments/service.unit.test.ts @@ -12,6 +12,7 @@ import { ApplicationEnvironment } from '../../../client/common/application/appli import { IApplicationEnvironment, IWorkspaceService } from '../../../client/common/application/types'; import { WorkspaceService } from '../../../client/common/application/workspace'; import { Channel } from '../../../client/common/constants'; +import { DiscoveryVariants } from '../../../client/common/experiments/groups'; import { ExperimentService } from '../../../client/common/experiments/service'; import { Experiments } from '../../../client/common/utils/localize'; import * as Telemetry from '../../../client/telemetry'; @@ -157,14 +158,14 @@ suite('Experimentation service', () => { suite('In-experiment-sync check', () => { const experiment = 'Test Experiment - experiment'; - let telemetryEvents: { eventName: string; properties: Record }[] = []; + let telemetryEvents: { eventName: string; properties: unknown }[] = []; let getTreatmentVariable: sinon.SinonStub; let sendTelemetryEventStub: sinon.SinonStub; setup(() => { sendTelemetryEventStub = sinon .stub(Telemetry, 'sendTelemetryEvent') - .callsFake((eventName: string, _, properties: Record) => { + .callsFake((eventName: string, _, properties: unknown) => { const telemetry = { eventName, properties }; telemetryEvents.push(telemetry); }); @@ -182,6 +183,20 @@ suite('Experimentation service', () => { sinon.restore(); }); + test('Enable discovery experiment without file watching for all users', async () => { + configureSettings(true, [], []); + + const experimentService = new ExperimentService( + instance(workspaceService), + instance(appEnvironment), + globalMemento, + outputChannel, + ); + const result = experimentService.inExperimentSync(DiscoveryVariants.discoveryWithoutFileWatching); + + assert.isTrue(result); + }); + test('If the opt-in and opt-out arrays are empty, return the value from the experimentation framework for a given experiment', async () => { configureSettings(true, [], []); @@ -401,13 +416,13 @@ suite('Experimentation service', () => { }); suite('Opt-in/out telemetry', () => { - let telemetryEvents: { eventName: string; properties: Record }[] = []; + let telemetryEvents: { eventName: string; properties: unknown }[] = []; let sendTelemetryEventStub: sinon.SinonStub; setup(() => { sendTelemetryEventStub = sinon .stub(Telemetry, 'sendTelemetryEvent') - .callsFake((eventName: string, _, properties: Record) => { + .callsFake((eventName: string, _, properties: unknown) => { const telemetry = { eventName, properties }; telemetryEvents.push(telemetry); }); From 9a0a7e590666297fbe7f233fd0a0ac2bb74bb78d Mon Sep 17 00:00:00 2001 From: Karthik Nadig Date: Fri, 17 Sep 2021 11:19:20 -0700 Subject: [PATCH 22/23] Update change log and version (#17450) --- CHANGELOG.md | 62 +++++++++++++++++++++++++++++++++++++++++++ news/2 Fixes/17447.md | 1 - package-lock.json | 2 +- package.json | 2 +- 4 files changed, 64 insertions(+), 3 deletions(-) delete mode 100644 news/2 Fixes/17447.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 1162bec1bf48..b6f94be54879 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,67 @@ # Changelog +## 2021.9.3 (20 September 2021) + +### Fixes + +1. Fix `Python extension loading...` issue for users who have disabled telemetry. + ([#17447](https://github.com/Microsoft/vscode-python/issues/17447)) + +### 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/) +- [Microsoft Python Language Server](https://github.com/microsoft/python-language-server) +- [Pylance](https://github.com/microsoft/pylance-release) +- [exuberant ctags](http://ctags.sourceforge.net/) (user-installed) +- [rope](https://pypi.org/project/rope/) (user-installed) + +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! + ## 2021.9.2 (13 September 2021) ### Fixes diff --git a/news/2 Fixes/17447.md b/news/2 Fixes/17447.md deleted file mode 100644 index 418a8f3b253c..000000000000 --- a/news/2 Fixes/17447.md +++ /dev/null @@ -1 +0,0 @@ -Fix `Python extension loading...` issue for users who have disabled telemetry. diff --git a/package-lock.json b/package-lock.json index f59b7aeff2c8..4274c17c5c2a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "python", - "version": "2021.9.2", + "version": "2021.9.3", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 66dc8876b567..1c030a831013 100644 --- a/package.json +++ b/package.json @@ -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": "2021.9.2", + "version": "2021.9.3", "featureFlags": { "usingNewInterpreterStorage": true }, From bfdc16299d98a4915e74d37cf2b50e2bce925e9f Mon Sep 17 00:00:00 2001 From: Karthik Nadig Date: Tue, 21 Sep 2021 18:32:20 -0700 Subject: [PATCH 23/23] Ensure TPN is up to date --- ThirdPartyNotices-Distribution.txt | 558 ++++++++++++++++++----------- 1 file changed, 357 insertions(+), 201 deletions(-) diff --git a/ThirdPartyNotices-Distribution.txt b/ThirdPartyNotices-Distribution.txt index 4d907acd8e0a..ea9133a455d0 100644 --- a/ThirdPartyNotices-Distribution.txt +++ b/ThirdPartyNotices-Distribution.txt @@ -808,103 +808,208 @@ importlib-metadata 3.10.0 - Apache-2.0 Copyright 2017-2019 Jason R. Coombs, Barry Warsaw -Apache License -Version 2.0, January 2004 + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ -http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. - "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. - - - - "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. - - - - "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. - - - - "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. - - - - "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. - - - - "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. - - - - "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). - - - - "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. - - - - "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." - + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. - "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. - 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. - 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). - 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. - (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." - (b) You must cause any modified files to carry prominent notices stating that You changed the files; and + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. - (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. - (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. - You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: - 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and - 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and - 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and - 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. - 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. -APPENDIX: How to apply the Apache License to your work. + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. -To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. -Copyright [yyyy] [name of copyright owner] + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. -Licensed under the Apache License, Version 2.0 (the "License"); + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. -you may not use this file except in compliance with the License. + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. -You may obtain a copy of the License at + END OF TERMS AND CONDITIONS -http://www.apache.org/licenses/LICENSE-2.0 + APPENDIX: How to apply the Apache License to your work. -Unless required by applicable law or agreed to in writing, software + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. -distributed under the License is distributed on an "AS IS" BASIS, + Copyright [yyyy] [name of copyright owner] -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at -See the License for the specific language governing permissions and + http://www.apache.org/licenses/LICENSE-2.0 -limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. --------------------------------------------------------- @@ -1005,103 +1110,208 @@ Copyright (c) Microsoft Corporation. Copyright 2017 Palantir Technologies, Inc. Copyright 2018 Palantir Technologies, Inc. -Apache License -Version 2.0, January 2004 + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ -http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. - "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. - - - - "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. - - - - "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. - - - - "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. - - - - "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. - - - - "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. - - - - "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). - - - - "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. - - - - "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." - + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. - "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. - 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. - 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). - 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. - (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." - (b) You must cause any modified files to carry prominent notices stating that You changed the files; and + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. - (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. - (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. - You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: - 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and - 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and - 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and - 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. - 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. -APPENDIX: How to apply the Apache License to your work. + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. -To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. -Copyright [yyyy] [name of copyright owner] + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. -Licensed under the Apache License, Version 2.0 (the "License"); + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. -you may not use this file except in compliance with the License. + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. -You may obtain a copy of the License at + END OF TERMS AND CONDITIONS -http://www.apache.org/licenses/LICENSE-2.0 + APPENDIX: How to apply the Apache License to your work. -Unless required by applicable law or agreed to in writing, software + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. -distributed under the License is distributed on an "AS IS" BASIS, + Copyright [yyyy] [name of copyright owner] -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at -See the License for the specific language governing permissions and + http://www.apache.org/licenses/LICENSE-2.0 -limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. --------------------------------------------------------- @@ -4330,7 +4540,7 @@ IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. --------------------------------------------------------- -yallist 4.0.0 - ISC +yallist 2.1.2 - ISC https://github.com/isaacs/yallist#readme Copyright (c) Isaac Z. Schlueter and Contributors @@ -4356,7 +4566,7 @@ IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. --------------------------------------------------------- -yallist 2.1.2 - ISC +yallist 4.0.0 - ISC https://github.com/isaacs/yallist#readme Copyright (c) Isaac Z. Schlueter and Contributors @@ -5151,11 +5361,11 @@ SOFTWARE. --------------------------------------------------------- -braces 2.3.2 - MIT +braces 3.0.2 - MIT https://github.com/micromatch/braces Copyright (c) 2014-2018, Jon Schlinkert. -Copyright (c) 2018, Jon Schlinkert (https://github.com/jonschlinkert). +Copyright (c) 2019, Jon Schlinkert (https://github.com/jonschlinkert). The MIT License (MIT) @@ -5184,11 +5394,11 @@ THE SOFTWARE. --------------------------------------------------------- -braces 3.0.2 - MIT +braces 2.3.2 - MIT https://github.com/micromatch/braces Copyright (c) 2014-2018, Jon Schlinkert. -Copyright (c) 2019, Jon Schlinkert (https://github.com/jonschlinkert). +Copyright (c) 2018, Jon Schlinkert (https://github.com/jonschlinkert). The MIT License (MIT) @@ -5787,7 +5997,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --------------------------------------------------------- -date-format 2.1.0 - MIT +date-format 3.0.0 - MIT https://github.com/nomiddlename/date-format#readme Copyright (c) 2013 Gareth Jones @@ -5818,7 +6028,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --------------------------------------------------------- -date-format 3.0.0 - MIT +date-format 2.1.0 - MIT https://github.com/nomiddlename/date-format#readme Copyright (c) 2013 Gareth Jones @@ -6765,12 +6975,11 @@ THE SOFTWARE. --------------------------------------------------------- -fs-extra 9.1.0 - MIT +fs-extra 8.1.0 - MIT https://github.com/jprichardson/node-fs-extra Copyright (c) 2011-2017 JP Richardson Copyright (c) 2011-2017 JP Richardson (https://github.com/jprichardson) -Copyright (c) Sindre Sorhus (sindresorhus.com) Copyright (c) 2014-2016 Jonathan Ong me@jongleberry.com and Contributors (The MIT License) @@ -6794,11 +7003,12 @@ OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHE --------------------------------------------------------- -fs-extra 8.1.0 - MIT +fs-extra 9.1.0 - MIT https://github.com/jprichardson/node-fs-extra Copyright (c) 2011-2017 JP Richardson Copyright (c) 2011-2017 JP Richardson (https://github.com/jprichardson) +Copyright (c) Sindre Sorhus (sindresorhus.com) Copyright (c) 2014-2016 Jonathan Ong me@jongleberry.com and Contributors (The MIT License) @@ -8020,29 +8230,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------------------------------------------------- - ---------------------------------------------------------- - -jedi 0.17.2 - MIT - - -Copyright (c) <2013> -Copyright (c) Maxim Kurnikov. -copyright u'jedi contributors -copyright (c) 2014 by Armin Ronacher. -Copyright (c) 2015 Jukka Lehtosalo and contributors - -MIT License - -Copyright (c) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - --------------------------------------------------------- --------------------------------------------------------- @@ -8358,15 +8545,15 @@ THE SOFTWARE --------------------------------------------------------- -kind-of 5.1.0 - MIT +kind-of 3.2.2 - MIT https://github.com/jonschlinkert/kind-of -Copyright (c) 2014-2017, Jon Schlinkert. +Copyright (c) 2014-2017, Jon Schlinkert Copyright (c) 2017, Jon Schlinkert (https://github.com/jonschlinkert). The MIT License (MIT) -Copyright (c) 2014-2017, Jon Schlinkert. +Copyright (c) 2014-2017, Jon Schlinkert Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -8391,15 +8578,15 @@ THE SOFTWARE. --------------------------------------------------------- -kind-of 3.2.2 - MIT +kind-of 5.1.0 - MIT https://github.com/jonschlinkert/kind-of -Copyright (c) 2014-2017, Jon Schlinkert +Copyright (c) 2014-2017, Jon Schlinkert. Copyright (c) 2017, Jon Schlinkert (https://github.com/jonschlinkert). The MIT License (MIT) -Copyright (c) 2014-2017, Jon Schlinkert +Copyright (c) 2014-2017, Jon Schlinkert. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -9372,37 +9559,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------------------------------------------------- - ---------------------------------------------------------- - -parso 0.7.1 - MIT - - -Copyright (c) <2013-2017> -Copyright 2006 Google, Inc. -copyright u'parso contributors -Copyright (c) 2010 by Armin Ronacher. -Copyright David Halter and Contributors -Copyright 2004-2005 Elemental Security, Inc. -Copyright 2014 David Halter and Contributors -Copyright (c) 2014-2016 Ian Lee -Copyright (c) 2017-???? Dave Halter -Copyright (c) 2006-2009 Johann C. Rocholl -Copyright 2010 by Armin Ronacher. :license Flask Design License -Copyright (c) 2009-2014 Florent Xicluna -Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Python Software Foundation - -MIT License - -Copyright (c) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - --------------------------------------------------------- --------------------------------------------------------- @@ -11348,7 +11504,7 @@ THE SOFTWARE. --------------------------------------------------------- -universalify 2.0.0 - MIT +universalify 0.1.2 - MIT https://github.com/RyanZim/universalify#readme Copyright (c) 2017, Ryan Zimmerman @@ -11379,7 +11535,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --------------------------------------------------------- -universalify 0.1.2 - MIT +universalify 2.0.0 - MIT https://github.com/RyanZim/universalify#readme Copyright (c) 2017, Ryan Zimmerman @@ -11930,7 +12086,7 @@ SOFTWARE. --------------------------------------------------------- -xml2js 0.4.19 - MIT +xml2js 0.2.8 - MIT https://github.com/Leonidas-from-XIV/node-xml2js Copyright 2010, 2011, 2012, 2013. @@ -11960,7 +12116,7 @@ IN THE SOFTWARE. --------------------------------------------------------- -xml2js 0.2.8 - MIT +xml2js 0.4.19 - MIT https://github.com/Leonidas-from-XIV/node-xml2js Copyright 2010, 2011, 2012, 2013.