From 8aada494142f6bec6b1894f4f61444c3dc83d58f Mon Sep 17 00:00:00 2001 From: grossmj Date: Sun, 15 Aug 2021 15:25:33 +0930 Subject: [PATCH] =?UTF-8?q?Some=20fixes=20for=20early=20support=20for=20Py?= =?UTF-8?q?thon3.10=20The=20loop=20parameter=20has=20been=20removed=20from?= =?UTF-8?q?=20most=20of=20asyncio=E2=80=98s=20high-level=20API=20following?= =?UTF-8?q?=20deprecation=20in=20Python=203.8.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gns3server/utils/asyncio/embed_shell.py | 2 +- gns3server/utils/asyncio/raw_command_server.py | 2 +- gns3server/utils/asyncio/telnet_server.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gns3server/utils/asyncio/embed_shell.py b/gns3server/utils/asyncio/embed_shell.py index ca822ff1..05e2f5ea 100644 --- a/gns3server/utils/asyncio/embed_shell.py +++ b/gns3server/utils/asyncio/embed_shell.py @@ -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() diff --git a/gns3server/utils/asyncio/raw_command_server.py b/gns3server/utils/asyncio/raw_command_server.py index a0533dd9..d80f5204 100644 --- a/gns3server/utils/asyncio/raw_command_server.py +++ b/gns3server/utils/asyncio/raw_command_server.py @@ -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: diff --git a/gns3server/utils/asyncio/telnet_server.py b/gns3server/utils/asyncio/telnet_server.py index 7c9e7397..9580d899 100644 --- a/gns3server/utils/asyncio/telnet_server.py +++ b/gns3server/utils/asyncio/telnet_server.py @@ -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: