summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Schubert <contact@benschubert.me>2020-06-17 19:22:20 +0000
committerBenjamin Schubert <contact@benschubert.me>2020-06-17 19:22:20 +0000
commit76f764b1a40e957b9636c480b7551713aa85fad4 (patch)
treecb42786c95d8669956f7fca36c1c2164ad42b2a3
parent05ecd800eb664d1877ab08400f222d3f242442e8 (diff)
downloadbuildstream-76f764b1a40e957b9636c480b7551713aa85fad4.tar.gz
_signals.py: Remove code for python3.5 support
-rw-r--r--src/buildstream/_signals.py13
1 files 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