Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Use sendText to send Python code to Terminal REPL for Python >= 3.13#24765

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
anthonykim1 merged 15 commits intomicrosoft:mainfromanthonykim1:sendText3.13
Feb 4, 2025

Conversation

anthonykim1
Copy link

@anthonykim1anthonykim1 commentedJan 31, 2025
edited
Loading

Resolves:#24674 (comment)
Use sendText to send Python code to Terminal REPL for Python >= 3.13 to prevent keyboard interrupt.

Relevant file context from VS Code:https://github.com/microsoft/vscode/blob/f9c927cf7a29a59b896b6cdac2d8b5d2d43afea5/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts#L906

It seems like we are on this edge scenario where generic terminal shell integration is enabled (so executeCommand can be used), but we have temporarily disabled Python shell integration for Python >= 3.13 (and of course sending the relevant escape sequences such as the commandLine itself to VS Code). Why?

Why and where I think the keyboard interrupt is happening:
Python extension tries to executeCommand when sending commands to terminal REPL >= Python3.13, where we are not sending shell integration escape sequences from the Python side.

  • I think this is why it is attaching the keyboard interrupt all the sudden, because VS Code see that Python extension is requesting executeCommand but is not sending the commandLine escape sequence to them. For every other versions < 3.13 (where we send all the shell integration escape sequences including the commandLine), this does not happen.

@anthonykim1anthonykim1 added bugIssue identified by VS Code Team member as probable bug area-terminal labelsJan 31, 2025
@anthonykim1anthonykim1 added this to theFebruary 2025 milestoneJan 31, 2025
@anthonykim1anthonykim1 self-assigned thisJan 31, 2025
@@ -261,6 +280,36 @@ suite('Terminal Service', () => {
terminal.verify((t) => t.sendText(TypeMoq.It.isValue(textToSend)), TypeMoq.Times.never());
});

test('Ensure sendText is called when Python shell integration and terminal shell integration are both enabled - Mac, Linux && Python >= 3.13', async () => {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Note we will start using executeCommand again once we resolve all the Python3.13 related issue and start using Python shell integration again.

@anthonykim1anthonykim1 marked this pull request as ready for reviewFebruary 4, 2025 19:13
@vs-code-engineeringVS Code Engineering
Copy link

⚠️ This PR originates from a fork. Due to security restrictions, pipelines from forks are no longer triggered automatically.Learn more.

If the changes appear safe, you can manually trigger the pipeline by commenting/AzurePipelines run.

@anthonykim1anthonykim1 merged commit6b784e5 intomicrosoft:mainFeb 4, 2025
46 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@karthiknadigkarthiknadigkarthiknadig approved these changes

@eleanorjboydeleanorjboydAwaiting requested review from eleanorjboyd

Assignees

@anthonykim1anthonykim1

Labels
area-terminalbugIssue identified by VS Code Team member as probable bug
Projects
None yet
Milestone
February 2025
Development

Successfully merging this pull request may close these issues.

Running a file in WSL executes ^C(keyboardInterrupt) before running
2 participants
@anthonykim1@karthiknadig

[8]ページ先頭

©2009-2025 Movatter.jp