Commit Graph
86 Commits
Author SHA1 Message Date
Mikhail Golubevandintellij-monorepo-bot fd524cbe67 PY-86002 Disable "python.typing.strict.unions" and revert the tests updated for PY-24834 in 253
(cherry picked from commit 3df7847e2f94e8368e15e331f16a2254154e63fa)

IJ-MR-184619

GitOrigin-RevId: 213aedec5242143c1456450c214deb6f6e0fd60e
2025-12-03 20:58:50 +00:00
Alexey Katsmanandintellij-monorepo-bot 1a7d3b77fb PY-85162 Add registry key for timeout to guess SDK
(cherry picked from commit b044fee434c707575efe27bb383ef0e57747a347)

IJ-MR-184472

GitOrigin-RevId: ec0c53e404f92c6b75753c8c79b6a2461c2ef461
2025-12-02 19:50:56 +00:00
David Lysenkoandintellij-monorepo-bot c1990978e1 [pycharm] PY-85133 Add PyCharm UX survey link
Merge-request: IJ-MR-182825
Merged-by: David Lysenko <david.lysenko@jetbrains.com>

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

GitOrigin-RevId: b1f238cb81ab78e9b63af154ad126d4955322279
2025-11-27 11:03:40 +00:00
Alexey Katsmanandintellij-monorepo-bot 10e67083be PY-85634 Move PyInterpreterInspection to a separate package
Follow-up to IJ-MR-178613

GitOrigin-RevId: e2508fd5a34b9684ae464611f1434ccff874ddbc
2025-11-25 18:47:50 +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
Ilya.Kazakevichandintellij-monorepo-bot 434590383d [python] PY-79486: (WIP) Move tools to separate modules to access them from the frontend.
We are slowly moving all tools to the separate modules to register them as EP. On the front we might have `ToolId` only. To map it to an icon we will use EP.

GitOrigin-RevId: 3cd0ad9f8da4a69739c8f632a6305ddd7c29d62d
2025-11-24 16:35:26 +00:00
Vitaly Legchilkinandintellij-monorepo-bot c1eeb637cf [python] (PY-84316) revert serial calls & EditorContextBarMenu for Python Package Manager Actions
(cherry picked from commit 42374befa238b38583cf0490e1b2e248c206f2ef)

GitOrigin-RevId: 027fa79ceb0985967f837fcc21015a68bc5af2a1
2025-11-11 19:12:42 +00:00
Anton Efimchukandintellij-monorepo-bot 8b64bfcbcd PY-84316 Add the floating toolbar actions to the requirements.txt \ pyproject.toml \ environment.yaml file context menu
(cherry picked from commit d277ad9d67e22c695eb65f27929ec70f1c5e7813)

GitOrigin-RevId: b6f3412c8ec241a66d82475581ba4da46355afe0
2025-11-11 19:12:42 +00:00
Egor Eliseevandintellij-monorepo-bot 0e99914369 [python] PY-83446 Function is executed on hover while debugging
Merge-request: IJ-MR-180916
Merged-by: Egor Eliseev <Egor.Eliseev@jetbrains.com>

(cherry picked from commit a57d32cd81bb3817639fe0d5190d6de8522a8b1f)

IJ-MR-180916

GitOrigin-RevId: 1ae4e5e801c91d3677d61f65485fe3cb08e1eec4
2025-11-01 08:16:41 +00:00
Nikita.Ashihminandintellij-monorepo-bot 23cfe9dea3 PY-84790 Jupyter: Fix review and small refactors
(cherry picked from commit 83d42335c6e6a0ee8014b5b0e4ac61f01538ab50)

GitOrigin-RevId: aca283d1a38dd54877a42e3bb7d948d4f26dde8d
2025-10-26 11:32:04 +00:00
Alexey Katsmanandintellij-monorepo-bot 9140cb4e7b [python] PY-84315: Use SDK configurators for inspection
There was a problem that we can detect uv environment as a virtualenv in
PyInterpreterInspection. The problem is that we don't use the knowledge
about the existing environment anyhow.

This change relies on SDK configurators to tell whether environment is
present or can be configured.

GitOrigin-RevId: 27f55c7d1b4712b0b8c3d39b1b8f7d8643680910
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
Alexey Katsmanandintellij-monorepo-bot cc191a617f [python] PY-83881 Detect existing environments when creating SDK
Before the changes, there wasn't any mechanism to detect that
environment was already created (for example, .venv exists in the
project). In these situations, during SDK creation we could've created
another environment which was not expected by users.

With these changes, it's now possible to detect in the configurator that
environment already exists, and use it when creating SDK.

Merge-request: IJ-MR-177317
Merged-by: Alexey Katsman <alexey.katsman@jetbrains.com>

GitOrigin-RevId: dd0cf0c02b18e90022e9ec828b7f9ad2282cd5b3
2025-10-21 21:47:11 +00:00
Timur Malaninandintellij-monorepo-bot 266c5fa121 PY-84905 Introduce run.with.py.tool registry key to enable running with specific run tools.
(cherry picked from commit d62efa40233864a49bf0c4c79395b9a726b0eca9)

IJ-MR-178963

GitOrigin-RevId: 8d564387328ebf00dd6a6124c69d1fdacf492069
2025-10-20 21:08:19 +00:00
Timur Malaninandintellij-monorepo-bot ea39ed6ad9 PY-84846 Log Python "Run with" tool usage.
(cherry picked from commit ee13b27a80b759d2c12169a30499ba8dd39a03ea)

IJ-MR-178767

GitOrigin-RevId: a1c87d6cb426ef195c4fbf1c60cf01a56547ffad
2025-10-20 20:19:30 +00:00
Ilya.Kazakevichandintellij-monorepo-bot 011c111b86 [python] PY-84910 PY-79486: (WIP) Replace old SDK configuration process with new one if enabled.
When registry key is enabled, we replace all other SDK configurations (done by inspection and open processors) with a new one.

We also have an action to start this process

GitOrigin-RevId: 425ae78b769c5b5d40974cee9f19227410f63d45
2025-10-17 18:12:21 +00:00
Vitaly Legchilkinandintellij-monorepo-bot 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
Timur Malaninandintellij-monorepo-bot defbf5a1d0 PY-80882 Introduce support for "Run with" tools in Python run configurations. Introduce PyRunToolProvider and UvRunToolProvider to enable uv run for UV SDKs and update Python run configuration logic accordingly
GitOrigin-RevId: 0323bba73b2f9d3530280c5d03e749c664adb425
2025-10-13 19:57:17 +00:00
Daniil Kalininandintellij-monorepo-bot 97ce0f6cd7 PY-82344 Enable the new UI for Update Dialog for PyCharm
GitOrigin-RevId: 794ca7ea6ccba61e4a2ead522c672dcfcd592502
2025-10-13 15:11:48 +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
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
Alexey Katsmanandintellij-monorepo-bot 0c509dbb23 PY-82666 Fix undetached process cancellation when running packaging tool
Pip packaging tool used legacy process handler, which led to undetached
processes being spawned and even process leaks if they are really long
running. This led to flaky tests that were trying to delete temporary
directories after the test was finished, and at the same time process
was still running and creating __pycache__ directories there. That's
where a DirectoryNotEmptyException was thrown leading to a test failure.

The whole problem was fixed by using a new ExecService instead of a
legacy process handler. Also unused register keys `python.packaging.tool.use.project.location.as.working.dir` and `python.packaging.tool.upload.project` have been removed.


Merge-request: IJ-MR-176080
Merged-by: Alexey Katsman <alexey.katsman@jetbrains.com>

GitOrigin-RevId: 31c02fc8c25abd5941518958e7e2651f3771bad1
2025-10-05 17:18:24 +00:00
Ilya.Kazakevichandintellij-monorepo-bot 2888d207d9 PY-82580: pyproject.toml refactoring to combine all pyproject.toml EPs to single API
The main idea is to decouple tool implementation from low-level platform APIs: Open project processor, workspace model e.t.c.
Implementing `spi.Tool` should be enough to introduce new tool.

GitOrigin-RevId: 1177b57fc0eee1ca2c88cac5b20618a6170bf521
2025-10-01 02:21:16 +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
Ilya.Kazakevichandintellij-monorepo-bot 3d6abaf160 PY-79486: Cleanup (WIP)
We now have only one (`python.pyproject.model`) registry key enabled by default.

Number of boilerplate was a little bit decreased too.

GitOrigin-RevId: 0f7ecf324be038430230d9865688ce22ee922de6
2025-09-15 22:28:10 +00:00
Yuriy Artamonovandintellij-monorepo-bot 64512e8d6c [icons] IJPL-207480 Move generic purpose icons from PythonIcons to AllIcons
GitOrigin-RevId: 966f5d8f9fe1a42064c56ca50d936347ea067273
2025-09-14 19:47:10 +00:00
Alexey Katsmanandintellij-monorepo-bot 69523b7c6a PY-82352 Fix reading of env files for old command line python runner
GitOrigin-RevId: 81df145e58cf0a509dd92ad1157916fc77978afb
2025-09-12 17:35:51 +00:00
Timur Malaninandintellij-monorepo-bot c98d45b58b PY-84135 Revert "PY-81854 Introduce UvRunConfigurationProducer to support run via uv run for UV SDKs"
This reverts commit 1a456731fcea42ad2f374b3baa90a3bbf058ca1f.


Merge-request: IJ-MR-175388
Merged-by: Timur Malanin <timur.malanin@jetbrains.com>

GitOrigin-RevId: f023ddab144e0d88202f27ae23a031fa67f76715
2025-09-12 10:47:38 +00:00
Nikita.Ashihminandintellij-monorepo-bot b804677f62 PY-83138 requirements.txt: To update icon and wording for floating toolbar
GitOrigin-RevId: a4ee64089960c93a45c7f758ddb34fb2047205b1
2025-09-12 09:51:32 +00:00
Timur Malaninandintellij-monorepo-bot ed13009694 PY-81854 Introduce UvRunConfigurationProducer to support run via uv run for UV SDKs
GitOrigin-RevId: 1a456731fcea42ad2f374b3baa90a3bbf058ca1f
2025-09-10 18:05:56 +00:00
Natalia.Murychevaandintellij-monorepo-bot feb51851df [PyCharm Tables] PY-78903 Added a registry key to save preferences between new and old tables #PY-78903 Ready for Merge
* Added the "python.data.view.allow.save.preferences.community.vs.powerful.data.view" registry key. If it's enabled, then we will remember a user's choice which data viewer they prefer.
* Will show the Slicing editor field in the new data view by default, as users cannot find this slicing field (the "input expression" field)

GitOrigin-RevId: 1c03357451d3dc8a228b06fd4c59210b313e8478
2025-09-10 10:48:31 +00:00
Egor Eliseevandintellij-monorepo-bot c017cf9b49 PY-83446 Function is executed on hover while debugging
Merge-request: IJ-MR-175035
Merged-by: Egor Eliseev <Egor.Eliseev@jetbrains.com>

GitOrigin-RevId: 0917d6b69dc336fa64eec087b31cdbd762f62bbc
2025-09-09 17:17:13 +00:00
Timur Malaninandintellij-monorepo-bot 716ad92ab6 PY-82801 Introduce support for error display and quick fixes in Python Packaging Toolwindow
- Integrated error nodes into the Packaging Toolwindow UI and implemented rendering strategies.
- Introduced `SyncLockFileQuickFix` interface and UV-specific synchronization quick fix.

GitOrigin-RevId: e47ae06a5772a9fd2f3a176805483fe32f2110c1
2025-08-18 16:01:59 +00:00
Vitaly Legchilkinandintellij-monorepo-bot 42e77f6682 [python][evolution] Python Sdk Evolution widget (PoC)
Merge-request: IJ-MR-172341
Merged-by: Vitaly Legchilkin <Vitaly.Legchilkin@jetbrains.com>

GitOrigin-RevId: 46dd03abe5bbcb02a9b0202d232979dff5f4e492
2025-08-13 21:51:41 +00:00
3e7b16f248 PY-24834 Implement the strict semantics of union types
Under the registry flag "python.typing.strict.unions", enabled by default.

"Strict" union is considered a subtype of another type only if *all* its
members are subtypes of this type. Similarly, accessing an attribute on
a union type considered safe only if *all* its members contain this attribute.
It holds even if one of the union members is Any, i.e. "str | Any" is still
incompatible with "int", and it's not safe to access a non-str attribute on
it.

This is how all other type checkers treat union types. Historically, we
use so called "weak unions", where the above rules were relaxed so that
it was enough to have at least one compatible member type. It was
necessary because back then there was no way to declare function overloads,
type narrowing was limited (no pattern matching, no TypeIs/TypeGuard),
so proper strict unions, as in the type theory, would cause too many false
positives.

Co-authored-by: Aleksandr.Govenko <aleksandr.govenko@jetbrains.com>

GitOrigin-RevId: 8a676d810548bf71ac0ff3497e59d8694e03e4db
2025-08-12 17:19:34 +00:00
Nikita.Ashihminandintellij-monorepo-bot 248b69f8cc PY-78749 Packages: Remove not used PyPackageManagers
GitOrigin-RevId: 64afac916b5e99bdb6eecfbd0714dea88f5ad626
2025-08-10 12:31:15 +00:00
Nikita Ashihminandintellij-monorepo-bot 82eace9398 PY-83179 PySDK: Support read only
Merge-request: IJ-MR-171680
Merged-by: Nikita Ashihmin <Nikita.Ashihmin@jetbrains.com>

GitOrigin-RevId: 0518786baf820fc50f8f7e8346157e98380f2f36
2025-08-07 23:38:52 +00:00
Vitaly Legchilkinandintellij-monorepo-bot cc03cdfb94 [python] add display ids for notifications (PY-83036)
Merge-request: IJ-MR-171306
Merged-by: Vitaly Legchilkin <Vitaly.Legchilkin@jetbrains.com>

GitOrigin-RevId: 7a4b12f4bee6fae93ce5351bda0e19289b8f7404
2025-08-05 08:56:42 +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
Vitaly Legchilkinandintellij-monorepo-bot 9114137195 [python][sdk] check poetry.lock in poetry auto configurator (PY-82840)
+ refactor PyProjectSdkConfiguration to return PyResult for SDK creation methods:
In case of creation failure, the actual error was hidden and some random sdk was assigned instead of the real one. For example, if we open a poetry project and project and poetry sdk creation fails - any random sdk was assigned to the project (last used hatch or conda for example). Now ShowMessageErrorSink is used.

GitOrigin-RevId: 015fc469b6b5d934b49278ccfb3afc683b61554e
2025-07-25 14:03:47 +00:00
Nikita.Ashihminandintellij-monorepo-bot 94a946682b PY-82838 Pipenv: rewrite to PythonPackageManager
Signed-off-by: Nikita.Ashihmin <nikita.ashihmin@jetbrains.com>

GitOrigin-RevId: 213a8c34d554c443fd77a6f0e60c75ed97f844eb
2025-07-23 23:08:33 +00:00
Petrandintellij-monorepo-bot 1399a0c594 PY-81981 Sync pushed language level
GitOrigin-RevId: d60893c0631846bf411819c5d2687e411a0a578c
2025-07-22 19:28:39 +00:00
Nikita.Ashihminandintellij-monorepo-bot c35bacc607 PY-82800 Requirements: Add floting toolbar for requirements.txt for venv interpreters
Signed-off-by: Nikita.Ashihmin <nikita.ashihmin@jetbrains.com>

GitOrigin-RevId: b9fb948d7f12fce1f60e0990e47657f9b17e94f6
2025-07-22 19:05:39 +00:00
Ilya Kazakevichandintellij-monorepo-bot 45d3c7a691 PY-76167: Do not access FS from EDT + test.
PY-76167: Convert class to a light service to satisfy Qodana

PY-76167: Do not access FS from EDT + test.

`PyConfigurableInterpreterList` checks sdk type to sort it.

To get SDK type it used to access FS. It does no more: it now uses SDK additional data.

To test it, we've introduced `FORBID_SLOW_OPS_PROPERTY`


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

GitOrigin-RevId: 80631e31a021e5ea7007c5873596446ef6d8665e
2025-07-22 12:49:44 +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
Vladimir.Koshelevandintellij-monorepo-bot c76c23c658 [pycharm] get rid of PyCompletionLogger since we don't use its results
GitOrigin-RevId: 0b88e40c0908d25cdcac8fd68f8f9977f97bbdf4
2025-07-17 15:09:18 +00:00
Aleksandr Sorotskiiandintellij-monorepo-bot 157270ebce fix system python providers registration config; PY-47379
GitOrigin-RevId: 4b0e7d9bf893ed5b014691e3b1081652f33e8d58
2025-07-16 12:59:27 +00:00
Petrandintellij-monorepo-bot a51b604bd4 PY-71549 Eliminate global shared state inside annotators
Before, when entering an `annotate` method, a reference to `AnnotationHolder` was stored in the annotator field. And this required synchronization. Now this reference is stored into a temporary PyElementVisitor object actually used to perform highlighting.

Also, register all python annotators using a regular 'annotator' EP. There is no point in using 'Pythonid.pyAnnotator'.

GitOrigin-RevId: ad1df8ce743bc62d3f43e6bf9b1a8ea370ff7de7
2025-07-15 11:17:12 +00:00
Petrandintellij-monorepo-bot 6db8559cd4 PY-71549 Move HighlightingAnnotator, PyAnnotatingVisitor to python.psi.impl
GitOrigin-RevId: 049a21f31101e4c90ebcb1f335825d759ae50663
2025-07-15 11:17:12 +00:00