Message ID | 20240509104857.3913445-1-richard.purdie@linuxfoundation.org |
---|---|
State | Accepted, archived |
Commit | 0e4767c4a880408750e1a6855270c5a4eef8383d |
Headers | show |
Series | asyncrpc/client: Fix websockets minimum version for python 3.10 | expand |
diff --git a/lib/bb/asyncrpc/client.py b/lib/bb/asyncrpc/client.py index 65f3f8964d..b49de99313 100644 --- a/lib/bb/asyncrpc/client.py +++ b/lib/bb/asyncrpc/client.py @@ -25,7 +25,9 @@ ADDR_TYPE_TCP = 1 ADDR_TYPE_WS = 2 WEBSOCKETS_MIN_VERSION = (9, 1) - +# Need websockets 10 with python 3.10+ +if sys.version_info >= (3, 10, 0): + WEBSOCKETS_MIN_VERSION = (10, 0) def parse_address(addr): if addr.startswith(UNIX_PREFIX):
python 3.10 support is only available in websockets 10.0 and later: https://github.com/python-websockets/websockets/commit/08d8011132ba038b3f6c4d591189b57af4c9f147 Update the version for this case. This avoids failures on Ubuntu 22.04. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> --- lib/bb/asyncrpc/client.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)