-
Notifications
You must be signed in to change notification settings - Fork 371
Open
Description
Apache Iceberg version
None
Please describe the bug 🐞
Pydantic recently 2.12.0
and unfortunately it contains a regression: pydantic/pydantic#12347 that ValidationInfo
object will lose field_names
in some cases.
I have a draft PR that experiments 2.12.0
and confirmed that the regression affect us: #2589
table_metadata = ValidationInfo(config={'title': 'TableMetadataV2', 'validate_by_alias': True, 'validate_by_name': True}, context=None, data=None, field_name=None)
def check_schemas(table_metadata: TableMetadata) -> TableMetadata:
"""Check if the current-schema-id is actually present in schemas."""
> current_schema_id = table_metadata.current_schema_id
E AttributeError: 'pydantic_core._pydantic_core.ValidationInfo' object has no attribute 'current_schema_id'
More info:
pydantic 2.11.10

pydantic 2.12.0

While waiting for upstream fix, I think we may want to pin the pydantic version to <2.12.0
Willingness to contribute
- I can contribute a fix for this bug independently
- I would be willing to contribute a fix for this bug with guidance from the Iceberg community
- I cannot contribute a fix for this bug at this time
athossampayo and michaelbertoni-ep
Metadata
Metadata
Assignees
Labels
No labels