After this refactoring we how have `comparators.kt` with sorting logic that is used both by `SystemPython` and `PythonSelectableInterpreter` (ViewModel thing for V2).
Tests are also added.
GitOrigin-RevId: 9d04405829f31874d15cb893d9261c7997cb2dd5
Extract various classes to the shared modules, `ExecutablePython` now has `env` map as it can be used by conda.
GitOrigin-RevId: eb45ea29f49132fa4f91c979f71453e6a2ade344
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
According to feedback, the name `upgrade` confuses people.
We refused `getEelApi` because this call usually implies a getter, and a getter usually implies some lightweight operation.
We refused `make`, `convert`, `get` and other short methods because they're as confusing as `upgrade`.
GitOrigin-RevId: 56adf5362f93bc4f98954db79c039e5e898b4550
People usually struggle to run a Gradle script to install pythons, so we:
1. Tell them explicitly what to do.
2. Provide `PYTHON_FOR_TESTS` env var they can point to Python.
GitOrigin-RevId: 06337f1f7d831f1d4b1e94134bdc78c2db2a08dc
If we access `SystemPythonServiceImpl` before the Application is fully loaded (i.e. `com.intellij.python.junit5Tests.env.systemPython.SystemPythonRootsFixer.execute`), we might encounter an error:
```
Registry key python.system.refresh.minutes is not defined
```
With this change we access Registry lazily and, unlike `Registry.get`, `RegistryManager` async service is fully safe: it just suspends until the Registry is available.
Merge-request: IJ-MR-160727
Merged-by: Ilya Kazakevich <ilya.kazakevich@jetbrains.com>
GitOrigin-RevId: ef56cfee7b15907c7c99b859b5704b6fcef66b01
We execute `--version` to find python version.
Since 3.4 Python uses stdout for output, but before that it used stderr.
We now check both: stdout and stderr.
GitOrigin-RevId: ca9059b71cabbd1a94e26523192cdf9eeb8c1eb1
1. Preload pythons from a project start activity
2. Cache them for some time (see `cache` variable)
3. Provide API to refresh
Merge-request: IJ-MR-158389
Merged-by: Ilya Kazakevich <ilya.kazakevich@jetbrains.com>
GitOrigin-RevId: 8b58ad3f35f144364d4103578d20a3cfc9b637f2
1. No need to use shell to expand simple vars for local execution.
2. Check pythons (sys and venv) in parallel (see `PythonWithLanguageLevelImpl`)
GitOrigin-RevId: d5432b12452a6a64213cd9da59a7d94e1ae2aa11
We now use `SystemPythonService` to look for system pythons and validate new pythons against it.
GitOrigin-RevId: c06201cd03f7e1cb060a44c4578dd71f8bb05df6
With this change we can move conda into the separate module to decouple test framework from community.impl
GitOrigin-RevId: 589dc29f39d9d46252681c8f31b8fe482e63595f
PythonCore consists of several v1 modules (they aren't v2 modules in its content, but bare v1 modules to be packed directly in it).
They used to have `com.jetbrains` package to match plugin's package.
I now removed plugin package and moved modules to the appropriate packages.
https://jetbrains.slack.com/archives/CMDBCUBGE/p1738073999835749?thread_ts=1738008244.276339&cid=CMDBCUBGE
GitOrigin-RevId: 5702998a23598d4aa363064025afad8951faf7f7