fallintoplace opened a new pull request, #3354: URL: https://github.com/apache/iceberg-python/pull/3354
## Summary Avoid committing update builders when the body of a `with` block raises. `UpdateTableMetadata.__exit__` currently commits unconditionally, so user code like `with table.update_schema() as update:` can still mutate table metadata even when an exception is raised before the block finishes. This change makes update builders mirror `Transaction.__exit__` and only commit on a clean exit. ## Testing - `.venv\\Scripts\\python -m pytest "tests/catalog/test_catalog_behaviors.py::test_update_schema_with_statement_does_not_commit_on_exception[memory]" "tests/catalog/test_catalog_behaviors.py::test_update_schema_with_statement_does_not_commit_on_exception[sql]" -q` -- 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]
