Remove Python 3.4 support (#3147)

Closes #3123
This commit is contained in:
Sebastian Rittau
2019-07-27 10:58:21 +02:00
committed by GitHub
parent 4697adcb1a
commit 9ccf9356bf
55 changed files with 988 additions and 1266 deletions

View File

@@ -84,14 +84,11 @@ from asyncio.locks import (
BoundedSemaphore as BoundedSemaphore,
)
if sys.version_info < (3, 5):
from asyncio.queues import JoinableQueue as JoinableQueue
else:
from asyncio.futures import isfuture as isfuture
from asyncio.events import (
_set_running_loop as _set_running_loop,
_get_running_loop as _get_running_loop,
)
from asyncio.futures import isfuture as isfuture
from asyncio.events import (
_set_running_loop as _set_running_loop,
_get_running_loop as _get_running_loop,
)
if sys.platform != 'win32':
from asyncio.streams import (
open_unix_connection as open_unix_connection,

View File

@@ -39,8 +39,7 @@ class BaseEventLoop(AbstractEventLoop):
def call_at(self, when: float, callback: Callable[..., Any], *args: Any) -> TimerHandle: ...
def time(self) -> float: ...
# Future methods
if sys.version_info >= (3, 5):
def create_future(self) -> Future[Any]: ...
def create_future(self) -> Future[Any]: ...
# Tasks methods
def create_task(self, coro: Union[Awaitable[_T], Generator[Any, None, _T]]) -> Task[_T]: ...
def set_task_factory(self, factory: Optional[Callable[[AbstractEventLoop, Generator[Any, None, _T]], Future[_T]]]) -> None: ...
@@ -131,8 +130,7 @@ class BaseEventLoop(AbstractEventLoop):
def remove_signal_handler(self, sig: int) -> None: ...
# Error handlers.
def set_exception_handler(self, handler: Optional[_ExceptionHandler]) -> None: ...
if sys.version_info >= (3, 5):
def get_exception_handler(self) -> Optional[_ExceptionHandler]: ...
def get_exception_handler(self) -> Optional[_ExceptionHandler]: ...
def default_exception_handler(self, context: _Context) -> None: ...
def call_exception_handler(self, context: _Context) -> None: ...
# Debug flag management.

View File

@@ -73,9 +73,8 @@ class AbstractEventLoop(metaclass=ABCMeta):
@abstractmethod
def time(self) -> float: ...
# Future methods
if sys.version_info >= (3, 5):
@abstractmethod
def create_future(self) -> Future[Any]: ...
@abstractmethod
def create_future(self) -> Future[Any]: ...
# Tasks methods
@abstractmethod
def create_task(self, coro: Union[Awaitable[_T], Generator[Any, None, _T]]) -> Task[_T]: ...
@@ -197,9 +196,8 @@ class AbstractEventLoop(metaclass=ABCMeta):
# Error handlers.
@abstractmethod
def set_exception_handler(self, handler: Optional[_ExceptionHandler]) -> None: ...
if sys.version_info >= (3, 5):
@abstractmethod
def get_exception_handler(self) -> Optional[_ExceptionHandler]: ...
@abstractmethod
def get_exception_handler(self) -> Optional[_ExceptionHandler]: ...
@abstractmethod
def default_exception_handler(self, context: _Context) -> None: ...
@abstractmethod

View File

@@ -26,8 +26,7 @@ class _TracebackLogger:
def clear(self) -> None: ...
def __del__(self) -> None: ...
if sys.version_info >= (3, 5):
def isfuture(obj: object) -> bool: ...
def isfuture(obj: object) -> bool: ...
class Future(Awaitable[_T], Iterable[_T]):
_state: str

View File

@@ -42,9 +42,3 @@ class PriorityQueue(Queue[_T]): ...
class LifoQueue(Queue[_T]): ...
if sys.version_info < (3, 5):
class JoinableQueue(Queue[_T]):
def task_done(self) -> None: ...
@coroutine
def join(self) -> Generator[Any, None, bool]: ...