Drop dependency on pytz
Current usage of pytz can be easily replaced by the built-in datetime library and this allows reducing dependency on 3rd party libraries. Change-Id: I74c5b8ebce7600cc5986f48a9874ab1882a49ed4
This commit is contained in:
parent
a3095c0485
commit
52ae921e28
@ -24,7 +24,6 @@ import urllib3
|
||||
|
||||
from oslo_log import log as logging
|
||||
from oslo_serialization import jsonutils
|
||||
import pytz
|
||||
import requests
|
||||
from requests import adapters
|
||||
|
||||
@ -418,7 +417,7 @@ class K8sClient(object):
|
||||
|
||||
# This is needed for Event date, otherwise LAST SEEN/Age will be empty
|
||||
# and misleading.
|
||||
now = datetime.datetime.utcnow().replace(tzinfo=pytz.UTC)
|
||||
now = datetime.datetime.utcnow().replace(tzinfo=datetime.timezone.utc)
|
||||
date_time = now.strftime("%Y-%m-%dT%H:%M:%SZ")
|
||||
|
||||
name = ".".join((resource['metadata']['name'],
|
||||
|
@ -27,4 +27,3 @@ pyroute2>=0.5.7;sys_platform!='win32' # Apache-2.0 (+ dual licensed GPL2)
|
||||
retrying!=1.3.0,>=1.2.3 # Apache-2.0
|
||||
stevedore>=1.20.0 # Apache-2.0
|
||||
prometheus_client>=0.6.0 # Apache-2.0
|
||||
pytz>=2024.1 # MIT
|
||||
|
Loading…
Reference in New Issue
Block a user