Skip to content

Commit

Permalink
Fix examples for Python 3.10
Browse files Browse the repository at this point in the history
  • Loading branch information
fantix committed Feb 6, 2021
1 parent 68db1a2 commit b7048b9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions examples/bench/echoserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ async def print_debug(loop):
while True:
print(chr(27) + "[2J") # clear screen
loop.print_debug_info()
await asyncio.sleep(0.5, loop=loop)
await asyncio.sleep(0.5)


if __name__ == '__main__':
Expand Down Expand Up @@ -168,11 +168,11 @@ async def print_debug(loop):
print('using asyncio/streams')
if unix:
coro = asyncio.start_unix_server(echo_client_streams,
addr, loop=loop,
addr,
ssl=server_context)
else:
coro = asyncio.start_server(echo_client_streams,
*addr, loop=loop,
*addr,
ssl=server_context)
srv = loop.run_until_complete(coro)
elif args.proto:
Expand Down
6 changes: 3 additions & 3 deletions examples/bench/rlserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ async def print_debug(loop):
while True:
print(chr(27) + "[2J") # clear screen
loop.print_debug_info()
await asyncio.sleep(0.5, loop=loop)
await asyncio.sleep(0.5)


if __name__ == '__main__':
Expand Down Expand Up @@ -76,10 +76,10 @@ async def print_debug(loop):
print('using asyncio/streams')
if unix:
coro = asyncio.start_unix_server(echo_client_streams,
addr, loop=loop, limit=256000)
addr, limit=256000)
else:
coro = asyncio.start_server(echo_client_streams,
*addr, loop=loop, limit=256000)
*addr, limit=256000)
srv = loop.run_until_complete(coro)

try:
Expand Down

0 comments on commit b7048b9

Please sign in to comment.