Merge 3.5 (issue #28371)

This commit is contained in:
Yury Selivanov 2016-10-05 18:29:04 -04:00
commit d2c5fab7c6
3 changed files with 11 additions and 3 deletions

View file

@ -606,6 +606,9 @@ class BaseEventLoop(events.AbstractEventLoop):
if isinstance(func, events.Handle):
assert not args
assert not isinstance(func, events.TimerHandle)
warnings.warn(
"Passing Handle to loop.run_in_executor() is deprecated",
DeprecationWarning)
if func._cancelled:
f = self.create_future()
f.set_result(None)