Skip to content

Commit

Permalink
Install typing_extensions for python<3.8 (#82)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbrochart authored Jun 20, 2023
1 parent 4bb84be commit 930ec49
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ dependencies = [
"anyio >=3.6.2,<4",
"aiosqlite >=0.18.0,<1",
"y-py >=0.6.0,<0.7.0",
"typing_extensions; python_version < '3.8'",
]

[project.optional-dependencies]
Expand Down
7 changes: 6 additions & 1 deletion ypy_websocket/websocket.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
from typing_extensions import Protocol
import sys

if sys.version_info >= (3, 8):
from typing import Protocol
else:
from typing_extensions import Protocol


class Websocket(Protocol):
Expand Down

0 comments on commit 930ec49

Please sign in to comment.