Drop support for Python before 3.9

built-in zoneinfo is too good to work around
This commit is contained in:
Jeff Epler 2022-09-25 11:19:04 -05:00
parent c1442eb17c
commit ce6138095c
No known key found for this signature in database
GPG key ID: D5BF15AB975AB4DE
3 changed files with 1 additions and 15 deletions

View file

@ -17,13 +17,9 @@ jobs:
strategy:
matrix:
python-version:
- '3.7'
- '3.8'
- '3.9'
- '3.10'
- '3.11.0-rc.1 - 3.11'
- 'pypy-3.7'
- 'pypy-3.8'
- 'pypy-3.9'
os-version:
- 'ubuntu-latest'

View file

@ -16,6 +16,5 @@ twine; implementation_name=="cpython"
types-beautifulsoup4
types-python-dateutil
types-requests
backports.zoneinfo; python_version<"3.9"
tzdata
wheel

View file

@ -6,16 +6,7 @@
#
# SPDX-License-Identifier: GPL-3.0-only
import datetime
import sys
from typing import Callable
ZoneInfo: Callable[[str], datetime.tzinfo]
if sys.version_info >= (3, 9): # pragma no coverage
from zoneinfo import ZoneInfo
else: # pragma no coverage
from backports.zoneinfo import ZoneInfo
from zoneinfo import ZoneInfo
Mountain = ZoneInfo("America/Denver")