MCPcopy Create free account
hub / github.com/seleniumbase/SeleniumBase / _patch_tornado

Function _patch_tornado

seleniumbase/core/nest_asyncio.py:275–282  ·  view source on GitHub ↗

If tornado is imported before nest_asyncio, make tornado aware of the pure-Python asyncio Future.

()

Source from the content-addressed store, hash-verified

273
274
275def _patch_tornado():
276 """If tornado is imported before nest_asyncio,
277 make tornado aware of the pure-Python asyncio Future."""
278 if "tornado" in sys.modules:
279 import tornado.concurrent as tc # type: ignore
280 tc.Future = asyncio.Future
281 if asyncio.Future not in tc.FUTURES:
282 tc.FUTURES += (asyncio.Future,)

Callers 1

applyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…