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
Reject tz-aware datetime / time when utcoffset() returns None
The datetime / time ISO 8601 encoders previously fell through to the
naive format when an aware value's tzinfo subclass returned ``None``
from ``utcoffset(...)``. The branch was conservatively documented as
"broken tzinfo subclass" but the silent demotion lost the user's
tz-awareness intent without warning, and was asymmetric with the
sibling ``_format_utc_offset`` rejection behaviour.
Raise ``DataError`` in both branches so the caller sees the broken
tzinfo contract immediately. Update the broken-tzinfo encoder pin
tests to assert the new rejection contract; drop the silent-naive
round-trip pins.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments