One function

FixedOffset in micktwomey/pyiso8601

The author described this change as Fix pickling / deepcopy of returned datetime objects. It counts as a record because the check below fails on the code as it stood at 81ff28738 and passes on ab5e6f85d, with nothing else changed between the two runs.

Fix saved2013-10-17
Sharing licenceMIT · LICENSE
Change size+5 0

What the code was meant to do, written into the code itself as a docstring

Fixed offset in hours and minutes from UTC

The change

33
44 """
55 def __init__(self, offset_hours, offset_minutes, name):
6+ self.__offset_hours = offset_hours # Keep for later __getinitargs__
7+ self.__offset_minutes = offset_minutes # Keep for later __getinitargs__
68 self.__offset = timedelta(hours=offset_hours, minutes=offset_minutes)
79 self.__name = name
810
1618 if isinstance(other, tzinfo):
1719 return other == self
1820 return False
21+
22+ def __getinitargs__(self):
23+ return (self.__offset_hours, self.__offset_minutes, self.__name)
1924
2025 def utcoffset(self, dt):
2126 return self.__offset

The check that tells the two apart

failpass·iso8601/test_iso8601.py::test_parse_valid_date[1997-07-16T19:20+01:00-expected_datetime1]

Check file iso8601/test_iso8601.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.

Origin and history

The code before it81ff287384424cda10f087a25e2e104d2c02532a
Broken version dated2013-10-17
Moduleiso8601.iso8601
Units changedFixedOffset
Fingerprintd6209a3f3a97808b
Checked2026-08-18 by goldset/0.1

Every field above is generated by our program. None of it is written by hand.