Commit Graph
362 Commits
Author SHA1 Message Date
Ilya.Kazakevichandintellij-monorepo-bot 3388536d2c [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>

(cherry picked from commit 2950f5f0cd2745c12987a92e40774d366568f312)

GitOrigin-RevId: f30e9a6cd7b5d103454d66f26a0c2282d7c587fc
2025-11-26 13:52:46 +00:00
Ilya.Kazakevichandintellij-monorepo-bot ed0fda649a [python]: PY-85585 : (WIP) Introduce method to map errors
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
2025-11-26 13:52:46 +00:00
Ilya.Kazakevichandintellij-monorepo-bot 7cd15cd432 [python] PY-79486: (WIP): introduce PathShorter.
See class doc for info

GitOrigin-RevId: 901aa77ace2e8e262156e88efc059508f37b8334
2025-11-24 16:35:26 +00:00
Ilya.Kazakevichandintellij-monorepo-bot a1b92b2591 [python] PY-79486: (WIP) split pyproject.toml tools into backend/common.
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
2025-11-24 16:35:26 +00:00
Alexey Katsmanandintellij-monorepo-bot 1ac353ef9a [python] PY-83881 Provide python info during environment detection
GitOrigin-RevId: 4382680255fc78925c4b23ce825a2894114040c5
2025-11-03 12:05:45 +00:00
Alexey Katsmanandintellij-monorepo-bot a03643bb9c [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: 73bc98aed2918c44832b57f22b86c9c7d17a4301
2025-10-22 13:10:20 +00:00
David Lysenkoandintellij-monorepo-bot fc7d863a50 IJ-MR-176106-to-253
[pycharm] PY-81494 Fix deadlocking code


Merge-request: IJ-MR-179432
Merged-by: David Lysenko <david.lysenko@jetbrains.com>
[pycharm] PY-81494 Config fixes

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>


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

GitOrigin-RevId: 44552a582dd628d206b207e02e6f24c7749b4d9f
2025-10-22 09:04:47 +00:00
Vladimir Lagunovandintellij-monorepo-bot d7e0b918d7 Revert "Python Env Tests: support python.exe from Windows Apps in PYTHON_FOR_TESTS"
This reverts commit dc3c04ab43749a1c02285ccdc4deab01f49b13c1.


(cherry picked from commit 93aaf56d801631313443cf9f04b58f6da1cd964e)

IJ-CR-178048

GitOrigin-RevId: f44adec30cb46f26f8717a9bb4b8174766e8fea0
2025-10-17 10:18:34 +00:00
Vladimir Krivosheevandintellij-monorepo-bot 30413b84c9 IJPL-209476 IJ-MR-175479 extract jettison, jaxen, bouncy-castle
GitOrigin-RevId: d9f6e8e745fbfb69604eb02d0f95cad976d4d7f9
2025-10-09 21:36:26 +00:00
Vladimir Lagunovandintellij-monorepo-bot 956af7d0aa Python Env Tests: support python.exe from Windows Apps in PYTHON_FOR_TESTS
GitOrigin-RevId: dc3c04ab43749a1c02285ccdc4deab01f49b13c1
2025-10-09 14:41:12 +00:00
Nikolay Chashnikovandintellij-monorepo-bot 3a8344fcad [plugin model] use 'public' visibility for content modules which classes are used from external plugins (IJPL-207059)
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
2025-10-08 18:39:06 +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
Ilia Kirianovskiiandintellij-monorepo-bot f43aa95086 [bazel] Update build files (IJI-3062)
GitOrigin-RevId: 98a67396a48bddc3d084cc93c50ae2f2017bfe8c
2025-09-29 00:11:15 +00:00
Ilia Kirianovskiiandintellij-monorepo-bot b09e3546ec [python] Add intellij.python.community._test module descriptor to run tests in dev-mode (IJPL-116621)
GitOrigin-RevId: 59dc5a2b0b52d0b3c10288a5394fd560c7aabc2a
2025-09-24 23:20:50 +00:00
Vitaly Legchilkinandintellij-monorepo-bot 0999615909 [python] add TraceContext as a trace tracker for coroutine inner calls
* 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
2025-09-24 18:56:23 +00:00
Ilia Kirianovskiiandintellij-monorepo-bot 6f8920da99 [bazel] Update build files (IJI-3062)
GitOrigin-RevId: 2394c1289e33945f7640f249b17cbf34b31fd695
2025-09-23 09:25:59 +00:00
Ilya.Kazakevichandintellij-monorepo-bot 3fafaf4bf6 Python: close symbols and "tests" package to test to make sure no new symbol gets opened.
Bazel plugin isn't a problem as it is now controlled by JB

GitOrigin-RevId: c54256deac88c6c2f5a3a29c9efb7a0a80b5e106
2025-09-01 22:15:43 +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 eb336fedc2 [python] show execution command and outputs for conda runner in case of parsing failures (PY-76274)
+ ZeroCodeStdoutParserTransformer  
 + ZeroCodeJsonParserTransformer
 + add transformer showcase


Merge-request: IJ-MR-172758
Merged-by: Vitaly Legchilkin <Vitaly.Legchilkin@jetbrains.com>

GitOrigin-RevId: 1f293e8725a986eaed2a6050a3c6a240441f09fe
2025-08-19 08:09:48 +00:00
Ilya Kazakevichandintellij-monorepo-bot ec7562bf07 Python: Introduce API to get process from SDK via ExecService
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
2025-08-08 19:08:05 +00:00
Ilya Kazakevichandintellij-monorepo-bot 8f83b52355 Python: Support Targets API in ExecService.
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
2025-08-06 16:10:47 +00:00
Nikita.Ashihminandintellij-monorepo-bot 929d057b18 PY-78749 Packages: move NormalizedPackageName to PyPackageName in openapi
Signed-off-by: Nikita.Ashihmin <nikita.ashihmin@jetbrains.com>

GitOrigin-RevId: 5bfb5abfbc3e9d05306e36e7a5df60a748df399f
2025-08-03 09:54:19 +00:00
Nikita.Ashihminandintellij-monorepo-bot f5d815d1e4 PY-78749 Packages: refactor install utils, migrate methods to PPMUI
Signed-off-by: Nikita.Ashihmin <nikita.ashihmin@jetbrains.com>

GitOrigin-RevId: 69eaeb90dd326f7e5cb07d67f615e939980d536b
2025-08-01 15:07:47 +00:00
Nikita Ashihminandintellij-monorepo-bot 78fc24c815 PY-82919 PyPackages: Refactor Stub inspection
Signed-off-by: Nikita.Ashihmin <nikita.ashihmin@jetbrains.com>


Merge-request: IJ-MR-170639
Merged-by: Nikita Ashihmin <Nikita.Ashihmin@jetbrains.com>

GitOrigin-RevId: 9697165e74ea2e1c897de1f72312043d003796d5
2025-07-30 14:26:37 +00:00
Nikita.Ashihminandintellij-monorepo-bot 83c557f522 PY-78749 Packages: refactor uninstall(String) from PyPM
Signed-off-by: Nikita.Ashihmin <nikita.ashihmin@jetbrains.com>

GitOrigin-RevId: dbf373cca5c10091c12f4abce22d66fb76568c02
2025-07-24 11:34:37 +00:00
Nikita.Ashihminandintellij-monorepo-bot 50d6856ce5 PY-78749 Packages: refactor install(String) from PyPM
Signed-off-by: Nikita.Ashihmin <nikita.ashihmin@jetbrains.com>

GitOrigin-RevId: 7d537581c6190d7a434d162854ac5db739909c59
2025-07-24 11:34:37 +00:00
Ilya.Kazakevichandintellij-monorepo-bot 01fab1c57c Python: extract plugin IDs
GitOrigin-RevId: 6803c7a3a76587c277a337f0cd18bf0dcedb97f8
2025-07-22 01:59:11 +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
Morgan Bartholomewandintellij-monorepo-bot b3cd91977f [python] refactor stub suggestions to use PythonPackageManager
GitOrigin-RevId: d370e9fb005f850246a377ae10e4e87ba924efbd
2025-07-14 10:11:59 +00:00
David Lysenkoandintellij-monorepo-bot 203f58acf4 [pycharm] PY-79081 Fix working dir initialization for uv plugin
GitOrigin-RevId: d026b7ccaa6be64758530859880b5ac8a53f038f
2025-07-04 15:12:13 +00:00
Ilya.Kazakevichandintellij-monorepo-bot 4964cc3a7d PY-82326: Preparation for it (WIP): support ExecError for targets.
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
2025-07-01 08:05:21 +00:00
Nikita.Ashihminandintellij-monorepo-bot 024d2ae147 PY-82119 Packaging: Fix env tests for conda
Signed-off-by: Nikita.Ashihmin <nikita.ashihmin@jetbrains.com>

GitOrigin-RevId: 47286211e8ca894aa2e04c3f65528a2ab22fc37c
2025-06-25 17:06:43 +00:00
Aleksandr Sorotskiiandintellij-monorepo-bot ca209c662c cleanup
GitOrigin-RevId: 30dbff5da2c157f526a8095b9d7065559eda468b
2025-06-19 17:54:48 +00:00
Nikita Ashihminandintellij-monorepo-bot 2c3a5a9f7a PY-82119 Packaging: Rewrite Conda to use EEL
GitOrigin-RevId: 8329d24191bdc1411775dc8e58a65172a2804788
2025-06-19 17:30:40 +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 cd9fd36b44 PY-81939: Do not show the full log on exec error dialog.
`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
2025-06-14 03:52:50 +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
Ilya.Kazakevichandintellij-monorepo-bot 2e14347844 Python: extract python-specific extensions from exec service to simplify API and make it extendable for intepreters.
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
2025-06-07 22:05:56 +00:00
Vladimir Krivosheevandintellij-monorepo-bot 65fe061584 IJ-MR-162467 don't export intellij.platform.analysis
GitOrigin-RevId: fcbcb68010b58cb507fee2c47473758b999e471b
2025-06-04 11:16:33 +00:00
Vitaly Legchilkinandintellij-monorepo-bot 50995c2812 [python] migration from kotlin.Result to python.PyResult in package managers (PY-81238)
* 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
2025-05-27 07:18:45 +00:00
Nikita.Ashihminandintellij-monorepo-bot ebaf7afd67 PY-81238 Packages: add space for better format
Signed-off-by: Nikita.Ashihmin <nikita.ashihmin@jetbrains.com>

GitOrigin-RevId: 8ad78f68d857afc9f00bc77009b631522900c25e
2025-05-19 01:36:51 +00:00
Ilya.Kazakevichandintellij-monorepo-bot 6bf17f551a Python: introduce PyExecResult as an alias for Result<T, ExecError>.
It is just more convenient to right less generic params.

GitOrigin-RevId: cd33be23da4bb3cb09658aa6564e4d298a3ba72d
2025-05-14 20:47:57 +00:00
Ilya.Kazakevichandintellij-monorepo-bot 01754edfcb Python: drop unused, deprecated symbols.
Still used symbols are in `DeprecatedUtils` now to be dropped later

GitOrigin-RevId: 550eab3d417185b868072b06101bf7634263b4a2
2025-05-12 18:17:00 +00:00
Ilya.Kazakevichandintellij-monorepo-bot 11c31cfde7 Python: refactor ExecService to get rid of ProcessOutput and better support interactive execution.
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
2025-05-08 23:32:15 +00:00
Ilya.Kazakevichandintellij-monorepo-bot 5eac555264 Python: add mapError to Result
GitOrigin-RevId: 4fc242454dc016fdc84d0f2ce4937f13e1b0fc2b
2025-05-08 22:43:34 +00:00
Ilia Kirianovskiiandintellij-monorepo-bot 1a2088f2c7 [bazel] Update build files
GitOrigin-RevId: 7c67cec8f9c7bb49918dec997484b7d24431e564
2025-05-01 18:01:00 +00:00
Ilya.Kazakevichandintellij-monorepo-bot 0d1edf1017 ExecService clean-up, add eel-test.
`Command` was a mistake: we should use `Binary` but with the ability to resolve it.

GitOrigin-RevId: 5151c6131af0338ea919d650c317cd9b88baeb12
2025-05-01 16:38:08 +00:00
Ilya.Kazakevichandintellij-monorepo-bot 43618513c0 Python: make runExecutable interface return the only error it can return
GitOrigin-RevId: 30f11900a7bf1085c405d92e6f58f771ed1c9004
2025-04-30 14:02:00 +00:00