Skip to content

Add PyTzInfo constructors #5055

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 3 commits into from
Apr 25, 2025
Merged

Conversation

bschoenmaeckers
Copy link
Member

This continuous the discussion if we want additional constructors for PyTzInfo, started in #4970. By doing so it enables users to easily create timezone aware datetimes without going trough chrono-tz or jiff integrations.

@bschoenmaeckers bschoenmaeckers force-pushed the tzinfo-constructors branch 6 times, most recently from 675314d to 21856f1 Compare April 7, 2025 11:41
@bschoenmaeckers bschoenmaeckers force-pushed the tzinfo-constructors branch 2 times, most recently from 966baa9 to d881f84 Compare April 14, 2025 21:52
@bschoenmaeckers bschoenmaeckers force-pushed the tzinfo-constructors branch 2 times, most recently from 19b821b to 1bb5288 Compare April 14, 2025 22:18
Copy link
Contributor

@Icxolu Icxolu left a comment

Choose a reason for hiding this comment

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

LGTM

@davidhewitt Any concerns from your side?

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.

Looks good to me, thanks 👍

@davidhewitt davidhewitt added this pull request to the merge queue Apr 25, 2025
Merged via the queue into PyO3:main with commit d50ec3e Apr 25, 2025
42 of 44 checks passed
newcomertv pushed a commit to newcomertv/pyo3 that referenced this pull request Apr 28, 2025
* Add `PyTzInfo` constructors

* Make `PyTzInfo::utc` failable

* Deprecate `timezone_utc`
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.

3 participants