Description
With the new Timedelta
type (see #8184), we introduced behavior that breaks compatibility with the superclass timedelta
: td.seconds
refers to seconds since the last minute, rather than seconds since the last day (as in the superclass).
I think breaking compatibility with the superclass here was a mistake. User code clearly does rely on the old behavior, e.g., as manifested in bugs for exporting datetime columns to Excel: #9139. Moreover, it's likely to remain an issue causing silent bugs, because external libraries are going to continue to use isinstance
checks to verify that something is a datetime
/timedelta
object. We chose to subclass timedelta
here, so we really are stuck with full API compatibility.
So I think we should make this change in 0.16. It's a breaking change, but 0.15 was already a breaking change in this respect, and in any case I think we should give ourselves some allowance for API changes for new types.