Remove condition about gevent installed on interpreter. There is no need for such check anymore, because multithreading debugging was fixed (PY-18823), but it breaks support for other patching libraries such as eventlet.
On windows we should remove brackets from some arguments in order to find interpreter options and put them in the correct place when patching args for the new python process.
Now it's able to find not only empty function/class bodies but also
empty blocks of other compound statements such as conditional
branches, loops, try/except/finally parts etc.
If pasted fragment can belong to several statements lists depending on
its indentation we let user to choose by using indentation before the
caret. However it's not allowed to insert new text so that it breaks
existing block structure, i.e. we constrain minimum and maximum
possible indentation.
Now first and consecutive indents of a statement list are treated
equally by the method.
Also getExpectedIndent was renamed into getExpectedBlockIndent and
made part of the implementation. It actually should accept only
statement lists, because for other element it didn't work as expected
previously.
This previously existed check was lost after the recent fixes for
PY-18522. It also caused failures of PyCopyPasteTest.testEmpty(), so
I reverted previous fix for the test.
We shouldn't update sys.modules for the main thread, cause it leads to the second importing 'threading' module, and the new instance of main thread is created. In this case we lose thread id and thread additional info, so it totally breaks the debugger.
Use indent based on caret position only when we're pasting neither
inside existing statement list (e.g. in the middle of a function), nor
inside empty statement list
I reverted previously modified test data in PyEditingTest, since
this fix doesn't affect top-level string literals treated as module
docstrings. They are processed in BaseQuoteHandler as earlier.
* Fix problems found in review and add tests
* Fix problems with positional substitution resolving, where arguments consist of positional and packed arguments and add tests
* Remove doc string check
Create a separate resolver for Django forms in order to prevent calling self.errors because it is a property and has side effects. Also We shouldn't call str(), because it also has side effects.