Closed seushermsft closed 5 years ago
This fixes #170
I am hitting issues running test cases (even unaltered) on my machine, but my application code runs correctly with this change.
Thanks @seushermsft , I've used this patch at https://github.com/tlocke/pg8000/commit/ecdc956f053351efb3ce806abd822ff7675a61a8 and https://github.com/tlocke/pg8000/commit/33f579291abd4088bae4c8dccd13d27ac38efdc7
This allows developers to use:
with pg8000.connect(**db_connect) as db:
instead of using a try-finally mechanism with extra checking to ensure they don't attempt to call close on an uninitialized object.