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:28 +0000 |
commit | 03df18316968797ec594eed4332a1d0745344bb4 (patch) | |
tree | 0c78ca5dbf6f2987f2ac1133f7262df81635258e /bitbake | |
parent | aaf40f1d436fbfe25875c82557dc122074ddb9e3 (diff) | |
download | poky-03df18316968797ec594eed4332a1d0745344bb4.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: 573968cb3e04567559d400a753f0be8d5a0da0b8)
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 'bitbake')
-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 a0dc0c170f..df0fa0a079 100644 --- a/bitbake/lib/hashserv/server.py +++ b/bitbake/lib/hashserv/server.py | |||
@@ -521,7 +521,7 @@ class Server(object): | |||
521 | 521 | ||
522 | def start_tcp_server(self, host, port): | 522 | def start_tcp_server(self, host, port): |
523 | self.server = self.loop.run_until_complete( | 523 | self.server = self.loop.run_until_complete( |
524 | asyncio.start_server(self.handle_client, host, port, loop=self.loop) | 524 | asyncio.start_server(self.handle_client, host, port) |
525 | ) | 525 | ) |
526 | 526 | ||
527 | for s in self.server.sockets: | 527 | for s in self.server.sockets: |
@@ -546,7 +546,7 @@ class Server(object): | |||
546 | # Work around path length limits in AF_UNIX | 546 | # Work around path length limits in AF_UNIX |
547 | os.chdir(os.path.dirname(path)) | 547 | os.chdir(os.path.dirname(path)) |
548 | self.server = self.loop.run_until_complete( | 548 | self.server = self.loop.run_until_complete( |
549 | asyncio.start_unix_server(self.handle_client, os.path.basename(path), loop=self.loop) | 549 | asyncio.start_unix_server(self.handle_client, os.path.basename(path)) |
550 | ) | 550 | ) |
551 | finally: | 551 | finally: |
552 | os.chdir(cwd) | 552 | os.chdir(cwd) |