AbstractEventLoop exception handler is optional (#2446)

Closes #1616

* get_exception_handler() is only available in 3.5
This commit is contained in:
Sebastian Rittau
2018-09-11 17:26:57 +02:00
committed by Jelle Zijlstra
parent 27514df2bd
commit 60548f122f

View File

@@ -180,9 +180,10 @@ class AbstractEventLoop(metaclass=ABCMeta):
def remove_signal_handler(self, sig: int) -> None: ...
# Error handlers.
@abstractmethod
def set_exception_handler(self, handler: _ExceptionHandler) -> None: ...
@abstractmethod
def get_exception_handler(self) -> _ExceptionHandler: ...
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 default_exception_handler(self, context: _Context) -> None: ...
@abstractmethod