fix CBOR doesn't roundtrip integer types

This commit is contained in:
Tobias Oberstein 2015-12-13 16:34:09 +01:00
parent a771b54bc9
commit 727bf5a277
2 changed files with 4 additions and 2 deletions

View File

@ -120,7 +120,9 @@ class Serializer(object):
message_type = raw_msg[0]
if type(message_type) != int:
if type(message_type) not in six.integer_types:
# CBOR doesn't roundtrip number types
# https://bitbucket.org/bodhisnarkva/cbor/issues/6/number-types-dont-roundtrip
raise ProtocolError("invalid type {0} for WAMP message type".format(type(message_type)))
Klass = self.MESSAGE_TYPE_MAP.get(message_type)

View File

@ -122,7 +122,7 @@ extras_require_compress = [
#
extras_require_serialization = [
"msgpack-python>=0.4.6", # Apache 2.0 license
"cbor>=0.1.22" # Apache 2.0 license
"cbor>=0.1.23" # Apache 2.0 license
]
# everything