Skip to content

Commit f44ded1

Browse files
author
Kartik Raj
authored
Use Microsoft Store instead of Windows Store to represent store related utilities (#19612)
Use 'Microsoft Store' instead of 'Windows Store' to represent store related utilities
1 parent 0a236a1 commit f44ded1

File tree

28 files changed

+121
-118
lines changed

28 files changed

+121
-118
lines changed

src/client/common/process/pythonEnvironment.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,18 +173,18 @@ export async function createCondaEnv(
173173
return new PythonEnvironment(interpreterPath, deps);
174174
}
175175

176-
export function createWindowsStoreEnv(
176+
export function createMicrosoftStoreEnv(
177177
pythonPath: string,
178178
// These are used to generate the deps.
179179
procs: IProcessService,
180180
): PythonEnvironment {
181181
const deps = createDeps(
182182
/**
183-
* With windows store python apps, we have generally use the
183+
* With microsoft store python apps, we have generally use the
184184
* symlinked python executable. The actual file is not accessible
185185
* by the user due to permission issues (& rest of exension fails
186186
* when using that executable). Hence lets not resolve the
187-
* executable using sys.executable for windows store python
187+
* executable using sys.executable for microsoft store python
188188
* interpreters.
189189
*/
190190
async (_f: string) => true,

src/client/common/process/pythonExecutionFactory.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { EventName } from '../../telemetry/constants';
1010
import { IFileSystem } from '../platform/types';
1111
import { IConfigurationService, IDisposableRegistry, IInterpreterPathService } from '../types';
1212
import { ProcessService } from './proc';
13-
import { createCondaEnv, createPythonEnv, createWindowsStoreEnv } from './pythonEnvironment';
13+
import { createCondaEnv, createPythonEnv, createMicrosoftStoreEnv } from './pythonEnvironment';
1414
import { createPythonProcessService } from './pythonProcess';
1515
import {
1616
ExecutionFactoryCreateWithEnvironmentOptions,
@@ -82,10 +82,10 @@ export class PythonExecutionFactory implements IPythonExecutionFactory {
8282
return condaExecutionService;
8383
}
8484

85-
const windowsStoreInterpreterCheck = this.pyenvs.isWindowsStoreInterpreter.bind(this.pyenvs);
85+
const windowsStoreInterpreterCheck = this.pyenvs.isMicrosoftStoreInterpreter.bind(this.pyenvs);
8686

8787
const env = (await windowsStoreInterpreterCheck(pythonPath))
88-
? createWindowsStoreEnv(pythonPath, processService)
88+
? createMicrosoftStoreEnv(pythonPath, processService)
8989
: createPythonEnv(pythonPath, processService, this.fileSystem);
9090

9191
return createPythonService(processService, env);

src/client/interpreter/configuration/environmentTypeComparer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export class EnvironmentTypeComparer implements IInterpreterComparer {
3636
* The comparison guidelines are:
3737
* 1. Local environments first (same path as the workspace root);
3838
* 2. Global environments next (anything not local), with conda environments at a lower priority, and "base" being last;
39-
* 3. Globally-installed interpreters (/usr/bin/python3, Windows Store).
39+
* 3. Globally-installed interpreters (/usr/bin/python3, Microsoft Store).
4040
*
4141
* Always sort with newest version of Python first within each subgroup.
4242
*/
@@ -236,7 +236,7 @@ function getPrioritizedEnvironmentType(): EnvironmentType[] {
236236
EnvironmentType.VirtualEnv,
237237
EnvironmentType.Conda,
238238
EnvironmentType.Pyenv,
239-
EnvironmentType.WindowsStore,
239+
EnvironmentType.MicrosoftStore,
240240
EnvironmentType.Global,
241241
EnvironmentType.System,
242242
EnvironmentType.Unknown,

src/client/interpreter/configuration/interpreterSelector/commands/setInterpreter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,7 @@ function getGroup(item: IInterpreterQuickPickItem, workspacePath?: string) {
543543
case EnvironmentType.Global:
544544
case EnvironmentType.System:
545545
case EnvironmentType.Unknown:
546-
case EnvironmentType.WindowsStore:
546+
case EnvironmentType.MicrosoftStore:
547547
return EnvGroups.Global;
548548
default:
549549
return EnvGroups[item.interpreter.envType];

src/client/interpreter/contracts.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export interface IComponentAdapter {
5050
// Undefined is expected on this API, if the environment is not conda env.
5151
getCondaEnvironment(interpreterPath: string): Promise<CondaEnvironmentInfo | undefined>;
5252

53-
isWindowsStoreInterpreter(pythonPath: string): Promise<boolean>;
53+
isMicrosoftStoreInterpreter(pythonPath: string): Promise<boolean>;
5454
}
5555

5656
export const ICondaService = Symbol('ICondaService');

src/client/jupyter/jupyterIntegration.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ type PythonApiForJupyterExtension = {
106106
interpreter?: PythonEnvironment,
107107
allowExceptions?: boolean,
108108
): Promise<NodeJS.ProcessEnv | undefined>;
109-
isWindowsStoreInterpreter(pythonPath: string): Promise<boolean>;
109+
isMicrosoftStoreInterpreter(pythonPath: string): Promise<boolean>;
110110
suggestionToQuickPickItem(suggestion: PythonEnvironment, workspaceUri?: Uri | undefined): IInterpreterQuickPickItem;
111111
getKnownSuggestions(resource: Resource): IInterpreterQuickPickItem[];
112112
/**
@@ -234,8 +234,8 @@ export class JupyterExtensionIntegration {
234234
interpreter?: PythonEnvironment,
235235
allowExceptions?: boolean,
236236
) => this.envActivation.getActivatedEnvironmentVariables(resource, interpreter, allowExceptions),
237-
isWindowsStoreInterpreter: async (pythonPath: string): Promise<boolean> =>
238-
this.pyenvs.isWindowsStoreInterpreter(pythonPath),
237+
isMicrosoftStoreInterpreter: async (pythonPath: string): Promise<boolean> =>
238+
this.pyenvs.isMicrosoftStoreInterpreter(pythonPath),
239239
getSuggestions: async (resource: Resource): Promise<IInterpreterQuickPickItem[]> =>
240240
this.interpreterSelector.getAllSuggestions(resource),
241241
getKnownSuggestions: (resource: Resource): IInterpreterQuickPickItem[] =>

src/client/pythonEnvironments/base/info/env.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ export function getEnvID(interpreterPath: string, envFolderPath?: string): strin
231231
* Remarks: The current comparison assumes that if the path to the executables are the same
232232
* then it is the same environment. Additionally, if the paths are not same but executables
233233
* are in the same directory and the version of python is the same than we can assume it
234-
* to be same environment. This later case is needed for comparing windows store python,
234+
* to be same environment. This later case is needed for comparing microsoft store python,
235235
* where multiple versions of python executables are all put in the same directory.
236236
*/
237237
export function areSameEnv(

src/client/pythonEnvironments/base/info/envKind.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export function getKindDisplayName(kind: PythonEnvKind): string {
1212
for (const [candidate, value] of [
1313
// Note that Unknown is excluded here.
1414
[PythonEnvKind.System, 'system'],
15-
[PythonEnvKind.WindowsStore, 'windows store'],
15+
[PythonEnvKind.MicrosoftStore, 'microsoft store'],
1616
[PythonEnvKind.Pyenv, 'pyenv'],
1717
[PythonEnvKind.Poetry, 'poetry'],
1818
[PythonEnvKind.Custom, 'custom'],
@@ -40,7 +40,7 @@ export function getKindDisplayName(kind: PythonEnvKind): string {
4040
* Top level we have the following environment types, since they leave a unique signature
4141
* in the environment or * use a unique path for the environments they create.
4242
* 1. Conda
43-
* 2. Windows Store
43+
* 2. Microsoft Store
4444
* 3. PipEnv
4545
* 4. Pyenv
4646
* 5. Poetry
@@ -57,7 +57,7 @@ export function getPrioritizedEnvKinds(): PythonEnvKind[] {
5757
return [
5858
PythonEnvKind.Pyenv,
5959
PythonEnvKind.Conda,
60-
PythonEnvKind.WindowsStore,
60+
PythonEnvKind.MicrosoftStore,
6161
PythonEnvKind.Pipenv,
6262
PythonEnvKind.Poetry,
6363
PythonEnvKind.Venv,

src/client/pythonEnvironments/base/info/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export enum PythonEnvKind {
1212
Unknown = 'unknown',
1313
// "global"
1414
System = 'global-system',
15-
WindowsStore = 'global-windows-store',
15+
MicrosoftStore = 'global-microsoft-store',
1616
Pyenv = 'global-pyenv',
1717
Poetry = 'poetry',
1818
Custom = 'global-custom',
@@ -48,7 +48,7 @@ export const virtualEnvKinds = [
4848
export const globallyInstalledEnvKinds = [
4949
PythonEnvKind.OtherGlobal,
5050
PythonEnvKind.Unknown,
51-
PythonEnvKind.WindowsStore,
51+
PythonEnvKind.MicrosoftStore,
5252
PythonEnvKind.System,
5353
PythonEnvKind.Custom,
5454
];

src/client/pythonEnvironments/base/locators/composite/resolverUtils.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ function getResolvers(): Map<PythonEnvKind, (env: BasicEnvInfo, useCache?: boole
3636
resolvers.set(k, resolveSimpleEnv);
3737
});
3838
resolvers.set(PythonEnvKind.Conda, resolveCondaEnv);
39-
resolvers.set(PythonEnvKind.WindowsStore, resolveWindowsStoreEnv);
39+
resolvers.set(PythonEnvKind.MicrosoftStore, resolveMicrosoftStoreEnv);
4040
resolvers.set(PythonEnvKind.Pyenv, resolvePyenvEnv);
4141
return resolvers;
4242
}
@@ -231,10 +231,10 @@ async function isBaseCondaPyenvEnvironment(executablePath: string) {
231231
return arePathsSame(path.dirname(location), pyenvVersionDir);
232232
}
233233

234-
async function resolveWindowsStoreEnv(env: BasicEnvInfo): Promise<PythonEnvInfo> {
234+
async function resolveMicrosoftStoreEnv(env: BasicEnvInfo): Promise<PythonEnvInfo> {
235235
const { executablePath } = env;
236236
return buildEnvInfo({
237-
kind: PythonEnvKind.WindowsStore,
237+
kind: PythonEnvKind.MicrosoftStore,
238238
executable: executablePath,
239239
version: parsePythonVersionFromPath(executablePath),
240240
org: 'Microsoft',

0 commit comments

Comments
 (0)