PyHive
                                
                                
                                
                                    PyHive copied to clipboard
                            
                            
                            
                        Add __enter__, __exit__ methods
The methods allow us to use connections and cursors with withs
statements.
Pinging @jingw directly, hoping for a faster merge :)
@gglanzani can this be added also to the presto part? This client seems to have it implemented: https://github.com/prestodb/presto-python-client/blob/master/prestodb/dbapi.py#L121
I've added #218 in a similar spirit to this PR. Seems to work (at lest with connection object) but it needs review.
@petobens sure, it should just work, but I don't have a presto cluster to test it :)
 
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.