Some fixes for early support for Python3.10

The loop parameter has been removed from most of asyncio‘s high-level API following deprecation in Python 3.8.
This commit is contained in:
grossmj 2021-08-15 15:25:33 +09:30
parent 496170b4e5
commit 8aada49414
3 changed files with 3 additions and 3 deletions

View File

@ -352,7 +352,7 @@ if __name__ == '__main__':
# Demo using telnet
shell = Demo(welcome_message="Welcome!\n")
server = create_telnet_shell(shell, loop=loop)
coro = asyncio.start_server(server.run, '127.0.0.1', 4444, loop=loop)
coro = asyncio.start_server(server.run, '127.0.0.1', 4444)
s = loop.run_until_complete(coro)
try:
loop.run_forever()

View File

@ -111,7 +111,7 @@ if __name__ == '__main__':
command = ["nc", "localhost", "80"]
server = AsyncioRawCommandServer(command, replaces=[(b"work", b"{{HOST}}", )])
coro = asyncio.start_server(server.run, '0.0.0.0', 4444, loop=loop)
coro = asyncio.start_server(server.run, '0.0.0.0', 4444)
s = loop.run_until_complete(coro)
try:

View File

@ -424,7 +424,7 @@ if __name__ == '__main__':
stdin=asyncio.subprocess.PIPE)))
server = AsyncioTelnetServer(reader=process.stdout, writer=process.stdin, binary=False, echo=False)
coro = asyncio.start_server(server.run, '127.0.0.1', 4444, loop=loop)
coro = asyncio.start_server(server.run, '127.0.0.1', 4444)
s = loop.run_until_complete(coro)
try: