mnzpk commented on PR #1747: URL: https://github.com/apache/iceberg-python/pull/1747#issuecomment-2797084917
> IMHO, it would be better to define the client as a [cached_property](https://docs.python.org/3/library/functools.html#functools.cached_property), and just return it. +1 for moving the init out of the `__init__` func, and converting the client to a `cached_property` will help to do this, where the user will be able to use the client with and without a context manager. Hi @hussein-awala, just to make sure I have this right, would this mean moving most of the logic in `_init_thrift_client` to a cached property named `client` with `__enter__` returning `self.client` and `__exit__` closing the transport and `del`eting `self.client`? -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org