From 76f764b1a40e957b9636c480b7551713aa85fad4 Mon Sep 17 00:00:00 2001 From: Benjamin Schubert Date: Wed, 17 Jun 2020 19:22:20 +0000 Subject: _signals.py: Remove code for python3.5 support --- src/buildstream/_signals.py | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/buildstream/_signals.py b/src/buildstream/_signals.py index 969789e92..03b55b052 100644 --- a/src/buildstream/_signals.py +++ b/src/buildstream/_signals.py @@ -23,22 +23,15 @@ import threading import traceback from contextlib import contextmanager, ExitStack from collections import deque -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from typing import Callable, MutableSequence +from typing import Callable, Deque # Global per process state for handling of sigterm/sigtstp/sigcont, # note that it is expected that this only ever be used by new processes # the scheduler starts, not the main process. # -# FIXME: We should ideally be using typing.Deque as type hints below, not -# typing.MutableSequence. However, that is only available in Python versions -# 3.5.4 onward and 3.6.1 onward. -# Debian 9 ships with 3.5.3. -terminator_stack = deque() # type: MutableSequence[Callable] -suspendable_stack = deque() # type: MutableSequence[Callable] +terminator_stack: Deque[Callable] = deque() +suspendable_stack: Deque[Callable] = deque() # Per process SIGTERM handler -- cgit v1.2.1