Convert `FileFormatModel` from `ABC` to `typing.Protocol` (#3692) Closes #3100 ## Rationale for this change `FileFormatModel` had only abstract methods (no shared implementation), so an `ABC` was heavier than needed. This PR converts it to `typing.Protocol`, which is the more Pythonic pattern for a pure interface. `FileFormatWriter` remains an `ABC` since it has shared `__enter__`/`__exit__`/`result` implementations that inheritance carries for free. `FileFormatFactory` is unchanged - it matches the existing `AuthManagerFactory` pattern. ## Changes New format implementations can now conform structurally without inheriting from `FileFormatModel`. Net: 2 `ABC`s → 1 `ABC` + 1 `Protocol`. No signature change for existing callers; `ParquetFormatModel(FileFormatModel)` inheritance is retained (`Protocol` supports explicit conformance). ## Are these changes tested? Yes. `tests/io/test_fileformat.py` adds two tests using a shared `_StructuralModel` helper: - `test_file_format_model_is_protocol` - a structurally-conforming class (no inheritance) passes `isinstance()` against `FileFormatModel`. - `test_structural_model_works_with_factory` - a structurally-conforming class can be registered and retrieved via `FileFormatFactory` end-to-end. ## Are there any user-facing changes? No. Default behavior is unchanged.
PyIceberg is a Python library for programmatic access to Iceberg table metadata as well as to table data in Iceberg format. It is a Python implementation of the Iceberg table spec.
The documentation is available at https://py.iceberg.apache.org/.