We can't use `nonModal` here as we are in a modal dialog already, but any isn't good either because we need to access a workspace
GitOrigin-RevId: eefde20c1ea9c4ac3bcf1ef3a9fe2f515cc7d33c
`PythonSdkUtil` duplicates VER logic. One Jython-specific thing was also removed as we do not need Jython anymore
GitOrigin-RevId: 658fc42b485ac074a6d89fce3c7408e51cdc8f95
1. Move constant to decouple from other classes
2. newtypes instead of path
3. no need to have more than 1 python binary
GitOrigin-RevId: 277cc1e6ffbb681642b1148f7f5c8f8867833d8c
If you see any problems with your spellchecking strategy, please feel free to remove DumbAware from it. Or, you can make it dumb-aware by avoiding using indexes in dumb mode
The only strategies that are not DumbAware at the moment are:
- JavaSpellcheckingStrategy
- JSSpellCheckingStrategy
GitOrigin-RevId: 74781cf1ebd9b58669396bf7b1c03a839019f12b
`PythonSdkFlavor` detects pythons.
It uses `VirtualEnvReader` under the hood (see virtual env flavor) and system pythons (see other flavors).
We use it in `PythonLocalAddInterpreterModel` and cover it with tests
PY-74425 WIP, PY-74236: `VirtualEnvReader` shouldn't return `null` nor should it check for dir existence, use `getVEnvRootDir` as a default dir for venv.
The whole logic behind `VirtualEnvReader` is the following: we check for some env variable, and if it points to the correct path -- we use it. We fall back to the home directory otherwise.
Directory doesn't need to exist (hence, no need to check `isDirectory`) because a client might always create it.
Even worse: directory would probably not exist on a fresh OS, but a user still wants to create virtual envs there.
PY-74425 WIP: Encapsulate python names and patterns inside `VirtualEnvReader`.
`VirtualEnvReader` seems to be the main entry point to look for virtual envs on the local file system.
Historically, flavors did that, so they had a set of names and patterns to filter python by name, however:
1. `UnixPythonSdkFlavor` had named for **nix only, and `VirtualEnvSdkFlavor` had names both for Windows and **nix. It is unlikely to see a `.exe ` file on **nix or file, without an extension on Windows, so this check is useless and broken (`VirtualEnvSdkFlavor` checks for both names on both OSes)
2. `UnixPythonSdkFlavor` had regex to filter Python2, but this python was removed 4 years ago and could hardly be met on any new OS; hence this check is useless.
3. New Project Wizard needs to find pythons, but knows nothing about names and patterns.
Merge-request: IJ-MR-142040
Merged-by: Ilya Kazakevich <ilya.kazakevich@jetbrains.com>
GitOrigin-RevId: ce649b4f12f7c7b60a25d8e1fb1222e075337844
1. Use a map instead of getter.
2. All functions that access IO must have a BG thread requirement.
GitOrigin-RevId: 03299dcf8c8a8722f39aa90a5777c616aaa2ade1
* PEP 8 inspection has "No highlighting" severity after PY-73129
* Let's set it back to "Weak Warning" for the tests
(cherry picked from commit 843bab9ca238e7f29a45374043d5d6e337629bc4)
IJ-MR-141929
GitOrigin-RevId: 79d0fb7d61ef1d443c5bcc1ad943731f5ecec290
* now we don't ignore do_trim parameter
* fixed take_first_n_coll_elements: added a missed str type
GitOrigin-RevId: 8aa22974050f44fff1605ba66ca20696df9e401b
Current implementation doesn't destroy envs, created by tests, so it might be useful to create a fixture to do that as it is done for Conda.
This change makes `VanillaPythonEnvExtension` to look for Python with Poetry and install its path to `PropertiesComponent`.
See `PoetryTest` as an example
GitOrigin-RevId: 3d66a46a8e9b80d85e7bf47b1bf27eeb562c218b
Interpreter creation logic might work against a project or a module. In the latter case a project is a module field.
See `ModuleOrProject` for description.
We also added logic to the `PythonAddLocalInterpreterPresenter.basePathForEnv`: it now uses module root if possible.
Merge-request: IJ-MR-141583
Merged-by: Ilya Kazakevich <ilya.kazakevich@jetbrains.com>
GitOrigin-RevId: 0ef23feb6a2407331c48b9b69caabefc8625a455