From 3791c55bdcf76aa8bd8ca35e77b7ec2f7cfbe39c Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Sat, 11 Oct 2025 22:29:38 +0200 Subject: [PATCH] Python 3.11 and earlier apparently do not like multi-line f-strings. --- plugins/module_utils/_compose_v2.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/plugins/module_utils/_compose_v2.py b/plugins/module_utils/_compose_v2.py index 3f4d2da8..3631a5c4 100644 --- a/plugins/module_utils/_compose_v2.py +++ b/plugins/module_utils/_compose_v2.py @@ -181,15 +181,16 @@ _RE_PULL_EVENT = re.compile( r"$" ) +_DOCKER_PULL_PROGRESS_WD = sorted( + DOCKER_PULL_PROGRESS_DONE | DOCKER_PULL_PROGRESS_WORKING +) + _RE_PULL_PROGRESS = re.compile( r"^" r"\s*" r"(?P\S+)" r"\s+" - f"(?P{'|'.join( - re.escape(status) - for status in sorted(DOCKER_PULL_PROGRESS_DONE | DOCKER_PULL_PROGRESS_WORKING) - )})" + f"(?P{'|'.join(re.escape(status) for status in _DOCKER_PULL_PROGRESS_WD)})" r"\s*" r"(?:|\s\[[^]]+\]\s+\S+\s*|\s+[0-9.kKmMgGbB]+/[0-9.kKmMgGbB]+\s*)" r"$"