File tree 1 file changed +8
-1
lines changed
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -196,7 +196,7 @@ async def recv() -> Any:
196
196
ConnectionContext (
197
197
self ._component_constructor (),
198
198
value = Connection (
199
- scope = WSGIContainer .environ (self .request ),
199
+ scope = _FAKE_WSGI_CONTAINER .environ (self .request ),
200
200
location = Location (
201
201
pathname = f"/{ path [len (self ._url_prefix ):]} " ,
202
202
search = (
@@ -222,3 +222,10 @@ async def on_message(self, message: str | bytes) -> None:
222
222
def on_close (self ) -> None :
223
223
if not self ._dispatch_future .done ():
224
224
self ._dispatch_future .cancel ()
225
+
226
+
227
+ # The interface for WSGIContainer.environ changed in Tornado version 6.3 from
228
+ # a staticmethod to an instance method. Since we're not that concerned with
229
+ # the details of the WSGI app itself, we can just use a fake one.
230
+ # see: https://github.com/tornadoweb/tornado/pull/3231#issuecomment-1518957578
231
+ _FAKE_WSGI_CONTAINER = WSGIContainer (lambda * a , ** kw : iter ([]))
You can’t perform that action at this time.
0 commit comments