[websockets] Add WebSocketFragmentFD (#399)

Necessary for #392

Co-authored by: nao20010128nao, pukkandan
This commit is contained in:
pukkandan
2021-06-21 22:53:17 +05:30
parent ff0f78e1fe
commit e36d50c5dd
14 changed files with 140 additions and 18 deletions

View File

@@ -3030,6 +3030,21 @@ except AttributeError:
compat_Match = type(re.compile('').match(''))
import asyncio
try:
compat_asyncio_run = asyncio.run
except AttributeError:
def compat_asyncio_run(coro):
try:
loop = asyncio.get_event_loop()
except RuntimeError:
loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)
loop.run_until_complete(coro)
asyncio.run = compat_asyncio_run
__all__ = [
'compat_HTMLParseError',
'compat_HTMLParser',
@@ -3037,6 +3052,7 @@ __all__ = [
'compat_Match',
'compat_Pattern',
'compat_Struct',
'compat_asyncio_run',
'compat_b64decode',
'compat_basestring',
'compat_chr',