Thanks, this is a good improvement, to make cbor2 match CPython.
QUERY · ISSUE
Undefined function in CBOR library
enhancement
In CBOR library there are a couple of unidentified functions such as:
unpack_float16
def decode_float16(decoder):
payload = decoder.read(2)
return unpack_float16(payload)
and
undefined
special_decoders = {
20: lambda self: False,
21: lambda self: True,
22: lambda self: None,
23: lambda self: undefined,
24: decode_simple_value,
25: decode_float16,
26: decode_float32,
27: decode_float64,
31: lambda self: break_marker,
}
CANDIDATE · PULL REQUEST
Senml/cbor2 update.
This update deprecates the decoder and encoder module, to maintain compatibility with the CPython cbor2 on pypi. The cbor2 module should now be imported and used directly instead of the decoder/encoder modules, for example:
import cbor2
cbor2.dumps(...)
The senml library, which uses cbor2, is updated to use the new API.
1 comment
@iabdalkader hi Ibrahim, would you be able to take a look at this? Thanks
It seems it was not implemented in the original library, I have no idea why, but it should be easy to add.
Anyone want to make a MR for this functionality? :)