From 2466ba13b3727b768fbc88155fd74701dcbe871c Mon Sep 17 00:00:00 2001 From: "Donal K. Fellows" Date: Mon, 7 Aug 2023 09:36:34 +0100 Subject: [PATCH] Need to use pre-3.9 form --- spinnman/spalloc/spalloc_client.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/spinnman/spalloc/spalloc_client.py b/spinnman/spalloc/spalloc_client.py index efdcd67b3..d702b3305 100644 --- a/spinnman/spalloc/spalloc_client.py +++ b/spinnman/spalloc/spalloc_client.py @@ -15,7 +15,7 @@ Implementation of the client for the Spalloc web service. """ -from contextlib import AbstractContextManager, contextmanager +from contextlib import contextmanager from logging import getLogger from multiprocessing import Process, Queue from time import sleep @@ -26,6 +26,7 @@ import struct import threading from typing import ( + ContextManager, Callable, Collection, Dict, FrozenSet, Iterable, Iterator, List, Mapping, Optional, Tuple, cast) from typing_extensions import TypeAlias @@ -629,7 +630,7 @@ def keepalive(self) -> None: @overrides(SpallocJob.launch_keepalive_task, extend_doc=True) def launch_keepalive_task( - self, period: float = 30) -> AbstractContextManager[Process]: + self, period: float = 30) -> ContextManager[Process]: """ .. note:: Tricky! *Cannot* be done with a thread, as the main thread is known