From 145e6604f7d01548e1fc62910a714719718ee2a4 Mon Sep 17 00:00:00 2001 From: Nathan Raw Date: Thu, 7 Mar 2024 04:26:10 +0000 Subject: [PATCH] :bug: Remove call to removeprefix to fix python 3.8 --- replicate/stream.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/replicate/stream.py b/replicate/stream.py index 47f9df5f..9aebf94d 100644 --- a/replicate/stream.py +++ b/replicate/stream.py @@ -114,7 +114,7 @@ def decode(self, line: str) -> Optional[ServerSentEvent]: return None fieldname, _, value = line.partition(":") - value = value.removeprefix(" ") + value = value[1:] if value.startswith(" ") else value if fieldname == "event": if event := ServerSentEvent.EventType(value):