Commit Graph

228 Commits

Author SHA1 Message Date
Nikita Ashihmin
1480554414 PY-81864 PyPackages: Move saved requirements.txt path from module to sdk
Signed-off-by: Nikita.Ashihmin <nikita.ashihmin@jetbrains.com>


Merge-request: IJ-MR-165494
Merged-by: Nikita Ashihmin <Nikita.Ashihmin@jetbrains.com>

GitOrigin-RevId: fc852bf8db5ebda9a138c2b7cc2f096143adce7b
2025-06-13 15:38:02 +00:00
Ilya.Kazakevich
2e14347844 Python: extract python-specific extensions from exec service to simplify API and make it extendable for intepreters.
Use `ExecService` `api.kt` to exec any binary and extensions from `execService.python/api.kt` for python-specific things (i.e helpers)

GitOrigin-RevId: bb217798a9d1ee886c4b12220ec1f66a5ef08336
2025-06-07 22:05:56 +00:00
Ilya.Kazakevich
80f248d842 Python: Move helpers locator out of PSI module
GitOrigin-RevId: 55fb4b41c56fdd41b6d9523cd7a148c002ffb8be
2025-06-07 21:59:42 +00:00
Ilya.Kazakevich
79b1c49897 Eel and Python: mark exec with throws and use localized text.
GitOrigin-RevId: d427283ad731c4611a04656e5f713025d5a8aac6
2025-06-05 20:57:23 +00:00
Vitaly Legchilkin
50995c2812 [python] migration from kotlin.Result to python.PyResult in package managers (PY-81238)
* introduce PyResult.localizedError() (instead of failure()
* get rid of obsolete kotlin.Result.failure(..) extension
* add errorOrNull to python.Result, to access it from Java classes

Merge-request: IJ-MR-163973
Merged-by: Vitaly Legchilkin <Vitaly.Legchilkin@jetbrains.com>

GitOrigin-RevId: 2bd8336cf4c53170eea5d050f609fd64541ebd99
2025-05-27 07:18:45 +00:00
Aleksandr Sorotskii
67a49445ef fixup python plugin sdk configuration silent errors; fixup quick fix path association getting stuck
GitOrigin-RevId: e709f2063464bfc4b90f3acdf0c6b82277f2dc65
2025-05-26 22:53:26 +00:00
Ilya.Kazakevich
c16d6840e8 Python: hide symbols
GitOrigin-RevId: 2653974b9d8ba190fb9a1aea8c36759e8ddc42d3
2025-05-14 20:27:09 +00:00
Vladimir Krivosheev
fbc9805e89 IJ-MR-162467 don't export intellij.platform.jps.model
GitOrigin-RevId: ebaebc90d514e5f3046fe2b973647da4bf156625
2025-05-14 18:10:23 +00:00
Andrii Zinchenko
2c59ca5374 [eel] IJPL-172897: extract ExecuteProcessException from the EelExecApi
GitOrigin-RevId: 85501068fec6ec96a82d83c5bb0f07a6b8cfeee1
2025-05-14 13:40:16 +00:00
Andrii Zinchenko
24ca6b4997 [eel] IJPL-172897: remove "results" from EelExecApi
GitOrigin-RevId: a99ed91bdfd15c018d5e12542b991c401ac190e8
2025-05-13 21:59:42 +00:00
Ilya.Kazakevich
7a0754c1a3 Python: drop non-suspend version of setAssociationToModule
GitOrigin-RevId: db366d6641e2df2456fe96070acd835fa88f4e1f
2025-05-08 19:30:13 +00:00
Ilya.Kazakevich
57d61a67e1 Python: close public symbols
GitOrigin-RevId: 73b1b857834aed22c6cf72d8b06a8c620f8aceef
2025-05-08 01:07:29 +00:00
Vladimir Krivosheev
e3d5d85a47 update bazel files
GitOrigin-RevId: 4a1f45312f93e76248b05a7c8cc27a2b2ac84036
2025-04-30 14:07:08 +00:00
Vladimir.Koshelev
67594cdaad [pycharm] finish community migration to v2
# Conflicts:
#	community/python/pluginCore/resources/META-INF/plugin.xml

GitOrigin-RevId: e4d6969fd15a3fddc4d6a03491fb9f9634285edf
2025-04-30 10:08:56 +00:00
Ilya.Kazakevich
803e270d45 Python: refactor PyError hierarchy, migrate to PyResult.
DO:
For upper-level (public) API use `PyResult`.
(Optionally) for low-level APIs inside your modules use python `Result<S, E>`.
Represent errors as `PyError` whenever possible.
Report `PyError` to `ErrorSink` at the top of your code.

DON'T:
Use `kotlin.Result`
Use `PyExecutionException`
Use any exception to represent user errors.

GitOrigin-RevId: 4ecf69e1fae8be9192cd33b90e0147c725a98964
2025-04-29 00:43:56 +00:00
Andrii Zinchenko
c92d860f76 [eel] IJPL-172897: remove EelPath.OS, use only EelPlatform in the API
GitOrigin-RevId: 1a1b676865f759f4dbabc97165b62c77decb5087
2025-04-27 19:21:46 +00:00
Ilya.Kazakevich
b1a58215ae Python cleanup: remove redundant methods from PythonSdkAdditionalData: one should use sdk modificator
GitOrigin-RevId: 7682d5287264fd5bf75807be6c61c4527788c1d9
2025-04-23 18:18:13 +00:00
Ilya.Kazakevich
36d87867b7 Various Python refactorings as prerequirements for PY-65425 and PY-78035.
1. Make SDK->Module association function `suspend` to make it testable (one can't test something that runs code by `invokeLater`)
2. Add SDK->Module associations checks into `ensureSdkIsUsable` test tool.
3. Rename fields in v2 widgets to emphasize their purpose.
4. Make this association default for `pyVenv` fixture.

GitOrigin-RevId: 58267750b6dda0b596183c8bd335ce75b00fd41d
2025-04-23 01:36:07 +00:00
Ilya.Kazakevich
e85793a824 Python: drop deprecated symbols
GitOrigin-RevId: d66da3569c50ee78167a4a73010e8a02a4880a6a
2025-04-20 02:59:39 +00:00
Ilya.Kazakevich
2d1ff1fec7 PY-80388: Exclude conda from system pythons.
What happened: `WinPythonSdkFlavor` returned all pythons from the `Path` environment variable.
Conda might be installed there.

How did we fix it: all flavors now report paths using protected functions. The parent class then filters results to drop pythons with incorrect flavor.

See `com.jetbrains.python.sdk.flavors.PythonSdkFlavor.suggestLocalHomePaths`.

GitOrigin-RevId: 7f2ef52a427ac07a625305c8371d985e2a7e0575
2025-04-16 23:11:27 +00:00
David Lysenko
0472911240 [pycharm] PY-79552 Ensure that environment is downloaded before installing an executable
GitOrigin-RevId: 406e678d11aee2288bbb4a40cadb6d0744eb3dbb
2025-04-13 11:34:09 +00:00
Ilya.Kazakevich
e312afbd06 Python: unused symbols removed
GitOrigin-RevId: 41c09ef1ffe46246ee659d3e65744dd40f154f9b
2025-04-03 17:05:21 +00:00
Ilya Kazakevich
4dee4e6be9 AT-21208: Migrate findSubdirInstallations to nio from vfs not to touch vfs without read action.
`WinSdkFlavor` is also made a bit more configurable to write test
against.


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

GitOrigin-RevId: 371f7efaebbfd436dd426d144b529ab9e186c72d
2025-03-31 12:18:31 +00:00
Ilya.Kazakevich
92b5532dc1 PY-80049: Check Python2 version correctly.
We execute `--version` to find python version.
Since 3.4 Python uses stdout for output, but before that it used stderr.

We now check both: stdout and stderr.

GitOrigin-RevId: ca9059b71cabbd1a94e26523192cdf9eeb8c1eb1
2025-03-28 18:06:13 +00:00
Andrey Vokin
c220735306 [python] do not pollute logs with skeleton generator info output
GitOrigin-RevId: 39a5d5e1fc33ecda1cf4e8c6215a34eaabdc26ca
2025-02-25 16:40:54 +00:00
Leonid Shalupov
2e048d9e57 housekeeping: remove kotlin unused imports
GitOrigin-RevId: 1ba9dd92e225ce5e8df8fbc429acdcd38d114f36
2025-02-24 20:03:20 +00:00
Konstantin Nisht
b6d3690b12 [threading] IJPL-149765: Rename writeAction to edtWriteAction #6
GitOrigin-RevId: 635c50933068a86ac0bf62608185bd359c7ac98c
2025-02-19 22:13:13 +00:00
David Lysenko
24544e3599 [pycharm] PY-78648 Address feedback
GitOrigin-RevId: 363b0f62c631d9cebf547088f16780100c36dcf8
2025-02-17 13:58:20 +00:00
David Lysenko
a782da7be5 [pycharm] PY-78648 Resolve uv correctly on windows
GitOrigin-RevId: f280a79ce566d43682fd77da735d037fff2e9ed3
2025-02-17 13:58:20 +00:00
Ilya.Kazakevich
66905cc64f Python: mark API internal
GitOrigin-RevId: 316e866fc72d1710d7ac3723c54422a6b540be35
2025-02-12 23:53:58 +00:00
Leonid Shalupov
5db4998301 housekeeping: remove unused imports
GitOrigin-RevId: be93bd341860bfc077fdbff5ce2ae91eebada31e
2025-02-11 23:18:34 +00:00
Mikhail Golubev
3d1f1cf094 PY-54269 Keep the order of roots in SDK additional data
GitOrigin-RevId: be3627bf469d9dea44f99a7c026353474e62edee
2025-02-04 22:07:19 +00:00
Ilya.Kazakevich
eab4466488 Python: move VirtualEnvReader out of psi-impl module
GitOrigin-RevId: c4d7bd0bf0c5592b13a2ccffcd217c1bae819637
2025-01-29 21:40:40 +00:00
Ilya.Kazakevich
504e1208ef Python: mark deprecated as to be remove
GitOrigin-RevId: dfb59057ae58c060b8d432a504be6d804aa9acec
2025-01-29 21:40:40 +00:00
Andrii Zinchenko
da7deee35d [eel] move process utils in to the eel-provider module
GitOrigin-RevId: 8beffa883a1de89e7d487ada51df190d5347cbee
2025-01-29 20:29:06 +00:00
Ilya.Kazakevich
4618dc40b0 Python: move sdk-specific code to sdk.
GitOrigin-RevId: 6fae443546bf490f90608f17f5b32528786978a0
2025-01-28 03:37:46 +00:00
Ilya.Kazakevich
11be6ed929 Python: move getOrCreateAdditionalData to sdk module.
It doesn't belong to `community.impl`

GitOrigin-RevId: 51e197ca19e5e64363229ddc5c27aa0332fcb62f
2025-01-27 19:56:44 +00:00
Ilya.Kazakevich
b3866686e1 Python: Clean-up API to work with python versions.
There are lots of methods that return "default value" if provided data can't be parsed. It leads to errors and misunderstandings

Signed-off-by: Ilya.Kazakevich <ilya.kazakevich@jetbrains.com>

GitOrigin-RevId: 0736c91c91e1e6990d23169a492ec408f7299830
2025-01-25 23:02:05 +00:00
Ilya.Kazakevich
a55c4935fe Python: move PySdkSettings out of community impl.
It is used by virtualenv creation and we want venv to be a separate module

Signed-off-by: Ilya.Kazakevich <ilya.kazakevich@jetbrains.com>

GitOrigin-RevId: 3b394047320ee149189007321475711e92ca3c17
2025-01-25 07:56:10 +00:00
Ilya.Kazakevich
d1b441d0bb Python: Replace localized string class with string with annotation.
No need to have a separate class

Signed-off-by: Ilya.Kazakevich <ilya.kazakevich@jetbrains.com>

GitOrigin-RevId: 9af33f30bbab9a85609c0c6536cb3120347fa20b
2025-01-24 02:02:40 +00:00
Vladimir Krivosheev
f565c7eee8 update bazel files
GitOrigin-RevId: 6098b437c6d0239551d19af7bd631f5e372a8b48
2025-01-18 10:56:48 +00:00
Konstantin.Nisht
d100810ce6 [eel] IJPL-172897: Export intellij.platform.eel from intellij.platform.eel.provider, as an API module can be exported from the module with utilities
GitOrigin-RevId: 6819299595d2401de7451929e6e80169a81c5c10
2025-01-17 19:46:01 +00:00
Vladimir Krivosheev
0bc1cf1557 update bazel files
GitOrigin-RevId: 7320d3eff3aba093692ce66839c720ece6d7c4db
2024-12-30 11:28:24 +00:00
Vladimir Krivosheev
7b9ec58009 do not export intellij.database.connectivity.tests
GitOrigin-RevId: a1ef44dfa34cde110c9e6cad19d11b5e3019ab72
2024-12-28 21:45:55 +00:00
Vladimir Krivosheev
25233df1b1 cleanup - isEmpty
GitOrigin-RevId: 100d69abb6a423556574a72e82508fdb8f5d7fa3
2024-12-27 14:41:14 +00:00
Vladimir Krivosheev
68d99c6550 cleanup
GitOrigin-RevId: 9cb238c220249088bfc75a448eb310b93c7fc45c
2024-12-26 14:56:01 +00:00
Ilya.Kazakevich
c20f54b91d Python: various tools are added.
They are used in services which will be added soon.

GitOrigin-RevId: 737d9d41037195eafe820d75aeda788ce318b266
2024-12-25 01:41:50 +00:00
Ilya.Kazakevich
1aec794bc8 Python: refactor validatePythonAndGetVersion to become eel-compatible
GitOrigin-RevId: 8d6e71dcd5694f98a7763204c8848d175c8ea78b
2024-12-23 23:08:06 +00:00
Ilya.Kazakevich
c845e649dd Python: refactor validatePythonAndGetVersion to return error
This error can be processed by a caller which is better than plain null.

GitOrigin-RevId: c68e28631faf84d735770a430d6866a931b2dbc7
2024-12-23 19:34:32 +00:00
Ilya.Kazakevich
a88530c3c5 PyCharm: remove unused method
GitOrigin-RevId: c6116628686d61a07cb04746400fb587703beced
2024-12-23 16:53:17 +00:00