Skip to content

fix(python): handle missing manifest partition summaries#2886

Open
mattfaltyn wants to merge 1 commit into
apache:mainfrom
mattfaltyn:agent/fix-python-manifest-partitions
Open

fix(python): handle missing manifest partition summaries#2886
mattfaltyn wants to merge 1 commit into
apache:mainfrom
mattfaltyn:agent/fix-python-manifest-partitions

Conversation

@mattfaltyn

Copy link
Copy Markdown

Which issue does this PR close?

What changes are included in this PR?

The Python ManifestFile.partitions getter now returns an empty list when the
optional core partition summaries are absent. Previously, the getter
unconditionally unwrapped the optional value and triggered a Rust/PyO3 panic
for valid manifest entries with partitions: None.

The getter also avoids cloning the entire summaries vector before converting
its entries, and a focused regression test covers the absent-summary case.

Are these changes tested?

Yes. The regression test constructs a valid ManifestFile with
partitions: None and verifies that the Python getter returns an empty list.

  • cargo test -p pyiceberg_core_rust test_manifest_partitions_without_summaries -- --nocapture
  • make check
  • make unit-test
  • (cd bindings/python && make test) — 17 passed, 2 skipped

@mattfaltyn
mattfaltyn marked this pull request as ready for review July 24, 2026 07:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Python ManifestFile.partitions panics when partition summaries are absent

1 participant