235 Commits

Author SHA1 Message Date
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
Nikita.Ashihmin
886b4f0716 PY-31400 Jupyter: support get envs for Notebook export
GitOrigin-RevId: 0d4f3959e20e0bfbd51236333c24f69eccc7785a
2024-06-07 06:52:08 +00:00
Nikolay Chashnikov
908883714c [python] API cleanup: remove unused deprecated API (IJPL-503)
GitOrigin-RevId: bc9846615603353710cae0b35f362d199de113e8
2024-05-16 18:01:12 +00:00
Vitaly Legchilkin
9a56930105 Use BinaryInstaller for CPython, update sdks registry, remove os field from FUS (PY-71414)
* os field is a reserved field, it is an autofilled field, no need to add it manually.

GitOrigin-RevId: 9506335e17c6e049adce9ebf17352c609739022a
2024-05-11 17:40:47 +00:00
Ilya.Kazakevich
9f06f1a251 PY-71747: Do not fail if remote interpreter has a path with ssh:// prefix.
Some remote interpreters have `sdk#homePath` starting with `ssh://`.

Code all over the monorepo assumes that `homePath` is a local file path and tries to convert it to `Path` throwing the exception effectively.

There is a `isCustomPythonSdkHomePath` which must be used to check string before trying to convert it into `Path`

The current situation (along with "solution") is a legacy from dark ages and will be rewritten to the workspace model soon

GitOrigin-RevId: 9adc02f312667571a65ff63d4e802aa7d6dbb518
2024-05-02 14:20:44 +00:00
Aleksei Kniazev
984183cbea [python] executable cache in PythonSdkFlavor prevents from validating newly installed conda (PY-63084)
(cherry picked from commit 2b7e6c361fd1429f0ce94d271214c5e1f5bca23b)

IJ-MR-129618

GitOrigin-RevId: 55551e94e651a953863e0766419e881220c0a45b
2024-03-21 19:02:35 +00:00
Vitaly Legchilkin
a3a2a5db18 Add Conda (Miniconda/Anaconda) install manager (PY-63084)
Make project optional (PY-63084)

Fix BinaryInstallerUsagesCollector(PY-63084)

* align eventIds according to naming convention
* fix version regex (allow only digits dots and dashes)

Add Conda (Miniconda/Anaconda) install manager (PY-63084)

* refactor python installers
* add conda updater
* create conda sdks registry


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

GitOrigin-RevId: 1e73d1bd32fced94901c4c9a2c1260fca8aca9e2
2024-03-19 00:50:15 +00:00
Nikolay Chashnikov
8856dd6264 API: mark for removal unused deprecated API (IJPL-275)
GitOrigin-RevId: d4f67b9700b60c8eb278ed79baaba4fa01d71fd9
2024-02-16 15:45:57 +00:00
Aleksei Kniazev
d5281a5055 [python] serialization for PyDetectedSdkAdditionalData with TargetEnvironmentConfiguration (PY-65470)
PyDetectedSdk is expected to be serialized only by SdkModificatorBridgeImpl for internal storage
Every time PyDetectedSdk is selected as a project interpreter it should be transformed to a regular SDK

GitOrigin-RevId: 2e38e894014436b8a1a2740ea0fd5dc7aacbe10b
2024-01-24 21:17:58 +00:00
Ilya.Kazakevich
743936d654 [python, ds] remove python.remoteInterpreter -> intellij.python (prof) dependency.
DS doesn't have prof, but should support SSH and WSL

GitOrigin-RevId: 3c0759d64bdd8ce41e939864659177f9ff6cec12
2024-01-18 08:17:56 +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
b599287e32 [python] Refactor icons layout in community
Icons removed from SDK package (no need to have a separate class for it), ultimate icons moved out of community module.

There are only 3 icon packages in community:
* `PythonParserIcons`
* `PythonPsiApiIcons`
* `PythonIcons` (aka `intellij.python.community.impl`)

Latter two have `.json` mapper to replace old icons with new one for New UI which is included into corresponding `.xml` file.

GitOrigin-RevId: 0438ad4485b5a82a89c81ec63ae6e575d5bb52de
2024-01-12 15:53:48 +00:00
Ilya.Kazakevich
826e478335 [python] Move icons in SDK in the right package
GitOrigin-RevId: fcd5331038928a183665a4869c7ea4e34502f1fb
2024-01-12 10:53:46 +00:00
Vitaly Legchilkin
5dc633a1ab Remove 3.6 & 3.7 python versions from install dialog (PY-65338)
+ bump CPython 3.12.0 -> 3.12.1

GitOrigin-RevId: fc29d8f5b49585a93e819acd1926eb33c141c9b0
2024-01-05 11:32:22 +00:00
Vitaly Legchilkin
09c8981fab Fix Unit tests (PY-64546)
Verifies if there are python distributives for MacOS / Windows on ARM / X86 / X86_64

(cherry picked from commit 717f1a4540d12502e46e3b0fd29b08d2d2043281)

IJ-MR-121650

GitOrigin-RevId: 71ff849618c362bec369372f4952824a454d607d
2023-12-07 16:53:37 +00:00
Vitaly Legchilkin
3e1de3259e Add Python Sdks update script (PY-64546)
also bump sdks.json to latest

(cherry picked from commit 14cc088c20a8b77ee49007d8f7b982920e40c6e6)

IJ-MR-121650

GitOrigin-RevId: db7c0d11a61e239e2f47bd2f1a8dd1156f3712b1
2023-12-07 16:53:33 +00:00
Vitaly Legchilkin
95b312f00e Align python download and install progress text/details with a guideline (PY-64420)
Previous texts were uninformative and didn't comply with our guidelines.

GitOrigin-RevId: ec9f3b6456e504a806c94ff9427f147085be668d
2023-12-04 17:10:54 +00:00