Closed jonringer closed 4 years ago
arrow was changed (way before 0.15.4) to stop replace being used to shift the entire object.
This changes only the second attribute, nothing else.
arw=arrow.utcnow()
arw_later=arw.replace(second=37)
To fix your tests use the shift method which will update the entire object.
arw=arrow.utcnow()
arw_later=arw.shift(seconds=+37)
I'd recommend upping your pinned arrow versions (see changelog) if possible as 0.5.4 is very old, note that 0.15.0+ have breaking changes to do with parsing.
i think it might be fixed now - the tests pass, at least with arrow 0.15.5 - thanks for the pointers regarding the necessary changes!
My impression of the changes is that one must use replace
when changing the locale and setting a value, like microsecond=0
, while shift
is good to use for days=+1
, as you describe. but i don't claim to really get arrow... let's hope that this holds up.
will merge soon, i think, and cut a new release - which i sadly still cannot publish on pip, but hopefully that will be fixed soon as well!
with arrow==0.15.4, the tests throw the following error: