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.
Projectmicktwomey/pyiso8601
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
| 3 | 3 | ||
| 4 | 4 | """ | |
| 5 | 5 | 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__ | |
| 6 | 8 | self.__offset = timedelta(hours=offset_hours, minutes=offset_minutes) | |
| 7 | 9 | self.__name = name | |
| 8 | 10 | ||
| ⋯ | |||
| 16 | 18 | if isinstance(other, tzinfo): | |
| 17 | 19 | return other == self | |
| 18 | 20 | return False | |
| 21 | + | ||
| 22 | + | def __getinitargs__(self): | |
| 23 | + | return (self.__offset_hours, self.__offset_minutes, self.__name) | |
| 19 | 24 | ||
| 20 | 25 | def utcoffset(self, dt): | |
| 21 | 26 | return self.__offset | |
The check that tells the two apart
fail→pass·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.