Skip to content

Commit

Permalink
Restore python3.9 compat
Browse files Browse the repository at this point in the history
  • Loading branch information
mardiros committed Nov 3, 2024
1 parent 0d528f6 commit 4032d53
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/blacksmith/service/_async/route_proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@
get_origin,
)

try:
from types import UnionType # type: ignore
except ImportError: # coverage: ignore
# python 3.9 compat
UnionType = Union # type: ignore

from pydantic import ValidationError
from result import Err, Ok, Result

Expand Down
2 changes: 1 addition & 1 deletion src/blacksmith/service/_sync/route_proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
try:
from types import UnionType # type: ignore
except ImportError: # coverage: ignore
# python 3.7 compat
# python 3.9 compat
UnionType = Union # type: ignore

from pydantic import ValidationError
Expand Down

0 comments on commit 4032d53

Please sign in to comment.