Skip to content

Commit

Permalink
Fix ZoneInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
stinodego committed Aug 2, 2023
1 parent a13b407 commit 6705e57
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions py-polars/tests/unit/functions/test_as_datatype.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from __future__ import annotations

import sys
from datetime import date, datetime
from typing import TYPE_CHECKING

Expand All @@ -9,14 +8,12 @@
import polars as pl
from polars.testing import assert_frame_equal, assert_series_equal

if sys.version_info >= (3, 9):
from zoneinfo import ZoneInfo
else:
# Import from submodule due to typing issue with backports.zoneinfo package:
# https://github.com/pganssle/zoneinfo/issues/125
from backports.zoneinfo._zoneinfo import ZoneInfo
if TYPE_CHECKING:
from zoneinfo import ZoneInfo

from polars.type_aliases import TimeUnit
else:
from polars.utils.convert import get_zoneinfo as ZoneInfo


def test_date_datetime() -> None:
Expand Down

0 comments on commit 6705e57

Please sign in to comment.