amol- commented on a change in pull request #10054:
URL: https://github.com/apache/arrow/pull/10054#discussion_r614775487
##########
File path: python/pyarrow/io.pxi
##########
@@ -1449,6 +1449,10 @@ cdef shared_ptr[CBuffer] as_c_buffer(object o) except *:
cdef NativeFile get_native_file(object source, c_bool use_memory_map):
+ if source is None:
Review comment:
Yes, I can confirm that `not None` is not allowed in `cdef` functions:
```
pyarrow/io.pxi:1451:32: 'not None' only allowed in Python functions
```
I think that the main value probably comes from having a test to cover for a
past `segfault`, the better error message is a nice to have but not strictly
something that values the extra code. I wonder if we should not just keep the
test without any error message customization.
If we want to go deeper we might want to investigate where the segfault was
originally coming from (as my feeling is that we have just hidden it behind
other python changes) but it doesn't seem to value the extra time at the moment
if it's already solved.
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]