Skip to content

Commit 5c5cb96

Browse files
committed
Add check for Python 3.8
1 parent 253b1dd commit 5c5cb96

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

fastapi_utils/cbv.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1+
import functools
12
import inspect
3+
import sys
24
from typing import (
35
Any,
46
Callable,
@@ -16,6 +18,9 @@
1618
from fastapi.routing import APIRoute
1719
from starlette.routing import Route, WebSocketRoute
1820

21+
if sys.version_info >= (3, 9, 0):
22+
get_type_hints = functools.partial(get_type_hints, include_extras=True)
23+
1924
PYDANTIC_VERSION = pydantic.VERSION
2025
if PYDANTIC_VERSION[0] == "2":
2126
from typing_inspect import is_classvar

0 commit comments

Comments
 (0)