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
this causes dataclasses.as_dict to break as it depends on copy.deepcopy
quick shell demonstrating the issue
❯ python
Python 3.13.1 (main, Jan 8 2025, 13:21:34) [Clang 15.0.0 (clang-1500.3.9.4)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pendulum
>>> import copy
>>> copy.deepcopy(pendulum.Duration(weeks=1, hours=1))
Duration(hours=1)
>>>
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.gives
This is because there is no
weeks=self.weeks
in__deepcopy__
:pendulum/src/pendulum/duration.py
Lines 463 to 472 in 6383c07
The text was updated successfully, but these errors were encountered: