Commit Graph

516 Commits

Author SHA1 Message Date
Egor.Eliseev
1c33aab97d PY-77381 Unable to select an existing Poetry environment as a project interpreter
Add PoetryExistingEnvironmentSelector

(cherry picked from commit 4fc75a24669d8a2fc12b5ff963cc5715ebc6ab3a)

GitOrigin-RevId: b5ed7b45a3b4e27786bf899ab42f9ffe757d7f9d
2025-01-20 23:33:36 +00:00
Dima Golovkov
e305b9d6c2 Add UV icon for UX-3312
(cherry picked from commit 8cb51234a2a5b1c5757cf4dc2a04a769d510b675)

GitOrigin-RevId: 289cc40c9aa52bc3a666fff986178078630bbd6b
2025-01-19 21:30:05 +00:00
Aleksandr Sorotskii
b21ed9e4e9 more consistent naming for uv; PY-75983
(cherry picked from commit 111a9ffb7b7107d3fbdfe01df649a38be2b5b821)

GitOrigin-RevId: 2b99c7457d94437d5c4c117b74031c30c5c84ff1
2025-01-19 21:30:05 +00:00
Aleksandr Sorotskii
2df265c932 work around suspend/legacy api and threading isssues; #PY-77996 fixed
Merge-request: IJ-MR-151488
Merged-by: Ilya Kazakevich <ilya.kazakevich@jetbrains.com>
(cherry picked from commit db9e012e187c62fbc53ddfa0c31603eb834058f9)

GitOrigin-RevId: 543d11a54e7106bd7f057e930d3796cc76d64617
2025-01-19 21:30:05 +00:00
Aleksandr Sorotskii
42af44caf9 basic support for uv env & package manager; PY-75983
(cherry picked from commit 2597e4de17e167d8a0b0038190b5127a9dc4b155)

GitOrigin-RevId: 025955aea8f118a26e5ea24ca5b740fdd6c6bc7a
2025-01-19 21:30:04 +00:00
Egor Eliseev
cf06be9b95 PY-52265 Poetry in-project environment
Add the new setting: create poetry env in the project.


Merge-request: IJ-MR-149143
Merged-by: Egor Eliseev <Egor.Eliseev@jetbrains.com>

(cherry picked from commit ed85efe339518cdf6949752be286172113931c22)

IJ-MR-149143

GitOrigin-RevId: 3a682aac846e4a80e8310a3dcc0a5f1c988d28e2
2024-12-18 15:50:26 +00:00
Egor Eliseev
f910392d5d PY-77160 Poetry/Pipenv modules refactoring
Split pipenv into separate files.
Rewrite functions/methods using coroutines.
Add `internal` or `@Internal`.

Merge-request: IJ-MR-148379
Merged-by: Egor Eliseev <Egor.Eliseev@jetbrains.com>

(cherry picked from commit b398d04bfa358ce97bf1d30d59b2113548e7983c)


Merge-request: IJ-MR-151355
Merged-by: Egor Eliseev <Egor.Eliseev@jetbrains.com>

GitOrigin-RevId: 2cd929fad7649fd6302100b8af5ff7969de8ec3e
2024-12-18 14:01:31 +00:00
Daniil Kalinin
28719826e7 PY-76640 change wording for promotion message
(cherry picked from commit 5d1b976da6c4e10dbb35afca12a386be956abb5f)

IJ-CR-149632

GitOrigin-RevId: 2d8d7e8cc80c134c050b038a28dd12b50b78bdff
2024-11-19 13:03:04 +00:00
Andrei Iurko
efbebbef0b [qodana] QD-9891 Add reviewed inspections categories and fix json schema validation
GitOrigin-RevId: 7ca2b2fde31a47b41b1940badee13d931bd91102
2024-11-06 14:28:05 +00:00
Aleksei Kniazev
3d4d8fb8e1 [python] in-product survey about user's job for pycharm (PY-74269)
(cherry picked from commit 5ce25d3c418b54649e6a52a892bc84b837251e76)

IJ-MR-148062

GitOrigin-RevId: 878f980a2487aeb772e600721808261a688b18c4
2024-11-04 12:18:50 +00:00
Egor Eliseev
23a2bfac5c PY-65295 Poetry installation
Fix poetry executable detection for the "Add new local interpreter" panel.
There was a problem in `ModalityState`, which prevented updating `state.poetryExecutable` from EDT.


Merge-request: IJ-MR-147485
Merged-by: Egor Eliseev <Egor.Eliseev@jetbrains.com>

(cherry picked from commit 43a807c20f8572bcf570121792269d6ee0c67acd)

IJ-MR-147485

GitOrigin-RevId: fab1de5a2a55e62ff66790defb033b7745259dc5
2024-10-25 13:14:58 +00:00
Tatiana Ber
30416ced81 Fix typo in UI text
GitOrigin-RevId: 77a7cf873c9892e39deed4eb789dd997b513460b
2024-10-21 12:50:19 +00:00
Nikita Pavlenko
ff567970a9 [PyCharm] Jupyter (fix): Fixed suggestion to install Jupyter to view rich tables, added restart IDE. #PY-75914 Fixed
GitOrigin-RevId: 60ea3742324774979f6db883b0d2b2d63db3227d
2024-10-14 17:46:18 +00:00
Andrei Iurko
4111cfc875 [qodana] QD-9891 Add aspects with the highest certainty for inspections
GitOrigin-RevId: 8fad66714287192bd5cbc8396a3d30f1ba139302
2024-10-11 14:49:57 +00:00
Ilya.Kazakevich
ae6bda01df Python: Make createVirtualenv suspend, process error and cover with tests.
We now fail silently in case of any error. This commit fixes it.

GitOrigin-RevId: 76977843a892dd450d8292378a7cefb522cb78c1
2024-10-04 01:08:48 +00:00
Nikita Pavlenko
382b256f33 [PyCharm] PY-75914 Jupyter (feat): From scientific.py.tables also removed dependency to intellij.notebooks.visualization. Added suggestion to install Jupyter to view rich tables.
GitOrigin-RevId: 705a0f5f7883517da51da0f0c532eb90fd50e5ac
2024-10-01 13:04:25 +00:00
Ilya.Kazakevich
d1446af5c6 Duplicate entry removed
GitOrigin-RevId: d2c25a22a1d3d681fe738962a5c2928755525536
2024-09-30 23:35:22 +00:00
Roman Shevchenko
9b43719207 [project] reviewing use of file-based filters in choosers (IJPL-150176)
... and amending/replacing them with extension-based filters where possible

GitOrigin-RevId: 422e4f42ac96c295a707eae76ef25686753fc6ce
2024-09-30 20:14:03 +00:00
Nikita.Ashihmin
7283943f42 PY-75725 Packages(fix): simultaneous upgrading of multiple packages isn't working
GitOrigin-RevId: 503a98b90762ba21f1e5a628e9c929ee32eb1a29
2024-09-28 15:35:03 +00:00
Andrey Lisin
4843e1d6e4 PY-73432 Introduce checkbox option for enabling debugger server mode
GitOrigin-RevId: 7a9bc66ab59b2a209c15d3313256f2ebf61e2193
2024-09-26 13:47:19 +00:00
Andrey Lisin
95e95ad914 PY-21325 Add option to configure debugger port
GitOrigin-RevId: 312da6bbb2aafadc9600c0d5cc36a07052d52886
2024-09-25 20:36:51 +00:00
Ilya.Kazakevich
8457d2ae09 Python NPW: Heavy refactoring:
1. lots of funs now `suspend`
2. errors reported to `ErrorSink`
3. validation improved (yet, still not perfect)
4. tests added

GitOrigin-RevId: 5cbf674a70ad0e0b40180dd358398bf498d6f76d
2024-09-12 05:36:51 +00:00
Ilya Kazakevich
7bd141a993 PyCharm: Rewrite NPW API: See com.jetbrains.python.newProjectWizard
This package (aka PyV3) fixes several issues, including
1. Lots of `DirectoryProjectGenerator` misuses: We now create UI and settings with `ProjectGeneratorPeer`: no more manuals casts in callback
2. Decouples project generation from UI: Settings aren't aware of UI but generate a project instead. Settings are mapped to the UI using Kotlin DSL UI
3. Kotlin DSL UI panel enables validation
4. `PySdkCreator` (an interface implemented by all "v2" SDK panels) now accepts `Module`, so we can provide it Poetry

The whole machinery of `PythonGenerateProjectCallback` (a pack of manual casts only mother could love) is completely deprecated and will be removed soon.

Lots of small changes towards `suspend` functions, Kotlin DSL UI and `Flow` decrease the technical debt.


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

GitOrigin-RevId: 21963e843b0ae67c71a6fc5ea1229cb0f57915a9
2024-09-10 19:50:12 +00:00
Egor Eliseev
a54292035d PY-65295 Poetry installation
Try to install Poetry and Pipenv if they are not found


Merge-request: IJ-MR-141839
Merged-by: Egor Eliseev <Egor.Eliseev@jetbrains.com>

GitOrigin-RevId: 535426090df23b358ba61a9e21c2f0954c201945
2024-09-10 10:40:05 +00:00
Nikita.Ashihmin
4cbda9f67a PY-75685 Packages(fix): Small remarks for the packaging tool window
GitOrigin-RevId: a9ac807144830b4deca1654f4d791ee09044b167
2024-09-04 17:38:45 +00:00
Nikita.Ashihmin
fcfbe773b9 PY-49854 Packaging(fix): hide add package under gear
GitOrigin-RevId: 7e32a2db8dd987086b2bb2bce695271c94ca6f7a
2024-09-02 12:09:21 +00:00
Nikita.Ashihmin
8364098c4a PY-75464 PyPackages(refactor): Add PyPackageInfoPanel
GitOrigin-RevId: 34c671548086aae59833c0f6223bf7b2053ed432
2024-08-30 16:39:16 +00:00
Nikita.Ashihmin
e66c52bd22 PY-49929 Packages(fix): Allow selecting multiple packages simultaneously for a quick uninstall \ upgrade
GitOrigin-RevId: df8b02713955006061411b92cb89f40dc25046be
2024-08-24 18:21:16 +00:00
Nikita.Ashihmin
c3d76fcc00 PY-72994 Packages(refactor): Add install with option
GitOrigin-RevId: 64e7823def799c144be06213fe26198f74537775
2024-08-24 13:43:56 +00:00
Nikita.Ashihmin
b9ada91b76 PY-72994 Packages(refactor): Add progress indicator
GitOrigin-RevId: 9f6d2d17ffd67a10e73726417d05351bade5ca20
2024-08-24 13:43:56 +00:00
Nikita.Ashihmin
6996d81468 PY-72994 Packages(refactor): Fix bugs
GitOrigin-RevId: 49055bb50807cb0509cb4958cf37517e5e2ca698
2024-08-24 13:43:56 +00:00
Nikita.Ashihmin
9fde169b6a PY-72994 Packages(refactor, feat): Update package actions
GitOrigin-RevId: 12d6e92f838717817b6b3a69ae7b844ba1724be3
2024-08-24 13:43:55 +00:00
Nikita.Ashihmin
134376878d PY-72994 Packages(refactor, feat): Rename Delete package andd Update package
GitOrigin-RevId: 56ddaade343cb5eeb3240fd1090f68b72e42ed86
2024-08-24 13:43:55 +00:00
Aleksandr Sorotskii
81e490cd6f cleanup sdk validation api
GitOrigin-RevId: 33747cf0cfada370181b43d02f203b8401740c5c
2024-08-22 19:03:41 +00:00
Daniil Kalinin
abb3db3cbb PY-73906 Implement a new PyCharm Pro editor advertising notification using a plugin suggestion mechanism
GitOrigin-RevId: 1bbdad77006dfb4fe383ff21790f6aa55bdfb9bc
2024-08-08 09:20:09 +00:00
Ilya.Kazakevich
01228fba20 PyCharm: remove supportsPython3 check as any modern framework support it (all impls return true)
GitOrigin-RevId: 06f939ac73ae864a04ee6bdfd09be1e54b5bda5d
2024-08-01 19:52:34 +00:00
Yuriy Artamonov
4dac328bf4 [i18n] IJPL-158521 Fix more ellipsis problems in plugins
GitOrigin-RevId: 981393c6f975e303847ca598b650fec8fe65d9bf
2024-07-30 16:35:51 +00:00
lada.gagina
1605af64c4 [python] packaging: add an update button to the context menu (PY-72994)
GitOrigin-RevId: fbd6258369c199d3325166d9431467531c2b88ab
2024-07-30 09:29:01 +00:00
lada.gagina
0cd4aae5f5 [python] packaging: add a quickfix to install all missing packages in a file (PY-71152)
GitOrigin-RevId: 6d87758b7551df057160cfb12420064baae13b21
2024-07-18 20:53:48 +00:00
lada.gagina
19cf766f45 [python] requirements.txt: add a confirmation window for installing several packages (PY-71152)
GitOrigin-RevId: f6af85f16fa69280f56ac58c681e7c755a999cdf
2024-07-18 20:53:44 +00:00
Bogdan.Kirilenko
a6ed117460 [PyCharm] PY-35897 python scientific mode - ctrl+enter does not move the caret, shift+enter moves caret to the next cell
GitOrigin-RevId: c16f3d549b49284e709203548fe598c6cf2f639f
2024-07-18 14:20:43 +00:00
Pavel Karateev
8f2402e698 PY-57769 Fix the wrong command to install pydevd-pycharm
(cherry picked from commit 839e4aac1d72dcf2c57af66b69a06268cff19050)

IJ-MR-139749

GitOrigin-RevId: 7eecd813750d4e014ec691d764fe31eaa0c0d564
2024-07-12 14:25:11 +00:00
Mikhail Golubev
52850e21d8 PY-62208 Include importable names in basic completion results
Previously, such names were visible only on so-called "extended" completion,
activated when the hotkey for the basic completion was hit twice. The main reason
was that collecting such variants from indexes was a slow process, and we
didn't want to harm the responsiveness of completion for basic names.
Now it becomes possible thanks to a number of performance optimizations:

* Instead of using three separate indexes for classes, functions and variables,
we use one -- PyExportedModuleAttributeIndex. By definition, it includes only top-level
"importable" names, so we additionally save time by not filtering out irrelevant
entries. Also, it doesn't contain private definitions starting with an underscore.
It might bother some users, but given that the previous completion was used
extremely rarely, and the new one is going to be visible everywhere, it seems
that pruning unlikely entries as much as possible is a fare tradeoff. In the future,
we might enable them back on the "extended" completion if there is a demand.
Also, this index binds its keys to the project (`traceKeyHashToVirtualFileMapping`),
further eliminating useless index lookups.

* Thanks to the recent fixes in the platform (IJPL-265), it's now possible to
simultaneously iterate over all keys in an index and request values for a given key
without deadlocks, which is much faster than eagerly fetching all keys first.

* While scanning through all matching entries from indexes, we terminate
the lookup if the number of items exceeds the size of the lookup list.
We can further reduce this number by adjusting the "ide.completion.variant.limit"
registry value.

* Calculating expensive "canonical" import paths (e.g. "pkg.private.Name" is importable as
"pkg.Name") is offloaded to a background thread thanks to the `withExpensiveRenderer` API.
We still calculate these paths synchronously, though, for names whose raw qualified names
contain components starting with an underscore to decide whether these private names are
publicly re-exported and, hence, should be displayed.

The rest of the work has been put into reducing the number of entries on the list, e.g.

* The prefix under caret is now matched from the beginning of a name, e.g. `Bar<caret>`
matches `BarBaz`, but not `FooBar`.
* We don't suggest imported names clashing with those already available in scope.
* Some kinds of definitions are not suggested in specific contexts, e.g.
functions and variables are not suggested inside patterns and type hints.
* Nothing is suggested at the top-level of a class body, where dangling
reference expressions or calls are not normally expected.

Additionally, we don't suggest names from .pyi stubs at the moment, because
it pollutes the suggestion list with entries coming from the stubs for
third-party packages in Typeshed. We should probably enable them back once
we are able to properly disable Typeshed entries for not installed packages.

Some legacy forms of completion are left in the extended mode. In particular,
qualified names of classes are offered inside string literals only in this mode.
Also, module and package names are suggested only in the extended mode, because
top-level packages and modules are already suggested for the basic completion
by PyModuleNameCompletionContributor.

A few tests in PyClassNameCompletionTest were updated or removed entirely because
* we no longer suggest private names
* we no longer suggest names from private modules not re-exported in a public module
* we no longer suggest names clashing with those already available in scope
* prefix matching policy was changed to start at the beginning of an identifier

The whole feature can be disabled with the option "Suggest importable classes,
functions and variables in basic completion" in settings.

GitOrigin-RevId: 0787d42ce337b73b01a60f0bb7aa434fee43e659
2024-07-02 14:08:48 +00:00
Daniil Kalinin
35aa2b43b4 PY-58497 Add a custom bottom component for Python Parameter Info window.
Make it possible to expand/collapse overloads by clicking the action link in the bottom component or calling Parameter Info window on the same place for the second time.

GitOrigin-RevId: a65de4124b4530dd9cc5f16b0a709e3a6489071c
2024-07-02 09:57:32 +00:00
ekaterina.itsenko
d4e3fbb089 [pycharm] PY-72059 Add an error displaying when numpy is not installed
GitOrigin-RevId: 082917ec37b99955c9538ddf2154618f0a07fdaa
2024-06-19 22:11:34 +00:00
Alexander Lobas
89d58ee436 IJPL-150231 Move icon mappings from json to icon generator
GitOrigin-RevId: 4d4576fc7eeb92ec43c36abec2d62d271b45d9a4
2024-06-15 23:19:46 +00:00
Nikita.Ashihmin
05c9e88933 PY-72961 Packaging: show numpy info and other md descriptions
GitOrigin-RevId: 8b25964eeae581e09dc928a864b9c4d7693f7d48
2024-06-01 08:50:40 +04:00
Nikita Pavlenko
5fbfd19134 [pycharm] PackageManager (fix): "Delete Package", "Reload All Repositories" and "Manage Repositories" actions will not be disabled duting indexing. #PY-49280 Fixed
GitOrigin-RevId: d1f1cf553dd4c01fc3fe900bd55a228ec599db90
2024-05-30 15:16:09 +00:00
Vitaly Legchilkin
9a56930105 Use BinaryInstaller for CPython, update sdks registry, remove os field from FUS (PY-71414)
* os field is a reserved field, it is an autofilled field, no need to add it manually.

GitOrigin-RevId: 9506335e17c6e049adce9ebf17352c609739022a
2024-05-11 17:40:47 +00:00
Dima Golovkov
240bd4d7b2 Update python icons for IntUI for pythonCore for UX-3044
GitOrigin-RevId: eb66c30f8376ca9c7d80e8c4dc6a2e5439aa0588
2024-04-19 16:48:26 +00:00