@@ -100,9 +100,10 @@ class WebSocketServerProtocol(WebSocketCommonProtocol):
100
100
101
101
def __init__ (
102
102
self ,
103
+ # The version that accepts the path in the second argument is deprecated.
103
104
ws_handler : (
104
105
Callable [[WebSocketServerProtocol ], Awaitable [Any ]]
105
- | Callable [[WebSocketServerProtocol , str ], Awaitable [Any ]] # deprecated
106
+ | Callable [[WebSocketServerProtocol , str ], Awaitable [Any ]]
106
107
),
107
108
ws_server : WebSocketServer ,
108
109
* ,
@@ -983,9 +984,10 @@ class Serve:
983
984
984
985
def __init__ (
985
986
self ,
987
+ # The version that accepts the path in the second argument is deprecated.
986
988
ws_handler : (
987
989
Callable [[WebSocketServerProtocol ], Awaitable [Any ]]
988
- | Callable [[WebSocketServerProtocol , str ], Awaitable [Any ]] # deprecated
990
+ | Callable [[WebSocketServerProtocol , str ], Awaitable [Any ]]
989
991
),
990
992
host : str | Sequence [str ] | None = None ,
991
993
port : int | None = None ,
@@ -1140,9 +1142,10 @@ async def __await_impl__(self) -> WebSocketServer:
1140
1142
1141
1143
1142
1144
def unix_serve (
1145
+ # The version that accepts the path in the second argument is deprecated.
1143
1146
ws_handler : (
1144
1147
Callable [[WebSocketServerProtocol ], Awaitable [Any ]]
1145
- | Callable [[WebSocketServerProtocol , str ], Awaitable [Any ]] # deprecated
1148
+ | Callable [[WebSocketServerProtocol , str ], Awaitable [Any ]]
1146
1149
),
1147
1150
path : str | None = None ,
1148
1151
** kwargs : Any ,
@@ -1169,7 +1172,7 @@ def remove_path_argument(
1169
1172
ws_handler : (
1170
1173
Callable [[WebSocketServerProtocol ], Awaitable [Any ]]
1171
1174
| Callable [[WebSocketServerProtocol , str ], Awaitable [Any ]]
1172
- )
1175
+ ),
1173
1176
) -> Callable [[WebSocketServerProtocol ], Awaitable [Any ]]:
1174
1177
try :
1175
1178
inspect .signature (ws_handler ).bind (None )
0 commit comments