Whole file
fastavro/fastavro
The author described this change as “fix issue with json decoding of complex types within maps”. It counts as a record because the check below fails on the code as it stood at f320e5a15 and passes on 02feaa1c9, with nothing else changed between the two runs.
Projectfastavro/fastavro
Fix saved2021-12-22
Sharing licenceMIT · LICENSE
Change size+2 −1
What the code was meant to do, written into the code itself as a save note
fix issue with json decoding of complex types within maps
The change
| 69 | 69 | if self._key not in self._current: | |
| 70 | 70 | self._current = symbol.get_default() | |
| 71 | 71 | else: | |
| 72 | - | self._current = self._current.pop(self._key) | |
| 72 | + | # self._current = self._current.pop(self._key) | |
| 73 | + | self._current = self._current[self._key] | |
| 73 | 74 | ||
| 74 | 75 | def _pop(self): | |
| 75 | 76 | self._current, self._key = self._stack.pop() |
The check that tells the two apart
fail→pass·tests/test_json.py::test_map_of_union_of_array_and_map
Check file tests/test_json.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 itf320e5a1560427e61d404797a170cd9296749c68
Broken version dated2021-12-22
Modulefastavro.io.json_decoder
Units changedAvroJSONDecoder
Fingerprint4ff8a51f86d93853
Checked2026-08-18 by goldset/0.1
Every field above is generated by our program. None of it is written by hand.
Other bugs found in fastavro/fastavro
- 2024-02-13Fix aliases in schema resolution (#751)
- 2023-05-04fix namespace handling
- 2022-09-09write_record
- 2022-07-29fix issue with decoding records within maps
- 2022-05-21fix bug where records should match but they were not
- 2021-05-10parse_schema