Python 3.11 and earlier apparently do not like multi-line f-strings.

This commit is contained in:
Felix Fontein 2025-10-11 22:29:38 +02:00
parent 5bab9a41d3
commit 3791c55bdc

View File

@ -181,15 +181,16 @@ _RE_PULL_EVENT = re.compile(
r"$" r"$"
) )
_DOCKER_PULL_PROGRESS_WD = sorted(
DOCKER_PULL_PROGRESS_DONE | DOCKER_PULL_PROGRESS_WORKING
)
_RE_PULL_PROGRESS = re.compile( _RE_PULL_PROGRESS = re.compile(
r"^" r"^"
r"\s*" r"\s*"
r"(?P<layer>\S+)" r"(?P<layer>\S+)"
r"\s+" r"\s+"
f"(?P<status>{'|'.join( f"(?P<status>{'|'.join(re.escape(status) for status in _DOCKER_PULL_PROGRESS_WD)})"
re.escape(status)
for status in sorted(DOCKER_PULL_PROGRESS_DONE | DOCKER_PULL_PROGRESS_WORKING)
)})"
r"\s*" r"\s*"
r"(?:|\s\[[^]]+\]\s+\S+\s*|\s+[0-9.kKmMgGbB]+/[0-9.kKmMgGbB]+\s*)" r"(?:|\s\[[^]]+\]\s+\S+\s*|\s+[0-9.kKmMgGbB]+/[0-9.kKmMgGbB]+\s*)"
r"$" r"$"