Remove dependency on pytz
pytz will be removed from RHEL/CentOS 10 because of the built-in zoneinfo[1]. Because the current usage of pytz can be very easily replaced, this removes the dependency on pytz. [1] https://issues.redhat.com/browse/RHEL-219 Change-Id: Ia72c528eadeccf6075894ff58477fecade65ad71
This commit is contained in:
parent
1831b9947a
commit
c6e0553588
@ -40,7 +40,6 @@ from oslo_utils import netutils
|
||||
from oslo_utils import strutils
|
||||
from oslo_utils import timeutils
|
||||
import psutil
|
||||
import pytz
|
||||
|
||||
from ironic.common import exception
|
||||
from ironic.common.i18n import _
|
||||
@ -453,7 +452,7 @@ def unix_file_modification_datetime(file_name):
|
||||
# normalize time to be UTC without timezone
|
||||
datetime.datetime.fromtimestamp(
|
||||
# fromtimestamp will return local time by default, make it UTC
|
||||
os.path.getmtime(file_name), tz=pytz.utc
|
||||
os.path.getmtime(file_name), tz=datetime.timezone.utc
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -15,7 +15,6 @@ python-cinderclient!=4.0.0,>=3.3.0 # Apache-2.0
|
||||
python-glanceclient>=2.8.0 # Apache-2.0
|
||||
keystoneauth1>=4.2.0 # Apache-2.0
|
||||
ironic-lib>=5.5.0 # Apache-2.0
|
||||
pytz>=2013.6 # MIT
|
||||
stevedore>=1.29.0 # Apache-2.0
|
||||
oslo.concurrency>=4.2.0 # Apache-2.0
|
||||
oslo.config>=6.8.0 # Apache-2.0
|
||||
|
Loading…
x
Reference in New Issue
Block a user