105 Commits
Author SHA1 Message Date
Vitaly Legchilkinandintellij-monorepo-bot eab2b8b719 PY-87191 Always provide system Python when setting up Poetry environment
- Extract PyVersionSpecifiers from Poetry-specific PoetryPythonVersion
  into python-community-openapi for reuse across subsystems
- Add PyVersionSpecifiers parameter to PythonInstallerService.installLatestPython()
  so installation respects pyproject.toml version constraints
- Pass version specifiers from getSystemPython() through to the installer
- Move pyproject.toml python-version parsing to pyproject PSI utilities
- Replace PoetryPyProjectTomlPythonVersionsService internals with PyVersionSpecifiers


(cherry picked from commit 5ef8f7cb3430826ee38cd80ab460ea4a52da919a)

IJ-MR-193218

GitOrigin-RevId: a989e2dffd5b3081db526b703f9cc6085eac96d5
2026-02-26 12:50:57 +00:00
Ilya Kazakevichandintellij-monorepo-bot 2cbfd1a42d PY-87542, IJPL-234101: Do not touch removed container eel descriptor in tests.
PY-87542, IJPL-234101: (technical fix): suppress test dependencies check.

There is a bug in `IdeaUltimatePackagingTest` and reports several dependencies as redundant. But they aren't. I've been told by Develar to suppress it for now.

PY-87542, IJPL-234101: Support `SystemPythonService` python detection on WSL and Docker/Windows.

Enable `UnixSystemPythonProvider` on Windows so it can find WSL and Docker pythons even when host is Windows. We need it to test Docker descriptor support on Windows, and it is generally good thing to have.

To do that, we need to fix `directories` (`Path(""/foo/bar")` doesn't work on Windows JVM.

`collectPythonsInPaths` was also broken: `Path` isn't a string: it is a path (either real or eel path) with eel descriptor inside.

PY-87542, IJPL-234101: Do not touch removed container eel descriptor in tests.

`SystemPythonService` caches eel descriptors and looks for pythons in background.

`VirtualEnvReaderEelTest` called it for Docker, and removed the container shortly after, effectively left `SystemPythonService` with unusable descriptor that throws random (undocumented) exceptions from `toEelApi`.

Eel descriptor for Docker lifetime is somewhat blur (must be discussed with Eel team) so for now we mark it "ephemeral" which means we never cache it: see `EelDescriptorFilter`


Merge-request: IJ-MR-191348
Merged-by: Ilya Kazakevich <ilya.kazakevich@jetbrains.com>

GitOrigin-RevId: e007e09b2e8a496105e9a8a269916981823c7f78
2026-02-14 23:16:18 +00:00
Leonid Shalupovandintellij-monorepo-bot 188b7ef96f IJI-3282 Optimize imports
GitOrigin-RevId: 3b5c00d8ff20b8d0bb6005bc450921085d2da9b2
2026-01-31 17:03:42 +00:00
Alexey Katsmanandintellij-monorepo-bot 9ebdd29d37 PY-87232 Change venv module name
GitOrigin-RevId: faf2719abc6236f93840f7a2e34e58eec9f6e868
2026-01-29 13:25:49 +00:00
Ilya.Kazakevichandintellij-monorepo-bot 86fbbb50fe tests [python]: Fix intellij.python.community.services.systemPython dep. for JUnit4.
Module `intellij.python.community.services.systemPython` is required by both: JUnit4 and JUnit5 tests.

For 5, we have it as a part of `intellij.python.junit5Tests.plugin`.

GitOrigin-RevId: 538d66caf2dc9f081565d1ca901bdb2df9313b10
2026-01-28 23:13:21 +00:00
Alexey Katsmanandintellij-monorepo-bot 0dada0f9c1 PY-86991 Remove Python sdk configurators dialogs
Dialogs are no longer used in sdk configurators, so those were removed.

System pythons are sorted in a way so that free-threaded Python won't be
the first one (as it's unstable and may cause issues when used as a
default for venv creation).

Venv creation is now the default fallback, so that we won't use system
python as an interpreter.

SdkCreator won't return nullable SDK anymore. Also WSL sdk configurator
should be supported by respective tools, no need in a separate
configurator.

GitOrigin-RevId: 4db65e50363ced52a9ab468c56191095354d3fa2
2026-01-27 20:03:34 +00:00
Ilya.Kazakevichandintellij-monorepo-bot d50a714a98 cleanup [python]: Use fake ctor instead of static Instance field for VirtualEnvReader.
Use `VirtualEnvReader()` instead of `VirtualEnvReader.Instance` as it is shorter and more idiomatic

Space-RevId: 58448643037948f1e7dc2e84303844b50bd56ee9

GitOrigin-RevId: 35d5b67b8a2d2964ec4b5f611b0f081ac722be2a
2026-01-22 04:24:57 +00:00
Ilya.Kazakevichandintellij-monorepo-bot dc601f0dca tests [python]: Survive FSE when accessing pythons from the store.
GitOrigin-RevId: dc13d59d2efd3110b318e6ed9446d33ae15f2d07
2026-01-13 05:35:52 +00:00
Anton Efimchukandintellij-monorepo-bot 4f5b07293f PY-86778 [python] Migrate Python test environments from local builds to prebuilt standalone distributions
Replace Gradle-based local Python compilation with prebuilt standalone distributions
downloaded from JetBrains cache redirector. Introduces provider-based architecture
for test environment management with improved JUnit4/JUnit5 integration.

Key changes:
- Remove setup-test-environment Gradle module and build infrastructure
- Introduce python-test-env modules (core, common, plain, conda, uv, junit4, junit5)
- Implement PyEnvironmentProvider/PyEnvironmentSpec abstractions
- Add JUnit5 annotations (@RequiresPoetry, @RequiresUv, @RunOnEnvironments)
- Implement caching system with PyEnvDownloadCache and variant-specific directories
- Predefined environments like: VANILLA_2_7, VANILLA_3_11, VANILLA_3_12, VANILLA_3_13

Benefits:
- Faster test environment provisioning (no compilation required)
- Consistent cross-platform behavior with identical Python builds
- Improved reliability by eliminating platform-specific build failures
- Better test framework integration with parameterized environment testing

GitOrigin-RevId: a44957c3014f9e1fc7dbec347a7e245675f999c1
2026-01-10 00:33:44 +00:00
Yuriy Artamonovandintellij-monorepo-bot 9514b1d461 [platform] IJPL-224518 Cleanup private modifier usages with extensions/services in intellij.python.*
GitOrigin-RevId: 8a3b9d6763dbb00e30c9266ca1decc9803ef6304
2025-12-22 22:17:32 +00:00
Vladimir Krivosheevandintellij-monorepo-bot a0a2234f29 IJPL-224042 IJ-MR-184958 IJ-MR-184993 IJ-MR-179029 IJ-MR-184126 IJ-MR-181153 IJ-MR-146078 IJ-MR-175479 IJ-MR-186058 fix direct use of hamcrest
GitOrigin-RevId: d6df96d87f85db8966bbe260afe071992832593d
2025-12-20 16:34:23 +00:00
Ilya Kazakevichandintellij-monorepo-bot 5d4fd17a0f [python] PY-83776: Python list can't be sorted due to "Comparison method violates its general contract!".
`com.intellij.python.community.services.shared.PythonInfoWithUiComparator` sorts by `PythonInfoComparator` and then by `UiComparator`.

It used to multiply first result to `10` trying to shift it one digit left, but `compare` contract doesn't guarantee anything except the sign. It could be `-233` for certain tool names (i.e: different lengths, different characters with a huge distance between their codes).

We now only check contract


Merge-request: IJ-MR-186470
Merged-by: Ilya Kazakevich <ilya.kazakevich@jetbrains.com>

GitOrigin-RevId: 89e9b3de2bd0e4b46d1c213f3b262dd698462275
2025-12-19 15:58:25 +00:00
Ilya.Kazakevichandintellij-monorepo-bot 15809e6ed1 cleanup [python]: Use trace instead of debug in python sorting logic.
it is semantically `trace`.

GitOrigin-RevId: 8cb140d22ecbabdb74b3764174538067109eda0f
2025-12-19 05:10:42 +00:00
Vladimir Krivosheevandintellij-monorepo-bot 56bf43d2a9 IJPL-220739 IJ-MR-179029 IJ-MR-175479 IJ-MR-184126 convert kotlinx-coroutines-core lib to product module
GitOrigin-RevId: cb29d371d95f2e59ea722906c35dacf87992de97
2025-12-01 21:40:00 +00:00
Andrii Zinchenkoandintellij-monorepo-bot 092344bb30 [eel] IJPL-217770: Decouple EelDescriptor and EelMachine through EelMachineProvider
GitOrigin-RevId: 407055c63d852a064a689679f49a0beb06b8d205
2025-11-28 20:54:11 +00:00
Ilya Kazakevichandintellij-monorepo-bot 6d732f5624 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 <ilya.kazakevich@jetbrains.com>

GitOrigin-RevId: c391a55fda0f372184279e444e9188f71bceba3e
2025-11-24 21:21:09 +00:00
Ilya Kazakevichandintellij-monorepo-bot 679db704aa [python]: PY-85585 : Do not display vens as system pythons in "Add new interpreter" window.
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>

GitOrigin-RevId: 2950f5f0cd2745c12987a92e40774d366568f312
2025-11-19 14:24:40 +00:00
Ilya.Kazakevichandintellij-monorepo-bot 3a3053b63b [python] cleanup: Introduce PathSortener.shorten and obey case sensitivity.
1. utility method added
2. paths checked with correct case sensitivity

GitOrigin-RevId: a2d0917df2a1e4f0a1d3d33fbb1f403d1342cf8c
2025-11-14 05:37:37 +00:00
Nikolay Chashnikovandintellij-monorepo-bot 9888c763e4 [plugin model] use internal visibility for content modules which are used from test plugins (IJPL-206556)
Currently, we don't have a special 'visible for testing' variant of the visibility modifier, so we need to mark such modules as internal to avoid errors after the visibility checks are enabled at runtime.

Reviewed in IJ-MR-180677.

GitOrigin-RevId: 1dcff728cc567e0c9c4055285b279402b7e5e030
2025-11-04 10:12:54 +00:00
Alexey Katsmanandintellij-monorepo-bot efa8a7a246 [python] PY-84777 Use system pythons as a fallback for SDK configuration
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: f32238b063575a125642ee91984ed45ba47010ec
2025-10-21 12:52:02 +00:00
David Lysenkoandintellij-monorepo-bot f9835df460 PY-81494
[pycharm] PY-81494 Fix further flakiness

[pycharm] PY-81494 Address feedback

[pycharm] PY-81494 Fix flakiness

[pycharm] PY-81494 Separate modules

[pycharm] PY-81494 Fix tests

[pycharm] PY-81494 Change waitFor to awaitExit for coroutines

[pycharm] PY-81494 Configuration fixes

[pycharm] PY-81494 Add usage statistics

[pycharm] PY-81494 Address feedback

[pycharm] PY-81494 Add more limit tests

[pycharm] PY-81494 Post-rebase fixes

[pycharm] PY-81494 Implement logging tests

[pycharm] PY-81494 Final design adjustments

[pycharm] PY-81494 Refactor flows

[pycharm] PY-81494 Add more OutputSection tests

[pycharm] PY-81494 Add Toolbar tests

[pycharm] PY-81494 Add InterText tests

[pycharm] PY-81494 Add FilterActionGroup tests

[pycharm] PY-81494 Add EmptyContainerNotice tests

[pycharm] PY-81494 Add CollapsibleListSection tests

[pycharm] PY-81494 Add ActionIconButton tests

[pycharm] PY-81494 Address feedback

[pycharm] PY-81494 Address feedback

[pycharm] PY-81494 Post-rebase fixes

[pycharm] PY-81494 Address initial feedback

[pycharm] PY-81494 Fix existing tests & add new to tree

[pycharm] PY-81494 Implement copy to clipboard button

[pycharm] PY-81494 Amend design

[pycharm] PY-81494 Begin implementing output tests

[pycharm] PY-81494 Refactor file structure

[pycharm] PY-81494 Implement tests for process list

[pycharm] PY-81494 wip tests for process list

[pycharm] PY-81494 Finishing touches

[pycharm] PY-81494 Consolidate list logic in the model

[pycharm] PY-81494 Add logging limits

[pycharm] PY-81494 Implement open tool window on exec service error

[pycharm] PY-81494 Implement open command in terminal

[pycharm] PY-81494 Add expansion actions

[pycharm] PY-81494 Implement categorization by coroutine names

[pycharm] PY-81494 Memorize expansion states between tool window openings

[pycharm] PY-81494 Memorize scroll state between tool window openings

[pycharm] PY-81494 Introduce collapsible section for process info

[pycharm] PY-81494 Implement view setting filtering

[pycharm] PY-81494 Refactor process logging to use shared flows

[pycharm] PY-81494 Implement tests for ProcessList composable

[pycharm] PY-81494 Implement process toolwindow prototype


Merge-request: IJ-MR-176106
Merged-by: David Lysenko <david.lysenko@jetbrains.com>

GitOrigin-RevId: 16ffe4980f92254afd269f5c65bb5cf4d5d78fc9
2025-10-21 07:58:13 +00:00
Alex Plateandintellij-monorepo-bot e8b4bffc83 [Jupyter] Add a check for Throwable rethrow in AsdfSystemProvider.kt
Some exception should always be rethrown

GitOrigin-RevId: 337cfc90af2c7f3232ad157d38030d3f0fca121f
2025-10-16 13:24:28 +00:00
Vitaly Legchilkinandintellij-monorepo-bot 84934e9e9e [python] (IJPL-205889) (BAZEL-2462) don't call getOrCreateAdditionalData for non-python sdks
+ add requirePythonSdk() verification for the Sdk extension functions, these methods are not designed to be called for non-python sdks and now will throw IllegalArgumentException.

also corrects dependency tree:
+ move PythonSdkUtil to the python.sdk module, remove dependency on psi.impl
+ create PySkeletonUtil for skeleton utils and leave it in the psi.impl

[python] (IJPL-205889) (BAZEL-2462) don't call getOrCreateAdditionalData for non-python sdks

+ add requirePythonSdk() verification for the Sdk extension functions, these methods are not designed to be called for non-python sdks and now will throw IllegalArgumentException

also corrects dependency tree:
+ move PythonSdkUtil to the python.sdk module, remove dependency on psi.impl
+ create PySkeletonUtil for skeleton utils and leave it in the psi.impl

GitOrigin-RevId: 20d958c5e15cc4e05545b2e61b126b5e015696ed
2025-10-10 18:17:28 +00:00
Ilya.Kazakevichandintellij-monorepo-bot 5a4843d743 PY-79486: Introduce sdkConfigurator module.
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
2025-10-02 06:59:28 +00:00
Ilya.Kazakevichandintellij-monorepo-bot 894f26c7e9 Python: Rename and move UIInfo to openapi to reuse it from other modules
GitOrigin-RevId: 2f46a6e934853d14600351112da292586938cd86
2025-10-01 23:01:06 +00:00
Vladimir.Koshelevandintellij-monorepo-bot 657e9ebee3 update bazel files
GitOrigin-RevId: f8ee7c74051e66b41bddbc976d457d25939bc008
2025-09-30 18:46:16 +00:00
Vladimir.Koshelevandintellij-monorepo-bot 8a9a4a5eb8 [python] fix running intellij.python.community.services.systemPython
GitOrigin-RevId: 166a0991c7b5032a63efebad1eb078cc15540b46
2025-09-30 18:46:16 +00:00
Ilia Kirianovskiiandintellij-monorepo-bot f43aa95086 [bazel] Update build files (IJI-3062)
GitOrigin-RevId: 98a67396a48bddc3d084cc93c50ae2f2017bfe8c
2025-09-29 00:11:15 +00:00
Vladimir.Koshelevandintellij-monorepo-bot 3779e63fa2 [python] PY-84398 move icon files to make the icon generator happy
GitOrigin-RevId: 1c678f53eea4732cc71739df3721513b351ddeb4
2025-09-26 15:15:29 +00:00
Vladimir.Koshelevandintellij-monorepo-bot c5b44ca085 [python] PY-84398 get rid of package prefix in python modules.
It doesn't work. Sad, but true.

GitOrigin-RevId: c6cf4f2971ce813a2ce18afb2dcee22c2c5dad75
2025-09-26 15:15:29 +00:00
Vladimir.Koshelevandintellij-monorepo-bot ba393efaa7 [python] PY-84398 get rid of embedded loading rules in PythonCore plugin, fix related issues
GitOrigin-RevId: 54f4bb333e0ca06a002a86c75f0bbc474863253e
2025-09-26 15:15:29 +00:00
Ilia Kirianovskiiandintellij-monorepo-bot 1cbae62ad0 [python] Add intellij.python.community.services.systemPython._test module descriptor to run tests in dev-mode (IJPL-116621)
GitOrigin-RevId: 25fe4967dd614f21dc88e495bd0c02bdd2cd2ac8
2025-09-25 08:48:32 +00:00
Ilia Kirianovskiiandintellij-monorepo-bot 62aaf2e1ab [python] Add intellij.python.community.services.internal.impl._test module descriptor to run tests in dev-mode (IJPL-116621)
GitOrigin-RevId: bdacf3c5e1bf59a31110e05b580ce2188be03278
2025-09-25 08:37:39 +00:00
Ilia Kirianovskiiandintellij-monorepo-bot 4aef697527 [python] Add intellij.python.community.services.shared._test module descriptor to run tests in dev-mode (IJPL-116621)
GitOrigin-RevId: 8acac1956e5601527d14e9e58dc3bb8f68ecf78a
2025-09-25 08:24:59 +00:00
Ilia Kirianovskiiandintellij-monorepo-bot 6f8920da99 [bazel] Update build files (IJI-3062)
GitOrigin-RevId: 2394c1289e33945f7640f249b17cbf34b31fd695
2025-09-23 09:25:59 +00:00
Vladimir.Koshelevandintellij-monorepo-bot 4fca8ab8c8 [python] migrate junit5python tests to dev run
GitOrigin-RevId: c2b474f4fe944f6ed9c6729b730574f6dc56350d
2025-09-04 16:40:32 +00:00
Ilya.Kazakevichandintellij-monorepo-bot 682550148c PY-83776: Add logging to trace the problem.
Enable the following log:
```
#com.intellij.python.community.services.shared:debug
```

GitOrigin-RevId: 7ea444ebca62d3f8186d983cd10381199165a0a2
2025-08-31 18:05:23 +00:00
Ilia Kirianovskiiandintellij-monorepo-bot e857678b3f [bazel] Update build files (IJI-2835)
GitOrigin-RevId: 4029606395c15069d4528b2558b29d78f6987bb3
2025-08-20 10:24:48 +00:00
Ilia Kirianovskiiandintellij-monorepo-bot dc268560b6 [bazel] Update build files (IJI-2835)
GitOrigin-RevId: 275260ab73f59d3c08f0b4cb9f4c89b74054094a
2025-08-20 08:49:22 +00:00
Vitaly Legchilkinandintellij-monorepo-bot f2cf197bb8 [python] new icons for system pythons pyenv/homebrew (UX-3490, UX-3365)
GitOrigin-RevId: af8d8d78e0bea842737ee07cc84a6de9eb005ed2
2025-08-12 17:03:57 +00:00
Andrii Zinchenkoandintellij-monorepo-bot cc2954797c [eel][wsl] IJPL-196973 Compile error open target not source in wsl
- provide the possibility to get IjentApi instance by specific EelDescriptor

GitOrigin-RevId: 874542c0261cad5908da1fd10162f66800e97928
2025-07-23 15:04:29 +00:00
Andrii Zinchenkoandintellij-monorepo-bot 2fa1af099c [eel][wsl] IJPL-196973 Compile error open target not source in wsl
- Split EelDescriptor in to EelDescriptor and the EelMachine
- Add EelPathBoundDescriptor

GitOrigin-RevId: e0b7e5d5f3532682498466642b034e1892ef3cda
2025-07-23 15:04:29 +00:00
Aleksandr Sorotskiiandintellij-monorepo-bot a79ea7edfd support system pythons provided by asdf; PY-32643 Ready for Merge
GitOrigin-RevId: 926ee14228644c33ab4a17247a07cdf71799b265
2025-07-18 20:36:53 +00:00
Leonid Shalupovandintellij-monorepo-bot cff76ea65e bazel: split test and build sections in convert jps to bazel:L update Bazel files
GitOrigin-RevId: 90063178de33c2a95bfdebd160a721d6977d8097
2025-07-18 16:18:47 +00:00
Aleksandr Sorotskiiandintellij-monorepo-bot 1e3bf294c7 system python providers for unix/mac/win/legacy platform; pyenv/brew system python providers; PY-47379
GitOrigin-RevId: 02c3c3f3e682aa60e48bd429b7862d431ce5ddac
2025-07-14 17:33:19 +00:00
Ilya.Kazakevichandintellij-monorepo-bot 3156c22dee Python: localize string
GitOrigin-RevId: 63f2e888bff6d4e9ebccf67d43c6d9a927cba900
2025-06-25 16:54:15 +00:00
Evgenii Ilichevandintellij-monorepo-bot 06fb3e21e6 Update test definitions in BUILD.bazel
GitOrigin-RevId: 12636c0153e8909f9d9658a07278edac5ceb9c23
2025-06-18 19:05:49 +00:00
Ilya.Kazakevichandintellij-monorepo-bot 93d8518b8d PY-78033/Sort-Base-interpreter-list
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
2025-06-09 19:24:35 +00:00
Ilya.Kazakevichandintellij-monorepo-bot 107201d413 Python: refactoring before interpreters service.
Extract various classes to the shared modules, `ExecutablePython` now has `env` map as it can be used by conda.

GitOrigin-RevId: eb45ea29f49132fa4f91c979f71453e6a2ade344
2025-06-08 04:14:00 +00:00
Ilya.Kazakevichandintellij-monorepo-bot 105554c91d Python: introduce getOr("message"){} API to add errors on an appropriate level.
See `getOr` extension doc.

GitOrigin-RevId: 859af221e99f03b99ee2f82e829e83e0f00a9e6d
2025-06-07 22:05:56 +00:00