Skip to content

TST: tzdata is a required dependency when testing #47332

Closed
@simonjayhawkins

Description

@simonjayhawkins

Nightlies are sadly still broken.
On Windows, the failures are because tzdata is a required dependency when testing, because of a bug here.

pandas/pandas/conftest.py

Lines 1219 to 1220 in 259a15c

if zoneinfo is not None:
TIMEZONES.extend([zoneinfo.ZoneInfo("US/Pacific"), zoneinfo.ZoneInfo("UTC")])

We need to create a dummy ZoneInfo object and check to see if that works as zoneinfo will not raise if tzdata is missing on import, only when creating the ZoneInfo object.

tzdata should also probably be added to the optional dependencies list in the docs and in pandas/compat/_optional.py.
I dunno which minimum version we should support though.

cc @jbrockmendel (who added zoneinfo support)

Originally posted by @lithomas1 in #46856 (comment)

Metadata

Metadata

Assignees

Labels

Testingpandas testing functions or related to the test suiteWindowsWindows OS

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions