diff options
author | Justin Bronder <jsbronder@cold-front.org> | 2021-10-19 10:06:16 -1000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-10-23 17:47:38 +0100 |
commit | a07f53efa876d100190dc10351277f4a629ab9a1 (patch) | |
tree | 0b2e5890facb47671f053d657d9d16d14dabebae /bitbake/lib/hashserv | |
parent | 372e40092b4d0604b6957ae10fbf22168a20dc97 (diff) | |
download | poky-a07f53efa876d100190dc10351277f4a629ab9a1.tar.gz |
bitbake: 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
(Bitbake rev: 74a1e71b1e677a482fdedc685a71a1798ad63920)
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>
Diffstat (limited to 'bitbake/lib/hashserv')
-rw-r--r-- | bitbake/lib/hashserv/server.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bitbake/lib/hashserv/server.py b/bitbake/lib/hashserv/server.py index 81050715ea..56f354bd06 100644 --- a/bitbake/lib/hashserv/server.py +++ b/bitbake/lib/hashserv/server.py | |||
@@ -420,7 +420,7 @@ class Server(object): | |||
420 | 420 | ||
421 | def start_tcp_server(self, host, port): | 421 | def start_tcp_server(self, host, port): |
422 | self.server = self.loop.run_until_complete( | 422 | self.server = self.loop.run_until_complete( |
423 | asyncio.start_server(self.handle_client, host, port, loop=self.loop) | 423 | asyncio.start_server(self.handle_client, host, port) |
424 | ) | 424 | ) |
425 | 425 | ||
426 | for s in self.server.sockets: | 426 | for s in self.server.sockets: |
@@ -445,7 +445,7 @@ class Server(object): | |||
445 | # Work around path length limits in AF_UNIX | 445 | # Work around path length limits in AF_UNIX |
446 | os.chdir(os.path.dirname(path)) | 446 | os.chdir(os.path.dirname(path)) |
447 | self.server = self.loop.run_until_complete( | 447 | self.server = self.loop.run_until_complete( |
448 | asyncio.start_unix_server(self.handle_client, os.path.basename(path), loop=self.loop) | 448 | asyncio.start_unix_server(self.handle_client, os.path.basename(path)) |
449 | ) | 449 | ) |
450 | finally: | 450 | finally: |
451 | os.chdir(cwd) | 451 | os.chdir(cwd) |