Skip to content

Commit 9fcd7ff

Browse files
committed
Remove datetime.UTC
Replace `datetime.UTC` by `datetime.timezone.utc` datetime. UTC has been introduced into Python 3.11 and we still want to support Python 3.10 ref: it/org/software-supply-chain/production-pipeline/issues#182
1 parent ad80bfb commit 9fcd7ff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/e3/aws/troposphere/awslambda/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from __future__ import annotations
22

3-
from datetime import UTC, datetime
3+
from datetime import timezone, datetime
44
from enum import Enum
55
import logging
66
import os
@@ -659,7 +659,7 @@ def __init__(
659659
)
660660
self.source_dir: str = source_dir
661661
self.repository_name: str = repository_name
662-
timestamp = datetime.now(UTC).strftime("%Y-%m-%d-%H-%M-%S-%f")
662+
timestamp = datetime.now(timezone.utc).strftime("%Y-%m-%d-%H-%M-%S-%f")
663663
self.image_tag: str = f"{image_tag}-{timestamp}"
664664
self.image_uri: str | None = None
665665
self.docker_client = docker_client

0 commit comments

Comments
 (0)