Instead of old `addManuallyAddedInterpreter` we now have two functions: one that requires system python and one that doesn't.
Both functions register system python if provided, but the latter one accepts any python (venv included).
Various "selectors" use these functions.
We also make sure no non-system python is set to `baseInterpreters`: base are always system!
As a bonus, we show "system" or "virtual env" title near interpreter.
It now checks that python is system (see `ensureSystemPython`).
Non-system pythons are never reported, and `registerSystemPython` also returns an error for non-system pythons
We need `execGetBoolFromStdout` for the further changes
Merge-request: IJ-MR-182415
Merged-by: Ilya Kazakevich <ilya.kazakevich@jetbrains.com>
(cherry picked from commit 2950f5f0cd2745c12987a92e40774d366568f312)
GitOrigin-RevId: f30e9a6cd7b5d103454d66f26a0c2282d7c587fc
Utility method to map `Result<S, E>`` into `Result<S, E2>`` is required for the next changes
(cherry picked from commit 811ddf171794ffdf20f77de6c735ac7ac19ce30a)
GitOrigin-RevId: b13ddca080644357a738ffc10795703d11b18d97
Each tool (uv, poetry) now has `common` and `backend` part. `common` has icons because we need them both on the front and on the back.
We might need to create `front` module also if we wouldn't be able to use icons in compose.
GitOrigin-RevId: 560b5aa67e4e747a1653ad6e4f780301a3fae289
There was a problem with detecting system-wide pythons, which relied on
binary not being a part of conda env or virtualenv. But it led to
unrelated Hatch and Poetry pythons automatically configured as
interpreters in new projects. Another problem is that free-threaded
python was chosen as default interpreter with highest priority because
of the newest version.
This change uses SystemPythonService to detect system pythons properly,
also free-threaded python used as a default interpreter only if it's the
only available option.
Merge-request: IJ-MR-179008
Merged-by: Alexey Katsman <alexey.katsman@jetbrains.com>
GitOrigin-RevId: 73bc98aed2918c44832b57f22b86c9c7d17a4301
153 modules which contain classes used from external plugins from the Marketplace are marked as public. This is needed to ensure that it'll be possible to use that API after converting code from these external plugins to content modules.
GitOrigin-RevId: dc48e8970041fddd3bf50d280711e95ce9e9ad9b
This module listens for topic that model was just rebuilt from `pyproject.toml` and does its best to configure SDK.
It will support UI to make this process configurable
GitOrigin-RevId: c752c94385814b5fc4413316c0d9d4cc2adb41e4
* will be used by the Process Tool Window to show the context of the executed command
Merge-request: IJ-MR-176530
Merged-by: Vitaly Legchilkin <Vitaly.Legchilkin@jetbrains.com>
GitOrigin-RevId: 70d41845943b5c19b0647ef4711b16f48c53b28c
Look `src/com/jetbrains/python/sdk/sdkExecApi.kt` for method that executes SDK and returns a process.
See `PySdkOnTargetTest` as a usage example.
Merge-request: IJ-MR-171740
Merged-by: Ilya Kazakevich <ilya.kazakevich@jetbrains.com>
GitOrigin-RevId: a7e9b6995eba7ae1fa71019b370acca2d98738d2
API changes:
Class `Args` is not used to provide arguments for commands. Previous implementation was incompatible with Targets.
Instead of `Path` we now accept `BinaryToExec` which is either Eel or Target based.
Impl:
`ExecServiceImpl` now delegates execution to `com.intellij.python.community.execService.impl.processLaunchers`: there are two functions (Eel and Targets)
Merge-request: IJ-MR-171488
Merged-by: Ilya Kazakevich <ilya.kazakevich@jetbrains.com>
GitOrigin-RevId: 4c4ac7023e6605caaacb1880d60faf145b4160bf
SSH is now target-based and we can't use `EelPath` with it. So we now have two types of `ExecError.exe`.
Test is going to be created as next commit
GitOrigin-RevId: 6bc56eb9770caeb7ba32c8f43e6f374fcf5a3325
`PyError.message` contains the full log: all `orReturn("some text")` messages.
While they help user sometimes, some of them duplicate otuput and mustn't be displayed two times.
GitOrigin-RevId: 9a726cfcc8cb6b23825adc5d7dd505e1b8afd9c2
Use `ExecService` `api.kt` to exec any binary and extensions from `execService.python/api.kt` for python-specific things (i.e helpers)
GitOrigin-RevId: bb217798a9d1ee886c4b12220ec1f66a5ef08336
* introduce PyResult.localizedError() (instead of failure()
* get rid of obsolete kotlin.Result.failure(..) extension
* add errorOrNull to python.Result, to access it from Java classes
Merge-request: IJ-MR-163973
Merged-by: Vitaly Legchilkin <Vitaly.Legchilkin@jetbrains.com>
GitOrigin-RevId: 2bd8336cf4c53170eea5d050f609fd64541ebd99
1. `ProcessOutput` is a legacy thing with some redundant flags: replaced with modern `EelProcessExecutionResult`.
2. There was a bug in `ProcessInteractiveHandler`: one could fetch all data from stdout, and we then did that again to get a result. That leads to an empty result. It is now fixed, see `executeInteractive` doc.
GitOrigin-RevId: 7fa57f8110a202a32a3531ff6507d42a270075a3