From 14de63b0d9f4bca0a16fcb0b3583b514da0a4143 Mon Sep 17 00:00:00 2001 From: Karthikeyan Singaravelan Date: Tue, 14 Dec 2021 11:59:16 +0000 Subject: [PATCH 1/2] Use is_alive in favour of isAlive for Python 3.9 compatibility. --- etl/extract/brapi.py | 2 +- etl/transform/elasticsearch.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/etl/extract/brapi.py b/etl/extract/brapi.py index 7e29638..e0a8013 100755 --- a/etl/extract/brapi.py +++ b/etl/extract/brapi.py @@ -302,6 +302,6 @@ def main(config): threads.append(thread) for thread in threads: - while thread.isAlive(): + while thread.is_alive(): thread.join(500) diff --git a/etl/transform/elasticsearch.py b/etl/transform/elasticsearch.py index b718079..2792822 100755 --- a/etl/transform/elasticsearch.py +++ b/etl/transform/elasticsearch.py @@ -318,5 +318,5 @@ def main(config): threads.append(thread) for thread in threads: - while thread.isAlive(): + while thread.is_alive(): thread.join(500) From ef3682a7ec13ff920b51cd7003e94cb0b9f70722 Mon Sep 17 00:00:00 2001 From: Karthikeyan Singaravelan Date: Tue, 14 Dec 2021 11:59:26 +0000 Subject: [PATCH 2/2] Use assertEqual instead of assertEquals for Python 3.11 compatibility. --- tests/common/test_utils.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/common/test_utils.py b/tests/common/test_utils.py index 7c6928c..658ba75 100644 --- a/tests/common/test_utils.py +++ b/tests/common/test_utils.py @@ -150,7 +150,7 @@ def test_empty(self): value = 0 expected = {} actual = update_in(data, path, value) - self.assertEquals(expected, actual) + self.assertEqual(expected, actual) def test_one_level(self): data = {} @@ -158,7 +158,7 @@ def test_one_level(self): value = 0 expected = {'a': 0} actual = update_in(data, path, value) - self.assertEquals(expected, actual) + self.assertEqual(expected, actual) def test_multi_levels(self): data = {} @@ -166,7 +166,7 @@ def test_multi_levels(self): value = 'foo' expected = {'a': {'b': {'c': 'foo'}}} actual = update_in(data, path, value) - self.assertEquals(expected, actual) + self.assertEqual(expected, actual) def test_existing_levels(self): data = {'a': {'b': {'c': 'bar'}}} @@ -174,7 +174,7 @@ def test_existing_levels(self): value = 'foo' expected = {'a': {'b': {'c': 'foo'}}} actual = update_in(data, path, value) - self.assertEquals(expected, actual) + self.assertEqual(expected, actual) def test_array_levels(self): data = { @@ -198,4 +198,4 @@ def test_array_levels(self): ] } actual = update_in(data, path, value) - self.assertEquals(expected, actual) + self.assertEqual(expected, actual)