Skip to content

Commit

Permalink
Need to use pre-3.9 form
Browse files Browse the repository at this point in the history
  • Loading branch information
dkfellows committed Aug 7, 2023
1 parent ca94835 commit 2466ba1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions spinnman/spalloc/spalloc_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 2466ba1

Please sign in to comment.