Commit Graph

143 Commits

Author SHA1 Message Date
Ilya.Kazakevich
2eb4f94a5d Python: Remove unused symbols and WSL VFS listener (should be done at the platform level)
GitOrigin-RevId: 0859fb9636cb7ee1959153d0297500a7a755b095
2024-09-19 19:08:18 +00:00
Egor Eliseev
bffe31025a Poetry: Cleanup
Add general service for running coroutines in com.jetbrains.python.sdk.
Delete PoetryConfigLoader.kt and PoetryConfigService.kt.


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

GitOrigin-RevId: 474bbee10812bbe4ce5fd2db96602f12e9fa023b
2024-09-19 13:44:34 +00:00
Ilya.Kazakevich
218af635f1 Python: remove pre-targets API
Targets are enabled by default for more than a year

GitOrigin-RevId: ab0469410b4a699ce516c2054e38b63753c726fb
2024-09-12 21:24:42 +00:00
Ilya.Kazakevich
0f684b9c76 Python NPW: Remove a registry key for old NPW as we always use new now
GitOrigin-RevId: 3ea60922999fc330b9db0c5d18f9891b34246808
2024-09-12 07:24:18 +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
Daniil Kalinin
ccefd0e23f PY-71002 PEP-696: Suppress pep8 inspection for type parameters for
It cannot handle whitespaces around `=` in new-style type parameter declarations correctly

GitOrigin-RevId: c1d09acd54a329fbe4ff9d4ac8bd95a928440caf
2024-09-07 11:11:13 +00:00
Roman Shevchenko
a5666abead [project] pruning FileChooserDescriptor overrides (IJPL-150176 prerequisite)
`BrowseFolderRunnable` and `*WithBrowseButton` family: getting rid of separate "title" and "description" parameters in favor of the chooser descriptor object, to avoid cloning the latter down the road.

GitOrigin-RevId: 33ec5968a1db953c60848974135055c288accf85
2024-09-06 11:41:43 +00:00
Egor Eliseev
c23cd17165 PY-74168 Poetry: Check a python version from "pyproject.toml" and from Base interpreter
Implement version tracking for Python specified in pyproject.toml files.
Validate base interpreters using a Python version from pyproject.toml.


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

GitOrigin-RevId: ddd685240b6d58ef8d2e6c5668c89c96d8992d27
2024-09-05 13:15:45 +00:00
Nikita.Ashihmin
a968c7d095 PY-58972 Packages(fix): The attached project stays in the list on the "Python packages" tool window after its dettaching
GitOrigin-RevId: d7231e09a6d1a981536a68e8289a6b731549be92
2024-09-03 01:54:49 +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
Andrey Lisin
d1c7e0917a PY-73432 Minor: better name for registry key
GitOrigin-RevId: cec63f671f0635ba39d62126f21e023c0cf7fe73
2024-08-28 16:05:01 +00:00
Nikita.Ashihmin
1daa02b9f8 PY-74389 Packages(fix): FUS for "install all" quickfix action
GitOrigin-RevId: 9bbbb829833996c6d848a2b00136f177caa26771
2024-08-26 12:09:11 +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
39ac2bc2ae PY-49271 Packages(feat): Provide an ability to pass arbitrary options to pip install
GitOrigin-RevId: 29a1f81fd5cb17923385b478c19864957c87cebf
2024-08-24 13:43:56 +00:00
Nikita.Ashihmin
b155ed154a PY-72994 Packages(refactor): Refactor left panel
GitOrigin-RevId: 31fc0199fcb928193ac19e3ff36e625fc5739b77
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
Andrey Lisin
84a016fd62 PY-73432 Run Python debugger in server mode by default
GitOrigin-RevId: 3cdce22120868761d823402bd6bcf660224591b8
2024-08-23 12:18:41 +00:00
Vladimir Krivosheev
3b3ae1c0b5 IJPL-159596 disable sorting - we must produce distribution order entries in a stable manner without sorting
GitOrigin-RevId: 1bf3a1f18ba5b2d6d5bc4f9c44f8208f86c8baa2
2024-08-22 10:33:53 +00:00
Ilya.Kazakevich
42e49fcfc3 delete deprecated unused modules
GitOrigin-RevId: f656cf9b1e1aef85f9999cbf7fdaa8effda7652c
2024-08-20 21:19:35 +00:00
Gleb Marin
dc3c5730ea JBAI-5408 Release ML Imports Ranking in 2024.3
[ml tools] Fix build issue

[ml tools] Fix build issue

[ml tools] Fix build issue

[ml tools] Replace task object with service

[ml tools] Fix rebase issues

Add session duration metric

[ml imports ranking] Log fully only during EAP

[ml imports ranking] Set up FUS logs

[ml tools] Add dependency on ml api library


Merge-request: IJ-MR-142857
Merged-by: Gleb Marin <Gleb.Marin@jetbrains.com>

GitOrigin-RevId: 69be00b4b8f38ec71208c3b17cd6566a34508859
2024-08-20 06:16:36 +00:00
Ilya.Kazakevich
d74ffab3ba Python, DS: Use the new interpreter configuration UI to unify it between DS and PyCharm.
GitOrigin-RevId: 9faec46e4265e4a085c8f6acabee78551360c6a4
2024-08-14 17:47:00 +00:00
Mikhail Golubev
dc5c78e7f9 PY-73780 [fus] Collect Python version enabled for the compatibility inspection
GitOrigin-RevId: 8882995fa43bce79ec85fd3d8bbf4312b5d05076
2024-08-13 11:42:18 +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
Nikita Katkov
aacd74b83b [json] IJPL-159354 Add explicit dependencies on JSON plugin in PyCharm Community
GitOrigin-RevId: 02afec0731cc1c71b812a44023b01d92bd091503
2024-08-06 21:52:25 +00:00
Yuriy Artamonov
40ee9543ab [icons] Eliminate CrossModuleIcons.json
All icons reside in the corresponding modules now

GitOrigin-RevId: c5fe0b11a37256d1cae4d2067f17c6802a7721b8
2024-08-03 10:12:40 +00:00
Andrey Lisin
664c8ef4e8 PY-73432 Introduce registry key to enable single port communication between PyCharm and debugger
GitOrigin-RevId: a3a5199b1f343d1c3423c433fa636a6d1a657b4f
2024-07-31 19:41:40 +00:00
Andrey Lisin
638dce38d7 PY-71930 Restore reStructuredText plugin
This commit partially reverts changes from 4da3e7da. While the consolidation of reStructuredText support into a single module is retained, it needs to be available as a plugin since some IDEs do not include it by default but can still benefit from its capabilities.


Merge-request: IJ-MR-139650
Merged-by: Andrey Lisin <andrey.lisin@jetbrains.com>

GitOrigin-RevId: bc5cde2970a0760e32ceaee61ceef8427e8f8fe5
2024-07-31 12:47:03 +00:00
Egor Eliseev
994775243f PY-71926 Refine test detection criteria
Add a new setting Python Integrated Tools: Detect tests in Jupyter Notebooks.
Exclude Jupyter Notebook files from the scope for test detection by default.
Add tests


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

GitOrigin-RevId: 0bee082bde4fa608cb1907b8fbd64b97bb9755a0
2024-07-26 17:24:30 +00:00
Vladimir Krivosheev
398ebce1d5 split content report
GitOrigin-RevId: ef449bdf4c5480a6ee3ce43b4af118c2c6e31219
2024-07-25 19:20:06 +00:00
Aleksei Kniazev
7e95d1c688 [python] initial step of python interpreter creation unification (PY-73396)
- refactored NPW to use target-specific model
- creating interpreter through widget reuses the same UI (can be turned off by python.unified.interpreter.configuration)
- interpreter discovery and virtualenv creation using Targets API
- no more PyDetectedSdk in dialog


(cherry picked from commit 581b2d40254d26f02eb3aa61bc2e842854b87a3e)

IJ-MR-140986

GitOrigin-RevId: be29188304882ef5f0fb88bb60c538714a2d8746
2024-07-25 18:01:45 +00:00
Yann Cébron
6e1285e760 plugin descriptors: remove obsolete suppression comments for 'PluginXmlValidity' inspection
GitOrigin-RevId: 25a17cf82be4c35d4e12472e392aea15b55ea105
2024-07-16 18:55:00 +00:00
Vladimir Koshelev
2ca8342b13 [python] restore pep8 information level after plugin split PY-73129
GitOrigin-RevId: 53fb0cf4c7efe139694d34f1707cdb8305881e03
2024-07-02 18:12:23 +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
d47bd34358 PY-58497 Refactor parameter info logic for Python
Show type hints only for the highlighted parameter

GitOrigin-RevId: f55d8ecc27dcbca5e6c24c5ca347ea3995e69ca8
2024-07-02 09:57:32 +00:00
Aleksandr Sorotskii
b71858d628 PY-73001 Log popular tools and build system requirements mentioned in pyproject.toml
GitOrigin-RevId: 8a54afcc73246ff4d2667229345aa1778dc6a2af
2024-06-25 19:53:37 +00:00
Vladimir Koshelev
2c8d9f7ca1 [python] fix jumps on backspace when lines start with a lot of indents
GitOrigin-RevId: 3ee4005dc0b85f007d4b895367af7efcdf5fbaab
2024-06-25 12:24:22 +00:00
Egor.Eliseev
56241ab394 PY-73411 Pycharm performance tests failed
Merge-request: IJ-MR-137368
Merged-by: Egor Eliseev <Egor.Eliseev@jetbrains.com>

GitOrigin-RevId: 23a7e9d443606b1a9a028c5e3275c6c408c0d796
2024-06-20 21:51:17 +00:00
Egor.Eliseev
0c73c9eff9 PY-72274 separating content for python core/pro plugins
1. Delete `intellij.python.community.impl.xml` (move content to `PythonCore` plugin). It is necessary to fix incorrect dependencies: `PythonCore`, `Pythonid` include the same module.
2. Fixed dependencies: if some plugin/module needs Python core functionality, then it should depend on `PythonCore`.


Co-authored-by: Vladimir Koshelev <Vladimir.Koshelev@jetbrains.com>

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

GitOrigin-RevId: ce9ed4c17f601ee1ca2b6cf608f4e30fdac1d879
2024-06-19 21:39:24 +00:00
Vladimir Krivosheev
4d288109b4 IJPL-149476 PythonPsi.xml expected in the main plugin
GitOrigin-RevId: 7f532cc471c7b7b0253cbde9f73fa1db45738ddf
2024-05-15 21:10:53 +00:00
Ilya.Kazakevich
d7c00ac3da PY-70729: Move com.jetbrains.extensions deprecated package to the separate module.
This package is only used by third party plugins. We can't leave it inside another v2 module due to package inconsistency.

See errors like https://youtrack.jetbrains.com/issue/PY-70729/Class-com.jetbrains.python.psi.PyElementType-must-not-be-requested-from-main-classloader-of-Pythonid-plugin#focus=Comments-27-9494155.0-0

So we move it to the separate v2 module which will be removed soon

GitOrigin-RevId: 418ef1a59bb5e63dbc368a936437408c6510cc23
2024-03-19 00:34:37 +00:00
Ilya.Kazakevich
61d3b04a34 [python] actions were missing localization bundle
GitOrigin-RevId: 28a2c44d05cd4901ed05bcddacb17fe739d648a0
2024-03-18 13:35:48 +00:00
Ilya.Kazakevich
30aafec791 [python]: rename module python rider to move it out of community.impl since this name is already used and might lead to clash.
GitOrigin-RevId: 44de4d39d098845235e079171a78e78d2f4f3209
2024-03-07 22:34:34 +00:00
Ilya.Kazakevich
37c7118b1a [python]: rename module to move it out of community.impl since this name is already used and might lead to clash.
`intellij.python.community.impl.community_only` -> `intellij.python.community.communityOnly`

GitOrigin-RevId: 070222708f66ba5f58b9716040186ec11d984e5d
2024-03-07 19:20:06 +00:00
Ilya.Kazakevich
763c2e8597 [python] only share content between Community, Prof and Fleet. dependencies must be copied.
`dependencies` tag join is not supported, hence `plugin.xml` must declare all its dependencies in one file

GitOrigin-RevId: c1347feb7f995b211522c3f1408f9f576215f784
2024-02-28 16:12:03 +00:00
Ilya.Kazakevich
71467fb86a [python]: Make org.toml.lang requirement for Python plugin.
Python support depends on TOML (see `intellij.python.community.impl.xml` `<dependencies>`), and a Python plugin is useless without this module.

GitOrigin-RevId: 979376338c699c24e34b76f2084a8c8cc8065371
2024-02-27 22:29:45 +00:00
Ilya.Kazakevich
98b99c3717 DS-6282: Module missing when build from sources.
`intellij.python.community.impl.community_only` must be on the classpath of PyCharm Community and DS.

It has been done for dev builds, but not for sources.

GitOrigin-RevId: 13da57550c978098fabed0e08437d5aca5b5b230
2024-02-23 22:58:05 +00:00
Ilya.Kazakevich
9d4751f238 [python, ds, jupyter]: Migrate Python support to V2
Layout:

  JPS modules
  `intellij.python.community`
  `intellij.python.community.impl`
  `intellij.python.parser`
  `intellij.python.psi`
  `intellij.python.psi.impl`
  `intellij.python.ast`
  use package `com.jetbrains.python`
  and go to `intellij.python.community.impl` v2 module

  JPS module
  `intellij.python`
  uses package `com.intellij.python.pro`
  and goes to `intellij.python/pro` v2 module

  Both v2 modules (along with lots of others) come with
  `PythonId` (prof) or `PythonCore` (community) plugins

  DS bundles  `intellij.python.community.impl`

  Idea and other Mini IDEs get `PythonCore` or `PythonId` plugin that bundle modules for Idea and mini IDEs

GitOrigin-RevId: 98f418c52d90d51b9adf3250c561f2c36c767e2d
2024-01-22 20:26:58 +00:00
Ilya.Kazakevich
b533e29ce0 [python] get rid of classes registered in wrong modules
You must register class in the same v2 module class sits

GitOrigin-RevId: c7fcccd27c2fcaa3d9391d1173f61ad43fe2b076
2024-01-17 04:59:01 +00:00
Ilya.Kazakevich
5e4dbef015 [python] Move plugin-specific classes to the correct package
GitOrigin-RevId: 14efb7be0fd8f9614a1849c9345bcbf319f76cb9
2024-01-15 23:49:32 +00:00