Skip to content

Commit 5facc5d

Browse files
authored
typing_extensions should be optional on Python 3.11 (#1198)
typing_extensions should be optional
1 parent d74a88b commit 5facc5d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pynamodb/exceptions.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
"""
22
PynamoDB exceptions
33
"""
4+
import sys
45
from dataclasses import dataclass
56
from typing import Any
67
from typing import Dict
78
from typing import Iterable
89
from typing import List
910
from typing import Optional
10-
from typing_extensions import Literal
11+
if sys.version_info >= (3, 8):
12+
from typing import Literal
13+
else:
14+
from typing_extensions import Literal
1115

1216
import botocore.exceptions
1317

0 commit comments

Comments
 (0)