One function
JSONDecodeError in simplejson/simplejson
The author described this change as “fix pickle breakage with JSONDecodeError”. It counts as a record because the check below fails on the code as it stood at 35816bfe2 and passes on e787c8b9d, with nothing else changed between the two runs.
Projectsimplejson/simplejson
Fix saved2013-10-05
Sharing licenceMIT · LICENSE.txt
Change size+3 −0
What the code was meant to do, written into the code itself as a docstring
Subclass of ValueError with the following additional properties: msg: The unformatted error message doc: The JSON document being parsed pos: The start index of doc where parsing failed end: The end index of doc where parsing failed (may be None) lineno: The line corresponding to pos colno: The column corresponding to pos endlineno: The line corresponding to end (may be None) endcolno: The column corresponding to end (may be None)
The change
| 23 | 23 | self.endlineno, self.endcolno = linecol(doc, end) | |
| 24 | 24 | else: | |
| 25 | 25 | self.endlineno, self.endcolno = None, None | |
| 26 | + | ||
| 27 | + | def __reduce__(self): | |
| 28 | + | return self.__class__, (self.msg, self.doc, self.pos, self.end) |
The check that tells the two apart
fail→pass·simplejson/tests/test_errors.py::TestErrors::test_error_is_pickable
Check file simplejson/tests/test_errors.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 it35816bfe2d0ddeb5ddcc68239683cbb35b7e3ff2
Broken version dated2013-05-08
Modulesimplejson.scanner
Units changedJSONDecodeError
Fingerprint554c6fda5d3eda1e
Checked2026-08-18 by goldset/0.1
Every field above is generated by our program. None of it is written by hand.