Skip to content

Conversation

@mroeschke
Copy link
Member

Split off from #57045

  • Add more documentation about zoneinfo.ZoneInfo objects being accepted
  • Changed tests/benchmark to prefer stdlib timezone objects instead of pytz objects e.g. pytz.utc -> datetime.timezone.utc, pytz.timezone("US/Pacific") -> zoneinfo.ZoneInfo("US/Pacific")

@mroeschke mroeschke added Testing pandas testing functions or related to the test suite Docs Timezones Timezone data dtype labels Jun 14, 2024
@mroeschke mroeschke requested a review from MarcoGorelli as a code owner June 14, 2024 20:44
@mroeschke mroeschke added this to the 3.0 milestone Jun 14, 2024

pandas provides rich support for working with timestamps in different time
zones using the ``pytz`` and ``dateutil`` libraries or :class:`datetime.timezone`
zones using the ``zoneinfo``, ``pytz`` and ``dateutil`` libraries or :class:`datetime.timezone`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we even really need to advertise pytz any more or can it be fully replaced by zoneinfo?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think zoneinfo objects support all operations that pytz does. I was planning on keeping it around since it will be supported via an optional dependency I suppose.

If we ever deprecate pytz support, I would fully support not advertising it anymore

@mroeschke
Copy link
Member Author

Going to merge this PR to make progress on #57045, happy to follow up if needed

@mroeschke mroeschke merged commit 1cf98aa into pandas-dev:main Jun 24, 2024
@mroeschke mroeschke deleted the pre/tz/zoneinfo branch June 24, 2024 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Docs Testing pandas testing functions or related to the test suite Timezones Timezone data dtype

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants