Commit Graph

201 Commits

Author SHA1 Message Date
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
Ilya.Kazakevich
7986802e56 PyCharm: extract validatePythonAndGetVersion into a separate module to reuse it in services
GitOrigin-RevId: ce0c813650ee70a03841811decbc51acd982e1d0
2024-12-23 15:55:20 +00:00
Ilya.Kazakevich
f54ea8affd Python: Make version-specific methods static is PythonSdkFlavor: they aren't flavor-specific.
It is always `--version` and `Python [version]`, no need to have virtual overridable methods.
One doesn't need to know the flavor to get a python version.


(cherry picked from commit 63b16768f1dd299cb4cefb5fd935c44614d6ffb6)

IJ-CR-151990

GitOrigin-RevId: ebc2eb5428c10048cc6f17a6e5c99632b3f7d2cc
2024-12-19 20:53:06 +00:00
Vladimir Krivosheev
98799639aa do not use _test as lib - test targets do not support this
GitOrigin-RevId: f2f49db4294b6a64040dbbd5f1d95e972cbd70a3
2024-12-15 18:32:30 +00:00
Ilya.Kazakevich
1ef66e99af [Python]: Drop PyPy
GitOrigin-RevId: 41608a5a23f6aa5503fdeb8b37b637c7cb96896c
2024-11-27 16:10:15 +00:00
Vladimir Krivosheev
17916c90f8 libraries -> lib, resources, opt-in, test deps
GitOrigin-RevId: db66ee95dcb0f0553b40c9cc56cd6afed8634cdd
2024-11-27 13:53:42 +00:00
Tagir Valeev
1a4a0b51b3 Warnings fixed (mostly redundant assignment)
GitOrigin-RevId: 79b9c2ae99e8afc7b1f49e8cea2b31745458404d
2024-11-26 10:10:48 +00:00
Ilya.Kazakevich
c288b2bb00 PY-71771: Do not validate SSH interpreters using tools for local paths.
`isValidSdkHome` works for local paths only.
We must use `sdkSeemsValid` instead: it is aware of remote interpreters and usually ignores them if can't validate

GitOrigin-RevId: 31b42e14518f5a8f7a69ba35e50353f4f4894f42
2024-11-19 12:16:06 +00:00
Pavel Karateev
61e1321dc2 PY-76948 Update Python versions installable through PyCharm
+3.13.0
3.12.6 -> 3.12.7
+Anaconda 2024.10-1
+Minicoda 24.9.2-0


(cherry picked from commit 798add3774cda74c5ff669c0344ce1b6588a0620)

IJ-MR-147644

GitOrigin-RevId: 52d0e4c885600faaaaa83b30428a4d0c3f7081d9
2024-11-13 11:36:14 +00:00
Egor Eliseev
f79c7ad550 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>

GitOrigin-RevId: b398d04bfa358ce97bf1d30d59b2113548e7983c
2024-11-07 16:15:06 +00:00
Ilya.Kazakevich
ac0abfc3f2 Python: add API to reset homepath cache in python flavors.
In PY-75549 we might need to search for pythons after python installation. Windows flavor caches paths, so nothing found even after installation. We need to reset this cache.

GitOrigin-RevId: 2e2d22d8a07fb06f26875058882fad3cbdfda05b
2024-10-24 14:31:42 +00:00
Ilya.Kazakevich
b974a36396 Python: Doc added for not-so-obvious function
GitOrigin-RevId: 4c18b0733bcd30b250b6582d7dd1e9ede6dcb32c
2024-10-23 00:41:23 +00:00
Nikolay Chashnikov
b03b560520 [python] API cleanup: mark deprecated unused API for removal (IJPL-156972)
Deprecated APIs which still have internal usage are marked as internal to ensure that new external usages won't appear.

GitOrigin-RevId: 09818b884851d7b768f8ee0f356f982e79b46ed9
2024-10-10 23:55:42 +00:00
Ilya.Kazakevich
24be5efa81 PY-76147: Do not call sync tasks on pure EDT.
Use coroutines instead

GitOrigin-RevId: 447a28ae363f88b575b148b2dea931e09f6a4741
2024-09-23 17:06:44 +00:00
Aleksandr Sorotskii
d67337d2c9 fix additional data creation for remote interpreters; (#PY-76055) Fixed
GitOrigin-RevId: 064cbbaeb5f4241b718c9e51df0396b49971a365
2024-09-23 16:37:06 +00:00
Ilya.Kazakevich
14b44d05a6 Python: unused symbol removed
GitOrigin-RevId: 5bcc6542fbc9225629cf7b78e9cfd54cfb6df546
2024-09-20 23:12:02 +00:00
Ilya.Kazakevich
0438f8093b PY-76036 PY-75988 PY-75990 PY-76065: Fix various threading issues after the new platform threading policy
All "implicit" locks are removed from the platform, so we need to call read/write action explicitly (which is a right thing to do in any case).

GitOrigin-RevId: 290788bc78e39ca42f7d0f14ae4ccd16dd315ce7
2024-09-20 23:12:02 +00:00
Yuriy Artamonov
7810bf8adb [python] IJPL-158521 Actions: fix ellipsis in messages for actions
GitOrigin-RevId: c896f17db89f934ae64c24b920ed3684b605d168
2024-09-15 14:50:09 +00:00
Pavel Karateev
62a8794fdb PY-75865 Update Python version on Sep 12, 2024
* 3.12.2 -> 3.12.6
* +3.11.10
* 3.10.14 -> 3.10.15
* 3.9.19 -> 3.9.20
* 3.8.19 -> 3.8.20
* +Miniconda 24.7.1-0
* +Anaconda 2024.06-1
* +Miniconda 24.5.0-0
* +Miniconda 24.4.0-0


(cherry picked from commit 0afd9c5403c37dbe4376e11d01ecb368941adae6)

IJ-MR-144680

GitOrigin-RevId: aeb897013f2ef1c5f753f99210cd186b2344ce95
2024-09-13 11:19:14 +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
Andrei Iurko
f65c970d2d [qodana] QD-9527 Enabled Poetry SDK creation for Poetry projects in headless mode
GitOrigin-RevId: edaab8de048359a95a197989fb2c53068dd21f3e
2024-08-28 13:11:34 +00:00
Aleksandr Sorotskii
1cb0659dad python interpreter should be at least executable but not necessarily called python; PY-60259; PY-11992
(cherry picked from commit a9dd773947b75e850c1e74e209bec9330ae8d74f)

IJ-MR-143222

GitOrigin-RevId: 16f075b18210dbd73a8e04e86282064048c06b99
2024-08-24 00:37:05 +00:00
Aleksandr Sorotskii
81e490cd6f cleanup sdk validation api
GitOrigin-RevId: 33747cf0cfada370181b43d02f203b8401740c5c
2024-08-22 19:03:41 +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
Ilya.Kazakevich
cc9b394af1 Pycharm: Venv might have UnixPythonSdkFlavor instead of VirtualEnvSdkFlavor on Linux.
`getFlavor(@Nullable String sdkPath)` was used, and it detected the first flavor that is reports `isValidSdkHome`.

Somehow `UnixPythonSdkFlavor` stayed before `VirtualEnvSdkFlavor`.

We now sort them to make platform independent go first (as platform-dependent are always there).

We also use a separate method `tryDetectFlavorByLocalPath` not to use a deprecated one.

GitOrigin-RevId: ee7010e2b4a51d8447bd57264b2ce85af4ea1199
2024-07-24 19:20:28 +00:00
Egor.Eliseev
0be08ded36 [python] Rewrite PythonHelpersLocator
1. `PythonHelpersLocator` is an API to get helpers. It is aware of PyCharm Community helpers but also aware of some EP that provides additional helper paths.
2. EP implementations for PyCharm Prof and Jupyter that provide additional (prof) helpers.
It will help avoid problems with which Locator to use from Professional, Community or Jupiter plugins.


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

GitOrigin-RevId: c7c34f323247002699866f12f6ff5a08cf6a18ff
2024-07-23 12:04:22 +00:00
Egor.Eliseev
58d8eddeb8 PY-73525 Split HelpersLocator into Community/Pro versions
Merge-request: IJ-MR-138058
Merged-by: Egor Eliseev <Egor.Eliseev@jetbrains.com>

GitOrigin-RevId: cd82bc44337e7fdd182262c44ea5ca29e1804ad2
2024-07-02 11:43:46 +00:00
Bernhard Geisberger
c4dccf178c [python] Consider all available flavors when loading PythonSdkAdditionalData
GitOrigin-RevId: e5ea8d2adbb2a28bd5a639898dc2dc9b8cf42a96
2024-06-19 17:17:00 +00:00