Commit Graph

23835 Commits

Author SHA1 Message Date
Semyon Proshev
468aad6048 Configure Python interpreter in background (PY-39541)
GitOrigin-RevId: b9a48a2a89320715cd3c3524269af7eea080487e
2019-12-23 13:08:30 +00:00
andrey.matveev
d66e0eec0e PY-10184 Impl hasattr support
GitOrigin-RevId: e5826372ddfe233656097da774d978c57ee54937
2019-12-23 13:08:30 +00:00
Sergey Ignatov
23cfc5c2e4 python bundle
GitOrigin-RevId: e80fd24be0e55e6b26aa00ab333df441b8edfaaf
2019-12-21 18:09:08 +00:00
Andrey Vlasovskikh
7b2d0ce401 Moved PyTypedDictInspection.html from PyCharm IDE resources to the Python Community plugin resources
Python inspections are defined in the Python Community plugin, not in the PyCharm IDE, since they have
to be available e.g. in IntelliJ with Python Community plugin installed.

GitOrigin-RevId: e2e2af5bade75e93a22cb07bfa37b7fbf49b0596
2019-12-20 14:44:33 +00:00
Alexander Koshevoy
3e81c18ec6 PY-39011 Fix loss of Path Mappings field in Project Interpreter settings
The logic of `PyActiveSdkConfigurable` had been slightly changed previously. This resulted in the loss of the event of setting initial SDK in "Project Interpreter" combo box.

GitOrigin-RevId: 4a435344f36f8f8a8a85bccd582746175a272656
2019-12-20 12:32:37 +00:00
andrey.matveev
701660837c PY-39742 Change model version with before_rerank_order feature
GitOrigin-RevId: 47278c34506c815c3bff03b9ef290793d2100227
2019-12-20 12:08:35 +00:00
andrey.matveev
7eae287320 PY-39742 Disable ml completion by default
GitOrigin-RevId: 44aca73bec4e39f7a10df085a86a4d2f20671b8a
2019-12-20 12:08:35 +00:00
andrey.matveev
024cdece96 PY-39742 Turn on ml completion by default
GitOrigin-RevId: 275f9b984e674473b8bc4f37f487f196d213b4a2
2019-12-20 12:08:35 +00:00
Semyon Proshev
138392e594 Reuse interpreters popup in quickfix (PY-39694)
GitOrigin-RevId: acafc9fbdf73eb52482fb79cae891f5c049b3a7b
2019-12-20 11:35:51 +00:00
Elizaveta Shashkova
dcfe526ea4 PY-39736 Make "Execute selection" and "Execute cell" available during indexing
GitOrigin-RevId: 5fd7b13de31780236b6ad8686b7623f5e0ccf886
2019-12-20 11:35:51 +00:00
Sergey Ignatov
ef0bfae0bf rest bundle
GitOrigin-RevId: 1e2017f3b1e6ca2e8320eec404797955627ea5ce
2019-12-19 22:06:01 +00:00
Vladimir Krivosheev
2422a15654 deprecate getContentManager — use RunContentManager.getInstance() directly
GitOrigin-RevId: da81162abe382947ee2b159774bb2efd9aeeda01
2019-12-19 20:02:35 +00:00
Elizaveta Shashkova
9670bc3457 PY-27257 Reuse Console tool window in Python plugin and add action to make Python Console available before tool window registered
If Console tool window was created once, it's available as action in Python plugin. But before creation it's impossible to start Python Console during debug session.

GitOrigin-RevId: cfb9ac4450246f067d70626b139d8830166d68f1
2019-12-19 17:35:54 +00:00
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