From: Peter Eisentraut Date: Wed, 19 Jun 2019 14:36:18 +0000 (+0200) Subject: stress.py: Convert to psycopg2 X-Git-Tag: pgbouncer_1_10_0~17 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5f1e29c7391f555322487e9506f9417478601de0;p=pgbouncer stress.py: Convert to psycopg2 It was still on the ancient psycopg module. --- diff --git a/test/stress.py b/test/stress.py index e3fdf2a..71a9036 100755 --- a/test/stress.py +++ b/test/stress.py @@ -1,6 +1,6 @@ #! /usr/bin/env python -import sys, os, re, time, psycopg +import sys, os, re, time, psycopg2 import threading, thread, random n_thread = 100 @@ -61,9 +61,9 @@ class WorkThread(threading.Thread): except: pass def main_loop(self): - db = psycopg.connect(get_connstr()) + db = psycopg2.connect(get_connstr()) if not longtx: - db.autocommit(1) + db.autocommit = True n = 0 while n < 10: self.do_work(db)