Commit Graph

23 Commits

Author SHA1 Message Date
Leonid Shalupov
188b7ef96f IJI-3282 Optimize imports
GitOrigin-RevId: 3b5c00d8ff20b8d0bb6005bc450921085d2da9b2
2026-01-31 17:03:42 +00:00
Anton Efimchuk
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
Vladimir Krivosheev
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
Ilya Kazakevich
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
Alexey Katsman
ea82fe5cc2 [python] PY-83881 Provide python info during environment detection
GitOrigin-RevId: 4e424c8fa9c08ce3cd497586f5f13e5a5816f52a
2025-10-31 17:55:16 +00:00
Alexey Katsman
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
Vitaly Legchilkin
5e2028d129 [python] (PY-78749) single dialog for all types of Python SDKs
+ old dialogs were removed

GitOrigin-RevId: 00ed85ba578c6419373d8605ed50954e7aa58f0a
2025-10-13 22:54:32 +00:00
Ilia Kirianovskii
f43aa95086 [bazel] Update build files (IJI-3062)
GitOrigin-RevId: 98a67396a48bddc3d084cc93c50ae2f2017bfe8c
2025-09-29 00:11:15 +00:00
Vladimir.Koshelev
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 Kirianovskii
6f8920da99 [bazel] Update build files (IJI-3062)
GitOrigin-RevId: 2394c1289e33945f7640f249b17cbf34b31fd695
2025-09-23 09:25:59 +00:00
Ilya.Kazakevich
0fecbf2ca1 Python: report wrong version string
GitOrigin-RevId: ebdcf4f5be07bd1a7ff4bffd2b81a7114c2f283e
2025-09-02 14:46:47 +00:00
Ilya.Kazakevich
85d34e9c0e Python: drop unused symbols
GitOrigin-RevId: 6d571b57c6e5abe2ac88765b1c73b7f31bb1503b
2025-09-01 18:57:34 +00:00
Ilya.Kazakevich
0cf893efdf Python: support getting version for python on target.
See test for usage example

GitOrigin-RevId: aa65f15d294585040c3cdadc2ef3057c85136a19
2025-08-27 22:56:52 +00:00
Ilia Kirianovskii
dc268560b6 [bazel] Update build files (IJI-2835)
GitOrigin-RevId: 275260ab73f59d3c08f0b4cb9f4c89b74054094a
2025-08-20 08:49:22 +00:00
Ilya.Kazakevich
12960161ff Python: Introduce functions to call code against SDK:
See `sdkExecApi.kt`

GitOrigin-RevId: 0014b607ee6efa058e9144cfb208c7e75dff1e47
2025-08-06 23:27:57 +00:00
Ilya Kazakevich
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
Leonid Shalupov
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
Ilya.Kazakevich
fb1a3c893b Python: narrow various return types
GitOrigin-RevId: a98a36eefe29964754fd28e445703ac91464237b
2025-06-30 21:53:26 +00:00
Nikita.Ashihmin
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
Evgenii Ilichev
06fb3e21e6 Update test definitions in BUILD.bazel
GitOrigin-RevId: 12636c0153e8909f9d9658a07278edac5ceb9c23
2025-06-18 19:05:49 +00:00
Ilya.Kazakevich
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.Kazakevich
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.Kazakevich
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