Skip to content

Commit deda8dc

Browse files
olliemathKartik Rajkarthiknadig
authored
Add pypy compatability to pyvsc-run-isolated.py (microsoft#15968)
* Add pypy compatability to pyvsc-run-isolated.py Assigning a generator to a slice does not work under pypy3.7, causing microsoft#15960 * Add missing news file * Update news/2 Fixes/15968.md Co-authored-by: Karthik Nadig <kanadig@microsoft.com> Co-authored-by: Kartik Raj <karraj@microsoft.com> Co-authored-by: Karthik Nadig <kanadig@microsoft.com>
1 parent f6d5c58 commit deda8dc

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

‎news/2 Fixes/15968.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Added compatability with pypy3.7 interpreter.
2+
(thanks [Oliver Margetts](https://github.com/olliemath)

‎pythonFiles/pyvsc-run-isolated.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def normalize(path):
1717
# We "isolate" the script/module (sys.argv[1]) by removing current working
1818
# directory or '' in sys.path and then sending the target on to runpy.
1919
cwd = normalize(os.getcwd())
20-
sys.path[:] = (p for p in sys.path if p != "" and normalize(p) != cwd)
20+
sys.path[:] = [p for p in sys.path if p != "" and normalize(p) != cwd]
2121
del sys.argv[0]
2222
module = sys.argv[0]
2323
if module == "-c":

0 commit comments

Comments
 (0)