Skip to content

Commit b49c1d6

Browse files
authored
Merge branch 'main' into vscode-python-issue-25609-scrollable-repl
2 parents 6f60c00 + a4fa16e commit b49c1d6

5 files changed

Lines changed: 84 additions & 72 deletions

File tree

.github/workflows/pr-file-check.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ on:
99
- 'labeled'
1010
- 'unlabeled'
1111

12-
permissions: {}
12+
permissions:
13+
pull-requests: read
1314

1415
jobs:
1516
changed-files-in-pr:
@@ -19,6 +20,7 @@ jobs:
1920
- name: 'package-lock.json matches package.json'
2021
uses: brettcannon/check-for-changed-files@d85c64d17b3c1d0ac57c9cc46ea39399b0d6fa71 # v1.2.2
2122
with:
23+
token: ${{ github.token }}
2224
prereq-pattern: 'package.json'
2325
file-pattern: 'package-lock.json'
2426
skip-label: 'skip package*.json'
@@ -27,6 +29,7 @@ jobs:
2729
- name: 'package.json matches package-lock.json'
2830
uses: brettcannon/check-for-changed-files@d85c64d17b3c1d0ac57c9cc46ea39399b0d6fa71 # v1.2.2
2931
with:
32+
token: ${{ github.token }}
3033
prereq-pattern: 'package-lock.json'
3134
file-pattern: 'package.json'
3235
skip-label: 'skip package*.json'
@@ -35,6 +38,7 @@ jobs:
3538
- name: 'Tests'
3639
uses: brettcannon/check-for-changed-files@d85c64d17b3c1d0ac57c9cc46ea39399b0d6fa71 # v1.2.2
3740
with:
41+
token: ${{ github.token }}
3842
prereq-pattern: src/**/*.ts
3943
file-pattern: |
4044
src/**/*.test.ts

package-lock.json

Lines changed: 65 additions & 65 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/client/common/utils/localize.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ export namespace Interpreters {
218218
'{0} environment was successfully activated, even though {1} indicator may not be present in the terminal prompt. [Learn more](https://aka.ms/vscodePythonTerminalActivation).',
219219
);
220220
export const shellIntegrationEnvVarCollectionDescription = l10n.t(
221-
'Enables `python.terminal.shellIntegration.enabled` by modifying `PYTHONSTARTUP` and `PYTHON_BASIC_REPL`',
221+
'Enables `python.terminal.shellIntegration.enabled` by modifying `PYTHONSTARTUP`',
222222
);
223223
export const shellIntegrationDisabledEnvVarCollectionDescription = l10n.t(
224224
'Disables `python.terminal.shellIntegration.enabled` by unsetting `PYTHONSTARTUP` and `PYTHON_BASIC_REPL`',

src/client/terminals/pythonStartup.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ async function applyPythonStartupSetting(context: ExtensionContext): Promise<voi
2222
const sourcePath = path.join(EXTENSION_ROOT_DIR, 'python_files', 'pythonrc.py');
2323
await copy(Uri.file(sourcePath), destPath, { overwrite: true });
2424
context.environmentVariableCollection.replace('PYTHONSTARTUP', destPath.fsPath);
25-
// When shell integration is enabled, we disable PyREPL from cpython.
26-
context.environmentVariableCollection.replace('PYTHON_BASIC_REPL', '1');
2725
context.environmentVariableCollection.description = new MarkdownString(
2826
Interpreters.shellIntegrationEnvVarCollectionDescription,
2927
);

src/test/terminals/shellIntegration/pythonStartup.test.ts

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,15 +135,25 @@ suite('Terminal - Shell Integration with PYTHONSTARTUP', () => {
135135
globalEnvironmentVariableCollection.verify((c) => c.delete('PYTHONSTARTUP'), TypeMoq.Times.once());
136136
});
137137

138-
test('PYTHON_BASIC_REPL is set when shell integration is enabled', async () => {
138+
test('PYTHON_BASIC_REPL is not set when shell integration is enabled', async () => {
139139
pythonConfig.setup((p) => p.get('terminal.shellIntegration.enabled')).returns(() => true);
140+
140141
await registerPythonStartup(context.object);
142+
141143
globalEnvironmentVariableCollection.verify(
142-
(c) => c.replace('PYTHON_BASIC_REPL', '1', TypeMoq.It.isAny()),
143-
TypeMoq.Times.once(),
144+
(c) => c.replace('PYTHON_BASIC_REPL', TypeMoq.It.isAny(), TypeMoq.It.isAny()),
145+
TypeMoq.Times.never(),
144146
);
145147
});
146148

149+
test('PYTHON_BASIC_REPL is deleted when shell integration is disabled', async () => {
150+
pythonConfig.setup((p) => p.get('terminal.shellIntegration.enabled')).returns(() => false);
151+
152+
await registerPythonStartup(context.object);
153+
154+
globalEnvironmentVariableCollection.verify((c) => c.delete('PYTHON_BASIC_REPL'), TypeMoq.Times.once());
155+
});
156+
147157
test('Ensure registering terminal link calls registerTerminalLinkProvider', async () => {
148158
const registerTerminalLinkProviderStub = sinon.stub(
149159
pythonStartupLinkProvider,

0 commit comments

Comments
 (0)