Whole file
uiri/toml
The author described this change as “Add __deepcopy__ method to TomlTz class. Fix #308 (#309)”. It counts as a record because the check below fails on the code as it stood at 9be64582f and passes on 16a644146, with nothing else changed between the two runs.
Projectuiri/toml
Fix saved2020-10-27
Sharing licenceMIT · LICENSE
Change size+3 −0
What the code was meant to do, written into the code itself as a save note
Add __deepcopy__ method to TomlTz class. Fix #308 (#309)
The change
| 11 | 11 | self._hours = int(self._raw_offset[1:3]) | |
| 12 | 12 | self._minutes = int(self._raw_offset[4:6]) | |
| 13 | 13 | ||
| 14 | + | def __deepcopy__(self, memo): | |
| 15 | + | return self.__class__(self._raw_offset) | |
| 16 | + | ||
| 14 | 17 | def tzname(self, dt): | |
| 15 | 18 | return "UTC" + self._raw_offset | |
| 16 | 19 |
The check that tells the two apart
fail→pass·tests/test_api.py::test_deepcopy_timezone
Check file tests/test_api.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 it9be64582fff86b9c5bd94ce52a5fedcb3d4fac01
Broken version dated2020-08-22
Moduletoml.tz
Units changedTomlTz
Fingerprint9062db6c6ae8e917
Checked2026-08-18 by goldset/0.1
Every field above is generated by our program. None of it is written by hand.