From ed899bc94b04644d92b56a635fe36f5906d7a80e Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Wed, 9 Apr 2025 09:10:08 -0400 Subject: [PATCH] MT#55283 fix python websockets version test The newest module comes with a version string of "15.0.1" which makes the conversion to float fail. Use string operations to fix. Change-Id: Ia13534e9eeab451261d4c48fa782b116652b6904 (cherry picked from commit 9542cc0f3f030e1e844a669eea2128ec8b966146) --- t/auto-daemon-tests-websocket.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/t/auto-daemon-tests-websocket.py b/t/auto-daemon-tests-websocket.py index 178aba78b..075079a1c 100644 --- a/t/auto-daemon-tests-websocket.py +++ b/t/auto-daemon-tests-websocket.py @@ -21,7 +21,9 @@ async def make_ws(cls, proto): from platform import python_version from websockets import __version__ - if sys.version_info >= (3, 10) and float(__version__) <= 9.1: + ws_ver = str(__version__) + ws_ver = '.'.join(ws_ver.split('.')[0:2]) + if sys.version_info >= (3, 10) and float(ws_ver) <= 9.1: python_v = python_version() msg = "python3-websocket {} unsupported in {}".format(__version__, python_v) raise unittest.SkipTest(msg)