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
When a Duration object with a month attribute copied using copy.deepcopy, the result is a Duration that has day-based intervals instead of month-based intervals.
Repro:
from copy import deepcopy
from pendulum.datetime import DateTime
from pendulum.duration import Duration
cycle_interval = Duration(months=1)
cycle_interval
# Duration(months=1)
copy_attempt = deepcopy(Duration(months=1))
copy_attempt
# Duration(weeks=4, days=2)
I would expect copy_attempt to also be a Duration(months=1)
The text was updated successfully, but these errors were encountered:
Checks:
I am on the latest Pendulum version.
I have searched the issues of this repo and believe that this is not a duplicate.
OS version and name: MacOS Ventura 13.4 (22F66)
** Python Version** '3.9.16 (main, Feb 14 2023, 12:36:00) \n[Clang 14.0.0 (clang-1400.0.29.202)]'
Pendulum version: 2.1.2
Issue
When a
Duration
object with a month attribute copied usingcopy.deepcopy
, the result is a Duration that has day-based intervals instead of month-based intervals.Repro:
I would expect
copy_attempt
to also be aDuration(months=1)
The text was updated successfully, but these errors were encountered: