From aa0127adb657257f487aeb9cc6e2280cecf15e71 Mon Sep 17 00:00:00 2001 From: Ghraven <115199279+Ghraven@users.noreply.github.com> Date: Wed, 20 May 2026 18:53:45 +0000 Subject: [PATCH] fix(tracking): replace deprecated datetime.utcnow() in S3 time partition _get_time_partition() used datetime.datetime.utcnow(), which is deprecated in Python 3.12+ and returns a naive datetime. Switched to datetime.now(timezone.utc).replace(tzinfo=None), which is timezone-aware at the source and produces a byte-identical isoformat() string (no +00:00 suffix), so the existing S3 prefix slicing is unchanged. --- burr/tracking/s3client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/burr/tracking/s3client.py b/burr/tracking/s3client.py index 561d517af..575cd393b 100644 --- a/burr/tracking/s3client.py +++ b/burr/tracking/s3client.py @@ -204,7 +204,7 @@ def __init__( self.stream_state: Dict[StateKey, StreamState] = dict() def _get_time_partition(self): - time = datetime.datetime.utcnow().isoformat() + time = datetime.datetime.now(datetime.timezone.utc).replace(tzinfo=None).isoformat() return [time[:4], time[5:7], time[8:10], time[11:13], time[14:]] def get_prefix(self):