Skip to content

Commit e407477

Browse files
committed
Fix <3.10.
1 parent f08c399 commit e407477

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

referencing/_core.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
from __future__ import annotations
22

33
from collections.abc import Iterable, Mapping, Sequence
4-
from typing import TYPE_CHECKING, Any
4+
from typing import TYPE_CHECKING, Any, Union
55
from urllib.parse import unquote, urldefrag, urljoin
66

77
from pyrsistent import m
88
from pyrsistent.typing import PMap
99
import attrs
1010

11+
try:
12+
Mapping[str, str]
13+
except TypeError:
14+
from typing import Mapping
15+
1116

1217
class UnsupportedSubclassing(Exception):
1318
@classmethod
@@ -36,7 +41,7 @@ def frozen(cls):
3641
return attrs.frozen(cls)
3742

3843

39-
Schema = bool | Mapping[str, Any]
44+
Schema = Union[bool, Mapping[str, Any]]
4045

4146

4247
@frozen

0 commit comments

Comments
 (0)