Skip to content

fix jiff::Zoned into python conversion when zoneinfo is not available#5120

Merged
davidhewitt merged 2 commits intoPyO3:mainfrom
bschoenmaeckers:jiff-no-zoneinfo
May 9, 2025
Merged

fix jiff::Zoned into python conversion when zoneinfo is not available#5120
davidhewitt merged 2 commits intoPyO3:mainfrom
bschoenmaeckers:jiff-no-zoneinfo

Conversation

@bschoenmaeckers
Copy link
Member

This will fix the doctest on python 3.7/3.8 seen in #5091.

@davidhewitt
Copy link
Member

Thanks! To avoid the difference in behaviour across Python versions, I wonder if it would be better to try to use backports.zoneinfo on the older versions and fail if it's not installed?

@bschoenmaeckers
Copy link
Member Author

Thanks! To avoid the difference in behaviour across Python versions, I wonder if it would be better to try to use backports.zoneinfo on the older versions and fail if it's not installed?

Interesting idea! Added the fallback in the latest commit. Please let me know what you think.

Copy link
Member

@davidhewitt davidhewitt left a comment

Choose a reason for hiding this comment

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

Thanks, I think this is an elegant fallback 👍

@davidhewitt davidhewitt added this pull request to the merge queue May 9, 2025
Merged via the queue into PyO3:main with commit f6e65ed May 9, 2025
42 of 44 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants