mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
iotests: Change imports for Python 3.13
Python 3.13 isn't out yet, but it's in beta and Fedora is ramping up to make it the default system interpreter for Fedora 41. They moved our cheese for where ContextManager lives; add a conditional to locate it while we support both pre-3.9 and 3.13+. Signed-off-by: John Snow <jsnow@redhat.com> Message-id: 20240626232230.408004-4-jsnow@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
This commit is contained in:
parent
c5be244534
commit
e38900450f
2 changed files with 12 additions and 4 deletions
|
@ -27,11 +27,14 @@ import json
|
|||
import shutil
|
||||
import sys
|
||||
from multiprocessing import Pool
|
||||
from typing import List, Optional, Any, Sequence, Dict, \
|
||||
ContextManager
|
||||
|
||||
from typing import List, Optional, Any, Sequence, Dict
|
||||
from testenv import TestEnv
|
||||
|
||||
if sys.version_info >= (3, 9):
|
||||
from contextlib import AbstractContextManager as ContextManager
|
||||
else:
|
||||
from typing import ContextManager
|
||||
|
||||
|
||||
def silent_unlink(path: Path) -> None:
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue