Loading CHANGES.md +1 −0 Original line number Diff line number Diff line Loading @@ -8,6 +8,7 @@ This section will document changes to the library since the last release ## New features - Added timeout, time_quanta, priority and early_exit support - Pin size added to limits - SHA1 calculation used as default on puts when algorithm and tag not specified. Changes from 0.7.3 to 0.8.0 =========================== Loading kinetic/operations.py +8 −2 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ from common import KineticMessageException import common import kinetic_pb2 as messages import logging import hashlib LOG = logging.getLogger(__name__) Loading @@ -47,8 +48,13 @@ def _buildMessage(m, messageType, key, data=None, version='', new_version='', m.body.keyValue.tag = tag m.body.keyValue.algorithm = algorithm elif messageType == messages.Command.PUT: # check the data type first if data and (isinstance(data, str) or isinstance(data, bytes) or isinstance(data, bytearray)): # default to sha1 m.body.keyValue.tag = hashlib.sha1(data).digest() m.body.keyValue.algorithm = common.IntegrityAlgorithms.SHA1 else: m.body.keyValue.tag = 'l337' m.body.keyValue.algorithm = 1 # nacho: should be change to a value over 100 if synchronization: m.body.keyValue.synchronization = synchronization if version: Loading Loading
CHANGES.md +1 −0 Original line number Diff line number Diff line Loading @@ -8,6 +8,7 @@ This section will document changes to the library since the last release ## New features - Added timeout, time_quanta, priority and early_exit support - Pin size added to limits - SHA1 calculation used as default on puts when algorithm and tag not specified. Changes from 0.7.3 to 0.8.0 =========================== Loading
kinetic/operations.py +8 −2 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ from common import KineticMessageException import common import kinetic_pb2 as messages import logging import hashlib LOG = logging.getLogger(__name__) Loading @@ -47,8 +48,13 @@ def _buildMessage(m, messageType, key, data=None, version='', new_version='', m.body.keyValue.tag = tag m.body.keyValue.algorithm = algorithm elif messageType == messages.Command.PUT: # check the data type first if data and (isinstance(data, str) or isinstance(data, bytes) or isinstance(data, bytearray)): # default to sha1 m.body.keyValue.tag = hashlib.sha1(data).digest() m.body.keyValue.algorithm = common.IntegrityAlgorithms.SHA1 else: m.body.keyValue.tag = 'l337' m.body.keyValue.algorithm = 1 # nacho: should be change to a value over 100 if synchronization: m.body.keyValue.synchronization = synchronization if version: Loading