Skip to content

rust(feat): Convert DurationPy to and from timedelta - #849

Merged
taylor-sift merged 1 commit into
mainfrom
rust/duration-timedelta
Oct 21, 2026
Merged

taylor-sift merged 1 commit into
mainfrom
rust/duration-timedelta

Conversation

@taylor-sift

Copy link
Copy Markdown
Contributor

Adds DurationPy.to_timedelta() and DurationPy.from_timedelta() so Python callers can use RateLimitedErrorPy.retry_delay and other durations with standard library code. to_timedelta() raises OverflowError past timedelta.max; from_timedelta() raises ValueError for negative values.

Add DurationPy.to_timedelta() and DurationPy.from_timedelta() so Python
callers can use RateLimitedErrorPy.retry_delay and other durations with
standard library code. to_timedelta() raises OverflowError past
timedelta.max; from_timedelta() raises ValueError for negative values.
@taylor-sift
taylor-sift merged commit b58c8d7 into main Oct 21, 2026
24 checks passed
@taylor-sift
taylor-sift deleted the rust/duration-timedelta branch October 21, 2026 21:19
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