Browse Source

Intermediate changes
commit_hash:f3c8f135f282d645d645a13361be2570bfd2a026

robot-piglet 1 week ago
parent
commit
3c9e6a5979

+ 1 - 1
contrib/python/botocore/py3/botocore/auth.py

@@ -416,7 +416,7 @@ class SigV4Auth(BaseSigner):
     def add_auth(self, request):
         if self.credentials is None:
             raise NoCredentialsError()
-        datetime_now = datetime.datetime.utcnow()
+        datetime_now = datetime.datetime.now(datetime.UTC)
         request.context['timestamp'] = datetime_now.strftime(SIGV4_TIMESTAMP)
         # This could be a retry.  Make sure the previous
         # authorization header is removed first.

+ 11 - 0
contrib/python/botocore/py3/patches/06-fix-deprecation-warning.patch

@@ -0,0 +1,11 @@
+--- contrib/python/botocore/py3/botocore/auth.py	(index)
++++ contrib/python/botocore/py3/botocore/auth.py	(working tree)
+@@ -416,7 +416,7 @@ class SigV4Auth(BaseSigner):
+     def add_auth(self, request):
+         if self.credentials is None:
+             raise NoCredentialsError()
+-        datetime_now = datetime.datetime.utcnow()
++        datetime_now = datetime.datetime.now(datetime.UTC)
+         request.context['timestamp'] = datetime_now.strftime(SIGV4_TIMESTAMP)
+         # This could be a retry.  Make sure the previous
+         # authorization header is removed first.