Commit Graph

1103 Commits

Author SHA1 Message Date
Vitaly Legchilkin
9be677861d PY-88204 Don't show Python installation prompt on the welcome screen
(cherry picked from commit 8461ab36c621b80e836f7c7300318d1042492209)

IJ-MR-194950

GitOrigin-RevId: 96585fd461cc965aa1cfafa62b5c102600c182d5
2026-03-06 14:51:50 +00:00
Mikhail Filippov
67e3eba466 [build] IJPL-232588 update Kotlin compiler to 2.3.20-RC2
(cherry picked from commit 02cf3f93e77aa26b098c5c0d52caa4cf1af5078c)

IJ-MR-194445

GitOrigin-RevId: 05535bc07df7b591784f6973de9e8ce1751041f5
2026-03-04 22:14:34 +00:00
Vitaly Legchilkin
ea8384f976 PY-88015 Disable manual dependency editing for pyproject.toml-based modules
- Remove PYPROJECT_TOML_PENDING_KEY; use settings::usePyprojectToml directly
- Disable dependencies list per-module based on Module.isPyProjectTomlBased
- Fix Apply button staying active after applying changes
- Sort module list alphabetically, apply only changed dependencies


(cherry picked from commit cd759107b7bec10003f0977a1f1f3f0973d8c429)

IJ-MR-193755

GitOrigin-RevId: fc78dc32efedea640a2cf883d6424d48e53042e1
2026-02-28 00:13:33 +00:00
Ilya.Kazakevich
ce38a7707a PY-87933: Disable multimodule by default for Idea, enable for PyCharm and Rider.
We now have 3 options in registry: see `FeatureState`.

For the Idea we disable `pyproject.toml` autoimport due to instability.

For PyCharm we ask user as user might have different preferences for different projects.

For Rider, we enable it unconditionally, because:
1. We can't ask user in Rider: our "asking logic" depends on index, and it doesn't work in Rider, see `intellij.rider.customization.xml` comment.
2. There is no UI in Rider to configure this preference: `PythonContentEntriesConfigurable` sits in PyCharm.


(cherry picked from commit 78566e94641eef5b90feb42a1fe9737695fec951)

IJ-CR-193846

GitOrigin-RevId: 2b19070a84b0e67a01e78ef0e4d5d5233b688932
2026-02-27 22:50:06 +00:00
evgeny.bovykin
c6dc992360 refactor pycharm: Remove all non-const variables and methods from companion objects
See IJPL-115436 for more info

(cherry picked from commit 6c300e982830c5cd70d501763daf6b2087b51c64)

GitOrigin-RevId: 5d47cdd2da551fbc44040418ff8613c4c4d4580a
2026-02-25 12:38:14 +00:00
Ilya.Kazakevich
46cda23bf1 PY-87445: Obey PyProject enable/disable feature.
`PyProjectAutoImportService` is only automatically started by `startAutoImportIfNeeded` if `PyProjectModelSettings.getUsePyprojectToml` is enabled.

Once enabled/disabled, `PyProjectModelSettings` starts/stops `PyProjectAutoImportService`.

Also:
1. Move `PyProjectModelStartupActivity` to `askUserIfPyProjectMustBeEnabled` to make sure it is called __after__ project creation. Otherwise, it might start project import process in the middle of project creation and delete modules.

2. Make import non-suspend (no need to access IO anyway) to make sure we can call it from `PyProjectModelSettings`

GitOrigin-RevId: e9328721ad90c76d1a473cffa15c7fec2e365c9c
2026-02-25 01:20:01 +00:00
Vitaly Legchilkin
52d2828b6d [python] PY-87445 Make pyproject.toml setting visible across Project Structure pages before Apply
GitOrigin-RevId: 8fd3c7a89dc5c3b65759c38e775c95c68900da42
2026-02-25 01:20:01 +00:00
Vitaly Legchilkin
110fe78aab [python] PY-87445 Disable module dependencies UI when managed by pyproject.toml
GitOrigin-RevId: fa4e35248e7f8e33784cdbad06fb4010c3ea40e9
2026-02-25 01:20:01 +00:00
Vitaly Legchilkin
830d38cead [python] PY-87445 Add pyproject.toml-based project model settings and configuration notification
Add PyProjectModelSettings with persistent state for pyproject.toml
workspace configuration. Show a notification when pyproject.toml is
detected, allowing users to enable the feature or dismiss it.
Convert PythonContentEntriesConfigurable to Kotlin and guard the
checkbox with the registry flag.

# Conflicts:
#	community/python/python-pyproject/src/com/intellij/python/pyproject/model/internal/AutoImportstarter.kt

GitOrigin-RevId: 4f07afe0ad1179f99c8a05f596379e83c7b299fc
2026-02-25 01:20:01 +00:00
Vitaly Legchilkin
7e72b43d1d PY-87489 Subscribe to currentEditor flow to fix interpreter widget after project cloning
StatusBar.currentEditor is a StateFlow initialized with null that
resolves asynchronously via a serviceAsync chain. After cloning,
the widget's initial update() runs before the flow resolves, so
getSelectedFile() returns null and the widget stays hidden.
Subscribe to the flow so the widget re-evaluates once the editor
becomes available.


(cherry picked from commit db0cd436a76fef47e5a1913c2c23b5231c15c60a)

IJ-MR-192257

GitOrigin-RevId: 79140e2a60ea656eae21fe9da1f8fdecdb2eb377
2026-02-19 09:09:16 +00:00
Leonid Shalupov
b5eb6d8e20 MRI-2340 Automatically convert all UI Designer forms to sources
GitOrigin-RevId: 55249a442675e053b5093502648453b84391ec54
2026-02-14 16:43:48 +00:00
Vladimir Krivosheev
c546068c91 IJPL-233558 IJ-MR-184958 IJ-MR-184993 IJ-MR-179029 IJ-MR-184126 IJ-MR-181153 IJ-MR-146078 IJ-MR-175479 IJ-MR-186058 refactor: apply dependency and style cleanups
add explicit kotlin-stdlib, restructure projectFrame

GitOrigin-RevId: c151a69ae1e9b925b1892a3b01ba5d01566bba3b
2026-02-12 15:38:41 +00:00
Vladimir Krivosheev
c0807ece50 IJPL-233558 IJ-MR-184958 IJ-MR-184993 IJ-MR-179029 IJ-MR-184126 IJ-MR-181153 IJ-MR-146078 IJ-MR-175479 IJ-MR-186058 refactor(platform): split welcome-screen api to break platform-api cycle (part 3)
GitOrigin-RevId: f451593c7968b1c10e83fe664b9cbad12f7104be
2026-02-11 17:39:22 +00:00
Ilya.Kazakevich
8fd70026cb cleanup [python]: remove unused symbols
GitOrigin-RevId: cbefb7c4667b2d2d1a8f38bcddc28fb51a0ce226
2026-02-10 23:07:23 +00:00
Maxim Popov
a45f149b8a [debugger] PY-87450 add debugpy justMyCode checkbox for python configurations, where it is supported
Merge-request: IJ-MR-190905
Merged-by: Maxim Popov <maxim.popov@jetbrains.com>

GitOrigin-RevId: b34a0edf0c89ffd1967516810e0160c5f0cb0fce
2026-02-10 21:12:30 +00:00
Ilia Zakoulov
ebf43e06b4 PY-84031: Fix ipynb detection for welcome screen
GitOrigin-RevId: fd1966bb31bfcfadc21a51bde83c61b6a958c661
2026-02-10 20:17:52 +00:00
Vladimir Krivosheev
d09d6fd210 IJPL-215395 IJ-MR-184958 IJ-MR-184993 IJ-MR-179029 IJ-MR-184126 IJ-MR-181153 IJ-MR-146078 IJ-MR-175479 IJ-MR-186058 Wrong button order in empty state on Welcome screen
GitOrigin-RevId: afdfa512998ecb85effc6ce4c3d7e27eeb5ff0e3
2026-02-09 17:03:55 +00:00
Roman Shevchenko
e9e9b1620f AP-8446 [*]: dropping descriptions from the codebase
GitOrigin-RevId: 247054fd028e5213c06aedf635c75706268cf177
2026-02-05 11:51:17 +00:00
Ilya.Kazakevich
c797dcc7bc cleanup [python]: remove unused symbol, hide symbols not used by external plugins
GitOrigin-RevId: e5728587e408460009fa5c59fb2a1b0bcd7463a6
2026-02-04 22:34:24 +00:00
Ilia Zakoulov
2ba7ae91dc PY-84031: Register PyCharmWelcomeScreenOpenFileNotificationProvider for PyCharm
Space-RevId: 09a7d6a95463f32e5bb41f2bb593816987cff806

GitOrigin-RevId: 65db1c4f20fd2830e486c0afd07038310e901f82
2026-02-03 23:35:47 +00:00
Ilia Zakoulov
6e2d9cc90b PY-84031: Implement PyExternalFilesIndexService to index external files.
Non-project files by default are not indexed, do not have a module and do not have an SDK.
`PyExternalFilesIndexService` is resposible for adding a custom entities to the workspace model.

Space-RevId: dd7c50009e56dea0d69914c9f7f1524c7e77fe20

GitOrigin-RevId: cdfa2a578a01431fb9e0a06ce820c1d9b0f3fc0d
2026-02-03 23:35:47 +00:00
Ilia Zakoulov
df03c2a2ed PY-84031: Open only .ipynb files in Welcome Screen for PyCharm
Space-RevId: 6e05b377754700604f6e91db966ee2337cb0f745

GitOrigin-RevId: 2b025887769e5081ca62c4c217628c3adf016410
2026-02-03 23:35:47 +00:00
Ilia Zakoulov
7e1a54bb1f PY-84031: Introduce registry key to disable opening files in welcome screen for PyCharm
Space-RevId: 9acd4498039dde453b98116358698dc31eb0bf89

GitOrigin-RevId: 62b19feb98a47015d843c553b64446d699882df1
2026-02-03 23:35:47 +00:00
Leonid Shalupov
188b7ef96f IJI-3282 Optimize imports
GitOrigin-RevId: 3b5c00d8ff20b8d0bb6005bc450921085d2da9b2
2026-01-31 17:03:42 +00:00
Alexey Katsman
9ebdd29d37 PY-87232 Change venv module name
GitOrigin-RevId: faf2719abc6236f93840f7a2e34e58eec9f6e868
2026-01-29 13:25:49 +00:00
Alexey Katsman
71cb91d1b6 PY-87232 Move SDK configurators away from ide customizations module
This was done for two reasons. To support these configurators in Python
plugin, not only PyCharm. And to make it easier to split tools by plugins.

GitOrigin-RevId: 9954c0c70be4e0d87405e88a0547ba4984db3dc1
2026-01-29 13:25:49 +00:00
Ilya.Kazakevich
da3979b491 cleanup [python]: Stop using deprecated API basePath and rootManager
GitOrigin-RevId: 1687601dcc175ccf34e71de2bb0585ebc0fa2740
2026-01-28 21:12:16 +00:00
Mikhail Filippov
745886b823 [build] IJPL-230820 update kotlin compiler to 2.3.10-RC
GitOrigin-RevId: 3a384d99211f56a88ea4a3db96778418728653e0
2026-01-28 16:36:56 +00:00
Vitaly Legchilkin
7afaa3d97d PY-85194 use uv by default
GitOrigin-RevId: 04e47e357771863df3c25d9ed2950520fa62e69c
2026-01-28 00:27:29 +00:00
Vitaly Legchilkin
95a17ccde1 PY-86776 Proper venv folders resolving
+ don't create sdks if they exist already in the sdk table

GitOrigin-RevId: 1e6d6e6b3bb62598e3bc4500852f9c1195ad4a6f
2026-01-28 00:27:29 +00:00
Alexey Katsman
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 Kazakevich
8dd8162baf PY-87171: Wrap findAmongRoots in readAction.
The following method throws exception if module id disposed:
`com.intellij.openapi.roots.ModuleRootManager.getInstance`

Even if we ask a caller to check it in advance, we still can't guarantee that nobody disposes this module in the middle of the operation.


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

GitOrigin-RevId: b48f6bafbd7a2c856ed753b7c32d2de0bfae8da9
2026-01-27 16:46:27 +00:00
Vitaly Legchilkin
b62067d0df PY-86683 don't use base python for uv (it uses own pythons)
+ Remove the redundant "existing SDKs" parameter; it always uses PythonSdkUtil.getAllSdks() under the hood.

GitOrigin-RevId: 4b6576fd3ff8782f985418a1efbacd5b576e217d
2026-01-27 15:48:44 +00:00
Yuriy Artamonov
70e6388b43 [plugins] IJPL-223357 Use UpdateCheckerFacade.getIntance() in applied code
Space-RevId: fad1f2e0989550d14e7681f72e4bc4c3b3e6941b

GitOrigin-RevId: 0e9f88063ccc384f0a2eb6785c671c9fd6d70d5e
2026-01-26 19:27:29 +00:00
Ilya.Kazakevich
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.Kazakevich
8c0deced79 [python] PY-86999: Survive broken pyproject.toml.
`com.intellij.python.pyproject.PyProjectToml.Companion.parse` used to return Error in case of broken file so we simply ignored it. We now return `TomlTable` itself even in case of error.

So `com.intellij.python.pyproject.model.internal.pyProjectToml.TomFileToolsKt.readFile` is only null (which means module is skipped) if there is `IOException` reading `pyproject.toml` (either file doesn't exist or unreadable).

GitOrigin-RevId: 94fa7f46516450a9b0922679aa0d9d12571fae4f
2026-01-21 06:05:31 +00:00
Ilya.Kazakevich
55e7ab0114 PY-85793: Enable project configuration by default
GitOrigin-RevId: a568b0b32b543cee7724d4ced4b9077e9300630d
2026-01-15 06:31:46 +00:00
Ilya Kazakevich
8990009f05 PY-86857: Show module names in the execution console during SDK configuration.
SDK creator (`com/jetbrains/python/sdk/configuration/CreateSdkInfo.kt:19`) creates SDK, and we set `TraceContext` so every single call it does to `ExecutionService` (to run external tool for example) is accomplished with a module name.


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

GitOrigin-RevId: 86823980c1d7b0ee7901545617d6f904c55ecb7f
2026-01-14 20:16:10 +00:00
Ilia Zakoulov
d968a61777 PY-86822: Understand if it is welcome project by path but not by name
GitOrigin-RevId: 8a94659438a5f34d5305ae12a38b5928f4b09755
2026-01-14 20:13:17 +00:00
Mikhail Filippov
ea41f7932a [build] IJI-2993 enable progressive mode for Kotlin
GitOrigin-RevId: f506021c20fc3b3e5ef692c9092592e3bf247036
2026-01-14 11:00:39 +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
Alexey Katsman
a16ba73d98 PY-86671 PY-86714 Fix SDK problems for multi-module projects
First problem was that for Hatch interpreter we didn't set module
association in configurator. Because of that we could sometimes choose
an unrelated SDK for another project.

The second problem is that for workspace members we cached SDK
inspection results. That led to an issue when we created an SDK from the
inspection quick fix, but the cached result didn't allow to set the SDK
for a child workspace member. It was fixed by not caching the result of
an inspection for workspace children.

GitOrigin-RevId: 891b12f521672cc7004f6fdb10389cc68379b73d
2026-01-08 21:33:28 +00:00
Yuriy Artamonov
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
Mikhail Filippov
03c55f3020 [build] IJPL-220367 update kotlin compiler to 2.3.0
GitOrigin-RevId: 78297c61293c01004c2d5615ad65bdecff61381a
2025-12-22 15:30:41 +00:00
Mikhail Filippov
7744eca84a [build] IJPL-220367 bump Kotlin language and API versions
GitOrigin-RevId: c58c2f2ca3e4fbbe5116bd19119345174b7db32f
2025-12-20 13:35:48 +00:00
Vitaly Legchilkin
971b906415 PY-85211 mark pre-target sdks as invalid (we don't support them anymore)
GitOrigin-RevId: 1cb0b31bcb00a1a9f70fad91f082facb7b517183
2025-12-10 21:08:52 +00:00
Mikhail Filippov
7fe480df8b [build] IJPL-220367 update kotlin compiler to 2.3.0-RC3
GitOrigin-RevId: 3fa9accb1be54d43d7666809bc03b848dd801353
2025-12-10 15:02:31 +00:00
Konstantin Nisht
8f3ca011ea [actions] IJPL-219402: Replace currentThreadCoroutineScope with AnActionEvent#coroutineScope in Pycharm actions
GitOrigin-RevId: af7f7b8eb02b56ba05fde564a6fb39bf64cbe982
2025-12-10 11:55:29 +00:00
Alexey Katsman
ddc3157c60 PY-85903 Implement a cache for conda environments
GitOrigin-RevId: 78338ac3ffc7f25a6ba980cd017f0c8c0602bc6b
2025-12-08 19:26:13 +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