From c4a3e580d3c640fbcc71a041e8222a4ec5ffdeb0 Mon Sep 17 00:00:00 2001 From: Dave Johansen Date: Fri, 13 Oct 2023 09:06:59 -0600 Subject: [PATCH] Use built-in ISO 8601 parsing --- m3u8/parser.py | 4 +--- requirements.txt | 1 - setup.py | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/m3u8/parser.py b/m3u8/parser.py index 3f511e3c..18b37a30 100644 --- a/m3u8/parser.py +++ b/m3u8/parser.py @@ -8,8 +8,6 @@ import re from urllib.parse import urljoin as _urljoin -import iso8601 - from m3u8 import protocol """ @@ -20,7 +18,7 @@ def cast_date_time(value): - return iso8601.parse_date(value) + return datetime.datetime.fromisoformat(value) def format_date_time(value, **kwargs): diff --git a/requirements.txt b/requirements.txt index 57c80f08..e69de29b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +0,0 @@ -iso8601 diff --git a/setup.py b/setup.py index d9a95375..f1c01d4a 100644 --- a/setup.py +++ b/setup.py @@ -23,5 +23,5 @@ url="https://github.com/globocom/m3u8", description="Python m3u8 parser", long_description=long_description, - python_requires=">=3.6", + python_requires=">=3.7", )