From 8b1514ad2315ff3d6d1d06ea3eb6cd80f0edb94d Mon Sep 17 00:00:00 2001 From: Jacob Brown Date: Mon, 18 Oct 2021 11:31:17 -0400 Subject: [PATCH 1/9] changes for lite version testing --- optimizely/bucketer.py | 5 +---- requirements/core.txt | 7 +------ tests/test_bucketing.py | 3 +-- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/optimizely/bucketer.py b/optimizely/bucketer.py index 24852100..dcfec3ea 100644 --- a/optimizely/bucketer.py +++ b/optimizely/bucketer.py @@ -13,10 +13,7 @@ import math -try: - import mmh3 -except ImportError: - from .lib import pymmh3 as mmh3 +from .lib import pymmh3 as mmh3 MAX_TRAFFIC_VALUE = 10000 diff --git a/requirements/core.txt b/requirements/core.txt index 4049419d..b343a2ee 100644 --- a/requirements/core.txt +++ b/requirements/core.txt @@ -1,7 +1,2 @@ jsonschema==3.2.0 -pyrsistent==0.16.0 -mmh3==2.5.1 -requests>=2.21 -pyOpenSSL>=19.1.0 -cryptography>=2.8.0 -idna>=2.10 \ No newline at end of file +requests>=2.21 \ No newline at end of file diff --git a/tests/test_bucketing.py b/tests/test_bucketing.py index fb71ba13..0c169803 100644 --- a/tests/test_bucketing.py +++ b/tests/test_bucketing.py @@ -12,7 +12,6 @@ # limitations under the License. import json -import mmh3 import mock import random @@ -20,7 +19,7 @@ from optimizely import entities from optimizely import logger from optimizely import optimizely -from optimizely.lib import pymmh3 +from optimizely.lib import pymmh3 as mmh3 from . import base From c293c97af9a39ca569c8104e45afd04713eb050f Mon Sep 17 00:00:00 2001 From: Jacob Brown Date: Thu, 21 Oct 2021 12:55:20 -0400 Subject: [PATCH 2/9] Update call from pymmh3 to mmh3 --- tests/test_bucketing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_bucketing.py b/tests/test_bucketing.py index 0c169803..e71ae8af 100644 --- a/tests/test_bucketing.py +++ b/tests/test_bucketing.py @@ -214,7 +214,7 @@ def test_hash_values(self): for i in range(10): random_value = str(random.random()) - self.assertEqual(mmh3.hash(random_value), pymmh3.hash(random_value)) + self.assertEqual(mmh3.hash(random_value), mmh3.hash(random_value)) class BucketerWithLoggingTest(base.BaseTest): From b259dcd7159f657a5dd6ffd1921f50ff7604787e Mon Sep 17 00:00:00 2001 From: Jacob Brown Date: Thu, 21 Oct 2021 13:29:59 -0400 Subject: [PATCH 3/9] Adding back in libs and will remove one by one. --- requirements/core.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/requirements/core.txt b/requirements/core.txt index b343a2ee..03b44e8a 100644 --- a/requirements/core.txt +++ b/requirements/core.txt @@ -1,2 +1,6 @@ jsonschema==3.2.0 -requests>=2.21 \ No newline at end of file +requests>=2.21 +pyrsistent==0.16.0 +pyOpenSSL>=19.1.0 +cryptography>=2.8.0 +idna>=2.10 \ No newline at end of file From 90720ca5b42ab67b009283ca4ed9a6c1629fbc5b Mon Sep 17 00:00:00 2001 From: Jacob Brown Date: Thu, 21 Oct 2021 13:50:56 -0400 Subject: [PATCH 4/9] remove idna lib --- requirements/core.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/requirements/core.txt b/requirements/core.txt index 03b44e8a..48a74442 100644 --- a/requirements/core.txt +++ b/requirements/core.txt @@ -2,5 +2,4 @@ jsonschema==3.2.0 requests>=2.21 pyrsistent==0.16.0 pyOpenSSL>=19.1.0 -cryptography>=2.8.0 -idna>=2.10 \ No newline at end of file +cryptography>=2.8.0 \ No newline at end of file From 057c2495e0691b49f2ce3d9e40d6adff1431e7ad Mon Sep 17 00:00:00 2001 From: Jacob Brown Date: Thu, 21 Oct 2021 14:57:27 -0400 Subject: [PATCH 5/9] remove cryptography --- requirements/core.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/requirements/core.txt b/requirements/core.txt index 48a74442..171a8edc 100644 --- a/requirements/core.txt +++ b/requirements/core.txt @@ -1,5 +1,4 @@ jsonschema==3.2.0 requests>=2.21 pyrsistent==0.16.0 -pyOpenSSL>=19.1.0 -cryptography>=2.8.0 \ No newline at end of file +pyOpenSSL>=19.1.0 \ No newline at end of file From bcffa0bd0c90158e31dbf1e9a2caf03cfab9aa0e Mon Sep 17 00:00:00 2001 From: Jacob Brown Date: Fri, 22 Oct 2021 08:19:40 -0400 Subject: [PATCH 6/9] Re-adding cryptography as pypy has issues and removing openSSL lib. --- requirements/core.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/core.txt b/requirements/core.txt index 171a8edc..9eaa0221 100644 --- a/requirements/core.txt +++ b/requirements/core.txt @@ -1,4 +1,4 @@ jsonschema==3.2.0 requests>=2.21 pyrsistent==0.16.0 -pyOpenSSL>=19.1.0 \ No newline at end of file +cryptography>=2.8.0 \ No newline at end of file From e092d9d53b98b7fd081da21ba6dee2fe874670f4 Mon Sep 17 00:00:00 2001 From: Jacob Brown Date: Fri, 22 Oct 2021 08:37:55 -0400 Subject: [PATCH 7/9] Removing pyrsistent as test --- requirements/core.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/requirements/core.txt b/requirements/core.txt index 9eaa0221..0d0e5f15 100644 --- a/requirements/core.txt +++ b/requirements/core.txt @@ -1,4 +1,3 @@ jsonschema==3.2.0 requests>=2.21 -pyrsistent==0.16.0 cryptography>=2.8.0 \ No newline at end of file From 33f14c032491391557d66935824ccf38cac72e3a Mon Sep 17 00:00:00 2001 From: Jacob Brown Date: Fri, 22 Oct 2021 09:02:28 -0400 Subject: [PATCH 8/9] Re-adding pyrsistent as it casues issues in python 3.4 and pypy with the jsonschema library when removed. --- requirements/core.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements/core.txt b/requirements/core.txt index 0d0e5f15..9eaa0221 100644 --- a/requirements/core.txt +++ b/requirements/core.txt @@ -1,3 +1,4 @@ jsonschema==3.2.0 requests>=2.21 +pyrsistent==0.16.0 cryptography>=2.8.0 \ No newline at end of file From 7d0ce979f1af334931362978f4f9868b1f3c40b3 Mon Sep 17 00:00:00 2001 From: Jake Brown Date: Tue, 26 Oct 2021 13:01:53 -0400 Subject: [PATCH 9/9] Update core.txt requirements to only ommit mmh3 --- requirements/core.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/requirements/core.txt b/requirements/core.txt index 9eaa0221..58d2e8e8 100644 --- a/requirements/core.txt +++ b/requirements/core.txt @@ -1,4 +1,6 @@ jsonschema==3.2.0 -requests>=2.21 pyrsistent==0.16.0 -cryptography>=2.8.0 \ No newline at end of file +requests>=2.21 +pyOpenSSL>=19.1.0 +cryptography>=2.8.0 +idna>=2.10 \ No newline at end of file