Skip to content

Commit

Permalink
Merge 057c249 into 5420c7c
Browse files Browse the repository at this point in the history
  • Loading branch information
The-inside-man committed Oct 21, 2021
2 parents 5420c7c + 057c249 commit 7534657
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 12 deletions.
5 changes: 1 addition & 4 deletions optimizely/bucketer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 2 additions & 5 deletions requirements/core.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
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
pyrsistent==0.16.0
pyOpenSSL>=19.1.0
5 changes: 2 additions & 3 deletions tests/test_bucketing.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,14 @@
# limitations under the License.

import json
import mmh3
import mock
import random

from optimizely import bucketer
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

Expand Down Expand Up @@ -215,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):
Expand Down

0 comments on commit 7534657

Please sign in to comment.