diff --git a/stdlib/3/asyncio/events.pyi b/stdlib/3/asyncio/events.pyi index cc5500bc7..acfd61031 100644 --- a/stdlib/3/asyncio/events.pyi +++ b/stdlib/3/asyncio/events.pyi @@ -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