diff --git a/parsedmarc/mail/graph.py b/parsedmarc/mail/graph.py index 473ce8a6..6bb1e66e 100644 --- a/parsedmarc/mail/graph.py +++ b/parsedmarc/mail/graph.py @@ -5,7 +5,13 @@ from functools import lru_cache from pathlib import Path from time import sleep -from typing import Any, TypeAlias +import sys +from typing import Any + +if sys.version_info < (3, 10): + from typing_extensions import TypeAlias +else: + from typing import TypeAlias # Installed from azure.identity import ( diff --git a/pyproject.toml b/pyproject.toml index 4f678157..79b4dafe 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,6 +61,7 @@ dependencies = [ "publicsuffixlist>=0.10.0", "requests>=2.22.0", "tqdm>=4.31.1", + "typing-extensions;python_version<'3.10'", "urllib3>=1.25.7", "xmltodict>=0.12.0", ]