diff options
author | Justin Bronder <jsbronder@cold-front.org> | 2021-11-22 10:24:45 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-11-24 10:08:02 +0000 |
commit | 573968cb3e04567559d400a753f0be8d5a0da0b8 (patch) | |
tree | 31ef2b587634af0d71e9468578625c7eed4dc273 /lib | |
parent | 946f8f57a3e17fcb19a205e8a8a4b91a45a32f2e (diff) | |
download | bitbake-573968cb3e04567559d400a753f0be8d5a0da0b8.tar.gz |
hashserv: let asyncio discover the running loop
>From 3.10 documentation [1]:
Deprecated since version 3.8, removed in version 3.10: The loop
parameter. This function has been implicitly getting the current
running loop since 3.7
This is fixed in master as a side-effect of
cf9bc0310b0092bf52b61057405aeb51c86ba137 which is more intrusive but
likewise drops the loop parameter.
1. https://docs.python.org/3/library/asyncio-stream.html#asyncio.open_connection
Signed-off-by: Justin Bronder <jsbronder@cold-front.org>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 74a1e71b1e677a482fdedc685a71a1798ad63920)
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/hashserv/server.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/hashserv/server.py b/lib/hashserv/server.py index a0dc0c170..df0fa0a07 100644 --- a/lib/hashserv/server.py +++ b/lib/hashserv/server.py @@ -521,7 +521,7 @@ class Server(object): def start_tcp_server(self, host, port): self.server = self.loop.run_until_complete( - asyncio.start_server(self.handle_client, host, port, loop=self.loop) + asyncio.start_server(self.handle_client, host, port) ) for s in self.server.sockets: @@ -546,7 +546,7 @@ class Server(object): # Work around path length limits in AF_UNIX os.chdir(os.path.dirname(path)) self.server = self.loop.run_until_complete( - asyncio.start_unix_server(self.handle_client, os.path.basename(path), loop=self.loop) + asyncio.start_unix_server(self.handle_client, os.path.basename(path)) ) finally: os.chdir(cwd) |