Skip to content
This repository has been archived by the owner on Jul 10, 2023. It is now read-only.

Commit

Permalink
Upgrade peewee from 2.10.2 to 3.1.0
Browse files Browse the repository at this point in the history
Change Database.get_conn() to Database.connection()
ref: <http://docs.peewee-orm.com/en/latest/peewee/changes.html#changes-in-3-0>
  • Loading branch information
shunyi authored and shunyi committed Feb 24, 2018
1 parent de8b94a commit 182485b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion zdict/completer.py
Expand Up @@ -4,7 +4,7 @@
class DictCompleter:
def __init__(self):
self.db = db
self.db.get_conn()
self.db.connection()

def __del__(self):
self.db.close()
Expand Down
2 changes: 1 addition & 1 deletion zdict/dictionary.py
Expand Up @@ -20,7 +20,7 @@ def __init__(self, args):
self.db = db

try:
self.db.get_conn()
self.db.connection()
except:
self.db = None
raise
Expand Down
2 changes: 1 addition & 1 deletion zdict/tests/test_completer.py
Expand Up @@ -14,7 +14,7 @@ def test_DictCompleter_db_connect(db):
'''
# init
completer = DictCompleter()
assert db.get_conn.called
assert db.connection.called

# del
del completer
Expand Down

0 comments on commit 182485b

Please sign in to comment.