Skip to content

Commit

Permalink
remove ciso8601
Browse files Browse the repository at this point in the history
  • Loading branch information
ekneg54 committed Oct 19, 2024
1 parent 3ce5793 commit 9b8b521
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
4 changes: 1 addition & 3 deletions logprep/util/time.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
from typing import Union
from zoneinfo import ZoneInfo

import ciso8601

from logprep.abc.exceptions import LogprepException

UTC = ZoneInfo("UTC")
Expand Down Expand Up @@ -35,7 +33,7 @@ def from_string(cls, source: str, set_missing_utc: bool = True) -> datetime:
datetime object
"""
try:
time_object = ciso8601.parse_datetime(source) # pylint: disable=c-extension-no-member
time_object = datetime.fromisoformat(source) # pylint: disable=c-extension-no-member
if set_missing_utc:
time_object = cls._set_utc_if_timezone_is_missing(time_object)
return time_object
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ dependencies = [
"aiohttp>=3.9.2", # CVE-2024-23334
"attrs",
"certifi>=2023.7.22", # CVE-2023-37920
"ciso8601", # fastest iso8601 datetime parser. can be removed after dropping support for python < 3.11
"colorama",
"confluent-kafka>2",
"geoip2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@
"subfield": {"field2": "2022-12-05 12:00:00"},
"tags": ["_timestamp_differ_failure"],
},
r".*ProcessingWarning.*Invalid character while parsing",
r".*ProcessingWarning.*Invalid isoformat string: 'non-timestamp'",
),
(
"diff between two timestamps with partial timestamp format match",
Expand Down

0 comments on commit 9b8b521

Please sign in to comment.