Open
Description
-
I am on the latest Pendulum version.
-
I have searched the issues of this repo and believe that this is not a dup
-
OS version and name: macOS
-
Pendulum version: 3.0.0
Issue
If a Duration
has more than 7 days, deepcopy is wrong as there is no mention of weeks.
def test():
d = pendulum.Duration(days=9)
d1 = copy.deepcopy(d)
assert d1.total_days() == 9
gives
> assert d1.total_days() == 9
E assert 2.0 == 9
E + where 2.0 = total_days()
E + where total_days = Duration(days=2).total_days
This is because there is no weeks=self.weeks
in __deepcopy__
:
pendulum/src/pendulum/duration.py
Lines 463 to 472 in 6383c07
Metadata
Metadata
Assignees
Labels
No labels
Activity