--- /dev/null
+import sys\r
+from typing import Any, Union, Callable, TypeVar, Type, List, Generic, Iterable, Generator, Awaitable\r
+from .events import AbstractEventLoop\r
+from concurrent.futures import (\r
+ CancelledError as CancelledError,\r
+ TimeoutError as TimeoutError,\r
+ Future as _ConcurrentFuture,\r
+ Error,\r
+)\r
+\r
+__all__: List[str]\r
+\r
+_T = TypeVar('_T')\r
+_S = TypeVar('_S', bound=Future)\r
+\r
+class InvalidStateError(Error): ...\r
+\r
+class _TracebackLogger:\r
+ exc = ... # type: BaseException\r
+ tb = ... # type: List[str]\r
+ def __init__(self, exc: Any, loop: AbstractEventLoop) -> None: ...\r
+ def activate(self) -> None: ...\r
+ def clear(self) -> None: ...\r
+ def __del__(self) -> None: ...\r
+\r
+if sys.version_info >= (3, 5):\r
+ def isfuture(obj: object) -> bool: ...\r
+\r
+class Future(Awaitable[_T], Iterable[_T]):\r
+ _state = ... # type: str\r
+ _exception = ... # type: BaseException\r
+ _blocking = False\r
+ _log_traceback = False\r
+ _tb_logger = ... # type: Type[_TracebackLogger]\r
+ def __init__(self, *, loop: AbstractEventLoop = ...) -> None: ...\r
+ def __repr__(self) -> str: ...\r
+ def __del__(self) -> None: ...\r
+ def cancel(self) -> bool: ...\r
+ def _schedule_callbacks(self) -> None: ...\r
+ def cancelled(self) -> bool: ...\r
+ def done(self) -> bool: ...\r
+ def result(self) -> _T: ...\r
+ def exception(self) -> BaseException: ...\r
+ def add_done_callback(self: _S, fn: Callable[[_S], Any]) -> None: ...\r
+ def remove_done_callback(self: _S, fn: Callable[[_S], Any]) -> int: ...\r
+ def set_result(self, result: _T) -> None: ...\r
+ def set_exception(self, exception: Union[type, BaseException]) -> None: ...\r
+ def _copy_state(self, other: Any) -> None: ...\r
+ def __iter__(self) -> Generator[Any, None, _T]: ...\r
+ def __await__(self) -> Generator[Any, None, _T]: ...\r
+\r
+def wrap_future(f: Union[_ConcurrentFuture[_T], Future[_T]]) -> Future[_T]: ...\r