lupko commented on issue #36540: URL: https://github.com/apache/arrow/issues/36540#issuecomment-1626950181
i did some further digging and turns out this is related to Python exception handling. The stack frames included in exception's traceback keep reference to all local variables. And so naturally things do not get cleared up if code holds onto the exception. There is even a function `traceback.clear_frames(tb)` to address this. Tested it with the reproducer and all is good. So if anything, this could perhaps be a little doc update? A note into `pyarrow.flight.FlightError` perhaps? WDYT? Otherwise I'm going to close this. -- 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org