Skip to content

ENH: support zoneinfo tzinfos #46425

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 21 commits into from
Apr 18, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add backports.zoneinfo to ci deps
  • Loading branch information
jbrockmendel committed Mar 19, 2022
commit 7786aa98009092cd0706e39ce6623dd1669ff330
1 change: 1 addition & 0 deletions ci/deps/actions-38-downstream_compat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ dependencies:
- python-dateutil
- numpy
- pytz
- backports.zoneinfo

# optional dependencies
- beautifulsoup4
Expand Down
1 change: 1 addition & 0 deletions ci/deps/actions-38-minimum_versions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ dependencies:
- python-dateutil=2.8.1
- numpy=1.18.5
- pytz=2020.1
- backports.zoneinfo

# optional dependencies, markupsafe for jinja2
- beautifulsoup4=4.8.2
Expand Down
5 changes: 4 additions & 1 deletion pandas/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -1167,6 +1167,7 @@ def iris(datapath):
timezone(timedelta(hours=1)),
timezone(timedelta(hours=-1), name="foo"),
zoneinfo.ZoneInfo("US/Pacific"),
zoneinfo.ZoneInfo("UTC"),
]
TIMEZONE_IDS = [repr(i) for i in TIMEZONES]

Expand All @@ -1193,7 +1194,9 @@ def tz_aware_fixture(request):
tz_aware_fixture2 = tz_aware_fixture


@pytest.fixture(params=["utc", "dateutil/UTC", utc, tzutc(), timezone.utc])
@pytest.fixture(
params=["utc", "dateutil/UTC", utc, tzutc(), timezone.utc, zoneinfo.ZoneInfo("UTC")]
)
def utc_fixture(request):
"""
Fixture to provide variants of UTC timezone strings and tzinfo objects.
Expand Down