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
Reproduced on main and opened #72710 with the widening you suggested.
I went looking for what actually emits the bare int and couldn't pin it down from inside the repo — serialize() writes total_seconds() as a float, BaseSerialization does the same, and a JSON round-trip keeps 2700.0 intact. So I've written the PR as a defensive widening rather than claiming to have traced your traceback. If you happen to know which producer the payload came through, that'd be useful to note on the PR.
Either way the value is clearly reachable, and the datetime branch a few lines above already accepts int | float for the same kind of cross-producer reason, so accepting it one type down seems consistent.
Test is parametrised over int/float/str — on main only the int case fails, which keeps it pinned to the actual broken path.
Activity
CaptainAni187 commentedon Sep 8, 2026
Reproduced on main and opened #72710 with the widening you suggested.
I went looking for what actually emits the bare int and couldn't pin it down from inside the repo —
serialize()writestotal_seconds()as a float,BaseSerializationdoes the same, and a JSON round-trip keeps2700.0intact. So I've written the PR as a defensive widening rather than claiming to have traced your traceback. If you happen to know which producer the payload came through, that'd be useful to note on the PR.Either way the value is clearly reachable, and the
datetimebranch a few lines above already acceptsint | floatfor the same kind of cross-producer reason, so accepting it one type down seems consistent.Test is parametrised over int/float/str — on main only the int case fails, which keeps it pinned to the actual broken path.
Add regression test for int timedelta serde payloads
Fix timedelta serde to accept int payloads (#72326)