From bef3c0362b9a22dd7024b723bb7aa106181b59bb Mon Sep 17 00:00:00 2001 From: "Chayim I. Kirshen" Date: Sun, 24 Apr 2022 12:44:54 +0300 Subject: [PATCH 1/3] updating dependencies --- pyproject.toml | 8 ++++---- tests/test_sqlwritebehind.py | 20 ++++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index d8b111b..990ede3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,9 +23,9 @@ classifiers = [ [tool.poetry.dependencies] python = "^3.6.2" -redis = "^4.1.4" -SQLAlchemy = "1.3.24" -pymongo = "4.0.1" # located here, because it achieves the same goal as sqlalchemy +redis = "^4.2.0" +SQLAlchemy = "1.4.35" +pymongo = "4.1.1" # located here, because it achieves the same goal as sqlalchemy [tool.poetry.dev-dependencies] flake8 = "^3.9.2" @@ -41,7 +41,7 @@ tox-docker = "^3.0.0" tox-pyenv = "^1.1.0" PyMySQL = "^1.0.2" cryptography = "^3.4.7" -psycopg2-binary = "^2.9.1" +psycopg2-binary = "^3.0.11" [tool.pytest.ini_options] markers = [ diff --git a/tests/test_sqlwritebehind.py b/tests/test_sqlwritebehind.py index 8fcfe2d..13dcda2 100644 --- a/tests/test_sqlwritebehind.py +++ b/tests/test_sqlwritebehind.py @@ -48,7 +48,7 @@ def testSimpleWriteBehind(self): if count == 10: self.env.assertTrue(False, message='That failed') break - res = result.next() + res = result.fetchone() assert res == ('1', 'foo', 'bar', 22) self.env.execute_command('del', 'person:1') @@ -76,7 +76,7 @@ def testWriteBehindAck(self): assert res[0][1][0][1] == to_utf(['status', 'done']) result = self.dbconn.execute(text('select * from persons')) - res = result.next() + res = result.fetchone() assert res == ('1', 'foo', 'bar', 22) @@ -123,7 +123,7 @@ def testWriteBehindOperations(self): assert res[0][1][0][1] == to_utf(['status', 'done']) result = self.dbconn.execute(text('select * from persons')) - res = result.next() + res = result.fetchone() assert res == ('1', 'foo', 'bar', 22) # delete data without replicate @@ -136,7 +136,7 @@ def testWriteBehindOperations(self): # make sure data is still in the dabase result = self.dbconn.execute(text('select * from persons')) - res = result.next() + res = result.fetchone() assert res == ('1', 'foo', 'bar', 22) # rewrite a hash and not replicate @@ -163,7 +163,7 @@ def testSimpleWriteThrough(self): # make sure data is in the dabase result = self.dbconn.execute(text('select * from persons')) - res = result.next() + res = result.fetchone() assert res == ('1', 'foo', 'bar', 20) assert self.env.execute_command('hgetall', 'person:1') == to_utf({'first_name':'foo', 'last_name': 'bar', 'age': '20'}) @@ -183,7 +183,7 @@ def testSimpleWriteThroughPartialUpdate(self): # make sure data is in the dabase result = self.dbconn.execute(text('select * from persons')) - res = result.next() + res = result.fetchone() assert res == ('1', 'foo', 'bar', 20) assert self.env.execute_command('hgetall', 'person:1') == to_utf({'first_name':'foo', 'last_name': 'bar', 'age': '20'}) @@ -192,7 +192,7 @@ def testSimpleWriteThroughPartialUpdate(self): # make sure data is in the dabase result = self.dbconn.execute(text('select * from persons')) - res = result.next() + res = result.fetchone() assert res == ('1', 'foo1', 'bar', 20) assert self.env.execute_command('hgetall', 'person:1') == to_utf({'first_name':'foo1', 'last_name': 'bar', 'age': '20'}) @@ -223,7 +223,7 @@ def testDelThroughNoReplicate(self): # make sure data is in the dabase result = self.dbconn.execute(text('select * from persons')) - res = result.next() + res = result.fetchone() assert res == ('1', 'foo', 'bar', 20) assert self.env.execute_command('hgetall', 'person:1') == to_utf({'first_name':'foo', 'last_name': 'bar', 'age': '20'}) @@ -233,7 +233,7 @@ def testDelThroughNoReplicate(self): # make sure data was deleted from redis but not from the target assert self.env.execute_command('hgetall', 'person:1') == {} result = self.dbconn.execute(text('select * from persons')) - res = result.next() + res = result.fetchone() assert res == ('1', 'foo', 'bar', 20) @@ -253,7 +253,7 @@ def testWriteTroughAckStream(self): # make sure data is in the dabase result = self.dbconn.execute(text('select * from persons')) - res = result.next() + res = result.fetchone() assert res == ('1', 'foo', 'bar', 20) # make sure data is in redis From 8683ec0fc5eb5c8e44ca770acedea2088101ee51 Mon Sep 17 00:00:00 2001 From: "Chayim I. Kirshen" Date: Sun, 24 Apr 2022 16:11:53 +0300 Subject: [PATCH 2/3] dependency renamed apparently --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 990ede3..2e5e16d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,7 +41,7 @@ tox-docker = "^3.0.0" tox-pyenv = "^1.1.0" PyMySQL = "^1.0.2" cryptography = "^3.4.7" -psycopg2-binary = "^3.0.11" +psycopg-binary = "^3.0.11" [tool.pytest.ini_options] markers = [ From 8984ff6a28b4171fde34d402bc9b0c383f4802b0 Mon Sep 17 00:00:00 2001 From: "Chayim I. Kirshen" Date: Mon, 25 Apr 2022 11:12:26 +0300 Subject: [PATCH 3/3] psycopg2 binary --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 2e5e16d..f13bbcd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,7 +41,7 @@ tox-docker = "^3.0.0" tox-pyenv = "^1.1.0" PyMySQL = "^1.0.2" cryptography = "^3.4.7" -psycopg-binary = "^3.0.11" +psycopg2-binary = "^2.9.3" [tool.pytest.ini_options] markers = [