Turn acquire_connection into a context manager
#3435
+97
−71
acquire_connection into a context manager
#3435