diff --git a/src/dso/_util.py b/src/dso/_util.py index bfad4fd..5a40f9f 100644 --- a/src/dso/_util.py +++ b/src/dso/_util.py @@ -5,7 +5,13 @@ from collections.abc import Sequence from functools import cache from importlib import resources -from importlib.resources.abc import Traversable + +try: + # has been added in Python 3.11 + from importlib.resources.abc import Traversable +except ImportError: + # will be removed in Python 3.14 + from importlib.abc import Traversable from os import environ from pathlib import Path from typing import Literal