File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -278,17 +278,20 @@ class SDKInfo(TypedDict):
278278 # TODO: Make a proper type definition for this (PRs welcome!)
279279 BreadcrumbHint = Dict [str , Any ]
280280
281- _ASGIInfo = TypedDict ("_ASGIInfo" , {"version" : str , "spec_version" : str })
281+ _ASGIInfo = TypedDict (
282+ "_ASGIInfo" , {"version" : str , "spec_version" : NotRequired [str ]}
283+ )
282284 _ASGIScope = TypedDict (
283285 "_ASGIScope" ,
284286 {
285287 "type" : str ,
286288 "asgi" : _ASGIInfo ,
287- "http_version" : str ,
288- "method" : str ,
289289 "path" : str ,
290290 "query_string" : bytes ,
291291 "headers" : list [tuple [bytes , bytes ]],
292+ # Not mandatory in Websocket
293+ "http_version" : NotRequired [str ],
294+ "method" : NotRequired [str ],
292295 # Optional fields per ASGI spec
293296 "scheme" : NotRequired [str ],
294297 "raw_path" : NotRequired [bytes ],
You can’t perform that action at this time.
0 commit comments