profile
viewpoint
Ian Huff IanMatthewHuff @Microsoft Kirkland, WA

IanMatthewHuff/AAAAAA 1

Automated Abstract Art Assembly And Appreciation

IanMatthewHuff/MIEngine 0

The Visual Studio MI Debug Engine ("MIEngine") provides an open-source Visual Studio Debugger extension that works with MI-enabled debuggers such as gdb, lldb, and clrdbg.

IanMatthewHuff/Samples 0

Small code samples, templates, notes and other such items go here

IanMatthewHuff/SlickGrid 0

A lightning fast JavaScript grid/spreadsheet

IanMatthewHuff/vscode-extension-samples 0

Sample code illustrating the VS Code extension API.

IanMatthewHuff/vscode-python 0

Python extension for Visual Studio Code

issue openedmicrosoft/vscode-python

Markdown editor doesn't save cursor location on focus / de-focus

Just something annoying that I noticed dogfooding. With Markdown cells if you ESC out and then ENTER back in you will lose the location in monaco that your cursor was at. It's always back at the start. I confirmed that Jupyter keeps the cursor position in this scenario.

created time in 15 hours

delete branch IanMatthewHuff/vscode-python

delete branch : dev/ianhu/heartbeatTelemetry

delete time in 17 hours

PR closed microsoft/vscode-python

Throw the real error when we wait for heartbeat skip news

For #

<!-- If an item below does not apply to you, then go ahead and check it off as "done" and strikethrough the text, e.g.: - [x] ~Has unit tests & system/integration tests~ -->

  • [ ] Pull request represents a single change (i.e. not fixing disparate/unrelated things in a single PR).
  • [ ] Title summarizes what is changing.
  • [ ] Has a news entry file (remember to thank yourself!).
  • [ ] Appropriate comments and documentation strings in the code.
  • [ ] Has sufficient logging.
  • [ ] Has telemetry for enhancements.
  • [ ] Unit tests & system/integration tests are added/updated.
  • [ ] Test plan is updated as appropriate.
  • [ ] package-lock.json has been regenerated by running npm install (if dependencies have changed).
  • [ ] The wiki is updated with any design decisions/details.
+1 -1

2 comments

1 changed file

IanMatthewHuff

pr closed time in 17 hours

Pull request review commentmicrosoft/vscode-python

DRAFT ONLY collect kernel stderr

 export class PythonKernelDaemon extends BasePythonDaemon implements IPythonKerne         // If the daemon dies, then kernel is also dead.         this.closed.catch((error) => this.subject.error(new PythonKernelDiedError({ error })));     }++    // stderr is coming in line at a time, so from when we first see it come in wait a bit to collect it all+    // before raising the error on our side+    private coalesceStderr(output: string) {+        // If we have not yet started our timeout, then queue it+        if (!this.stderrTimeout) {+            this.stderrTimeout = setTimeout(this.fireStderrError, 250);+        }++        this.stderrOutput = `${this.stderrOutput}\n${output}`;+    }++    private fireStderrError = () => {+        // TELEMETRY HERE?

I don't think that we even know if it is a callstack (it might not be) this is just whatever is coming over the raw stderr from the kernel. It's up to the kernel what they want to show here. For example the windows + 3.8 + old ipykernel looks like this:

Info 2020-08-10 12:14:11: Python Daemon (pid: 16976): write to stderr:   File "C:\Users\FMA3720\AppData\Roaming\Python\Python38\site-packages\zmq\eventloop\zmqstream.py", line 127, in __init__

<snip>

Info 2020-08-10 12:14:11: Python Daemon (pid: 16976): write to stderr:     self.asyncio_loop.add_reader(fd, self._handle_events, fd, IOLoop.READ)

Info 2020-08-10 12:14:11: Python Daemon (pid: 16976): write to stderr:   File "C:\Users\FMA3720\AppData\Local\Programs\Python\Python38-32\lib\asyncio\events.py", line 501, in add_reader

Info 2020-08-10 12:14:11: Python Daemon (pid: 16976): write to stderr:     raise NotImplementedError

Info 2020-08-10 12:14:11: Python Daemon (pid: 16976): write to stderr: NotImplementedError

I mean I could have a grep type check to see if it's this specific error, but that just seems silly, it's less work to just fix the version issue. What I want is to see stderr for the stuff that we don't know about. Might just have to ask for logs still.

IanMatthewHuff

comment created time in 17 hours

Pull request review commentmicrosoft/vscode-python

DRAFT ONLY collect kernel stderr

 export class PythonKernelDaemon extends BasePythonDaemon implements IPythonKerne         // If the daemon dies, then kernel is also dead.         this.closed.catch((error) => this.subject.error(new PythonKernelDiedError({ error })));     }++    // stderr is coming in line at a time, so from when we first see it come in wait a bit to collect it all+    // before raising the error on our side+    private coalesceStderr(output: string) {+        // If we have not yet started our timeout, then queue it+        if (!this.stderrTimeout) {+            this.stderrTimeout = setTimeout(this.fireStderrError, 250);+        }++        this.stderrOutput = `${this.stderrOutput}\n${output}`;+    }++    private fireStderrError = () => {+        // TELEMETRY HERE?

Yeah, that's what I think as well. It's a shame, since this is the bit that we actually need to distinguish what's actually causing the kernel to fail.

IanMatthewHuff

comment created time in 17 hours

Pull request review commentmicrosoft/vscode-python

DRAFT ONLY collect kernel stderr

 export class PythonKernelDaemon extends BasePythonDaemon implements IPythonKerne         // If the daemon dies, then kernel is also dead.         this.closed.catch((error) => this.subject.error(new PythonKernelDiedError({ error })));     }++    // stderr is coming in line at a time, so from when we first see it come in wait a bit to collect it all+    // before raising the error on our side+    private coalesceStderr(output: string) {+        // If we have not yet started our timeout, then queue it+        if (!this.stderrTimeout) {+            this.stderrTimeout = setTimeout(this.fireStderrError, 250);+        }++        this.stderrOutput = `${this.stderrOutput}\n${output}`;+    }++    private fireStderrError = () => {+        // TELEMETRY HERE?

@greazer in particular as he's the GDPR champ.

IanMatthewHuff

comment created time in 17 hours

Pull request review commentmicrosoft/vscode-python

collect kernel stderr

 export class PythonKernelDaemon extends BasePythonDaemon implements IPythonKerne         // If the daemon dies, then kernel is also dead.         this.closed.catch((error) => this.subject.error(new PythonKernelDiedError({ error })));     }++    // stderr is coming in line at a time, so from when we first see it come in wait a bit to collect it all+    // before raising the error on our side+    private coalesceStderr(output: string) {+        // If we have not yet started our timeout, then queue it+        if (!this.stderrTimeout) {+            this.stderrTimeout = setTimeout(this.fireStderrError, 250);+        }++        this.stderrOutput = `${this.stderrOutput}\n${output}`;+    }++    private fireStderrError = () => {+        // TELEMETRY HERE?

I was starting to implement this change. But I put this up as a draft, because before I went any further I just get the feeling that this might not be ok to log.

So it is the stderr that is coming from the ipykernel process that we launch. It's not output from execution errors of user code. But I think that it could possibly have user PII as it's a callstack. We do have a tool to scrub callstacks from Typescript errors, but sadly at this point we just have a string of output it's not something that we can feed into that.

IanMatthewHuff

comment created time in 17 hours

PR opened microsoft/vscode-python

collect kernel stderr

For #

<!-- If an item below does not apply to you, then go ahead and check it off as "done" and strikethrough the text, e.g.: - [x] ~Has unit tests & system/integration tests~ -->

  • [ ] Pull request represents a single change (i.e. not fixing disparate/unrelated things in a single PR).
  • [ ] Title summarizes what is changing.
  • [ ] Has a news entry file (remember to thank yourself!).
  • [ ] Appropriate comments and documentation strings in the code.
  • [ ] Has sufficient logging.
  • [ ] Has telemetry for enhancements.
  • [ ] Unit tests & system/integration tests are added/updated.
  • [ ] Test plan is updated as appropriate.
  • [ ] package-lock.json has been regenerated by running npm install (if dependencies have changed).
  • [ ] The wiki is updated with any design decisions/details.
+28 -9

0 comment

2 changed files

pr created time in 17 hours

push eventIanMatthewHuff/vscode-python

Ian Huff

commit sha 5466f9f5312feded34bca93455af22d552cbb49a

small changes

view details

push time in 17 hours

create barnchIanMatthewHuff/vscode-python

branch : dev/ianhu/logKernelError

created branch time in 17 hours

push eventIanMatthewHuff/vscode-python

dependabot[bot]

commit sha c93e6b228ec4b6006b5347dda7e0d3d0a13f3412

Bump serialize-javascript from 2.1.2 to 3.1.0 (#13400) Bumps [serialize-javascript](https://github.com/yahoo/serialize-javascript) from 2.1.2 to 3.1.0. - [Release notes](https://github.com/yahoo/serialize-javascript/releases) - [Commits](https://github.com/yahoo/serialize-javascript/compare/v2.1.2...v3.1.0) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

view details

Joyce Er

commit sha a70b6145c0707c03ce32ce4498afaa77170dde02

Don't show trust message for IW (#13414)

view details

Jim Griesmer

commit sha 9b3803a33b415519034b46e2a6c2d2d9a172490b

Add binding for cell selection (#13417) > @greazer it's actually more appropriate to mark the 4 of us as 'reviewer's instead of assignees. You should be the assignee as you're going to submit this PR. Whoops, I just wasn't paying attention.

view details

Karthik Nadig

commit sha 08e4074efcd25b29a46b9ec7102ae347ec8eec05

Rename some types (#13408) * Rename InterpreterType to EnvironmentType * Rename PythonInterpreter to PythonEnvironment * Rename environment type field from 'type' to 'envType' * Fix unit tests broken by rename. * Fix build failure.

view details

Ian Huff

commit sha f47defc877d0383ca25af089aa2513b5cee8e06f

release plan changes (#13415) Co-authored-by: Ian Huff <ianhuff@ravikun-dev2.redmond.corp.microsoft.com>

view details

push time in a day

Pull request review commentmicrosoft/vscode-python

Update 1_ds_bug_report.md

 _Please provide as much info as you readily know_ -   **OS:** Windows | Mac | Linux (distro): -   **Virtual environment:** conda | venv | virtualenv | N/A | ... -## Developer Tools Console Output+## Python Output  <!------------------------------------------------------------------------------------------------Copy/paste the output in the "Console" tab in the "Developer Tools" panel (Help >-Toggle Developer Tools). For better details, run the "Enable source map support for-extension debugging" command in VS Code at least once beforehand.+Please set this setting: ```"python.logging.logLevel": "debug"```

Nice 👍

rchiodo

comment created time in a day

delete branch IanMatthewHuff/vscode-python

delete branch : dev/ianhu/releasePlanUpdates

delete time in 2 days

push eventmicrosoft/vscode-python

Ian Huff

commit sha f47defc877d0383ca25af089aa2513b5cee8e06f

release plan changes (#13415) Co-authored-by: Ian Huff <ianhuff@ravikun-dev2.redmond.corp.microsoft.com>

view details

push time in 2 days

PR merged microsoft/vscode-python

Reviewers
Release Plan Updates skip news

For #

<!-- If an item below does not apply to you, then go ahead and check it off as "done" and strikethrough the text, e.g.: - [x] ~Has unit tests & system/integration tests~ -->

  • [ ] Pull request represents a single change (i.e. not fixing disparate/unrelated things in a single PR).
  • [ ] Title summarizes what is changing.
  • [ ] Has a news entry file (remember to thank yourself!).
  • [ ] Appropriate comments and documentation strings in the code.
  • [ ] Has sufficient logging.
  • [ ] Has telemetry for enhancements.
  • [ ] Unit tests & system/integration tests are added/updated.
  • [ ] Test plan is updated as appropriate.
  • [ ] package-lock.json has been regenerated by running npm install (if dependencies have changed).
  • [ ] The wiki is updated with any design decisions/details.
+27 -26

3 comments

1 changed file

IanMatthewHuff

pr closed time in 2 days

PR opened microsoft/vscode-python

Throw the real error when we wait for heartbeat

For #

<!-- If an item below does not apply to you, then go ahead and check it off as "done" and strikethrough the text, e.g.: - [x] ~Has unit tests & system/integration tests~ -->

  • [ ] Pull request represents a single change (i.e. not fixing disparate/unrelated things in a single PR).
  • [ ] Title summarizes what is changing.
  • [ ] Has a news entry file (remember to thank yourself!).
  • [ ] Appropriate comments and documentation strings in the code.
  • [ ] Has sufficient logging.
  • [ ] Has telemetry for enhancements.
  • [ ] Unit tests & system/integration tests are added/updated.
  • [ ] Test plan is updated as appropriate.
  • [ ] package-lock.json has been regenerated by running npm install (if dependencies have changed).
  • [ ] The wiki is updated with any design decisions/details.
+1 -1

0 comment

1 changed file

pr created time in 2 days

create barnchIanMatthewHuff/vscode-python

branch : dev/ianhu/heartbeatTelemetry

created branch time in 2 days

issue commentmicrosoft/vscode-python

Custom editor will randomly not use the custom editor

Validated. Not sure how common it is. But I tried it about a half dozen times and didn't get the error. Great to not have the raw ipynb popping up any more as well.

rchiodo

comment created time in 2 days

issue closedmicrosoft/vscode-python

Custom editor will randomly not use the custom editor

Enable custom editor Create a blank notebook

This comes up: image

We might fix this by using openWith instead of open [Edit], we already use openWith so that's not the problem.

closed time in 2 days

rchiodo

Pull request review commentmicrosoft/vscode-python

Use KernelSelection instead of KernelSpecInterpreter

 export class JupyterExecutionBase implements IJupyterExecution {         return Cancellation.race(async () => {             let result: INotebookServer | undefined;             let connection: IJupyterConnection | undefined;-            let kernelSpecInterpreter: KernelSpecInterpreter | undefined;-            let kernelSpecInterpreterPromise: Promise<KernelSpecInterpreter> = Promise.resolve({});+            let kernelSpecInterpreter: KernelSelection | undefined;

Looks like the variables need a rename as well.

DonJayamanne

comment created time in 2 days

push eventIanMatthewHuff/vscode-python

Don Jayamanne

commit sha 2ba5380473087a181a3f986efbce010f68f51de5

Refactor KernelSelection type to include a `kind` (#13407) For #13406

view details

Ian Huff

commit sha 0c6f631d71b433eea8048389455ddecbb9acc833

Merge release branch back to master (#13412)

view details

Kartik Raj

commit sha 5b0152ded77d5afa12762a3ac538e709c5a3d9cd

Upgrade isort to 5.3.2 (#13340) * Upgrade isort + remove unnecessary logging * Remove old workaround * Update test * News entries * Revert test

view details

push time in 2 days

delete branch IanMatthewHuff/vscode-python

delete branch : dev/ianhu/updateMasterFromRelease

delete time in 2 days

push eventmicrosoft/vscode-python

Ian Huff

commit sha 0c6f631d71b433eea8048389455ddecbb9acc833

Merge release branch back to master (#13412)

view details

push time in 2 days

PR merged microsoft/vscode-python

Reviewers
Merge release branch back to master skip news

<!-- If an item below does not apply to you, then go ahead and check it off as "done" and strikethrough the text, e.g.: - [x] ~Has unit tests & system/integration tests~ -->

  • [ ] Pull request represents a single change (i.e. not fixing disparate/unrelated things in a single PR).
  • [ ] Title summarizes what is changing.
  • [ ] Has a news entry file (remember to thank yourself!).
  • [ ] Appropriate comments and documentation strings in the code.
  • [ ] Has sufficient logging.
  • [ ] Has telemetry for enhancements.
  • [ ] Unit tests & system/integration tests are added/updated.
  • [ ] Test plan is updated as appropriate.
  • [ ] package-lock.json has been regenerated by running npm install (if dependencies have changed).
  • [ ] The wiki is updated with any design decisions/details.
+678 -675

3 comments

4 changed files

IanMatthewHuff

pr closed time in 2 days

pull request commentmicrosoft/vscode-python

Release Plan Updates

Tried to take some notes on the release process while I was doing it, and clean up some wording that was unclear to me. Looping in some folks involved with recent releases to see if they agree with my changes.

IanMatthewHuff

comment created time in 2 days

PR opened microsoft/vscode-python

Release Plan Updates

For #

<!-- If an item below does not apply to you, then go ahead and check it off as "done" and strikethrough the text, e.g.: - [x] ~Has unit tests & system/integration tests~ -->

  • [ ] Pull request represents a single change (i.e. not fixing disparate/unrelated things in a single PR).
  • [ ] Title summarizes what is changing.
  • [ ] Has a news entry file (remember to thank yourself!).
  • [ ] Appropriate comments and documentation strings in the code.
  • [ ] Has sufficient logging.
  • [ ] Has telemetry for enhancements.
  • [ ] Unit tests & system/integration tests are added/updated.
  • [ ] Test plan is updated as appropriate.
  • [ ] package-lock.json has been regenerated by running npm install (if dependencies have changed).
  • [ ] The wiki is updated with any design decisions/details.
+27 -26

0 comment

1 changed file

pr created time in 2 days

create barnchIanMatthewHuff/vscode-python

branch : dev/ianhu/releasePlanUpdates

created branch time in 2 days

Pull request review commentmicrosoft/vscode-python

DRAFT - Refactor KernelSelection type

 import type { KernelSpecInterpreter } from './kernelSelector'; export type LiveKernelModel = IJupyterKernel & Partial<IJupyterKernelSpec> & { session: Session.IModel };  /**- * Whether a selected kernel is:- * - Kernel spec (IJupyterKernelSpec)- * - Active kernel (IJupyterKernel) or- * - An Interpreter+ * Connection metadata for Live Kernels.+ * With this we are able connect to an existing kernel (instead of starting a new session).  */+export type LiveKernelConnectionMetadata = {+    kernelModel: LiveKernelModel;+    kernelSpec: undefined;+    interpreter: undefined;+    kind: 'live';+};+/**+ * Connection metadata for Kernels started using kernelspec (JSON).+ * This could be a raw kernel (spec might have path to executable for .NET or the like).+ */+export type KernelSpecConnectionMetadata = {+    kernelModel: undefined;+    kernelSpec: IJupyterKernelSpec;+    interpreter: undefined;+    kind: 'kernelSpec';+};+/**+ * Connection metadata for Kernels started using Python interpreter.+ * These are not necessarily raw (it could be plain old Jupyter Kernels, where we register Python interpreter as a kernel)+ */+export type PythonKernelConnectionMetadata = {+    kernelModel: undefined;+    kernelSpec: undefined;+    interpreter: PythonInterpreter;+    kind: 'pythonInterpreter';+};+// /**+//  * Connection metadata for Kernels started using Python interpreter with Kernel spec (JSON).+//  * Sometimes, we're unable to determine the exact interpreter associated with a kernelspec, in such cases this is a closes match.+//  */++// export type PythonKernelSpecConnectionMetadata = {+//     kernelModel: undefined;+//     kernelSpec: IJupyterKernelSpec;+//     interpreter: PythonInterpreter;+//     kind: 'pythonInterpreterKernelSpec';+// };+// /**+//  * Connection metadata for Kernels started using kernelspec (JSON).+//  * Note, we could be connecting/staring a kernel on a remote jupyter server.+//  * Sometimes, we're unable to determine the exact interpreter associated with a kernelspec, in such cases this is a closes match.+//  * E.g. when selecting a remote kernel, we do not have the remote interpreter information, we can only try to find a close match.}+//  */++// export type PythonLiveKernelConnectionMetadata = {+//     kernelModel: undefined;+//     kernelSpec: IJupyterKernelSpec;+//     interpreter: PythonInterpreter;+//     kind: 'pythonInterpreterLive';+// }; export type KernelSelection =-    | { kernelModel: LiveKernelModel; kernelSpec: undefined; interpreter: undefined }-    | { kernelModel: undefined; kernelSpec: IJupyterKernelSpec; interpreter: undefined }-    | { kernelModel: undefined; kernelSpec: undefined; interpreter: PythonInterpreter };+    | LiveKernelConnectionMetadata+    | KernelSpecConnectionMetadata+    | PythonKernelConnectionMetadata;

Thanks for removing raw. Seemed confusing as I knew there was a jupyter case that just had an interpreter in this type.

DonJayamanne

comment created time in 2 days

pull request commentmicrosoft/vscode-python

Merge release branch back to master

Last release process step. Merging release changes back into master branch.

IanMatthewHuff

comment created time in 2 days

PR opened microsoft/vscode-python

Merge release branch back to master skip news

<!-- If an item below does not apply to you, then go ahead and check it off as "done" and strikethrough the text, e.g.: - [x] ~Has unit tests & system/integration tests~ -->

  • [ ] Pull request represents a single change (i.e. not fixing disparate/unrelated things in a single PR).
  • [ ] Title summarizes what is changing.
  • [ ] Has a news entry file (remember to thank yourself!).
  • [ ] Appropriate comments and documentation strings in the code.
  • [ ] Has sufficient logging.
  • [ ] Has telemetry for enhancements.
  • [ ] Unit tests & system/integration tests are added/updated.
  • [ ] Test plan is updated as appropriate.
  • [ ] package-lock.json has been regenerated by running npm install (if dependencies have changed).
  • [ ] The wiki is updated with any design decisions/details.
+678 -675

0 comment

4 changed files

pr created time in 2 days

create barnchIanMatthewHuff/vscode-python

branch : release-2020.08

created branch time in 2 days

delete branch IanMatthewHuff/vscode-python

delete branch : dev/ianhu/updateReleaseForRelease

delete time in 2 days

Pull request review commentmicrosoft/vscode-python

Remove interpreter info from types

 export class JupyterNotebookBase implements INotebook {              // Change our own kernel spec             // Only after session was successfully created.-            this._executionInfo.kernelSpec = spec;+            this._executionInfo.kernelSpec = { ...spec };              // Rerun our initial setup             await this.initialize();         } else {             // Change our own kernel spec-            this._executionInfo.kernelSpec = spec;+            this._executionInfo.kernelSpec = { ...spec };         }          this.kernelChanged.fire(spec);          // If our new kernelspec has an interpreter, set that as our interpreter too         if (interpreter) {-            this._executionInfo.interpreter = interpreter;+            const metadata = { ...this._executionInfo.kernelSpec.metadata } || {};

Something like this is now going to display the path of the interpreter not the path of the kernelspec, which I don't think we want. https://github.com/microsoft/vscode-python/blob/0a0493a29f94390200b4f454746636f36c79f664/src/client/datascience/jupyter/kernels/kernelSelections.ts#L38

DonJayamanne

comment created time in 3 days

issue commentmicrosoft/vscode-python

Use a single type to represent kernel connection information

Just wanted to comment that I'm not sure about raw | live | spec. the | interpreter existed before raw existed so there is a case where kernelSelection is being used to carry around just an interpreter for launching with Jupyter. Just have to make sure that we handle that case.

DonJayamanne

comment created time in 3 days

issue commentmicrosoft/vscode-python

Use a single type to represent kernel connection information

Whoops, not sure how I closed that.

DonJayamanne

comment created time in 3 days

IssuesEvent

Pull request review commentmicrosoft/vscode-python

Remove interpreter info from types

 export class JupyterNotebookBase implements INotebook {              // Change our own kernel spec             // Only after session was successfully created.-            this._executionInfo.kernelSpec = spec;+            this._executionInfo.kernelSpec = { ...spec };              // Rerun our initial setup             await this.initialize();         } else {             // Change our own kernel spec-            this._executionInfo.kernelSpec = spec;+            this._executionInfo.kernelSpec = { ...spec };         }          this.kernelChanged.fire(spec);          // If our new kernelspec has an interpreter, set that as our interpreter too         if (interpreter) {-            this._executionInfo.interpreter = interpreter;+            const metadata = { ...this._executionInfo.kernelSpec.metadata } || {};

I feel like this is a big change. I'm going to look, but I think that we have some code that assumes the kernelspecs with interpreter metadata in them are kernelspecs that we created off of an interpreter. This looks like it's now saving interpreter info in any kernelspec that we use.

DonJayamanne

comment created time in 3 days

issue closedmicrosoft/vscode-python

Use a single type to represent kernel connection information

  • Call this type KernelConnectionMetadata.
  • Rename export type KernelSelection to KernelConnectionMetadata
  • This will be a union of 3 types:
    • Each of the three types will have a kind property with the values
      • raw - When starting raw kernels
      • live - When connecting to a remote jupyter session
      • spec - When connection to a kernel using a kernel spec.

@rchiodo @IanMatthewHuff @joyceerhl @DavidKutu /cc

closed time in 3 days

DonJayamanne

push eventIanMatthewHuff/vscode-python

Joyce Er

commit sha 032ebce9bf8ba915d1d041e2acd1f00f0d6258ae

Remove control tower code for trusted notebooks (#13394)

view details

Don Jayamanne

commit sha 66a4ffbfa625ddd6bf153b41f2ac2482d5e752ce

Refactor cell execution using IKernel (#13402) For #12189 * The kernel information returned to VSC from kernel provider now returns a stateless class * No more validation is performed when a kernel is changed (this happens when executing code) * Cleaned up IKernel interface * Move all execution of code & managing state of cells and notebook into IKernel class Hence deleted the old ExecutionService

view details

Rich Chiodo

commit sha eff739c5331e606f5c530be4b80db5bd4e3fee23

Ensure working directory is an actual directory (#13403) * Ensure working directory is an actual directory * Fix interrupt double test too. * Skip remote when doing raw kernel * Fix switch failure and try to fix ipywidget failure too * Update comment * Fix hygiene

view details

push time in 3 days

Pull request review commentmicrosoft/vscode-python

Ensure working directory is an actual directory

 for i in range(0, 100): 
     runTest(
         'Interrupt double',
-        async () => {
-            let interruptedKernel = false;
-            const { window, mount } = await getOrCreateInteractiveWindow(ioc);
-            window.notebook?.onKernelInterrupted(() => (interruptedKernel = true));
-
-            let timerCount = 0;
-            addContinuousMockData(ioc, interruptCode, async (_c) => {
-                timerCount += 1;
-                await sleep(0.5);
-                return Promise.resolve({ result: '', haveMore: timerCount < 100 });
-            });
+        async (context: Mocha.Context) => {
+            if (ioc.mockJupyter) {
+                let interruptedKernel = false;
+                const { window, mount } = await getOrCreateInteractiveWindow(ioc);
+                window.notebook?.onKernelInterrupted(() => (interruptedKernel = true));
+
+                let timerCount = 0;
+                addContinuousMockData(ioc, interruptCode, async (_c) => {
+                    timerCount += 1;
+                    await sleep(0.5);
+                    return Promise.resolve({ result: '', haveMore: timerCount < 100 });
+                });
 
-            addMockData(ioc, interruptCode, undefined, 'text/plain');
+                addMockData(ioc, interruptCode, undefined, 'text/plain');
 
-            // Run the interrupt code and then interrupt it twice to make sure we can interrupt twice
-            const waitForAdd = addCode(ioc, interruptCode);
+                // Run the interrupt code and then interrupt it twice to make sure we can interrupt twice
+                const waitForAdd = addCode(ioc, interruptCode);
 
-            // 'Click' the button in the react control. We need to verify we can
-            // click it more than once.
-            const interrupt = findButton(mount.wrapper, InteractivePanel, 4);
-            interrupt?.simulate('click');
-            await sleep(0.1);
-            interrupt?.simulate('click');
+                // 'Click' the button in the react control. We need to verify we can
+                // click it more than once.
+                const interrupt = findButton(mount.wrapper, InteractivePanel, 4);
+                interrupt?.simulate('click');
+                await sleep(0.1);
+                interrupt?.simulate('click');
 
-            // We should get out of the wait for add
-            await waitForAdd;
+                // We should get out of the wait for add
+                await waitForAdd;
 
-            // We should have also fired an interrupt
-            assert.ok(interruptedKernel, 'Kernel was not interrupted');
+                // We should have also fired an interrupt
+                assert.ok(interruptedKernel, 'Kernel was not interrupted');
+            } else {
+                // Timing is too iffy for real jupyter. However we really just
+                // want to make sure double interrupt is supported so keep the

Sentence cuts off?

rchiodo

comment created time in 3 days

pull request commentmicrosoft/vscode-python

Update Release branch for August Release

No code changes. So merging on approval so that CI can start sooner.

IanMatthewHuff

comment created time in 3 days

pull request commentmicrosoft/vscode-python

Update Release branch for August Release

RC -> Release branch updates.

IanMatthewHuff

comment created time in 3 days

PR opened microsoft/vscode-python

Update Release branch for August Release skip news

For #

<!-- If an item below does not apply to you, then go ahead and check it off as "done" and strikethrough the text, e.g.: - [x] ~Has unit tests & system/integration tests~ -->

  • [ ] Pull request represents a single change (i.e. not fixing disparate/unrelated things in a single PR).
  • [ ] Title summarizes what is changing.
  • [ ] Has a news entry file (remember to thank yourself!).
  • [ ] Appropriate comments and documentation strings in the code.
  • [ ] Has sufficient logging.
  • [ ] Has telemetry for enhancements.
  • [ ] Unit tests & system/integration tests are added/updated.
  • [ ] Test plan is updated as appropriate.
  • [ ] package-lock.json has been regenerated by running npm install (if dependencies have changed).
  • [ ] The wiki is updated with any design decisions/details.
+675 -674

0 comment

5 changed files

pr created time in 3 days

delete branch IanMatthewHuff/vscode-python

delete branch : dev/ianhu/python27PreWarm

delete time in 3 days

issue commentmicrosoft/vscode-python

interactive window not opening in other conda environment

@sachin02986 if you have the time and you'd like to try out the full fix here, it's in our most recent development build. https://github.com/microsoft/vscode-python/blob/master/CONTRIBUTING.md#development-build It's very easy to revert back to the release version of the extension after trying that if you want. Just remove the optOutFrom line in package.json along with the insiders build and it should work with that conda 2.7 environment.

sachin02986

comment created time in 3 days

issue commentmicrosoft/vscode-python

Working directory for non-python kernels in a temp directory

Since the change here is in the Python extension then you would actually need the insiders version of our extension (can use that with either normal VS Code or VS Code - insiders). Info is on this here: https://github.com/microsoft/vscode-python/blob/master/CONTRIBUTING.md#development-build It's very easy to swap that back to the release version, so it's safe to use that to test if you want.

I believe that this should work with github codespaces, I've not tested that myself, but it's not using anything that would prevent that. However I would assume that github codespaces doesn't have the insiders version of our extension, so you would not see the fix there yet.

jlperla

comment created time in 3 days

Pull request review commentmicrosoft/vscode-python

Remove control tower code for trusted notebooks

 export class TrustService implements ITrustService {      * markdown will be rendered until notebook as a whole is marked trusted      */     public async isNotebookTrusted(uri: Uri, notebookContents: string) {-        if (this.alwaysTrustNotebooks || !(await this.enabled)) {-            return true; // Skip check if user manually overrode our trust checking, or if user is not in experiment+        if (this.alwaysTrustNotebooks) {+            return true; // Skip check if user manually overrode our trust checking

Updated comments 👍

joyceerhl

comment created time in 3 days

Pull request review commentmicrosoft/vscode-python

Support linting in native notebooks

 export class VSCodeNotebook implements IVSCodeNotebook {         }         return this.notebook.activeNotebookEditor;     }+    public get onDidSaveNotebookDocument(): Event<NotebookDocument> {+        return this.provider ? this.provider.onDidSaveNotebook : this._onDidSaveNotebookDocumentStandin.event;

Does registerNotebookContentProvider get called first thing? This standin looks a bit odd, if someone hooks up to it would it just get thrown away when the provider registers?

rchiodo

comment created time in 3 days

Pull request review commentmicrosoft/vscode-python

Support linting in native notebooks

 export class LintingEngine implements ILintingEngine {         this.diagnosticCollection.set(document.uri, diagnostics);     } +    private getDocumentKey(document: vscode.TextDocument): string {+        if (os.platform() === 'win32') {+            return document.uri.toString().toLowerCase();

Was there an existing bug here regarding the casing?

rchiodo

comment created time in 4 days

issue openedmicrosoft/vscode-python

Test DataScience with Python 3.9

RC is published so seems like a good time to kick the tires on this for us.

Via Steve:

The release candidate of Python 3.9 is ready! This is the time to test your packages and fix anything so you can have wheels ready for your users on release. (While we can't guarantee nothing will break between now and 3.9.0 final, we can guarantee that you'll be happier that we fixed it rather than left it broken.)

You can download Windows and macOS installers from https://www.python.org/downloads/release/python-390rc1/ or at \pytools\Python\CPython\v3.9.0rc1 (including some official but unreleased ARM64 packages and side-loadable MSIX packages for Windows).

On Ubuntu, use the deadsnakes PPA to install precompiled builds (soon).

(Discussion to the post in the General channel)

created time in 4 days

issue closedmicrosoft/vscode-python

Working directory for non-python kernels in a temp directory

Bug: Notebook Editor, Interactive Window, Editor cells

Steps to cause the bug to occur

  1. Create a new jupyter notebook and save it in a file location, or open an existing file
  2. Change the kernel to something already installed (e.g. Julia 1.4.2 in my case)
  3. Run pwd() to see the working directory

Actual behavior

I am getting C:\\Users\\MYUSERNAME\\AppData\\Local\\Temp\\7bb05f8c-bf2c-4a11-b590-de1cdae0d271 as the path.

This is especially important for Julia since the jupyter kernel activates a Project.toml and Manifest.toml local to the path of a file when it starts. This makes reproducible packages/etc. possible, and is difficult to do after startup.

Expected behavior

It should be be where the file is opened or saved. In my case, 'c:\\Users\\MYUSERNAME\\Documents\\GitHub\\sandbox'

This is what happens with python kernels, for example. In that case, ;pwd returns that string.

Your Jupyter and/or Python environment

  • Jupyter server running: Local
  • Extension version: 2020.6.91350
  • VS Code version: 1.46.1
  • Setting python.jediEnabled: false
  • Python and/or Anaconda version: 3.7.4 64 bit conda
  • OS: Windows
  • Virtual environment: conda

Microsoft Data Science for VS Code Engineering Team: @rchiodo, @IanMatthewHuff, @DavidKutu, @DonJayamanne, @greazer, @joyceerhl

closed time in 4 days

jlperla

issue commentmicrosoft/vscode-python

Working directory for non-python kernels in a temp directory

Validated. The Julia experts can check it out more in the wild, but using the helpful example from jlperla it looks good to me: image.png Just reopen the bug if there are still issues here.

jlperla

comment created time in 4 days

issue closedmicrosoft/vscode-python

Change Gather survey

People with older versions of the python ext are getting a link to the same survey, so we need to change both the aka.ms link and the survey itself to start getting accurate responses next release.

@claudiaregio

closed time in 4 days

DavidKutu

issue commentmicrosoft/vscode-python

Change Gather survey

Validated. Not fully sure on validation, since I don't see the old survey. But I do see that the new link works and was submitted in this PR.

DavidKutu

comment created time in 4 days

issue closedmicrosoft/vscode-python

Selected remote Jupyter kernel not kept after closing VS Code

Bug: Notebook Editor, Interactive Window, Editor cells

<!----------------------------------------------------------------------------------------------- PLEASE READ If this issue doesn't relate to Jupyter Notebooks, Python Interactive Window features or other notebook or "cell"-based features of the Python extension, please use the main Python bug template instead of this one. Thank you! ------------------------------------------------------------------------------------------------->

Steps to cause the bug to occur

  1. Connect to remote Jupyter server
  2. Choose one among the kernels available on the server
  3. Close VS Code
  4. Reopen VS Code

Actual behavior

Kernel is not the one chosen anymore; seemingly VS Code changed it to the first of the available kernels ( you need to choose the original kernel manually again in order to work with it )

Expected behavior

I would expect the selected kernel, at least at project level, even better at notebook level, to not change after restarting.

<!----------------------------------------------------------------------------------------------- Animated GIFs can be effective means to describe a bug. Consider using a tool like https://github.com/phw/peek or https://www.screentogif.com/ to create one. ------------------------------------------------------------------------------------------------->

Your Jupyter and/or Python environment

Please provide as much info as you readily know

  • Jupyter server running: Remote
  • Extension version: 2020.6.91350
  • VS Code version: 1.46.1 cd9ea6488829f560dc949a8b2fb789f3cdc05f5d x64
  • Setting python.jediEnabled: true | false (can't find setting but languageServer is Jedi)
  • Setting python.languageServer: Jedi
  • Python and/or Anaconda version: conda 4.5.12
  • OS: Linux Ubuntu 18.04 both server and local
  • Virtual environment: conda

Developer Tools Console Output

<!----------------------------------------------------------------------------------------------- Copy/paste the output in the "Console" tab in the "Developer Tools" panel (Help > Toggle Developer Tools). For better details, run the "Enable source map support for extension debugging" command in VS Code at least once beforehand. ------------------------------------------------------------------------------------------------->

Microsoft Data Science for VS Code Engineering Team: @rchiodo, @IanMatthewHuff, @DavidKutu, @DonJayamanne, @greazer, @joyceerhl

closed time in 4 days

fra-luc

issue commentmicrosoft/vscode-python

Selected remote Jupyter kernel not kept after closing VS Code

Validated. Swapped the kernel after remote connection and this connection was preserved across the next time I connected after closing and reopening VSCode.

fra-luc

comment created time in 4 days

push eventIanMatthewHuff/vscode-python

Rich Chiodo

commit sha c06f2d3b30138b197463a12289da46ad9b599fe5

Fix nyc unit test failures (#13384)

view details

Ian Huff

commit sha e18d09bbe8242b22589fe2017e8f2eb8ce32e89e

don't try to prewarm an execution service (#13377) * don't try to prewarm an execution service * remove funky old cast * update unit tests Co-authored-by: Ian Huff <ianhuff@ravikun-dev2.redmond.corp.microsoft.com>

view details

Kartik Raj

commit sha e044a04d09cbd50bd84233d2f6f6a7124af9f915

Do not fail interpreter discovery if accessing Windows registry fails. (#13369) * Do not fail discovery if accessing Windows registry fails * News entry

view details

Eric Snow

commit sha da06067e94b5621db0845911d0ce48b259046dd2

Revert "PyEnvs: Register proxies with the DI framework to replace @injectable usage. (#12795)" (#13278) (for #12833) This reverts commit 3016ad86b34695e22969a744f120e66800bbf618. We will work on un-reverting separately.

view details

push time in 4 days

issue commentmicrosoft/vscode-python

Ability to open .py files directly in the Notebook Editor

@syagev Thanks for filing this here off of the teams convo.

syagev

comment created time in 4 days

push eventmicrosoft/vscode-python

Ian Huff

commit sha e18d09bbe8242b22589fe2017e8f2eb8ce32e89e

don't try to prewarm an execution service (#13377) * don't try to prewarm an execution service * remove funky old cast * update unit tests Co-authored-by: Ian Huff <ianhuff@ravikun-dev2.redmond.corp.microsoft.com>

view details

push time in 4 days

PR merged microsoft/vscode-python

Reviewers
don't try to prewarm an execution service

For #13258

<!-- If an item below does not apply to you, then go ahead and check it off as "done" and strikethrough the text, e.g.: - [x] ~Has unit tests & system/integration tests~ -->

  • [x] Pull request represents a single change (i.e. not fixing disparate/unrelated things in a single PR).
  • [x] Title summarizes what is changing.
  • [x] Has a news entry file (remember to thank yourself!).
  • [x] Appropriate comments and documentation strings in the code.
  • [ ] Has sufficient logging.
  • [ ] Has telemetry for enhancements.
  • [ ] Unit tests & system/integration tests are added/updated.
  • [ ] Test plan is updated as appropriate.
  • [ ] package-lock.json has been regenerated by running npm install (if dependencies have changed).
  • [ ] The wiki is updated with any design decisions/details.
+44 -20

3 comments

7 changed files

IanMatthewHuff

pr closed time in 4 days

pull request commentmicrosoft/vscode-python

don't try to prewarm an execution service

27 failures were just linter test failures so pushing.

IanMatthewHuff

comment created time in 4 days

issue commentmicrosoft/vscode-python

systematically Timed out waiting to get a heartbeat from kernel process.

We use IPyKernel to launch so in particular I'm interested in that version as it looks like ipykernel fixed this issue here: https://github.com/ipython/ipykernel/pull/456 in their 5.1.4 release.

farinderin

comment created time in 4 days

issue closedmicrosoft/vscode-python

Cannot copy code from notebook cell into a script file

Issue Type: <b>Bug</b>

  1. Open up a python notebook that has python code in it.
  2. Open up a python ".py" file and have the two open tabs side by side
  3. Select some lines of code from a single cell in the notebook, and select Edit->Copy
  4. Go to the script file and try to paste the code into the script

The code from the notebook does not paste into the script file.

VS Code version: Code 1.47.3 (91899dcef7b8110878ea59626991a18c8a6a1b3e, 2020-07-23T13:12:49.994Z) OS version: Windows_NT x64 10.0.18363

<details> <summary>System Info</summary>

Item Value
CPUs Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz (16 x 2400)
GPU Status 2d_canvas: enabled<br>flash_3d: enabled<br>flash_stage3d: enabled<br>flash_stage3d_baseline: enabled<br>gpu_compositing: enabled<br>multiple_raster_threads: enabled_on<br>oop_rasterization: disabled_off<br>protected_video_decode: enabled<br>rasterization: enabled<br>skia_renderer: disabled_off_ok<br>video_decode: enabled<br>viz_display_compositor: enabled_on<br>viz_hit_test_surface_layer: disabled_off_ok<br>webgl: enabled<br>webgl2: enabled
Load (avg) undefined
Memory (System) 31.71GB (19.79GB free)
Process Argv
Screen Reader no
VM 0%

</details><details><summary>Extensions (28)</summary>

Extension Author (truncated) Version
indent4to2 Com 0.1.2
vscode-markdownlint Dav 0.36.2
xml Dot 2.5.1
vscode-pandoc Dou 0.0.8
prettier-vscode esb 5.1.3
getter-setter-generator Gab 1.4.0
mdmath goe 2.5.1
language-cython guy 0.0.6
vsc-python-indent Kev 1.10.1
restructuredtext lex 129.0.0
pandoc-format mon 0.0.3
mssql ms- 1.9.0
anaconda-extension-pack ms- 1.0.1
python ms- 2020.7.96456
vscode-pylance ms- 2020.8.0
remote-wsl ms- 0.44.4
autodocstring njp 0.5.3
java red 0.65.0
vscode-yaml red 0.9.1
markdown-preview-enhanced shd 0.5.12
rewrap stk 1.13.0
vscodeintellicode Vis 1.2.9
vscode-java-debug vsc 0.27.1
vscode-java-dependency vsc 0.10.2
vscode-java-pack vsc 0.9.1
vscode-java-test vsc 0.24.0
vscode-maven vsc 0.23.0
markdown-all-in-one yzh 3.2.0

</details> <!-- generated by issue reporter -->

closed time in 4 days

Dr-Irv

issue commentmicrosoft/vscode-python

Cannot copy code from notebook cell into a script file

Thanks @Dr-Irv . I'm going to close this issue down now, as this was a known issue with VSCode and not with the extension. I'm pretty sure that the next core VSCode release is coming soon so as soon as that hits this should be resolved.

Dr-Irv

comment created time in 4 days

issue commentmicrosoft/vscode-python

systematically Timed out waiting to get a heartbeat from kernel process.

@farinderin Sorry about the issue and thanks for reporting. The interesting bit of the log seems to be here, where we are attempting to launch our ipython kernel to use.


Info 2020-08-10 12:14:11: Python Daemon (pid: 16976): write to stderr:     self._init_io_state()

Info 2020-08-10 12:14:11: Python Daemon (pid: 16976): write to stderr:   File "C:\Users\FMA3720\AppData\Roaming\Python\Python38\site-packages\zmq\eventloop\zmqstream.py", line 546, in _init_io_state

Info 2020-08-10 12:14:11: Python Daemon (pid: 16976): write to stderr:     self.io_loop.add_handler(self.socket, self._handle_events, self.io_loop.READ)

Info 2020-08-10 12:14:11: Python Daemon (pid: 16976): write to stderr:   File "C:\Users\FMA3720\AppData\Roaming\Python\Python38\site-packages\tornado\platform\asyncio.py", line 99, in add_handler

Info 2020-08-10 12:14:11: Python Daemon (pid: 16976): write to stderr:     self.asyncio_loop.add_reader(fd, self._handle_events, fd, IOLoop.READ)

Info 2020-08-10 12:14:11: Python Daemon (pid: 16976): write to stderr:   File "C:\Users\FMA3720\AppData\Local\Programs\Python\Python38-32\lib\asyncio\events.py", line 501, in add_reader

Info 2020-08-10 12:14:11: Python Daemon (pid: 16976): write to stderr:     raise NotImplementedError

Info 2020-08-10 12:14:11: Python Daemon (pid: 16976): write to stderr: NotImplementedError```

This looks to be a specific issue with Windows and Python 3.8 with regards to asyncio and the tornado web server. I found a number of related threads on this:
https://github.com/tornadoweb/tornado/issues/2608
https://github.com/nteract/papermill/issues/515
https://bugs.python.org/issue37373
https://github.com/jupyterhub/jupyterhub/pull/3123

Seems like we might need to make a change on our side specifically for windows and Python 3.8. For now, the linked tornado thread has a possible workaround to use. Or you could downgrade to python 3.7 for now. 

Also if you don't mind, could you please give me a pip list for the python version that you are targeting? Just want to see what versions of tornado, asyncio, and ipykernel we are working with here. 
farinderin

comment created time in 4 days

issue commentmicrosoft/vscode-python

Cannot copy code from notebook cell into a script file

@Dr-Irv We've had a series of issues recent with copy / paste / cut commands coming from our webviews (the notebook editor and the interactive window). This issue currently doesn't repro for me on Mac, but you are on Windows and some of these issues were platform specific.

I know that the VSCode core team was resolving a number of these issues, but those fixes might not be live in the main Code version yet. Could you try downloading VS Code - Insiders and seeing if you see the same issue there? If you don't then I'm pretty sure that the issues are resolved and just waiting to roll out in the next full release of VS Code.

Dr-Irv

comment created time in 4 days

Pull request review commentmicrosoft/vscode-python

Fix nyc unit test failures

 export abstract class BaseNotebookModel implements INotebookModel {                   ...this.notebookJson.metadata,                   id: this.kernelId               }-            : this.notebookJson.metadata;+            : // Fix nyc compiler problem

Totally, and I'm approving. Just kvetching a bit about having to change our code for NYC.

rchiodo

comment created time in 4 days

Pull request review commentmicrosoft/vscode-python

Fix nyc unit test failures

 export abstract class BaseNotebookModel implements INotebookModel {                   ...this.notebookJson.metadata,                   id: this.kernelId               }-            : this.notebookJson.metadata;+            : // Fix nyc compiler problem

With the "kernelspec as any" change above we are actually losing some type safety to make NYC happy. Sure it's not likely to be an issue, but now I can change the parameter type of the kernelspec passed into translateToNotebook and now Typescript won't complain due to the any, even if I'm passing in something wrong.

rchiodo

comment created time in 4 days

Pull request review commentmicrosoft/vscode-python

Fix nyc unit test failures

 export abstract class BaseNotebookModel implements INotebookModel {                   ...this.notebookJson.metadata,                   id: this.kernelId               }-            : this.notebookJson.metadata;+            : // Fix nyc compiler problem

Generally I'm ok with the fact that sometimes we need to make nyc happy. But I'm not a fan INotebookMetadataLive should just be nbformat.INotebookMetadata with an optional id. Was this.notebookJson.metadata not a valid nbformat.INotebookMetadata?

rchiodo

comment created time in 4 days

push eventIanMatthewHuff/vscode-python

Ian Huff

commit sha 5b6f2baf805ede2fa69efa3bba8a6188edf51e25

update unit tests

view details

push time in 4 days

push eventIanMatthewHuff/vscode-python

Rich Chiodo

commit sha 55b4573830f28f5c121a186230cd1265c7fca010

Enable custom editor support again (#13371) * Custom editor preliminary * Enforce insiders for custom editor experiment for now * Fix pending io errors and functional test problems * Add news entry * Fix linting (forgot to turn it on for VS code insiders) * Another linter failure * Fix linter again * Fix save to actually wait

view details

push time in 4 days

Pull request review commentmicrosoft/vscode-python

don't try to prewarm an execution service

 export class PythonExecutionFactory implements IPythonExecutionFactory {      public async createDaemon<T extends IPythonDaemonExecutionService | IDisposable>(

I was thinking no, since the <> part I see as the "request" for what the user wants. Honestly IPythonDaemonExecutionService is almost the same as IPythonExecutionService so it could go together, but I felt like the distinction was important here between what users are actually request (some type of IPythonDaemonExecutionService) and the fact that if we can't create one then we just return an IPythonExecutionService.

IanMatthewHuff

comment created time in 5 days

Pull request review commentmicrosoft/vscode-python

don't try to prewarm an execution service

 export class PythonKernelLauncherDaemon implements IDisposable {          // The daemon pool can return back a non-IPythonKernelDaemon if daemon service is not supported or for Python 2.         // Use a check for the daemon.start function here before we call it.-        if (!daemon.start) {+        if (!('start' in daemon)) {

This is where I'd made the previous fix to 2.7 non-daemon launching. But that funky type coming back from the daemon creation was still causing issues in other locations (such as with prewarm) so I converted the deamon create to return the actual type union that it creates and then make sure to handle the cases that might be different for a daemon versus an execution service. I should have changed it the first time around 😞 .

IanMatthewHuff

comment created time in 5 days

push eventIanMatthewHuff/vscode-python

Ian Huff

commit sha aa275d95620466fc1891740e0c0b7f4d7218d3fa

remove funky old cast

view details

push time in 5 days

PR opened microsoft/vscode-python

don't try to prewarm an execution service

For #13258

<!-- If an item below does not apply to you, then go ahead and check it off as "done" and strikethrough the text, e.g.: - [x] ~Has unit tests & system/integration tests~ -->

  • [x] Pull request represents a single change (i.e. not fixing disparate/unrelated things in a single PR).
  • [x] Title summarizes what is changing.
  • [x] Has a news entry file (remember to thank yourself!).
  • [x] Appropriate comments and documentation strings in the code.
  • [ ] Has sufficient logging.
  • [ ] Has telemetry for enhancements.
  • [ ] Unit tests & system/integration tests are added/updated.
  • [ ] Test plan is updated as appropriate.
  • [ ] package-lock.json has been regenerated by running npm install (if dependencies have changed).
  • [ ] The wiki is updated with any design decisions/details.
+40 -17

0 comment

5 changed files

pr created time in 5 days

create barnchIanMatthewHuff/vscode-python

branch : dev/ianhu/python27PreWarm

created branch time in 5 days

push eventIanMatthewHuff/vscode-python

Mikhail Arkhipov

commit sha 793acf17856e7c25d79852aa49f50690ee1a90fe

Fix test in CI (#13368) * Fix path * Actually fix settings * Add news * Add test * Format * Suppress 'jediEnabled' removal * Drop survey first launch threshold * Fix CI test

view details

Rich Chiodo

commit sha 0441636d3c0b5350e275d4e428defb8e16f9d68f

Fix raw kernel disposed problem (#13373) * Fix intermittent problem with notebook being disposed * Fix for other promise too (caught by functional tests)

view details

push time in 5 days

Pull request review commentmicrosoft/vscode-python

Enable custom editor support again

 export class DataScienceFileSystem implements IDataScienceFileSystem {         }         return (stat.type & fileType) === fileType;     }++    private async waitForPreviousIO(uri: Uri): Promise<void> {+        const pendingPromises = this.pendingIO.get(uri.toString()) || [];+        // Errors for previous IO should be ignored (they would have been handled elsewhere)+        return Promise.all(pendingPromises).ignoreErrors();+    }++    private async synchronizedRead(uri: Uri): Promise<Uint8Array> {+        // VSCFS does not guarantee that a write followed by a read will read the data+        // from the write. We need to enforce order ourselves.

Sorry I'm not totally following this here. It's just enforcing an await on the previous operations on this file, right? Shouldn't that be enforced by awaiting on the top level commands called from outside file system code? Like, if I'm coding against DataScienceFileSystem I should be in charge of making sure my write promise has been fully resolved before I call read.

rchiodo

comment created time in 5 days

Pull request review commentmicrosoft/vscode-python

Fix raw kernel disposed problem

 export abstract class InteractiveBase extends WebViewHost<IInteractiveWindowMapp     }      protected async ensureConnectionAndNotebook(): Promise<void> {+        // Start over if we somehow end up with a disposed notebook.+        if (this._notebook && this._notebook.disposed) {

Seem good. Just reset of the notebook was disposed. So it was on of those situations where a ipynb was opened twice?

rchiodo

comment created time in 5 days

issue commentmicrosoft/vscode-python

interactive window not opening in other conda environment

@sachin02986 . Thanks for including that. From that log I'm not 100% sure on the fix yet, but I believe that I see the issue. It looks like you are trying to launch with a Python 2.7 kernel?

value, Arg 1: <Uri:c:\Users\D Drive\HRSG Cread\HGP Analytic\HGP\sba_python_om_testbed_main.py>, Arg 2: {"architecture":3,"path":"C:\\Users\\105052872\\.conda\\envs\\om_base_cloud\\python.exe","version":{"options":{"loose":false,"includePrerelease":false},"loose":false,"raw":"2.7.12-final","major":2,"minor":7,"patch":12,"prerelease":["final"],"build":[],"version":"2.7.12-final"},"sysPrefix":"C:\\Users\\105052872\\.conda\\envs\\om_base_cloud","fileHash":"aefb86e6f8650d74f76d1e2ce07e5b557beea8c2fe0b1df9dddaad106dc1f780e85418ada4df08dbd5a4986f98d1e2fe8723dd953a6b4bd8666f3cc4ffb3ae5f","companyDisplayName":"Anaconda, Inc.","type":"Conda","envPath":"C:\\Users\\105052872\\.conda\\envs\\om_base_cloud","envName":"om_base_cloud","displayName":"Python 2.7.12 64-bit ('om_base_cloud': conda)","__store":true}, Arg 3: true

We recently added a new cleaner and faster way to launch kernels, but Python 2.7 is not supported with that new method. We are supposed to have a check for the Python 2 case, but it looks like it's not working here, and it's trying to use the new launch method with 2.7.

I'm looking at fixing this, but for now you could try adding this to your settings.json file.

"python.experiments.optOutFrom": ["LocalZMQKernel - experiment"],

This will turn off our new launching experiment for everything, so the 2.7 kernel should work in this case. Hopefully we'll get a fix for this quick and you won't need to keep opting out.

sachin02986

comment created time in 5 days

issue commentmicrosoft/vscode-python

First line of output doesn't follow formatting rules

@MoosaSaadat My apologies. I know that you were working on this, but we had a duplicate bug entered for a similar issue which was just fixed (see the PR above). I think this might actually resolve your issue as well. Didn't want you to spend more time on it if it was already fixed. Sorry about that.

MoosaSaadat

comment created time in 5 days

push eventIanMatthewHuff/vscode-python

Don Jayamanne

commit sha ddbea64d2d94bbf410291e16980918ebb8c24659

Revert "Notebook undo command is same as standard undo cmd (#13293)" (#13318) This reverts commit d7c934804d70e14604304c60e4d2ab25232b7724.

view details

Don Jayamanne

commit sha 48797c5ec3b665eb41e1de970b83f1bb68950f04

Ensure we do not switch kernel if already the same (#13297)

view details

Ian Huff

commit sha b7dc6795bdb5c25c39dded0d9797a83aa95c4c0b

final bandit warning (#13314) Co-authored-by: Ian Huff <ianhuff@Ians-MacBook-Pro.local>

view details

Rich Chiodo

commit sha 9df5ef4f3b99cc8cf27dfbb8b9af1a60f085ae05

Support launching with the same directory as a notebook (#13324) * Fix working directory to come correctly on raw and local jupyter * Add a functional test for current directory and fix some issues with starting raw kernel * Fix deleting * Add news entry * Fix unit tests * Fix functional test on windows

view details

Rich Chiodo

commit sha 19ece5d5a8928d17697a490bf0683e7d6c72d12e

Disable test (#13346)

view details

Pavel Minaev

commit sha 8aa91d15949e172f80491d0f82a184a8d3e41a85

Revert "Fix #11678: Add "argsExpansion" debug property to launch.json schema (#12445)" (#13336) Removing "argsExpansion" due to #13264.

view details

Hugues Valois

commit sha 69fe28130682cd04b073182b87c814da9cb435ce

Fix a policheck warning. (#13325)

view details

Jim Griesmer

commit sha c08ef0be557ed697ef96bfe12b3820d7e4ac2e8e

Add cell navigation commands as well as a default set of keyboard bindings for most new interactive window cell commands (#13334) * Add Goto Prev/Next Cell * Add goto previous cell * Remove unneeded changes * Add default keybindings for cell commands * Goto should be Go to Co-authored-by: Jim Griesmer <jimg@live.com>

view details

David Kutugata

commit sha 754ef7ae0774a3b2ea0beb681323895e8116b222

Fixed the output being trimmed (#13349) * Fixed the output being trimmed * refactor concatMultilineString

view details

Jim Griesmer

commit sha 7e6282420520e1e9d7c9213ad8154e20061c329d

Autoscroll when extending cell select (#13353) Code change can only affect new keyboard shortcut operations

view details

push time in 5 days

delete branch IanMatthewHuff/vscode-python

delete branch : dev/ianhu/portFlakyCIFix

delete time in 8 days

push eventmicrosoft/vscode-python

Ian Huff

commit sha 7b043db075b5762445e1c0c4b24245f2d514b96e

Disable test (#13346) (#13350) Co-authored-by: Rich Chiodo <rchiodo@users.noreply.github.com>

view details

push time in 8 days

PR merged microsoft/vscode-python

Reviewers
Port Flakey CI test disable skip news

Porting Rich's disabling of this test to release so we can get a clean CI build: https://github.com/microsoft/vscode-python/pull/13346

<!-- If an item below does not apply to you, then go ahead and check it off as "done" and strikethrough the text, e.g.: - [x] ~Has unit tests & system/integration tests~ -->

  • [ ] Pull request represents a single change (i.e. not fixing disparate/unrelated things in a single PR).
  • [ ] Title summarizes what is changing.
  • [ ] Has a news entry file (remember to thank yourself!).
  • [ ] Appropriate comments and documentation strings in the code.
  • [ ] Has sufficient logging.
  • [ ] Has telemetry for enhancements.
  • [ ] Unit tests & system/integration tests are added/updated.
  • [ ] Test plan is updated as appropriate.
  • [ ] package-lock.json has been regenerated by running npm install (if dependencies have changed).
  • [ ] The wiki is updated with any design decisions/details.
+6 -1

3 comments

1 changed file

IanMatthewHuff

pr closed time in 8 days

push eventIanMatthewHuff/Samples

Ian Huff

commit sha 87da6438bbaa451540a65fdd4998ce1c8bb7ed69

ch2 done

view details

push time in 8 days

delete branch microsoft/vscode-python

delete branch : release-2020.06

delete time in 8 days

delete branch microsoft/vscode-python

delete branch : release

delete time in 8 days

Pull request review commentmicrosoft/vscode-python

Fixed the output being trimmed

 export class JupyterNotebookBase implements INotebook {         if (existing) {             // tslint:disable-next-line:restrict-plus-operands             existing.text = existing.text + msg.content.text;-            const originalText = formatStreamText(concatMultilineStringOutput(existing.text));+            const originalText = formatStreamText(concatMultilineStringInput(existing.text));

Personally I don't see the need for two functions. If the only difference is trim = true and trim = false then just have trim as an optional parameter like you suggested. Anything else is just obscuring what is really happening.

DavidKutu

comment created time in 8 days

pull request commentmicrosoft/vscode-python

Port Flakey CI test disable

I also tagged the issue to investigate the test failure that this disable was ported to release. Just in case we think a release fix is appropriate there.

IanMatthewHuff

comment created time in 8 days

PR opened microsoft/vscode-python

Port Flakey CI test disable

Porting this to release so we can get a clean CI build: https://github.com/microsoft/vscode-python/pull/13346

<!-- If an item below does not apply to you, then go ahead and check it off as "done" and strikethrough the text, e.g.: - [x] ~Has unit tests & system/integration tests~ -->

  • [ ] Pull request represents a single change (i.e. not fixing disparate/unrelated things in a single PR).
  • [ ] Title summarizes what is changing.
  • [ ] Has a news entry file (remember to thank yourself!).
  • [ ] Appropriate comments and documentation strings in the code.
  • [ ] Has sufficient logging.
  • [ ] Has telemetry for enhancements.
  • [ ] Unit tests & system/integration tests are added/updated.
  • [ ] Test plan is updated as appropriate.
  • [ ] package-lock.json has been regenerated by running npm install (if dependencies have changed).
  • [ ] The wiki is updated with any design decisions/details.
+6 -1

0 comment

1 changed file

pr created time in 8 days

issue commentmicrosoft/vscode-python

CI is failing on Multi-workspace tests - Multiple linters enabled

Note: I ported the disabling of this test into release for September since it was blocking getting a clean CI. So if there is an important fix needed make sure that we get it ported to release as well.

rchiodo

comment created time in 8 days

create barnchIanMatthewHuff/vscode-python

branch : dev/ianhu/portFlakyCIFix

created branch time in 8 days

Pull request review commentmicrosoft/vscode-python

Fixed the output being trimmed

 export class JupyterNotebookBase implements INotebook {         if (existing) {             // tslint:disable-next-line:restrict-plus-operands             existing.text = existing.text + msg.content.text;-            const originalText = formatStreamText(concatMultilineStringOutput(existing.text));+            const originalText = formatStreamText(concatMultilineStringInput(existing.text));

If it is ok to use like this, might want to rename it. Just looks funky processing output with something called concatMultilineStringInput.

DavidKutu

comment created time in 8 days

pull request commentmicrosoft/vscode-python

Port cell navigation keyboard shortcuts to release

This didn't have a news entry checking into master did it? If not, then good to go.

greazer

comment created time in 8 days

Pull request review commentmicrosoft/vscode-python

change language server from Jedi when creating native notebooks

 export class NotebookEditor implements INotebookEditor {         private readonly configurationService: IConfigurationService,         disposables: IDisposableRegistry     ) {+        this.disableJedi();

If I was looking for it I'd very much be looking where the run startup commands and matplot configs get set. Can we tell if we are native only at that point?

DavidKutu

comment created time in 8 days

pull request commentmicrosoft/vscode-python

Disable flakey CI test

Generally I'm not a nag mail fan. But maybe we need something that sends mail / Teams messages when a test has failed for X number of CI runs. Or maybe just generally when it has been X amount of time since an insiders build has been generated.

rchiodo

comment created time in 8 days

Pull request review commentmicrosoft/vscode-python

change language server from Jedi when creating native notebooks

 export class NotebookEditor implements INotebookEditor {         private readonly configurationService: IConfigurationService,         disposables: IDisposableRegistry     ) {+        this.disableJedi();

Hang on a second. All the rest of the start / startup commands are all in the notebook base. That is what the issue says, but why would this change be native only?

DavidKutu

comment created time in 8 days

more