Whole file

fastavro/fastavro

The author described this change as fix namespace handling. It counts as a record because the check below fails on the code as it stood at 215105c91 and passes on 2bc6f7778, with nothing else changed between the two runs.

Fix saved2023-05-04
Sharing licenceMIT · LICENSE
Change size+5 5

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

fix namespace handling

The change

103103 )
104104
105105 namespace = schema.get("namespace", parent_ns)
106- if not namespace:
107- return namespace, name
108- elif "." in name:
109- return "", name
110- else:
106+ if "." in name:
107+ return name.rsplit(".", 1)[0], name
108+ elif namespace:
111109 return namespace, f"{namespace}.{name}"
110+ else:
111+ return "", name
112112
113113
114114 def expand_schema(schema: Schema) -> Schema:

The check that tells the two apart

failpass·tests/test_schema.py::test_namespace_respected

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 it215105c9118f6d80f54f3fe25e470bea4c534b8e
Broken version dated2023-04-19
Modulefastavro._schema_py
Units changedschema_name
Fingerprint8cca221e1bbe8834
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