Skip to content

Commit

Permalink
Fix wsproto version check expression
Browse files Browse the repository at this point in the history
  • Loading branch information
Kludex committed Jan 28, 2022
1 parent c84979a commit cf528a8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion uvicorn/protocols/websockets/wsproto_impl.py
Expand Up @@ -5,6 +5,7 @@

import h11
import wsproto
from packaging import version
from wsproto import ConnectionType, events
from wsproto.connection import ConnectionState
from wsproto.extensions import PerMessageDeflate
Expand All @@ -13,7 +14,9 @@
from uvicorn.logging import TRACE_LOG_LEVEL
from uvicorn.protocols.utils import get_local_addr, get_remote_addr, is_ssl

assert wsproto.__version__ > "0.13", "Need wsproto version 0.13"
assert version.parse(wsproto.__version__) > version.parse(
"0.13"
), "Need wsproto version 0.13"


class WSProtocol(asyncio.Protocol):
Expand Down

0 comments on commit cf528a8

Please sign in to comment.