From 1f33b2fad4f6f35568ae2d7d4aaddab6aa3e4c3a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 25 Jul 2024 13:31:25 -0400 Subject: [PATCH] Prefer tempora.parse for its better timezone support. Ref dateutil/dateutil#1221 --- jaraco/home/report-spam-call.py | 4 ++-- newsfragments/+ba94fe7d.bugfix.rst | 1 + pyproject.toml | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 newsfragments/+ba94fe7d.bugfix.rst diff --git a/jaraco/home/report-spam-call.py b/jaraco/home/report-spam-call.py index 930710d..5f284ea 100644 --- a/jaraco/home/report-spam-call.py +++ b/jaraco/home/report-spam-call.py @@ -2,7 +2,7 @@ import re import autocommand -import dateutil.parser +import tempora from splinter import Browser from jaraco.compat.py38 import r_fix @@ -28,7 +28,7 @@ def report_spam_call( comment='', close=False, browser='firefox', - when: dateutil.parser.parse = datetime.datetime.now(), # type: ignore + when: tempora.parse = datetime.datetime.now(), # type: ignore dialed=None, ): """ diff --git a/newsfragments/+ba94fe7d.bugfix.rst b/newsfragments/+ba94fe7d.bugfix.rst new file mode 100644 index 0000000..3717279 --- /dev/null +++ b/newsfragments/+ba94fe7d.bugfix.rst @@ -0,0 +1 @@ +Prefer tempora.parse for its better timezone support. \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index c122091..0943bfb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,6 +32,7 @@ dependencies = [ "victor-smart-kill", 'importlib_resources; python_version < "3.9"', "jaraco.compat>=4.1", + "tempora>=5.7", ] dynamic = ["version"]