Each tool (uv, poetry) now has `common` and `backend` part. `common` has icons because we need them both on the front and on the back.
We might need to create `front` module also if we wouldn't be able to use icons in compose.
GitOrigin-RevId: 560b5aa67e4e747a1653ad6e4f780301a3fae289
We are slowly moving all tools to the separate modules to register them as EP. On the front we might have `ToolId` only. To map it to an icon we will use EP.
GitOrigin-RevId: 3cd0ad9f8da4a69739c8f632a6305ddd7c29d62d
There was a problem that we can detect uv environment as a virtualenv in
PyInterpreterInspection. The problem is that we don't use the knowledge
about the existing environment anyhow.
This change relies on SDK configurators to tell whether environment is
present or can be configured.
GitOrigin-RevId: 27f55c7d1b4712b0b8c3d39b1b8f7d8643680910
Before the changes, there wasn't any mechanism to detect that
environment was already created (for example, .venv exists in the
project). In these situations, during SDK creation we could've created
another environment which was not expected by users.
With these changes, it's now possible to detect in the configurator that
environment already exists, and use it when creating SDK.
Merge-request: IJ-MR-177317
Merged-by: Alexey Katsman <alexey.katsman@jetbrains.com>
GitOrigin-RevId: dd0cf0c02b18e90022e9ec828b7f9ad2282cd5b3
When registry key is enabled, we replace all other SDK configurations (done by inspection and open processors) with a new one.
We also have an action to start this process
GitOrigin-RevId: 425ae78b769c5b5d40974cee9f19227410f63d45
+ add requirePythonSdk() verification for the Sdk extension functions, these methods are not designed to be called for non-python sdks and now will throw IllegalArgumentException.
also corrects dependency tree:
+ move PythonSdkUtil to the python.sdk module, remove dependency on psi.impl
+ create PySkeletonUtil for skeleton utils and leave it in the psi.impl
[python] (IJPL-205889) (BAZEL-2462) don't call getOrCreateAdditionalData for non-python sdks
+ add requirePythonSdk() verification for the Sdk extension functions, these methods are not designed to be called for non-python sdks and now will throw IllegalArgumentException
also corrects dependency tree:
+ move PythonSdkUtil to the python.sdk module, remove dependency on psi.impl
+ create PySkeletonUtil for skeleton utils and leave it in the psi.impl
GitOrigin-RevId: 20d958c5e15cc4e05545b2e61b126b5e015696ed
153 modules which contain classes used from external plugins from the Marketplace are marked as public. This is needed to ensure that it'll be possible to use that API after converting code from these external plugins to content modules.
GitOrigin-RevId: dc48e8970041fddd3bf50d280711e95ce9e9ad9b
Pip packaging tool used legacy process handler, which led to undetached
processes being spawned and even process leaks if they are really long
running. This led to flaky tests that were trying to delete temporary
directories after the test was finished, and at the same time process
was still running and creating __pycache__ directories there. That's
where a DirectoryNotEmptyException was thrown leading to a test failure.
The whole problem was fixed by using a new ExecService instead of a
legacy process handler. Also unused register keys `python.packaging.tool.use.project.location.as.working.dir` and `python.packaging.tool.upload.project` have been removed.
Merge-request: IJ-MR-176080
Merged-by: Alexey Katsman <alexey.katsman@jetbrains.com>
GitOrigin-RevId: 31c02fc8c25abd5941518958e7e2651f3771bad1
The main idea is to decouple tool implementation from low-level platform APIs: Open project processor, workspace model e.t.c.
Implementing `spi.Tool` should be enough to introduce new tool.
GitOrigin-RevId: 1177b57fc0eee1ca2c88cac5b20618a6170bf521
We now have only one (`python.pyproject.model`) registry key enabled by default.
Number of boilerplate was a little bit decreased too.
GitOrigin-RevId: 0f7ecf324be038430230d9865688ce22ee922de6
* Added the "python.data.view.allow.save.preferences.community.vs.powerful.data.view" registry key. If it's enabled, then we will remember a user's choice which data viewer they prefer.
* Will show the Slicing editor field in the new data view by default, as users cannot find this slicing field (the "input expression" field)
GitOrigin-RevId: 1c03357451d3dc8a228b06fd4c59210b313e8478
Under the registry flag "python.typing.strict.unions", enabled by default.
"Strict" union is considered a subtype of another type only if *all* its
members are subtypes of this type. Similarly, accessing an attribute on
a union type considered safe only if *all* its members contain this attribute.
It holds even if one of the union members is Any, i.e. "str | Any" is still
incompatible with "int", and it's not safe to access a non-str attribute on
it.
This is how all other type checkers treat union types. Historically, we
use so called "weak unions", where the above rules were relaxed so that
it was enough to have at least one compatible member type. It was
necessary because back then there was no way to declare function overloads,
type narrowing was limited (no pattern matching, no TypeIs/TypeGuard),
so proper strict unions, as in the type theory, would cause too many false
positives.
Co-authored-by: Aleksandr.Govenko <aleksandr.govenko@jetbrains.com>
GitOrigin-RevId: 8a676d810548bf71ac0ff3497e59d8694e03e4db
+ refactor PyProjectSdkConfiguration to return PyResult for SDK creation methods:
In case of creation failure, the actual error was hidden and some random sdk was assigned instead of the real one. For example, if we open a poetry project and project and poetry sdk creation fails - any random sdk was assigned to the project (last used hatch or conda for example). Now ShowMessageErrorSink is used.
GitOrigin-RevId: 015fc469b6b5d934b49278ccfb3afc683b61554e
PY-76167: Convert class to a light service to satisfy Qodana
PY-76167: Do not access FS from EDT + test.
`PyConfigurableInterpreterList` checks sdk type to sort it.
To get SDK type it used to access FS. It does no more: it now uses SDK additional data.
To test it, we've introduced `FORBID_SLOW_OPS_PROPERTY`
Merge-request: IJ-MR-169961
Merged-by: Ilya Kazakevich <ilya.kazakevich@jetbrains.com>
GitOrigin-RevId: 80631e31a021e5ea7007c5873596446ef6d8665e
Before, when entering an `annotate` method, a reference to `AnnotationHolder` was stored in the annotator field. And this required synchronization. Now this reference is stored into a temporary PyElementVisitor object actually used to perform highlighting.
Also, register all python annotators using a regular 'annotator' EP. There is no point in using 'Pythonid.pyAnnotator'.
GitOrigin-RevId: ad1df8ce743bc62d3f43e6bf9b1a8ea370ff7de7