(cherry picked from commit 675a1b5828c4b2570c386b469a440d5512713d02)
(cherry picked from commit a114659a11)
(cherry picked from commit f343db0751)
(cherry picked from commit 12147c0161)
Revert the revert of test changes that are not directly related to strict unions.
(cherry picked from commit 3f00d59e604a3488960c2907650ec9da4b611166)
IJ-MR-184663
GitOrigin-RevId: df38eadedc142c91771ceeb11f3fe4a1bb93b961
Because UnsafeUnion is not denotable, we used to generate Any in such cases.
(cherry picked from commit 37a29f635920c9c4ac1c1d4036ddd4594a0fd3bd)
IJ-MR-184663
GitOrigin-RevId: 058d7d214b16611230feb418b0ce93b680985936
Namely, `generics_basic.py` in the conformance test suite and
Py3TypeCheckerInspectionTest.testTypeVarWidening.
Revert 07803c6243370d55df0d870e2e32b38170c1fb49
(cherry picked from commit 24d3313cb944dc2e511191efd3b4d2cf2631ac92)
IJ-MR-184663
GitOrigin-RevId: 97d42c56b99ca3c6bb663294524af53769977203
`UnsafeUnion[int | str]` is considered a subtype of `str`, so the cast is redundant.
(cherry picked from commit 07319408575ee102041eb03a2ded0f3e8ece877e)
IJ-MR-184663
GitOrigin-RevId: bc34b40d5c2bf423a383b570625876cf4f58652e
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)
(cherry picked from commit f30e9a6cd7b5d103454d66f26a0c2282d7c587fc)
GitOrigin-RevId: 6894d00debe969ecdfdadd1a7ba0d44866d9bf53
Utility method to map `Result<S, E>`` into `Result<S, E2>`` is required for the next changes
(cherry picked from commit 811ddf171794ffdf20f77de6c735ac7ac19ce30a)
(cherry picked from commit b13ddca080644357a738ffc10795703d11b18d97)
GitOrigin-RevId: 3b4e5448ed2aa9526933e579be871a0b69b7f2f9
While closing remote stream should lead to `EOF` (`-1`), `read` might still throw `IOException`.
This is documented by the `read` contract, and we face it when underlying stream gets closed i.e: one thread was blocked by `read` and another one called `close`.
(cherry picked from commit 2c49be37333a794c6ed1f5ce4ad3d8d2f29b93fa)
IJ-MR-181675
(cherry picked from commit f3f40e8edbc0caa2450b297ae278b37a754a5f49)
IJ-CR-183687
GitOrigin-RevId: aaffb92704a0a52c89d75de83fcb0433a2ce3d54
- Python interpreters' `homePath` is the in‑environment absolute path (e.g., `/usr/local/bin/python3`) with no scheme; it can be identical across WSL, Docker, and SSH. With per‑environment separation enabled, these SDKs get routed into the `LocalEelDescriptor` environment bucket, making them unavailable to WSL projects and contributing to broken Remote Docker SDK workflows on Windows.
- Trade‑off: native opening of Dev Containers (without a backend running inside the container) isn't available with this default; that flow currently has other issues and isn't something we can ship now.
IJ-MR-181211
(cherry picked from commit 81e43569a48cc42f48d3e2b5472c16944b940318)
IJ-CR-183680
GitOrigin-RevId: b7d7a13a04d39b0710465b9fa3a33fe30f6031ff
PyInterpreterInspection uses SDK configurators to find existing
environments and find the most suitable SDK. This operation takes time
(especially with conda on Windows), and on top it's performed on every
file change, making UI freeze all the time.
This change makes inspection asynchronous by caching the result and
triggerring inspection again to show changes on the UI.
Follow-up to IJ-MR-178613
GitOrigin-RevId: 889bdaac6a0a34cfca4d29d6a43eb95824b32fe4
[pycharm] PY-85729 Post-cherry-pick fixes
[pycharm] PY-85729 Fix stress test on Windows
[pycharm] PY-85729 Fix smoke tests
[pycharm] PY-85729 Add visibility attribute to plugin config
[pycharm] PY-85729 Add a coroutine cleanup test
[pycharm] PY-85729 Add a stress env test
[pycharm] PY-85729 Minor cosmetic fixes
[pycharm] PY-85729 Performance improvement: add debounce to reduce the amount of GC garbage
[pycharm] PY-85729 Fix potential OOM: adjust limits
[pycharm] PY-85729 Fix potential OOM: add cancellation logic for background process observer
The background error process observation logic didn't cancel the coroutines, making them last for way longer than needed. Cancellation logic was added to remedy this.
[pycharm] PY-85729 Fix OOM: Force LazyTree recomposition on tree change
It looks like LazyTree composable hogs memory by keeping track of all the previous trees; this is bad for our use case as any snapshot change to the tree will be saved, causing potential OOM by not freeing the processes. This is fixed by forcing a recomposition on each tree change (via key(tree)).
Merge-request: IJ-MR-183264
Merged-by: David Lysenko <david.lysenko@jetbrains.com>
(cherry picked from commit 6a3f71219da1b8577b26d35ce73846685314eb3d)
IJ-MR-183264
GitOrigin-RevId: 0dfc7ab098a03f2e97ce7f5bfa9a691164353136
1. Filter/Search toolbar size on different zoom levels will be properly sized
2. Toolbar buttons will be right-aligned
3. Packages group headers will have proper sizing on every Zoom level
4. Packages list item will have proper text size when changing IDE zoom
(cherry picked from commit 1b5372491881448a22fa10c4b23df4c3fd1e6f8a)
IJ-CR-183206
GitOrigin-RevId: 86df447644ec637f61c93b9014aa90e8ca22734e
Function isAvailable might be called from EDT and it's completely
normal. Also, we already check that SDK is uv. So it's highly unlikely
that we won't have uv executable when getting run tool parameters.
(cherry picked from commit 018fb9486a04013c113c77c1167745bcf9324f98)
IJ-MR-183149
GitOrigin-RevId: a1573fa02bbb52da127b43b04b89c2289ee73dff
Firstly, we have JDK table where we store SDKs, but also we have our own
ProjectSdksModel for interpreters. If we won't persist SDK in our model,
but only in JDK table, we'll technically have SDK, but won't set it
properly in different places (eventually we'll sync those models
though). So it's important to persist SDK using ProjectSdksModel.
Secondly, for SSH interpreters we used helpers mappings for all uploaded
files. The proper way is to detect whether the file is a helper and
apply appropriate mapping.
These changes address both these issues.
(cherry picked from commit d582fc714326324c0580f11b13fd1f843d8ebefa)
IJ-MR-182438
GitOrigin-RevId: 07985128334d1725e12a6c95d1d320a2956fcf0c