HonahX opened a new issue, #2590:
URL: https://github.com/apache/iceberg-python/issues/2590

   ### Apache Iceberg version
   
   None
   
   ### Please describe the bug 🐞
   
   Pydantic recently `2.12.0` and unfortunately it contains a regression: 
https://github.com/pydantic/pydantic/issues/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: https://github.com/apache/iceberg-python/pull/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`
   
   <img width="1993" height="655" alt="Image" 
src="https://github.com/user-attachments/assets/90ae0cf4-d3fa-4d50-b94c-b1c8e791eae1";
 />
   
   `pydantic 2.12.0`
   
   <img width="2011" height="474" alt="Image" 
src="https://github.com/user-attachments/assets/a5e6f745-0054-46c3-9201-459499999ee9";
 />
   
   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


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to