From 2f96e298fa93c241da021157cd2ec5345db90e1d Mon Sep 17 00:00:00 2001 From: James Gaboardi Date: Wed, 10 Jul 2024 19:35:46 -0400 Subject: [PATCH] resolve #73 --- fastpair/base.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/fastpair/base.py b/fastpair/base.py index e5bc6b4..870dc73 100644 --- a/fastpair/base.py +++ b/fastpair/base.py @@ -2,10 +2,20 @@ # Copyright (c) 2002-2015, David Eppstein # Licensed under the MIT Licence (http://opensource.org/licenses/MIT). +import sys from collections import defaultdict from collections.abc import Callable, Generator, Iterable from itertools import combinations, cycle -from typing import Annotated, Self, TypeAlias, TypedDict, TypeVar +from typing import Annotated, TypeAlias, TypedDict, TypeVar + +################################################################ +# See GH#73 -- remove once Python 3.11 is minimum +if sys.version_info.minor < 11: + from typing_extensions import Self +else: + from typing import Self +################################################################ + import numpy import scipy.spatial.distance as dist