Skip to content

Commit b0c159f

Browse files
authored
Merge from main (microsoft#14040)
1 parent d146fd7 commit b0c159f

77 files changed

Lines changed: 1860 additions & 516 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/test_plan.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -492,6 +492,13 @@ def test_failure():
492492
1. Verify the variables explorer window shows output not available while debugging
493493
1. When you get to the end of the cell, the debugger should stop
494494
1. Output from the cell should show up in the Interactive Window (sometimes you have to finish debugging the cell first)
495+
- [ ] Verify installing ipykernel in a new environment
496+
1. Create a brand new folder on your machine
497+
1. Create a new venv in that folder via command line / terminal `python3 -m venv .newEnv`
498+
1. Open that folder in VS Code and copy the manual test file there
499+
1. Select the newly created venv by running Ctrl+Shift+P, typing 'Python: Select Interpreter' into the VS Code command palette, and selecting the new venv from the dropdown. If the new venv doesn't appear in the quickpick you may need to reload VS Code and reattempt this step.
500+
1. Execute the manual test file, you should be prompted to install ipykernel in `.newEnv`
501+
1. After ipykernel is installed execution of the file should continue successfully
495502

496503
#### P1 Test Scenarios
497504

experiments.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,13 @@
9393
"name": "LocalZMQKernel - experiment",
9494
"salt": "LocalZMQKernel",
9595
"min": 0,
96-
"max": 75
96+
"max": 100
9797
},
9898
{
9999
"name": "LocalZMQKernel - control",
100100
"salt": "LocalZMQKernel",
101-
"min": 75,
102-
"max": 100
101+
"min": 0,
102+
"max": 0
103103
},
104104
{
105105
"name": "CollectLSRequestTiming - experiment",

news/1 Enhancements/14027.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Upgraded to isort `5.5.3`.

news/2 Fixes/13942.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix isolate script to only remove current working directory.

news/2 Fixes/13955.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Make sure server name and kernel name show up when connecting.

news/2 Fixes/13956.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Correctly install ipykernel when launching from an interpreter.

news/2 Fixes/13981.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Backup on custom editors is being ignored.

news/2 Fixes/14016.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Have Custom Editors load on editor show unless autostart is disabled.

pythonFiles/interpreterInfo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
obj = {}
88
obj["versionInfo"] = tuple(sys.version_info)
99
obj["sysPrefix"] = sys.prefix
10-
obj["version"] = sys.version
10+
obj["sysVersion"] = sys.version
1111
obj["is64Bit"] = sys.maxsize > 2 ** 32
1212

1313
print(json.dumps(obj))

pythonFiles/pyvsc-run-isolated.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,20 @@
44
if __name__ != "__main__":
55
raise Exception("{} cannot be imported".format(__name__))
66

7+
import os
78
import os.path
89
import runpy
910
import sys
1011

11-
# We "isolate" the script/module (sys.argv[1]) by
12-
# replacing sys.path[0] with a dummy path and then sending the target
13-
# on to runpy.
14-
sys.path[0] = os.path.join(os.path.dirname(__file__), ".does-not-exist")
12+
13+
def normalize(path):
14+
return os.path.normcase(os.path.normpath(path))
15+
16+
17+
# We "isolate" the script/module (sys.argv[1]) by removing current working
18+
# directory or '' in sys.path and then sending the target on to runpy.
19+
cwd = normalize(os.getcwd())
20+
sys.path[:] = (p for p in sys.path if p != "" and normalize(p) != cwd)
1521
del sys.argv[0]
1622
module = sys.argv[0]
1723
if module == "-c":

0 commit comments

Comments
 (0)