diff --git a/trino/mapper.py b/trino/mapper.py index f29dd666..087bbfa9 100644 --- a/trino/mapper.py +++ b/trino/mapper.py @@ -2,14 +2,15 @@ import abc import base64 +import sys import uuid from datetime import date, datetime, time, timedelta, timezone, tzinfo from decimal import Decimal from typing import Any, Dict, Generic, List, Optional, Tuple, TypeVar -try: +if sys.version_info >= (3, 9): from zoneinfo import ZoneInfo -except ModuleNotFoundError: +else: from backports.zoneinfo import ZoneInfo import trino.exceptions