Skip to content

Commit 530e322

Browse files
committed
Merged PR posit-dev/positron-python#358: use unique cache directories for vendored parso
Merge pull request #358 from posit-dev/fix-parso-cache use unique cache directories for vendored `parso` -------------------- Commit message for posit-dev/positron-python@cfdcbb6: use unique cache directories for vendored `parso` Addresses #2120. Authored-by: Wasim Lorgat <[email protected]> Signed-off-by: Wasim Lorgat <[email protected]>
1 parent 6456b10 commit 530e322

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
We append `-Positron` to the `_VERSION_TAG` so that our cache directories don't overlap with a parso
2+
installation in the user's environment. The vendored parso has a different import path than the user's,
3+
so using the same cache can cause unexpected errors.
4+
5+
diff --git a/pythonFiles/positron/_vendor/parso/cache.py b/pythonFiles/positron/_vendor/parso/cache.py
6+
index 5592a9fdd..98b903aaa 100644
7+
--- a/pythonFiles/positron/_vendor/parso/cache.py
8+
+++ b/pythonFiles/positron/_vendor/parso/cache.py
9+
@@ -49,7 +49,7 @@ are regarded as incompatible.
10+
- A __slot__ of a class is changed.
11+
"""
12+
13+
-_VERSION_TAG = '%s-%s%s-%s' % (
14+
+_VERSION_TAG = '%s-%s%s-%s-Positron' % (
15+
platform.python_implementation(),
16+
sys.version_info[0],
17+
sys.version_info[1],

0 commit comments

Comments
 (0)