asyncio: sync with Tulip

- Sort imports
- Simplify/optimize iscoroutine(). Inline inspect.isgenerator(obj): replace it
  with isinstance(obj, types.GeneratorType)
- CoroWrapper: check at runtime if Python has the yield-from bug #21209.  If
  Python has the bug, check if CoroWrapper.send() was called by yield-from to
  decide if parameters must be unpacked or not.
- Fix "Task was destroyed but it is pending!" warning in
  test_task_source_traceback()
This commit is contained in:
Victor Stinner 2014-06-30 14:39:11 +02:00
parent a6ec5ee3c8
commit b75380f333
3 changed files with 52 additions and 10 deletions

View file

@ -19,11 +19,11 @@ import concurrent.futures
import heapq
import inspect
import logging
import os
import socket
import subprocess
import traceback
import time
import os
import traceback
import sys
from . import coroutines