diff --git a/setup.cfg b/setup.cfg index b3dcd19e8..155dfe5ad 100644 --- a/setup.cfg +++ b/setup.cfg @@ -30,7 +30,6 @@ install_requires = justbytes>=0.14 packaging psutil - python-dateutil wcwidth package_dir = diff --git a/src/stratis_cli/_actions/_list_filesystem.py b/src/stratis_cli/_actions/_list_filesystem.py index 4943f01b6..1510207c4 100644 --- a/src/stratis_cli/_actions/_list_filesystem.py +++ b/src/stratis_cli/_actions/_list_filesystem.py @@ -16,9 +16,9 @@ """ from abc import ABC, abstractmethod +from datetime import datetime from typing import Any, Callable, Dict, List -from dateutil import parser as date_parser from dbus import ObjectPath, String from justbytes import Range @@ -258,7 +258,7 @@ def display(self): try: created = ( - date_parser.isoparse(fs.Created()) + datetime.fromisoformat(fs.Created()) .astimezone() .strftime("%b %d %Y %H:%M") ) diff --git a/src/stratis_cli/_actions/_list_pool.py b/src/stratis_cli/_actions/_list_pool.py index cebc79f40..e187d0ecd 100644 --- a/src/stratis_cli/_actions/_list_pool.py +++ b/src/stratis_cli/_actions/_list_pool.py @@ -18,10 +18,10 @@ import json import os from abc import ABC, abstractmethod +from datetime import datetime from typing import Any, Callable, Iterable, Mapping from uuid import UUID -from dateutil import parser as date_parser from justbytes import Range from dbus_client_gen import DbusClientMissingPropertyError @@ -431,7 +431,9 @@ def _print_detail_view( # noqa: PLR0912,PLR0915 reencrypted = get_property( mopool.LastReencryptedTimestamp(), lambda t: ( - date_parser.isoparse(t).astimezone().strftime("%b %d %Y %H:%M") + datetime.fromisoformat(t) + .astimezone() + .strftime("%b %d %Y %H:%M") ), "Never", )