You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Duration pickle and shallow copy lose year and month components #1023
The inherited timedelta reduction serializes only its normalized day/second/microsecond fields, not the Duration instance state. Existing pickle coverage checks equality, so it doesn't catch the calendar information loss.
I plan to preserve the instance state alongside timedelta's existing reduction, with regressions for every supported pickle protocol, positive/negative/mixed-sign calendar components and shallow copying. Interval already defines its own reduction and should keep its existing behavior.
Reproduced from master with the pure-Python implementation on macOS / Python 3.12.13. Nineteen new regression cases fail before the fix. Checked existing duration pickle/copy issues and PRs for overlapping work.
Activity