Skip to content

pyarrow: Wrap capsule extraction errors into an explicit error#9660

Open
Tpt wants to merge 4 commits into
apache:mainfrom
Tpt:tpt/pyarrow-capsule
Open

pyarrow: Wrap capsule extraction errors into an explicit error#9660
Tpt wants to merge 4 commits into
apache:mainfrom
Tpt:tpt/pyarrow-capsule

Conversation

@Tpt

@Tpt Tpt commented Apr 3, 2026

Copy link
Copy Markdown
Contributor

Remove validate_pycapsule: pointer_checked already raises an exception if the capsule type is wrong, and we wrap it into a nicer error

Also relies on a trait to associate types with their capsules names

Because we wrap the exception (equivalent of raise X from Y), the original exception is still there

Follow up of #9639 #9594

@Tpt Tpt force-pushed the tpt/pyarrow-capsule branch 2 times, most recently from aa910ff to 61391e3 Compare April 4, 2026 17:21
@Tpt

Tpt commented Apr 16, 2026

Copy link
Copy Markdown
Contributor Author

@alamb Thank you for the rebase. This MR is blocked by a segfault. I have not understood why yet and put this MR on hold to go back to it with a fresh mind. I will try to debug that in the next few days. Sorry for having it been stalled for so long.

Update: got it working, there was a use-after-free error.

@Tpt Tpt force-pushed the tpt/pyarrow-capsule branch from f0b61da to 7ecba54 Compare April 16, 2026 19:28
@Tpt Tpt marked this pull request as ready for review April 16, 2026 19:29
@Tpt Tpt force-pushed the tpt/pyarrow-capsule branch from b1880b6 to 240fd32 Compare April 17, 2026 09:21
Tpt added 3 commits June 16, 2026 17:01
Remove validate_pycapsule: pointer_checked already raises an exception if the capsule type is wrong, and we wrap it into a nicer error
@Tpt Tpt force-pushed the tpt/pyarrow-capsule branch from 240fd32 to 6c51b43 Compare June 16, 2026 15:03
@Tpt

Tpt commented Jun 17, 2026

Copy link
Copy Markdown
Contributor Author

@timsaucer I would love to get some review on this MR. It cleans up both code and error messages

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.

1 participant