Whole file

fastavro/fastavro

The author described this change as fix issue where _inject_schema was confused about a previously injected schema. It counts as a record because the check below fails on the code as it stood at 3a15d0f13 and passes on 67126e5f3, with nothing else changed between the two runs.

Fix saved2021-01-17
Sharing licenceMIT · LICENSE
Change size+3 4

What the code was meant to do, written into the code itself as a save note

fix issue where _inject_schema was confused about a previously injected schema

The change

510510 if outer_schema == inner_schema["name"]:
511511 return inner_schema, True
512512 else:
513- raise Exception(
514- "Internal error; "
515- + "You should raise an issue in the fastavro github repository"
516- )
513+ # Hit a named schema that has already been loaded previously. Return
514+ # the outer_schema so we keep looking
515+ return outer_schema, is_injected
517516 else:
518517 # Remaining valid schemas must be dict types
519518 schema_type = outer_schema["type"]

The check that tells the two apart

failpass·tests/test_schema.py::test_load_schema_bug

Check file tests/test_schema.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 it3a15d0f137357a626ac42cc22d05e5c5a05affe0
Broken version dated2021-01-15
Modulefastavro._schema_py
Units changed_inject_schema
Fingerprint4924fa9d507a9b43
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