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
DO:
For upper-level (public) API use `PyResult`.
(Optionally) for low-level APIs inside your modules use python `Result<S, E>`.
Represent errors as `PyError` whenever possible.
Report `PyError` to `ErrorSink` at the top of your code.
DON'T:
Use `kotlin.Result`
Use `PyExecutionException`
Use any exception to represent user errors.
GitOrigin-RevId: 4ecf69e1fae8be9192cd33b90e0147c725a98964
There is a list of `PythonSelectableInterpreter` which should be sorted and filtered.
`PythonSelectableInterpreter`s are comparable now: we can sort them by type (using `uiCustomization` hash) and then by language.
There is a `sortForExistingEnvironment` function that implements the core logic of this patch.
The test is `SortForExistingEnvironmentTest`, but we also run `DetectedSelectableInterpreterSortTest` several times to make sure the order is not broken.
Merge-request: IJ-MR-161055
Merged-by: Ilya Kazakevich <ilya.kazakevich@jetbrains.com>
GitOrigin-RevId: 030e1b3fd171b2c41ca3473abde90607b95a9414
Wrong function was used: one must use either sdk modification or special helper function that commits the model.
GitOrigin-RevId: 343e536a195170654ddfef7de42f505806405c9e
1. Make SDK->Module association function `suspend` to make it testable (one can't test something that runs code by `invokeLater`)
2. Add SDK->Module associations checks into `ensureSdkIsUsable` test tool.
3. Rename fields in v2 widgets to emphasize their purpose.
4. Make this association default for `pyVenv` fixture.
GitOrigin-RevId: 58267750b6dda0b596183c8bd335ce75b00fd41d
We use bundled venv to create virtual envs because system python might not have one. However, if it does, it must be compatible with the one we bundle. A new version was released 31.mar.2025. When installed, it breaks our bundled one.
So, we bundled a version. It doesn't work with Py2 though, dus we now check language level.
GitOrigin-RevId: cc7ff994bf32ef4333908321c6bb189a0e9ca9e5
Short after project creation, so-called sdk-configuration process starts and substitutes sdk with whatever it finds.
This isn't happen for projects, created with `isProjectCreatedWithWizard`.
There is also sdk validation inspection that checks if sdk is valid. It caches results, so after new project creation it is generally good idea to clear the cache.
We also mark project trusted explicitly, so once you have all your settings deleted, you can still open this project. There is no API to test it for now
GitOrigin-RevId: 69141efc6ad36982b26602f9b34982fd7a71cb28