Commit Graph

23822 Commits

Author SHA1 Message Date
Andrey Lisin
a22effa122 PY-38347 Fix frame evaluator opcodes to lines mapping procedure
The previous version of the procedure could miss breakpoints when extra `EXTENDED_ARG` instructions are added before the injected code. This happened because in some corner cases after updating the opcodes to lines mapping an `EXTENDED_ARG` instruction could land as the last instruction in a line, and the instruction which argument it extends - on another. This lead to the situation when it was impossible to detect that we have hit the next line. These changes also add the ability to trace opcodes when the `PYDEVD_TRACE_OPCODES` environment variable is set to `True` (available only for Cython) to ease the debugging of such cases in the future.

(cherry picked from commit 77399d3b7b2b9bc6aac1b85d59ae305500cb6ecb)

GitOrigin-RevId: 105bf9d3d2cc51a940b03b1cb11c07e97074048b
2019-12-19 14:08:32 +00:00
Ilya.Kazakevich
70f83ef44c Test broken because of PY-39656
GitOrigin-RevId: 0ebc631dd4748a7583c9653db2dc77b2cb419d6c
2019-12-18 20:02:55 +00:00
Ilya.Kazakevich
3348ea74ef Flaky test goes to staging
GitOrigin-RevId: 47045f1686bcde1fd8d32c5e212704b0c18791f0
2019-12-18 18:12:51 +00:00
Ilya.Kazakevich
f8544fb8ee PY-26062, PY-38540, PY-25935: Various Django performance improvements.
* Do not provide references for "open" in Django (already done by another code)
* Do not use full resolve for class and functions names. In most cases "resolve", "ManyToMany" and "ModelForm" are imported as-is, not with aliases.

GitOrigin-RevId: 8a0803e6b19482654c91186aa9754ea3d91da282
2019-12-18 17:32:32 +00:00
Nikolay.Tropin
20e3cc86ad fix raw type in all implementations of RunProfileState.execute
GitOrigin-RevId: 4ffa418429f3f874af75564706c2db2e201da984
2019-12-18 15:34:12 +00:00
Mikhail Golubev
abcc326dc7 Allow to change multiprocessing start method via environment for testing purposes
GitOrigin-RevId: 2e0cb4c240f02a600b37e7511bdb6903a6708d1d
2019-12-18 11:08:59 +00:00
Mikhail Golubev
e8d5bd4376 Properly re-configure logging in a subprocess during skeleton generation
On platforms where "fork" is not available or not used by multiprocessing
root logger configuration is not automatically inherited and, thus, we loose
messages sent by worker processes. So as not to depend on particular
implementation of the module, e.g. by checking sys.platform or
multiprocessing.get_start_method(), we now explicitly reset and setup
logging anew in every created process.

GitOrigin-RevId: 572b5a1a77346f46421a6dd1e0ed0b1ed9c4ca6f
2019-12-18 11:08:59 +00:00
Alexander Doroshko
7d67af8bd8 add default implementation to DirectoryIndexExcludePolicy.getExcludeRootsForModule()
GitOrigin-RevId: da4fecfc5a43ea29043bcf53968630266ea4f5c2
2019-12-18 10:32:28 +00:00
Andrey Vlasovskikh
8600468ad7 Show the Python interpreter widget in all IDEs for which Python is a primary language
GitOrigin-RevId: ef0bb2a32b40751ac9e7a533fe6a1f874eda8299
2019-12-17 19:03:57 +00:00
Andrey Vlasovskikh
42843b151f Removed unused python-core-ide.xml
The components registered in it are included via pycharm-core.xml anyway.

GitOrigin-RevId: 210cc113414f277b4d13e23e1add02d12f03c36b
2019-12-17 19:03:57 +00:00
Andrey Vlasovskikh
14a1078a68 PY-39764 Restored Python as the primary language for PyCharm
The problem was that an implementation of IdeLanguageCustomization for Python got excluded from PyCharm builds due
to recent refactoring of the Python-related modules. This change brings it back and restores Python as the first
language in the list of languages in the Editor | Code Style settings.

GitOrigin-RevId: 0e00c712ee1b24a88babec78084b27956a9b53e7
2019-12-17 19:03:57 +00:00
Mikhail Golubev
20db357321 PY-39293 Prepare messages for InvalidSdkExceptions in a consistent manner
GitOrigin-RevId: 6c96a9b8990f2a15b99a16a9facce862361e7bc8
2019-12-17 18:33:57 +00:00
Mikhail Golubev
7444021e02 PY-39293 Restore reporting of a failed skeleton generator launch
With the new version of skeleton generator we kept process stderr in logs but
stopped reflecting a failed to start generator run anyhow in UI.

GitOrigin-RevId: 9cffaa0bd89655faf43d542a22249458801cfbd6
2019-12-17 18:33:57 +00:00
Semyon Proshev
161a28d32a Infer correct type for docstrings (PY-35885)
GitOrigin-RevId: 2994a2e312611b038c72ec18abb2cd96880213e9
2019-12-17 14:06:19 +00:00
Mikhail Golubev
ce6b36702a PY-34047 Handle keyword-only arguments in constructors of stub return values
On the whole, such stub calls look shaggy and could probably be replaced by
plain parameterless invocations altogether. It's also doubtful why we use
them only when analyzing docstrings of non-function callables, but questioning
whether they are needed in the first place seems out of scope of the current
issue. At least we don't produce warnings while generating them anymore.

GitOrigin-RevId: 25650f121e88141df081874f346d0cff2d31e3bb
2019-12-17 12:36:49 +00:00
Mikhail Golubev
15eeb501e9 PY-34047 Generator properly restores signatures of functions with keyword-only arguments
GitOrigin-RevId: d66bcb11e1fd3d9d27fb9a9dab19b6575cfffaa3
2019-12-17 12:36:49 +00:00
Ilya.Kazakevich
0f50ab63a1 Type in package name fixed (package renamed)
GitOrigin-RevId: 872a26060eac6f08682bebe38981fbf31c5a15dd
2019-12-16 23:05:41 +00:00
Andrey Vlasovskikh
28ef22103f Extracted intellij.python.community.plugin.modules from intellij.python.community.plugin so that we can run Python plugin without any extra plugins
GitOrigin-RevId: 69a297aec6f59872c860c1da0654e396eae43334
2019-12-16 19:36:07 +00:00
Andrey Vlasovskikh
1bb27a0cc0 Added a method to search helpers-pro
GitOrigin-RevId: c1022294b3b340ffd21eec3f04fce1d046898879
2019-12-16 19:36:07 +00:00
Stanislav Utikeev
fd34443bd8 Make PsiEditorUtil.findEditor(PsiElement) static method
GitOrigin-RevId: fe02ca11f5f9b6df71b509f411588fdf4733a38c
2019-12-16 15:36:47 +00:00
Stanislav Utikeev
5ed91a34a9 Replace deprecated PsiUtilBase#findEditor with PsiEditorUtil#findEditorByPsiElement
GitOrigin-RevId: 13c4098b91bde7722c462a21c26b35d9cd4ab7c6
2019-12-16 15:36:47 +00:00
Stanislav Utikeev
a1892c837b Move weighers to analysis modules
GitOrigin-RevId: 91d15872ff055d01a20b5202c3ef291155c7fe9a
2019-12-16 15:36:47 +00:00
Petr Golubev
fd72ec6e18 rm obsolete PyUnresolvedReferencesInspectionBase class
GitOrigin-RevId: c43097fdb06d9836dab094e9c3c47a2bfadd4b12
2019-12-16 13:11:04 +00:00
Petr Golubev
ba7bdc9706 unresolved ref inspection: get rid of PyUnresolvedReferencesQuickFixBuilder
GitOrigin-RevId: a00b3258cc0189010f1999cecd9f664ad6cc8c40
2019-12-16 13:11:04 +00:00
Petr Golubev
81eb2387a3 move Wildcard.END -> PyNames.END_WILDCARD; delete Wildcard class
GitOrigin-RevId: 91c84d289115de36918a5ceeb33ff8ab9441445d
2019-12-16 13:11:04 +00:00
Elizaveta Shashkova
5e6dcf687f IDEA-CR-56420: PY-39414 Fix TypeError exception with Task class under Concurrency Visualizer
Replace Task class with another mock class, not function

GitOrigin-RevId: 4f522b3308d3289b3d64f9d19e51908c90985368
2019-12-16 10:03:13 +00:00
Vladimir Krivosheev
d05fd119ea lazy toolwindow content manager creation - part 3
GitOrigin-RevId: 4bd92d3cffdb721eea6fab448c15285954179b66
2019-12-14 07:11:32 +00:00
Semyon Proshev
d861f0591d Remove fallback to find more cases of not-configured interpreter (PY-39541)
GitOrigin-RevId: f9ef9551f8c1a34c1bfdfdffc727eb55aa139542
2019-12-13 18:06:51 +00:00
Alexander Zolotov
3ccf932304 Migrate to defaultLiveTemplatesEP
GitOrigin-RevId: ff5058fbd0212bd0ceec5b56cfcd9d565216f020
2019-12-13 16:31:53 +00:00
Semyon Proshev
5b0f17f657 Reduce number of cases when interpreter is not configured (PY-39541)
Make PythonSdkConfigurator to be a project listener. It will catch opening project with .idea inside, or from recent projects list, or getting it from vcs.

GitOrigin-RevId: fcf3a7a37b4675670fad654efcc786f9f7fe9df1
2019-12-13 13:31:47 +00:00
Ilya.Kazakevich
d2cd69fc9e Fix test (call dispose() in finally)
GitOrigin-RevId: c0c8ce3f691fc09d728a347e2e364f14375422cf
2019-12-12 17:04:48 +00:00
Semyon Proshev
646f31a657 Don't highlight one element tuple in return (PY-34262)
GitOrigin-RevId: e1befffd14958e606f3f327848e5fee79dc68c03
2019-12-12 14:38:32 +00:00
Semyon Proshev
f865dc9a96 Introduce api for third-party dataclasses (PY-37802)
Make an ability to put these classes into our current support for STD and ATTRS

GitOrigin-RevId: ad655b6c2710e3af284eb811d314bc408ca619d2
2019-12-12 13:05:16 +00:00
Petr Golubev
759b71c9b9 mv python inspection EP from python to python/python-psi-api
GitOrigin-RevId: db59e4dfc53ffd531e527f42d8ed3361c98b8270
2019-12-12 11:34:54 +00:00
Ilya.Kazakevich
47fa6b7c4f Register module type in tests.
Some configuration producers fail if module type is unknown

GitOrigin-RevId: 58b0342873c5e5d4b653a1c6a8955386c3fc4a44
2019-12-12 00:32:07 +00:00
Semyon Proshev
d5ab1b39a5 Prefer default project interpreter over system-wide ones (PY-39653)
GitOrigin-RevId: 9709d51073ced0f9477cad9e9cc314f9b7b4f944
2019-12-11 18:34:34 +00:00
Semyon Proshev
1359157e7b Exclude inner venv on opening project directory (PY-39648)
GitOrigin-RevId: 63f3352991377875696f7acfb7c8a7d93cba6951
2019-12-11 17:31:39 +00:00
Semyon Proshev
80e5fb8710 Update StringLiteralTextEscaper to return range without quotes as a host text range (PY-37374)
GitOrigin-RevId: ac1e4dea2abc8fb3a8a58c33fb59618037267239
2019-12-11 15:07:28 +00:00
Ilya.Kazakevich
c4b849d3d0 Flaky tests moved to staging
GitOrigin-RevId: deb2db2fc65b23aa0a97adcb8488d39937a916b0
2019-12-11 14:40:19 +00:00
Ilya.Kazakevich
6feb35abfb tests for unittest2 removed (not used anymore)
GitOrigin-RevId: 91bb6d580e7527ab69216f1ae4143be065d5bbc2
2019-12-11 13:38:19 +00:00
Semyon Proshev
dc2faf114c Don't raise a missing type hints warning on function that has type hinted overloads (PY-39556)
GitOrigin-RevId: 15f29db84e0687c9573619a380eafab0b68f9072
2019-12-11 13:12:09 +00:00
Semyon Proshev
6144d481b8 Update resolving qname in scope so functions are processed correctly (PY-35881)
GitOrigin-RevId: 4949f39dbe340d51e8ffd990c3a02b06d52adf2d
2019-12-11 13:12:09 +00:00
Dennis Ushakov
dcdc6a2c74 unify AWS toolkit featured plugin description
GitOrigin-RevId: 60569162232485bb537784e8913c95e61bc8a1d2
2019-12-11 10:02:43 +00:00
Alexey Kudravtsev
9f8c04d183 remove spam from test console
GitOrigin-RevId: a2d55be12c4d15840a501232a58d891483c60499
2019-12-11 10:02:43 +00:00
Anna Kozlova
abc4a9ae72 no need in overriding getDisplayName for inspections
in production InspectionEP#displayName should be used; highlighting tests just do not use default names

GitOrigin-RevId: f0c172e568219499e7b96982fe352c7d1d3acc69
2019-12-11 08:03:54 +00:00
Ilya.Kazakevich
c51f222882 PY-39146: Do not use deprecated API.
See ``load()`` body

GitOrigin-RevId: 822dd2033d2f306c82400c8b1bb29fd769207d7e
2019-12-10 21:08:52 +00:00
Aleksey Rostovskiy
0877060dd6 Conda plugin: remove second description (ex change notes)
GitOrigin-RevId: 00ad364352fa0003176309e4b887f5af7130800a
2019-12-10 18:38:18 +00:00
Roman Shevchenko
bbb6dd9f83 [platform] unifying com.intellij.openapi.util.Pair extensions in a correct package
GitOrigin-RevId: 02fd5518b928efb106936c88f93ec2348a1ee400
2019-12-10 18:38:18 +00:00
Elizaveta Shashkova
5c67bc0373 IDEA-CR-56419: PY-34555 Clean module flag for child process
If a process was started with `-m` key (and converted to `--module` flag), this parameter will be passed to all its child processes. So we need to clear this flag in SetupHolder before patching arguments

GitOrigin-RevId: 00ae0b23fc6107bee75272a03a5bd15ca474fbc7
2019-12-10 15:38:42 +00:00
Ilya.Kazakevich
8e7be0b063 IDEA-CR-56335: PY-39497: Make default docstring ReST again
(cherry picked from commit bc34d102fa8b126b37748caeb4ac7b5f360a3c16)

GitOrigin-RevId: b9f45fdebbf4a27dd8dc43d40e37fea2621412e4
2019-12-10 15:38:42 +00:00