|
8 | 8 | from typing import Any |
9 | 9 | from typing import Literal |
10 | 10 | from unittest.mock import MagicMock |
| 11 | +from zoneinfo import ZoneInfo |
11 | 12 |
|
12 | 13 | import numpy as np |
13 | 14 | import pandas as pd |
14 | 15 | import pytest |
15 | | -import pytz |
16 | 16 | import zstandard |
17 | 17 | from databento_dbn import Compression |
18 | 18 | from databento_dbn import DBNRecord |
@@ -1579,24 +1579,24 @@ def test_dbnstore_to_df_with_timezone( |
1579 | 1579 | @pytest.mark.parametrize( |
1580 | 1580 | "timezone", |
1581 | 1581 | [ |
1582 | | - pytz.timezone("US/Central"), |
1583 | | - pytz.timezone("US/Eastern"), |
1584 | | - pytz.timezone("Europe/Vienna"), |
1585 | | - pytz.timezone("Asia/Dubai"), |
1586 | | - pytz.timezone("UTC"), |
| 1582 | + ZoneInfo("US/Central"), |
| 1583 | + ZoneInfo("US/Eastern"), |
| 1584 | + ZoneInfo("Europe/Vienna"), |
| 1585 | + ZoneInfo("Asia/Dubai"), |
| 1586 | + ZoneInfo("UTC"), |
1587 | 1587 | ], |
1588 | 1588 | ) |
1589 | 1589 | @pytest.mark.parametrize( |
1590 | 1590 | "schema", |
1591 | 1591 | [pytest.param(schema, id=str(schema)) for schema in Schema.variants()], |
1592 | 1592 | ) |
1593 | | -def test_dbnstore_to_df_with_pytz_timezone( |
| 1593 | +def test_dbnstore_to_df_with_zoneinfo( |
1594 | 1594 | test_data_path: Callable[[Dataset, Schema], Path], |
1595 | 1595 | schema: Schema, |
1596 | | - timezone: pytz.BaseTzInfo, |
| 1596 | + timezone: ZoneInfo, |
1597 | 1597 | ) -> None: |
1598 | 1598 | """ |
1599 | | - Test that setting the `tz` parameter in `DBNStore.to_df` accepts `pytz` |
| 1599 | + Test that setting the `tz` parameter in `DBNStore.to_df` accepts `ZoneInfo` |
1600 | 1600 | timezone objects. |
1601 | 1601 | """ |
1602 | 1602 | # Arrange |
|
0 commit comments