Commit Graph

29558 Commits

Author SHA1 Message Date
Pavel Karateev
567ee4977e PCQA-456 Python 3.13.0b3 is available
(cherry picked from commit f65fb479665d419df4577aa2a3c98ec6186db03a)

IJ-MR-137982

GitOrigin-RevId: 16aa6c0d81d80e06e85648c08002de8c4edb3de5
2024-07-09 12:22:43 +00:00
Pavel Karateev
24ab0a7b06 PCQA-456 Update Python versions for PyCharm helpers tests
* Drop 3.6 & 3.7
* Add 3.9+


(cherry picked from commit 52d830b560f32bb75d1a1d84f67fa2e1b41a1f2e)

IJ-MR-137982

GitOrigin-RevId: dba613bc2f34198c25b85fff3e581ab997764e17
2024-07-09 12:22:43 +00:00
Daniil Kalinin
163ea4bf45 PY-73755 Fix parameter hints for Python don't work in Split Mode
GitOrigin-RevId: 90090969126d7d15345b2052f0a05ec3a0af791c
2024-07-09 11:27:22 +00:00
Dmitriy.Panov
8a5ada0dcf GitHub plugin is split into community and ultimate parts which should be published with the same ID if not bundled
GitOrigin-RevId: 7673da63563b1b8005cc8259440ff2e8cfd32c2b
2024-07-09 10:15:41 +00:00
Aleksandr Sorotskii
292c6e0837 PY-11963 Sort lines
(cherry picked from commit 8c998e6ace23604f29382d4547bdeebb0583e954)

IJ-MR-139247

GitOrigin-RevId: c0d0f76a36073d25506e0446bbb406ea97f73d8f
2024-07-08 19:39:36 +00:00
Aleksandr Sorotskii
aa7a9353cf PY-11963 Add some packages
(cherry picked from commit 7d465f3823c0f9f0a31b49a0b675cbfda4a2f79b)

IJ-MR-139247

GitOrigin-RevId: 27c8ac0e17a2e04d2fd919b777ad98614dbb3bd9
2024-07-08 19:39:35 +00:00
Vladimir Koshelev
b7700aaf66 [pycharm] PY-64403 add vision file to PyCharm
GitOrigin-RevId: 7b3fd4492e0cebb313626c7a1b52e369e0577279
2024-07-08 18:25:33 +00:00
Petr
a6fc2c09c6 PY-53693 PyCharm adds _: KW_ONLY to dataclass' init signature
GitOrigin-RevId: 471e10b4e12a36a640da2f3006719372797b5cf1
2024-07-08 17:53:13 +00:00
Tagir Valeev
d263e30396 Remove raw types in PopupStep#onChosen inheritors
GitOrigin-RevId: df36f1a249ab4d87c2d10e3d39c27f0351298921
2024-07-08 16:18:24 +00:00
Egor.Eliseev
459520a382 PY-66449 PyCharm displays a Poetry env as "invalid" when adding an existing SDK
Add a path to interpreter `bin/python`


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

GitOrigin-RevId: 83da7890a778b3022ac874c1b6feed7d93b691f7
2024-07-08 13:31:34 +00:00
Konstantin Hudyakov
423a4cf421 IFT-573 Fix completion item detection in Python Basic completion lesson
GitOrigin-RevId: 83e1c2575c879fba8732417bd68ca783b52f5c99
2024-07-05 18:36:32 +00:00
Natalia.Murycheva
c4b259368d [PyCharm Tables] PY-73641 ... in tables instead of values #PY-73252 Fixed
* fixed polars case

GitOrigin-RevId: 259d170d79afbddf97a99e62b27685255aaf6d12
2024-07-05 16:32:23 +00:00
Daniil Kalinin
06d8a78b34 PY-33425 fix pep8 warnings were still shown after suppressing with # noinspection PyPep8
GitOrigin-RevId: 738ab906f4026f8f64a3b1f7185ba8a5add9fe40
2024-07-05 13:26:02 +00:00
Dmitry Kichinsky
f84c2574c5 [maven] IDEA-355917 set explicit nullability in com.intellij.execution.actions.ConfigurationContext.getModule
GitOrigin-RevId: 36411bae7f1ee6f84f6b7494df46076498b16947
2024-07-04 21:50:51 +00:00
Tagir Valeev
6bb83bc8e5 [stubs] Reduce amount of raw types
GitOrigin-RevId: 169895a6ee3c98db193443dbb0ced98497221430
2024-07-04 21:05:23 +00:00
Pavel Karateev
7309a62c8c PCQA-466 Specify pydevd test envs in tox.ini
We can avoid specifying versions here, but ...

1. It won't be possible to run tests locally without checking what
   versions are supported (going to TeamCity config)
2. It won't be possible to specify dependencies for each Python
   version separately when it is required (not yet, but will be soon)

Hardcoding Python versions in two places for `pydevd` tests looks
ugly, but at the moment I have no better ideas. Will investigate as
a separate task in PCQA-447


(cherry picked from commit cc9e50cd7a742b8265497cdc56a49a6be0db38a8)

IJ-MR-138586

GitOrigin-RevId: 717d434d6fd72a6cb6ac0a361917ad22e8e62687
2024-07-03 17:30:19 +00:00
Tagir Valeev
15fb25d32e [python] Fix redundant formatted call
GitOrigin-RevId: b972c2605e3aee85b91bd9f7bd88ade24c417b43
2024-07-03 12:47:15 +00:00
Natalia.Murycheva
f721a69556 PY-73641 ... in tables instead of values
* added setter option for max_rows

GitOrigin-RevId: 3cedda6ac4e9aa4dfcb0bda80111198bf8341e0a
2024-07-02 22:14:44 +00:00
Natalia.Murycheva
873b88a98f PY-72210 minor changes
* removed unnecessary get_value_counts for statistics, as it's redundant
    * removed the corresponding test
* fixed computing VISUALIZATION_DATA for tables in DataView, now visualizations are shown
* minor cleanup: got rid of unused variables

GitOrigin-RevId: 1772fd5cad8ba5777795460fca484e90d0ccef82
2024-07-02 22:14:40 +00:00
ekaterina.itsenko
16c75007f3 [pycharm] PY-71967 Remove unused imports
GitOrigin-RevId: 4c5e1094d1b86eb6b473daed599e37cab5f8dba3
2024-07-02 19:14:38 +00:00
Vladimir Koshelev
2ca8342b13 [python] restore pep8 information level after plugin split PY-73129
GitOrigin-RevId: 53fb0cf4c7efe139694d34f1707cdb8305881e03
2024-07-02 18:12:23 +00:00
Irina Fediaeva
3851796622 Install DRF in Django testing env
GitOrigin-RevId: fdafa913b286425c40f23fbccf71d46b0e5aac31
2024-07-02 16:13:18 +00:00
Mikhail Golubev
eb63148798 PY-73246 Don't insert square brackets after classes not having free type parameters
Even if they transitively extend typing.Generic, such as the builtin str.

GitOrigin-RevId: 9389ef5846e21ba5e0fed8b835beb2d458e42f13
2024-07-02 14:08:48 +00:00
Mikhail Golubev
ebba681c85 PY-62208 Don't suggest names shorter than five characters unless it's an extended completion
Otherwise, we end up with dozens of unintentionally public names such as "s", "i", "k"
even in the standard library (e.g. `this.s` or `pickletools.i`).

Ideally, we should rely on .pyi stubs and the content of `__all__` to offer only explicitly
exposed API, but not every module has any of those two, and it's not clear how to match
.py files and the corresponding .pyi stubs fast enough for completion.

GitOrigin-RevId: 163c472654e60ae63ff893142b8ddb9accc56393
2024-07-02 14:08:48 +00:00
Mikhail Golubev
1a3e6c2a64 PY-73246 Automatically insert square brackets on completion of parameterized types
GitOrigin-RevId: 5e81bc984fa3c7b4f83c564c85d872c5a49cf391
2024-07-02 14:08:48 +00:00
Mikhail Golubev
52850e21d8 PY-62208 Include importable names in basic completion results
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
2024-07-02 14:08:48 +00:00
Petr
5054f4a9b5 [python] Do not store unused decorator arguments in stubs
GitOrigin-RevId: d1a5f63dbed11a4f373d1d7936700af3bc74f70f
2024-07-02 14:04:36 +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
Daniil Kalinin
3186ddfc5b PY-58497 Cleanup, fix failing tests for Java parameter infos.
GitOrigin-RevId: d9950dfea02d95e6673f20eb940b65dbf85e7861
2024-07-02 09:57:32 +00:00
Daniil Kalinin
ab346dc761 PY-58497 add test on expand/collapse behaviour of Parameter Info window in Python
GitOrigin-RevId: e94b034d97fec61966e76dd6c2d6aef2b1eec393
2024-07-02 09:57:32 +00:00
Daniil Kalinin
29c93a526c PY-58497 Adapt PyParameterInfoTest and PythonConsoleTest to the new Parameter Info implementation
GitOrigin-RevId: 24cdf19e88d98e93cd8c0814b4d040ec88405623
2024-07-02 09:57:32 +00:00
Daniil Kalinin
35aa2b43b4 PY-58497 Add a custom bottom component for Python Parameter Info window.
Make it possible to expand/collapse overloads by clicking the action link in the bottom component or calling Parameter Info window on the same place for the second time.

GitOrigin-RevId: a65de4124b4530dd9cc5f16b0a709e3a6489071c
2024-07-02 09:57:32 +00:00
Daniil Kalinin
d47bd34358 PY-58497 Refactor parameter info logic for Python
Show type hints only for the highlighted parameter

GitOrigin-RevId: f55d8ecc27dcbca5e6c24c5ca347ea3995e69ca8
2024-07-02 09:57:32 +00:00
Ilya Muradyan
7e4a275cbe KTNB-235, PY-64586: Move core notebook support to the dedicated plugin to make it possible to install from different IDEs
GitOrigin-RevId: 1ffd4c09b575a83c37b83514fb7789e1d9863280
2024-07-01 19:29:25 +00:00
Mikhail Golubev
ded1e5d860 [python] Implement acceptPyVisitor in PyStatementListImpl and PyAstStatementList
In PyStatementListImpl, it was seemingly accidentally removed as part of
892acbe0c95fde6aec74b7595b0a58f902c426f5.

GitOrigin-RevId: 17b8db2ee2c779cb32cee346f59fb3cc56911288
2024-07-01 16:43:01 +00:00
Vladimir Koshelev
9bdf1de9e2 [python] move code vision elements to the right side by default
GitOrigin-RevId: 53c4dab7ad7e3569000675961ec8d45a6733bc1c
2024-07-01 09:41:26 +00:00
Nikita.Ashihmin
c06684c79f PY-62528 Tables(fix): Shift-Esc key combination doesn't hide SciView
GitOrigin-RevId: 250b87eeed1d66c51518b261ce864f4f2e9d4435
2024-06-29 15:31:08 +00:00
Nikita.Ashihmin
5f12e9384a PY-73598 Packaging(fix): Exception on open in statistic
GitOrigin-RevId: 1e31df9ab527e1dedab9ed6784aa86695e0570c9
2024-06-29 15:31:02 +00:00
Aleksei Kniazev
f43d8d2af2 [python] fixed python sdk rename (PY-71412)
- wrap sdk modification in write action
- recreate modificator on each consequent save

GitOrigin-RevId: 5b5719e6c29151ff72ddba16718bb6d96b2bcc0e
2024-06-28 19:43:16 +00:00
bogdan.kirilenko
25a5b83cae [pycharm] PY-73471 "python.hugging.face.cards" FUS hotfix - replaced activeFileType -> dialogWindowResult in "cache.management.item.delete.clicked" event
GitOrigin-RevId: fbd0103038118a8fb32fc214322573e5225cf5e0
2024-06-28 18:31:54 +00:00
ekaterina.itsenko
997640f4ac [pycharm] PY-71967 Fix sorting and indices
GitOrigin-RevId: 37769066f814b5406684ba7d0d4276309aa28dd4
2024-06-28 17:37:07 +00:00
ekaterina.itsenko
a490bab8c2 [pycharm] PY-70312 Fix everything except charts
GitOrigin-RevId: dc4ef94d776105260e0b4d0965a08bfaf1165268
2024-06-28 15:04:17 +00:00
Andrey Lisin
a7c8aaa04c PY-73427 Check if shape attribute is safe to access before evaluating it
GitOrigin-RevId: cf74c2c49235f60811ed9419a96dabe081f74b70
2024-06-28 14:58:59 +00:00
Andrey Lisin
5c4c5ad909 Revert "PY-73427 Experiment: always load self variable in safe manner"
This reverts commit dcdf3d070f71e3ad47055fc7620d4d53e5fc3c4f.

GitOrigin-RevId: 3f33fd05916cc4bed1c5f9ed9a2a30e608d94f76
2024-06-28 14:58:56 +00:00
Andrey Lisin
209c9d230e IJ-CR-138109 Acquire lock for entire get_instance() call
This modification streamlines the code as the lock needs to be obtained during the `update_handlers()` call regardless.

GitOrigin-RevId: c5d1d7ce9d3f5c3b81b63b8e6c4a26a72db3e666
2024-06-28 10:51:40 +00:00
Nikita.Ashihmin
7d6b08211f PY-71958 Plots(fix): Interactive mode in Python Plots show plot of fixed size, ignores figsize
GitOrigin-RevId: 48c072bcbfb6825dce0c0a8ecce5c046a88419d9
2024-06-28 09:06:32 +00:00
Andrey Lisin
fb6b4f42d4 PY-73549 Make initialization of variable handlers thread-safe
GitOrigin-RevId: eb4e0b566015efe92ed91604f20f38b64e74143b
2024-06-27 12:21:44 +00:00
Aleksandr Sorotskii
6e8d712dea PY-73259 use uniform package names for stats
GitOrigin-RevId: e133e0c0c38857316a627c742328cd7590232f17
2024-06-26 18:58:58 +00:00
Aleksandr Sorotskii
56cc278737 PY-73001: improve toml stats, add one more test
GitOrigin-RevId: 177c87c825c8b0da937c23c5b0a9c299ab0fdda5
2024-06-26 18:58:58 +00:00
Egor.Eliseev
2317f2b12d PY-73492 Fix errors with "helpers-pro" dir path
Change the "helpers-pro" path from `python-ce/helpers-pro` to `python/helpers-pro`


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

GitOrigin-RevId: 097aebb0e82024bcee84d7527a39813285e94414
2024-06-26 15:21:35 +00:00