Whole file
uiri/toml
The author described this change as “Fix #196: bug for datetime without tz info”. It counts as a record because the check below fails on the code as it stood at 1ef2eadd3 and passes on 349ab7054, with nothing else changed between the two runs.
Projectuiri/toml
Fix saved2018-09-15
Sharing licenceMIT · LICENSE
Change size+5 −1
What the code was meant to do, written into the code itself as a save note
Fix #196: bug for datetime without tz info
The change
| 480 | 480 | splitpoint = subsecondvalandtz.index('-') | |
| 481 | 481 | subsecondval = subsecondvalandtz[:splitpoint] | |
| 482 | 482 | tzval = subsecondvalandtz[splitpoint:] | |
| 483 | - | tz = TomlTz(tzval) | |
| 483 | + | else: | |
| 484 | + | tzval = None | |
| 485 | + | subsecondval = subsecondvalandtz | |
| 486 | + | if tzval is not None: | |
| 487 | + | tz = TomlTz(tzval) | |
| 484 | 488 | microsecond = int(int(subsecondval) * | |
| 485 | 489 | (10 ** (6 - len(subsecondval)))) | |
| 486 | 490 | else: |
The check that tells the two apart
fail→pass·tests/test_api.py::test_bug_196
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 it1ef2eadd317172c9d3d51c30c7e424a99ce47a05
Broken version dated2018-09-12
Moduletoml.decoder
Units changed_load_date
Fingerprintb55a5ed2f2d1f850
Checked2026-08-18 by goldset/0.1
Every field above is generated by our program. None of it is written by hand.