From 6d732f5624df13801961a7c4e2a9248e39cb85c3 Mon Sep 17 00:00:00 2001 From: Ilya Kazakevich Date: Mon, 24 Nov 2025 21:21:09 +0000 Subject: [PATCH] link/fix-system-pythons [python]: `PathShortenerTest`: do not throw an exception for relative paths. `EelPath` is always absolute, so we used to throw an exception if relative path was provided. It makes no sense to substitute anything in relative path, so we simply return it as is. [python]: `SystemPythonService`: remove duplicates. Merge-request: IJ-MR-183231 Merged-by: Ilya Kazakevich GitOrigin-RevId: c391a55fda0f372184279e444e9188f71bceba3e --- .../src/com/jetbrains/python/PathShortener.kt | 6 ++++- .../systemPython/systemPythonServiceImpl.kt | 5 +++- .../SystemPythonServiceShowCaseTest.kt | 24 ++++++++++--------- 3 files changed, 22 insertions(+), 13 deletions(-) diff --git a/python/openapi/src/com/jetbrains/python/PathShortener.kt b/python/openapi/src/com/jetbrains/python/PathShortener.kt index 9b09c1567c3b..19fdda2a92a5 100644 --- a/python/openapi/src/com/jetbrains/python/PathShortener.kt +++ b/python/openapi/src/com/jetbrains/python/PathShortener.kt @@ -11,6 +11,7 @@ import com.intellij.platform.eel.provider.getEelDescriptor import com.jetbrains.python.PathShortener.Companion.create import org.jetbrains.annotations.ApiStatus import java.nio.file.Path +import kotlin.io.path.pathString /** * Replaces homepath with tilda and some well-known Windows vars as well. @@ -58,10 +59,13 @@ class PathShortener private constructor(private val map: List