diff options
author | Yury Selivanov <yury@magic.io> | 2016-10-05 22:28:09 (GMT) |
---|---|---|
committer | Yury Selivanov <yury@magic.io> | 2016-10-05 22:28:09 (GMT) |
commit | 0de3de6cbfe034654dc03f3808de0c25e28a0c38 (patch) | |
tree | 029aa41fce2b4a4f4e57bd99764e452a239f3172 /Lib/asyncio | |
parent | 3e56ff0d08a65ea1e0fe361ae22d855acc9d65bb (diff) | |
download | cpython-0de3de6cbfe034654dc03f3808de0c25e28a0c38.zip cpython-0de3de6cbfe034654dc03f3808de0c25e28a0c38.tar.gz cpython-0de3de6cbfe034654dc03f3808de0c25e28a0c38.tar.bz2 |
Issue #28371: Deprecate passing asyncio.Handles to run_in_executor.
Diffstat (limited to 'Lib/asyncio')
-rw-r--r-- | Lib/asyncio/base_events.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/asyncio/base_events.py b/Lib/asyncio/base_events.py index af66c0a..648b9b9 100644 --- a/Lib/asyncio/base_events.py +++ b/Lib/asyncio/base_events.py @@ -605,6 +605,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) |