Drop support for Python before 3.9
built-in zoneinfo is too good to work around
This commit is contained in:
parent
c1442eb17c
commit
ce6138095c
3 changed files with 1 additions and 15 deletions
4
.github/workflows/test.yml
vendored
4
.github/workflows/test.yml
vendored
|
|
@ -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'
|
||||
|
|
|
|||
|
|
@ -16,6 +16,5 @@ twine; implementation_name=="cpython"
|
|||
types-beautifulsoup4
|
||||
types-python-dateutil
|
||||
types-requests
|
||||
backports.zoneinfo; python_version<"3.9"
|
||||
tzdata
|
||||
wheel
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue