Commit Graph

3662 Commits

Author SHA1 Message Date
Natalia.Murycheva
f4577f3c83 DS-6110 Statistics are not shown in some cases for polars >= 0.20.0
Added cast from str to int for a proper condition depending on package versions.

GitOrigin-RevId: e3979065f387959a435c1f65bf765e370047ff76
2024-01-03 12:58:56 +00:00
Natalia.Murycheva
d8a4585ee6 DS-6110 Statistics are not shown in some cases for polars >= 0.20.0
Added version-dependent name for the "counts" key for value_count() result.

GitOrigin-RevId: 6da274eebbafa0b9bc939f4027d2c8316efc1881
2023-12-27 12:55:27 +00:00
Georgii.Zorabov
f756fff1a7 DS-6000 changed max number bins in table column histograms from 5 to 20
Merge-request: IJ-MR-122495
Merged-by: Georgii Zorabov <georgii.zorabov@jetbrains.com>

GitOrigin-RevId: 2a23d04639d59c32e3b3fe7864aa28e4aafb5977
2023-12-19 12:10:19 +00:00
Andrey Lisin
78f607f45a PY-64487 Don't patch threads when sys.monitoring is in use because callbacks are per interpreter, not per thread
GitOrigin-RevId: 78f4d967dea9b357a0b15bd8291d8c39f4e49dfd
2023-12-11 16:10:13 +00:00
Egor.Eliseev
511297b5c8 PY-64542 Asyncio support for the debugger doesn't work with pytest-asyncio
Add check for a loop `_compute_internal_coro` attribute


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

GitOrigin-RevId: cb59161ba526f818f1f4e1a7ce6255fea58e3495
2023-12-11 13:45:28 +00:00
Egor.Eliseev
8eb7aff612 PY-36151 Can't create Pool in multiprocessing in Python Console
Merge-request: IJ-MR-117377
Merged-by: Egor Eliseev <Egor.Eliseev@jetbrains.com>

GitOrigin-RevId: a2770b4c9eede71c732e251f1f1bfddcad4bd36b
2023-12-11 13:17:05 +00:00
Andrey Lisin
502793eddc PY-65243 Obey PYDEVD_USE_CYTHON environment variable when importing tracing module for Python 3.12
GitOrigin-RevId: cd153cf56d18c3bc3858f31259d8a8252314578e
2023-12-11 12:18:04 +00:00
Egor.Eliseev
4e46197503 PY-53355 Warning when running Django tests: The extra_tests argument is deprecated
Remove the 'extra_tests' argument if a Django version >= 4.0


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

GitOrigin-RevId: d9274d828827112a01fd04d0ea62f4df945772af
2023-12-01 22:54:12 +00:00
Andrey Lisin
f14d7997ef Cleanup: redundant assignment
GitOrigin-RevId: ccaf73a7259b1490939ecb8557e765d0516a0c00
2023-12-01 17:23:44 +00:00
Andrey Lisin
98f6e4b47a PY-64317 Correctly detect library modules that should not be traced
GitOrigin-RevId: 434e4cadbd1191085aadf533b95284c065834d4c
2023-11-28 16:22:05 +00:00
Georgii.Zorabov
d2b6c5e318 DS-5711 added labels for bools hisrograms and min/max values for the other types.
Provided proper settings for the histogram and put them into histogramSettings class. Now visualisations are wider and shorter.
Labels size depends on a sum labels length only, todo: make it depend on a font size.


Merge-request: IJ-MR-118535
Merged-by: Georgii Zorabov <georgii.zorabov@jetbrains.com>

GitOrigin-RevId: 2d94e7d10c39e38c1946839c4474ead4591fe73e
2023-11-28 16:08:22 +00:00
Georgii.Zorabov
e1026ad8ae [tables] removed non-ascii symbol in comment in pydevd_polars.py and pydevd_pandas.py
Merge-request: IJ-MR-120966
Merged-by: Georgii Zorabov <georgii.zorabov@jetbrains.com>

GitOrigin-RevId: 810815417b3ae59ff70a201773f3231e2a8e5c5f
2023-11-28 15:13:58 +00:00
Andrey Lisin
ce7fa7ef0a PY-64302 Fix frame evaluator extension name and take Python version into account during import
GitOrigin-RevId: ae7c941c8c283f31e346c5bc2e4dbfbf7a31aa7e
2023-11-27 20:03:24 +00:00
Andrey Lisin
ba00d2d72a PY-64287 Fix debugging of Django projects
GitOrigin-RevId: c1173f76e7552f84b80e8a8ef73c63dc52457f1f
2023-11-24 14:34:49 +00:00
lada.gagina
3f37786ec0 [python] Check setuptools presence only for python < 3.10 (PY-48909)
As importlib.metadata exists in newer versions

GitOrigin-RevId: e9a58aefa0ec155ec13da8d2039c5bc6af23a657
2023-11-22 21:19:22 +00:00
Andrey Lisin
9fb6613f3a PY-64242 Don't suggest building debugger Cython extensions if setuptools are not presented
GitOrigin-RevId: f668ff557736174a4b5a8d3ea78d5ccaa4c351ac
2023-11-22 13:11:23 +00:00
Egor.Eliseev
10a5013c64 PY-64198 Convert SciView to Plots
Merge-request: IJ-MR-120373
Merged-by: Egor Eliseev <Egor.Eliseev@jetbrains.com>

GitOrigin-RevId: 8f4dc769097a4614bdafed4b147c08636ce605a4
2023-11-21 23:42:01 +00:00
Andrey Lisin
e1522d1916 PY-62566 Add PEP 669 based debugger Cython module for Windows
GitOrigin-RevId: 0838be90f9f3b68d6bc68cc05e46eb228bd42a05
2023-11-21 11:17:47 +00:00
Andrey Lisin
7bbdf1f090 PY-62566 Add experimental Cython module for PEP 669 based debugger on macOS
GitOrigin-RevId: 7f13e1289e5942b05acec42bf04f46b480002897
2023-11-20 16:10:37 +00:00
lada.gagina
75b1ecd244 [python] Cleanup supported/unsupported versions xmls
- Drop support for python 3.5 & 3.6 in compatibility inspection
- Fix and remove some outdated tests
- Remove xmls for long-unsupported python 2.6 & 3.5
- Regenerate versions.xml
- Remove mentions of OS-specific modules

GitOrigin-RevId: 3265dd1de8a4f7a41119e10c95bb705ca5845efe
2023-11-17 18:57:31 +00:00
Andrey Lisin
7a2dc89ae5 IJ-CR-120081 Fix formatting
GitOrigin-RevId: 9576a0f4293b4dddd8ee1da274beef0aa4bb741b
2023-11-17 13:09:48 +00:00
Andrey Lisin
529fcf24d2 IJ-CR-120081 Use setUp and tearDown mechanism instead of try/finally in every test
GitOrigin-RevId: c68f887d98e9fd66046ab8864d37ef6a54b9ca38
2023-11-17 11:11:26 +00:00
Andrey Lisin
cbe72f0f10 IJ-CR-120081 Add tests for args monkey patching function when -X or -B interpreter option is used
GitOrigin-RevId: 8bc0440fded2e71dcbb02547218c47e5d04c0538
2023-11-17 10:23:14 +00:00
Andrey Lisin
762ac48e88 PY-64110 Handle possible -X interpreter options properly
GitOrigin-RevId: ecd44cd7b6746b886f70e43487278503fe395a04
2023-11-16 16:33:42 +00:00
Andrey Lisin
bb00dda793 PY-63644 Gracefully stop PEP 669 based debugger on "Stop" button click
GitOrigin-RevId: e7f100cb4e95c5bddd6edbedf54a95a82ba2d1f0
2023-11-16 11:21:51 +00:00
Andrey Lisin
f91a4c223c PY-62566 Use cythonized version of helper functions in PEP 669 debugger when possible
GitOrigin-RevId: 979a5472e027266b911b1a2d3dc2f1fdb3ce10fa
2023-11-15 09:04:41 +00:00
Mikhail Golubev
ed3d0dca1b PY-64005 Don't copy versioned .so files, e.g. libcudnn_cnn_infer.so.8 as remote sources
GitOrigin-RevId: 4d2b1d49b7e3fbb967482397c41381db6415a867
2023-11-13 18:06:56 +00:00
Andrey.Matveev
c8942900df PY-63273 Restore SQLAlchemy and Flask-SQLAlchemy
GitOrigin-RevId: 0a3731899cc9d108839dd89128a2d3e583e8c56b
2023-11-10 17:48:23 +00:00
Andrey.Matveev
9aec9be967 PY-63273 Restore @python2
GitOrigin-RevId: f0bcf7431f279abab4332048fbdbadb0b221f44e
2023-11-10 17:48:23 +00:00
Andrey.Matveev
93919e49b3 PY-63273 Remove DataclassInstance related things
Issue: PY-63688

GitOrigin-RevId: 1c27f8d7d709bca75cb2b91abeacc5365d5ebab0
2023-11-10 17:48:23 +00:00
Andrey.Matveev
7d9e2720df PY-63273 Remove overloads of write and writelines
Issue: PY-63689

GitOrigin-RevId: 683e93628761b0f4ea7b6f9a048a25a6630eec48
2023-11-10 17:48:23 +00:00
Andrey.Matveev
5f61744b47 PY-63273 Revert __new__ to __init__
Issue: PY-62301

GitOrigin-RevId: 3f3738447b7cff0ff27953492189eb99527bd948
2023-11-10 17:48:23 +00:00
Andrey.Matveev
9a26cf0c14 PY-63273 Revert NewType function remove class
Issue: PY-34617

GitOrigin-RevId: 72fe29747517bfe58fd0b1c75376b52799dad4a9
2023-11-10 17:48:23 +00:00
Andrey.Matveev
4b088c972e PY-63273 Change order of if sys.version_info in collections
Issue: PY-34617

GitOrigin-RevId: 7e688d37a0fb518736d7df16d214121d2082259d
2023-11-10 17:48:23 +00:00
Andrey.Matveev
5a1bf3501e PY-63273 Update typeshed: run script
typeshed commit hash: 21fcd8960f1dae5ec4563dd99860d0918efe5cff

GitOrigin-RevId: 0fd8f2c47be13006dbfd556d1ae57f0bbb23d1bd
2023-11-10 17:48:22 +00:00
Andrey Lisin
3e40d8eb8a PY-62566 Support stepping out when using low impact Python 3.12 debugging
GitOrigin-RevId: 1a843a776a8592258c794e23b74271a660cc6f42
2023-11-10 10:47:56 +00:00
Georgii.Zorabov
263f637545 DS-5920 fixed incorrect dash in histogram tooltips for Windows case
Merge-request: IJ-MR-118912
Merged-by: Georgii Zorabov <georgii.zorabov@jetbrains.com>

GitOrigin-RevId: 5e07344b21850196e10570e4ab114ea957e364e2
2023-11-07 02:44:28 +00:00
Andrey Lisin
e4129ed736 PY-62566 When returning, check back frame is in project scope and not current one; turn off code monitoring after return
GitOrigin-RevId: 28d4607f1c750f440e335ec8e2ee1e1cf5b6f6d9
2023-11-06 23:44:20 +00:00
Andrey Lisin
f1f44389ab PY-62566 Prevent debugger from hitting lines with function calls twice when showing return values is enabled
GitOrigin-RevId: a93ede6c9e908e4cf60ca42f61b65ad608e8c8b9
2023-11-06 23:26:30 +00:00
Andrey Lisin
78b21895f2 PY-63555 Fix "Step Over" behaves like "Step Into"
GitOrigin-RevId: 046ca2a2d082f8fc1fddc4866dbbef893a1bb6e7
2023-11-06 16:15:12 +00:00
Natalia.Murycheva
dacfc63c4b DS-5894 Sorting by index breaks table output
Fixed the case, when a dataframe has RangeIndex. In that case, "level" argument in "sort_index" is not applicable.

GitOrigin-RevId: 9c2744dffee76a0a0a601e28daec6915e89d7a0e
2023-11-03 19:51:34 +00:00
Georgii.Zorabov
29c18fc1b6 DS-5711 fixes for visualisations
- if there are 3 unique values in a column and percentage vis is shown, no Other value shown (but all three values)
- if column contains value with name Other no collision with the word Other for percentage vis is present.
- fixed color names
- refactored code for python part
- int percentages are shown as ints, but double values are rounded to 1 digit
- added more types to visualisations
- fixed null column for polars case

Merge-request: IJ-MR-117790
Merged-by: Georgii Zorabov <georgii.zorabov@jetbrains.com>

GitOrigin-RevId: 60f88336666e839d671f40614a012121a2177258
2023-11-01 10:55:56 +00:00
lada.gagina
208da85244 [python] Handle absence of package metadata more gracefully (FL-22448)
importlib.metadata reads package details from respective METADATA files instead of dist-info folder name, thus resulting in exception if this file gets corrupted

GitOrigin-RevId: 306f2fdec202fe97b1073380a8c1267a11532994
2023-11-01 01:09:43 +00:00
Georgii.Zorabov
b5ec48e650 DS-5284-fixes
fixes for visualisations in table header. Percentage threshold is moved from 70 to 60, size of visualisations is decreased, font of percentage values is changed, colours are properly named, so everything works good when theme is switched and describe command processing is refactored  to correctly avoid possible warnings in its text for pandas and polars, also, added bars to histograms with height 0 to get rid of empty space.


Merge-request: IJ-MR-117579
Merged-by: Georgii Zorabov <georgii.zorabov@jetbrains.com>

GitOrigin-RevId: cf9e75fa51d827266c5b63116769bc662cc0d26b
2023-10-24 21:33:00 +00:00
Georgii Zorabov
16728f1068 georgii.zorabov/DS-5711
Now percentage and unique statistic visualisation are shown for table columns. Also, fixed code in pydevd_polars.py, pydevd_pandas.py and DSStatisticsTableHeader. Aditionaly, renamed color for histogram bars, so it shows correctly both for new and old UI

Merge-request: IJ-MR-116093
Merged-by: Georgii Zorabov <georgii.zorabov@jetbrains.com>

GitOrigin-RevId: d62776f8c696b14a95286713ea3b24cef72ad34d
2023-10-23 21:39:53 +00:00
Andrey Lisin
2c3f5d4e61 PY-62566 Fix step over behavior when stepping through multiple nested functions
GitOrigin-RevId: 5d0e85e5b87fd479eac81644c7e63a76961ffe7d
2023-10-23 20:58:48 +00:00
Andrey.Matveev
c24752ceb1 PY-58752 Impl inspection for check matching override signature
GitOrigin-RevId: 4520138ac657a514b53f2f939521f0336701be46
2023-10-22 10:27:24 +00:00
Mikhail Golubev
a14c9ef92c PY-53105 Support PEP 646 and TypeVarTuples. Take 2.
The introduction of TypeVarTuples and the concept of unpacked tuple types made us
revise all the places where we match sequences of types in type inference.
For instance, when matching type parameters and type arguments for generic
specialization in:

* type hints, i.e. xs: MyGeneric[int, str] = MyGeneric()
* constructor invocations, i.e. xs = MyGeneric[int, str]()
* class declarations, i.e. class MyGeneric(Base[T1, T2, str]): ...
* type alias declarations, i.e. MyAlias: TypeAlias = MyGeneric[T, int]

as well as during type matching of all generic types, both normal non-variadic and
existing "built-in" generic variadics in the type system, namely tuples and
Callables.

Previously, this logic was spread across numerous places in PyTypeChecker and
PyTypingTypeProvider, all with their own subtle differences. The first attempt
of PEP 646 support put all the code for uniform matching of type parameters directly
in PyTypeChecker, significantly complicating its already arcane internals.
I've introduced a unified API for that called PyTypeParameterMapping.
It still retains some of the former quirks in form of its Option flags, controlling
in particular how we handle having some of the expected types unmatched
(imagine expecting MyGeneric[T1, T2, *Ts] and receiving MyGeneric[int]),
but I'm planning to gradually eliminate this conditional logic.

The same class is now also responsible for matching parameter types of callables
that already allowed to fix some of the known problems, such as ignoring their
arity (PY-16994), but I'm going to extract a separate API entity for that, since
matching of callable signatures is a much more complicated task involving
compatibility of different types of parameters (positional-only, keyword-only,
defaults, varargs, etc.).

Another positive side effect of these changes is that substitution of type
parameters during type inference became more consistent, and we no longer lose
useful type information by replacing all unbound type parameters with Any. It's
particularly visible in type checker errors where we stopped dropping unbound type
parameters from messages about mismatched parameter-argument types.

Among other improvements in this changeset are proper scoping for
TypeVarTuples, consistent with other type parameters, and recognizing TypeVarTuples
and unpacked tuples in types of *args parameters in function bodies, e.g.
`*args: *Ts` translates to "args" parameter having the type `tuple[*Ts]`.

Confusing PyNoMatchedType used only for reporting of missing arguments for *args
parameters annotated with unpacked tuples in the type checker inspection, e.g.

def f(*args: *tuple[int, str]): ...
f(42)  # a type checker error about a missing argument for str

was also removed from the type system in favor of a simpler approach with handling
such errors directly in the inspection. We might need such a general type in
the future, but it has to be well thought-through.

GitOrigin-RevId: 63db6202254205863657f014632d141d340fe147
2023-10-20 13:38:06 +00:00
andrey.matveev
a75c569022 PY-53105 Support TypeVarTuple
GitOrigin-RevId: f8160e9d802b09991daa710ed9a20f3e30d455da
2023-10-20 13:38:04 +00:00
Egor.Eliseev
8e2f73f9f1 PY-29311 Make SciView plots interactive
1. Add image representation as html (mpld3 lib)
2. Add html preview editor for interactive plots
3. Add a suggestion "Install mpld3"
4. Add "Save as html" action
5. Add tests


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

GitOrigin-RevId: dab7cc1dac74ec5e90d4bcd1a88fd6aadf06e557
2023-10-19 12:03:04 +00:00