milesgranger commented on code in PR #13921:
URL: https://github.com/apache/arrow/pull/13921#discussion_r952383465
##########
python/pyarrow/io.pxi:
##########
@@ -121,6 +121,14 @@ cdef class NativeFile(_Weakrefable):
def __exit__(self, exc_type, exc_value, tb):
self.close()
+ def __repr__(self):
+ name = f"{self.__class__.__module__}.{self.__class__.__name__}"
Review Comment:
https://github.com/apache/arrow/pull/13921/commits/febd2efa417feba35b57ca41481b18c0992fd9c8
##########
python/pyarrow/io.pxi:
##########
@@ -1964,7 +1980,9 @@ cdef class Codec(_Weakrefable):
@property
def compression_level(self):
"""Returns the compression level parameter of the codec"""
- return frombytes(self.unwrap().compression_level())
+ if self.name == 'snappy':
+ return None
+ return self.unwrap().compression_level()
Review Comment:
https://github.com/apache/arrow/pull/13921/commits/6b49d22ada830b43c94260678a31eca8769de4b6
##########
python/pyarrow/io.pxi:
##########
@@ -1053,6 +1061,14 @@ cdef class Buffer(_Weakrefable):
def __len__(self):
return self.size
+ def __repr__(self):
+ name = f"{self.__class__.__module__}.{self.__class__.__name__}"
+ return (f"{name}("
+ f"address={hex(self.address)}, "
+ f"size={self.size}, "
+ f"is_cpu={self.is_cpu}, "
+ f"is_mutable={self.is_mutable})")
Review Comment:
https://github.com/apache/arrow/pull/13921/commits/febd2efa417feba35b57ca41481b18c0992fd9c8
--
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]