Commit Graph

32752 Commits

Author SHA1 Message Date
Mikhail Golubev
0bdf5b4c7d fixup! PY-86002 Disable "python.typing.strict.unions" and revert the tests updated for PY-24834 in 253
Revert the revert of test changes that are not directly related to strict unions.


(cherry picked from commit 8a76bd91e040ad97e8ed680161f28370c84920f8)

IJ-MR-184619

GitOrigin-RevId: 4c293de3ecc3c8cb16869532fccc639e8c5a17ae
2025-12-03 20:58:50 +00:00
Mikhail Golubev
3c1d2da94f fixup! PY-86002 Disable "python.typing.strict.unions" and revert the tests updated for PY-24834 in 253
(cherry picked from commit 484b24ce81fe1364bc826f0a7aac9ea002bd148e)

IJ-MR-184619

GitOrigin-RevId: ee3d8595146bd960def96bd6130d8de765f86a78
2025-12-03 20:58:50 +00:00
Mikhail Golubev
de837fb378 PY-86002 Fix more new tests that were expected to generate type hints with weak unions
Because UnsafeUnion is not denotable, we used to generate Any in such cases.


(cherry picked from commit 2c43848c86ccbab416bd321aee2f999f61eda756)

IJ-MR-184619

GitOrigin-RevId: 1f086ddc0e83b26e371cc3a3b64407e1508d57e2
2025-12-03 20:58:50 +00:00
Mikhail Golubev
060b900cf9 PY-86002 Revert also PY-25989 PY-84544 to fix new test failures after the revert to weak unions
Namely, `generics_basic.py` in the conformance test suite and
Py3TypeCheckerInspectionTest.testTypeVarWidening.

Revert 07803c6243370d55df0d870e2e32b38170c1fb49


(cherry picked from commit 9c334ef32597be1d1e8fbc3251ac267be46555c8)

IJ-MR-184619

GitOrigin-RevId: 4b2440c973d9c7a7a42590665bd473c4e7a4c9cf
2025-12-03 20:58:50 +00:00
Mikhail Golubev
7c1fa29f39 PY-86002 Adjust PyUnnecessaryCastInspectionTest.test okay expected result
`UnsafeUnion[int | str]` is considered a subtype of `str`, so the cast is redundant.


(cherry picked from commit 550a9d55715564492169175c5e20cfbf1ade4b20)

IJ-MR-184619

GitOrigin-RevId: 854131d04308bd97b12ef06cc10a4aa89238c9ef
2025-12-03 20:58:50 +00:00
Mikhail Golubev
3a75cb758c PY-86002 Update some tests introduced after PY-24834 to expect legacy unions
(cherry picked from commit 04d02eb3f87e8c38f50e89510c79c2a1c99e3936)

IJ-MR-184619

GitOrigin-RevId: 272214615275714ca0defcb24f6cf3f66d74382d
2025-12-03 20:58:50 +00:00
Mikhail Golubev
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
Hlib.Saliuk
33cd08a100 [python] RELEASE-578: PyCharm 2025.3 RC
(cherry picked from commit 34a044798cb94d389fe363664644480a4eb4b44c)

IJ-MR-183786

GitOrigin-RevId: 5911cd7e8d51659823527b134f682bc6c312ae8b
2025-12-02 23:25:31 +00:00
Alexey Katsman
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
Vladimir.Koshelev
a2f31c2e8a PY-85989 [pycharm]: update what's new for 2025.3
GitOrigin-RevId: 66042e9fff452c517e2905aa6c8f663f3c39f490
2025-12-02 17:32:00 +00:00
Pavel Karateev
9285fded89 [python] PY-83029 fix compatibility inspection tests
`testBreakInFinallyBlock` and `testReturnInFinallyBlock`
were testing vs. latest language level, so apart from
the compatibility warning (for which these tests are
intended) - a corresponding syntax error was captured

I made these tests to use a specific language level
so they only verify the correctness of the compatibility
inspection and introduced four tests in `PythonHighlightingTest`
to capture the syntax error


(cherry picked from commit 254570dc4d5022176590377eaf8ea6a08917937a)

IJ-MR-182362

GitOrigin-RevId: fb9c92923820b370672451c5753ee24bdd5a4570
2025-12-02 11:21:12 +00:00
Pavel Karateev
b257c225d2 [python] PY-83029 fix tests
(cherry picked from commit 64d9931ee762c8ac801114e22952f3086235467a)

IJ-MR-182362

GitOrigin-RevId: bcf515ae4f73cd3d44dc81a54c1acd1fbfb33c18
2025-12-02 11:21:12 +00:00
Pavel Karateev
a73f46edce [python] PY-83029 re-generate the list of unsupported modules
(cherry picked from commit d70598a84859bbc36587c3c8c61cd7af558743aa)

IJ-MR-182362

GitOrigin-RevId: 48a5a9a45159ff011e5424945cc6e59f1cf36c37
2025-12-02 11:21:12 +00:00
Pavel Karateev
e9731c5b3f [python] PY-83029 add Python 3.15 language level
(cherry picked from commit b7f275347c6d89230c497a3806a3efee26850833)

IJ-MR-182362

GitOrigin-RevId: ea857df39050863b5475063df902015cafeae7d2
2025-12-02 11:21:12 +00:00
Vladimir.Koshelev
95af317029 docs [pycharm]: add what's new for 2025.3
GitOrigin-RevId: 755d5e2674e5dbad4c3cbb1be0f758e3ad63e489
2025-12-01 17:03:02 +00:00
Yuriy Artamonov
f19f8e9e00 [jcef] IJPL-219928 Introduce JCEF plugin alias
To ease the migration to an explicit plugin dependency in the future


(cherry picked from commit e11b156081e50c072558b75285cdbe965e5db47f)

IJ-MR-184154

GitOrigin-RevId: 60ff0daa18b45bd246e13ec832bdca2180eb18f0
2025-12-01 13:46:56 +00:00
Natalia.Murycheva
057f12b46e [PyCharm Tables] PY-84611 Fixed once again
(cherry picked from commit af34abdd058021f5ee9ece44d0aa5b9268ae5eca)

IJ-CR-184067

GitOrigin-RevId: baef41d39c29550fcaf01bde3c3af6917529aec4
2025-11-28 16:27:00 +00:00
Morgan Bartholomew
723fb8c8d6 fixup! [PY-6591] use PyCodeInsightSettings.PREFER_FROM_IMPORT when moving module reference
(cherry picked from commit e194ea47c00647d67067377a63ff257609399c38)

IJ-MR-183300

GitOrigin-RevId: afc726fa9f2e556833f09d41e5d5f77469ca7fa6
2025-11-27 11:52:20 +00:00
Morgan Bartholomew
6d2db28b86 [PY-6591] use PyCodeInsightSettings.PREFER_FROM_IMPORT when moving module reference
(cherry picked from commit 2458902032ff1078689a2a641dfaa29e522148a5)

IJ-MR-183300

GitOrigin-RevId: f101d8aac2ad92af83ad6716a15865238856abb7
2025-11-27 11:52:20 +00:00
Morgan Bartholomew
b319657615 PY-85473/PY-85475 black/lsp modal use of forSdk
(cherry picked from commit 82a51fa36cf336450dda2e137aca0e9d06a92fb4)

IJ-MR-183301

GitOrigin-RevId: f4d2c74b43eacd003569f83525f38934969f8b34
2025-11-27 11:33:39 +00:00
David Lysenko
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
KotlinIsland
b0fd434d8f [PY-55968] poetry: detect dependencies in groups
(cherry picked from commit 6eb5da2a1ac45e2bae1831c9ae2ef22081f3c430)

IJ-MR-183124

GitOrigin-RevId: cba02910e4a11c38dfaf68b53a59a6e4102146d0
2025-11-27 08:56:23 +00:00
Mikhail Golubev
24990ca39b [python] PY-85031 Use PyAstNamedParameter.isSelf when reporting legacy positional-only parameters
It correctly takes into account the first argument of `__new__` that is also implicit,
and thus should be excluded when reporting positional-only parameters following
non-positional-only ones.


(cherry picked from commit abf09c6be5e49c21c12264d22bf63a51018fdcd6)

IJ-MR-180323

GitOrigin-RevId: 85fb7ea284a237252e8634344b968981eda56dc3
2025-11-26 19:08:59 +00:00
Mikhail Golubev
c298afb0e5 [python] PY-83347 Support mapping positional-only parameters to unpacked arguments
(cherry picked from commit 410737d5b913010933a0a2e0a2c350ff81925ee6)

IJ-MR-180323

GitOrigin-RevId: 1e0aa756a385dc498f04865e2ee99d7c7a0418e0
2025-11-26 19:08:59 +00:00
Petr
241ba26253 PY-25989 PY-84544 Widen types during type parameters substitution
(cherry picked from commit 627673fc7ed27621df839a5c1d4d31e677ce7f8c)

GitOrigin-RevId: 07803c6243370d55df0d870e2e32b38170c1fb49
2025-11-26 18:52:04 +00:00
Ilya.Kazakevich
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.Kazakevich
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
Daniil Kalinin
f2bde37381 PY-82344 Fix promo border visible even if promo is hidden
(cherry picked from commit 63b1b4896c31a7beb61d1be70fd5e19550496982)

GitOrigin-RevId: 3c8b66f3443cc6e126c3fef1ce96fcd920cef355
2025-11-25 20:09:10 +00:00
Daniil Kalinin
a75939123a PY-82344 Remove border from tooltip image
(cherry picked from commit b7d4fef651ef8d7ae8e03c95b999cb6535c45049)

GitOrigin-RevId: 0499188b113ccb542680f8fb0698f87ebfb93815
2025-11-25 20:09:10 +00:00
Alexey Katsman
46011986a7 PY-85634: Make PyInterpreterInspection async for PyCharm
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: ed9e1aad89fb24ce70ba910ddd386a1adccd1baf
2025-11-25 18:47:50 +00:00
Alexey Katsman
c6f0af15f0 PY-85634 Adapt PyInterpreterInspection to Kotlin style
Follow-up to IJ-MR-178613

GitOrigin-RevId: 25175f413a9062b43e1b2e2df2ea1082ebd639de
2025-11-25 18:47:50 +00:00
Alexey Katsman
93a8360b34 PY-85634 Move InterpreterSettingsQuickFix to a separate file
Follow-up to IJ-MR-178613

GitOrigin-RevId: 19520730af0b9df85c5b98baf36de6902b5701c8
2025-11-25 18:47:50 +00:00
Alexey Katsman
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
Alexey Katsman
6dae84901c PY-85634 Convert PyInterpreterInspection from Java to Kotlin
Follow-up to IJ-MR-178613

GitOrigin-RevId: 1e88c0704809735e9cff8aa8bff9cc921c8acb3b
2025-11-25 18:47:50 +00:00
Vitaly Legchilkin
10584bedba PY-85756 use sigstore to verify python distributive signatures instead of GPG
(cherry picked from commit e2db94448a88eef0c2fccd4e91e28e5ae548799e)

IJ-MR-183564

GitOrigin-RevId: cfb20127a6826da9b210f1812e5f8f0727e12bc0
2025-11-25 18:32:55 +00:00
Vitaly Legchilkin
f038c271b6 PY-85756 update sdks.json registry - bump python/conda versions
(cherry picked from commit 7699f7ed417a4c73bf9b18093c31c8950f9a1192)

IJ-MR-183564

GitOrigin-RevId: 7edbe174f2ff067761799baf1ed60bcf509f2eff
2025-11-25 18:32:55 +00:00
Alexey Katsman
cdfdd3e82f PY-85637 Persist tool path when selecting existing environment
GitOrigin-RevId: 9e10ee0c38a025286f53362cf834bfcce57b665f
2025-11-25 16:14:01 +00:00
Alexey Katsman
3064bb7b2e PY-85504 Move tool detection to an earlier phase
In order to prevent showing modal progress bar all the time, it's better
to start detection algorithm when we start choosing the interpreter. In
this scenario the progress bar will be show very rarely.

GitOrigin-RevId: 8b2e756e1d46a177ce7dd581520b201c5dd4e897
2025-11-24 19:21:50 +00:00
Alexey Katsman
5fa4f67865 PY-85162 Pre-select tool based on existing envs and other markers
GitOrigin-RevId: 3047ea7b0c18bfd591e7551a90c027d543aa5c30
2025-11-24 19:21:50 +00:00
Ilya.Kazakevich
a8e98b3613 [python] PY-79486: (WIP): Front-end refactoring
Use `key` not to recompose all modules while filtering

GitOrigin-RevId: 4dcc255226c7a34f16a24d9196ae82e1123c5f13
2025-11-24 16:35:26 +00:00
Ilya.Kazakevich
a198596584 [python] PY-79486: (WIP): Improve UI towards the new design:
1. Show module paths
2. Show icons
3. Make window 65% wide

GitOrigin-RevId: bbafbfddfadb9f2b52b4eccdf60539788dd356af
2025-11-24 16:35:26 +00:00
Ilya.Kazakevich
7cd15cd432 [python] PY-79486: (WIP): introduce PathShorter.
See class doc for info

GitOrigin-RevId: 901aa77ace2e8e262156e88efc059508f37b8334
2025-11-24 16:35:26 +00:00
Ilya.Kazakevich
de64dbce1b [python] PY-79486: (WIP): Front-end improvements:
Remove hardcodes, add filter

GitOrigin-RevId: e1d9370f8bfa14fe5a39891dd6812b99906fbf8b
2025-11-24 16:35:26 +00:00
Ilya.Kazakevich
08b6a3a4c9 [python] PY-79486: (WIP): Frontend clean-up, add open/close arrow
GitOrigin-RevId: c9e820cc6f79a79d3dfbbd6c7dff5559c189cf00
2025-11-24 16:35:26 +00:00
Ilya.Kazakevich
48c984ab27 [python] PY-79486: (WIP): show workspace members one level deeper.
Simplify frontend logic, show workspace members as children of their parent

GitOrigin-RevId: 19d875d5bf925e1be94307d990e217f07f47c6c7
2025-11-24 16:35:26 +00:00
Ilya.Kazakevich
fb7fbce0a1 [python] PY-79486: (WIP) Frontend refactoring.
Get rid of lots of constants, use intrinsic measurement

GitOrigin-RevId: c94400fb677249095c3035b1ffceeee44b725ef6
2025-11-24 16:35:26 +00:00
Ilya.Kazakevich
2fb85bfed8 [python] PY-79486: Limit window width
GitOrigin-RevId: a295aca1d35e32de8cd700d22df351a56621a982
2025-11-24 16:35:26 +00:00
Ilya.Kazakevich
0fd08859a3 [python] cleanup PY-79486: Inline poetry svg styles as Compose doesn't support classes.
SVG image with classes doesn't work in Compose which is used as a frontend by Python SDK configuration

GitOrigin-RevId: d84e5418f64d60747fd80a3d8e5a5e88be681c3d
2025-11-24 16:35:26 +00:00
Ilya.Kazakevich
b38ed09f04 [python] cleanup PY-79486, PY-82580: 2 -> 3 dots fix.
GitOrigin-RevId: 55126bfa11ae1b8256ae07d5f11193eba4910efd
2025-11-24 16:35:26 +00:00
Ilya.Kazakevich
a35535b51a [python] PY-79486 (WIP): Use real EPs to create SDKs.
The process is described in `ModulesSdkConfigurator` doc.

GitOrigin-RevId: 1a21824e488a2d799b229d7c8355b60b0b177809
2025-11-24 16:35:26 +00:00