pitrou commented on a change in pull request #7282:
URL: https://github.com/apache/arrow/pull/7282#discussion_r436778188



##########
File path: python/pyarrow/_flight.pyx
##########
@@ -844,8 +856,27 @@ cdef class FlightStreamReader(MetadataRecordBatchReader):
             (<CFlightStreamReader*> self.reader.get()).Cancel()
 
 
-cdef class FlightStreamWriter(_CRecordBatchWriter):
-    """A RecordBatchWriter that also allows writing application metadata."""
+cdef class MetadataRecordBatchWriter(_CRecordBatchWriter):
+    """A RecordBatchWriter that also allows writing application metadata.
+
+    This class is a context manager; on exit, close() will be called.

Review comment:
       Is `close` a method in the base class? If so, how about defining 
`__enter__` and `__exit__` in the base class instead?




----------------------------------------------------------------
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]


Reply via email to