Skip to content

Commit 9f400f4

Browse files
committed
replace ciso8601 with python-dateutil
1 parent b9119b4 commit 9f400f4

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

Dockerfile.docs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11
FROM python:3.8-slim
22

3-
# build-essential is required to build a wheel for ciso8601
4-
RUN apt update && apt install -y build-essential
5-
63
RUN python -m pip install --upgrade pip
74
RUN python -m pip install mkdocs mkdocs-material pdocs
85

96
COPY . /opt/src
107

118
WORKDIR /opt/src
129

13-
RUN python -m pip install -e \
10+
RUN python -m pip install \
1411
stac_fastapi/api \
1512
stac_fastapi/types \
1613
stac_fastapi/extensions \

stac_fastapi/types/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"attrs",
1111
"pydantic[dotenv]",
1212
"stac_pydantic==2.0.*",
13-
"ciso8601~=2.2.0",
13+
"python-dateutil~=2.7.0",
1414
]
1515

1616
extra_reqs = {

stac_fastapi/types/stac_fastapi/types/rfc3339.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
from datetime import datetime, timezone
44
from typing import Optional, Tuple
55

6-
import ciso8601
6+
import dateutil
77
from pystac.utils import datetime_to_str
88

99

1010
def rfc3339_str_to_datetime(s: str) -> datetime:
1111
"""Convert a string conforming to RFC 3339 to a :class:`datetime.datetime`.
1212
13-
Uses :meth:`ciso8601.parse_rfc3339` under the hood.
13+
Uses :meth:`dateutil.parser.isoparse` under the hood.
1414
1515
Args:
1616
s (str) : The string to convert to :class:`datetime.datetime`.
@@ -21,7 +21,7 @@ def rfc3339_str_to_datetime(s: str) -> datetime:
2121
Raises:
2222
ValueError: If the string is not a valid RFC 3339 string.
2323
"""
24-
return ciso8601.parse_rfc3339(s)
24+
return dateutil.parser.isoparse(s)
2525

2626

2727
def str_to_interval(

0 commit comments

Comments
 (0)