diff options
-rw-r--r-- | src/buildstream/_signals.py | 13 | ||||
-rwxr-xr-x | tests/conftest.py | 2 |
2 files changed, 4 insertions, 11 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 diff --git a/tests/conftest.py b/tests/conftest.py index 8b526f982..bb4611a11 100755 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -140,6 +140,6 @@ def set_xdg_paths(pytestconfig): ]: value = os.environ.get("BST_TEST_{}".format(env_var)) if value is None: - value = os.path.join(pytestconfig.getoption("basetemp"), default) + value = os.path.realpath(os.path.join(pytestconfig.getoption("basetemp"), default)) os.environ[env_var] = value |