Skip to content

Commit b7048b9

Browse files
committed
Fix examples for Python 3.10
1 parent 68db1a2 commit b7048b9

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

examples/bench/echoserver.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ async def print_debug(loop):
9595
while True:
9696
print(chr(27) + "[2J") # clear screen
9797
loop.print_debug_info()
98-
await asyncio.sleep(0.5, loop=loop)
98+
await asyncio.sleep(0.5)
9999

100100

101101
if __name__ == '__main__':
@@ -168,11 +168,11 @@ async def print_debug(loop):
168168
print('using asyncio/streams')
169169
if unix:
170170
coro = asyncio.start_unix_server(echo_client_streams,
171-
addr, loop=loop,
171+
addr,
172172
ssl=server_context)
173173
else:
174174
coro = asyncio.start_server(echo_client_streams,
175-
*addr, loop=loop,
175+
*addr,
176176
ssl=server_context)
177177
srv = loop.run_until_complete(coro)
178178
elif args.proto:

examples/bench/rlserver.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ async def print_debug(loop):
3131
while True:
3232
print(chr(27) + "[2J") # clear screen
3333
loop.print_debug_info()
34-
await asyncio.sleep(0.5, loop=loop)
34+
await asyncio.sleep(0.5)
3535

3636

3737
if __name__ == '__main__':
@@ -76,10 +76,10 @@ async def print_debug(loop):
7676
print('using asyncio/streams')
7777
if unix:
7878
coro = asyncio.start_unix_server(echo_client_streams,
79-
addr, loop=loop, limit=256000)
79+
addr, limit=256000)
8080
else:
8181
coro = asyncio.start_server(echo_client_streams,
82-
*addr, loop=loop, limit=256000)
82+
*addr, limit=256000)
8383
srv = loop.run_until_complete(coro)
8484

8585
try:

0 commit comments

Comments
 (0)