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
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
`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
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
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
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
- 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
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
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
`dependencies` tag join is not supported, hence `plugin.xml` must declare all its dependencies in one file
GitOrigin-RevId: c1347feb7f995b211522c3f1408f9f576215f784
Python support depends on TOML (see `intellij.python.community.impl.xml` `<dependencies>`), and a Python plugin is useless without this module.
GitOrigin-RevId: 979376338c699c24e34b76f2084a8c8cc8065371
`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
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