tmsgpack 0.2.13__tar.gz → 0.2.15__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ 0.2.15
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tmsgpack
3
- Version: 0.2.13
3
+ Version: 0.2.15
4
4
  Summary: Typed MessagePack serializer (inspired by but different from msgpack)
5
5
  Home-page: https://github.com/Yaakov-Belch/tmsgpack
6
6
  Author: Yaakov Belch
@@ -35,14 +35,14 @@ class BasicCodec(EncodeDecode):
35
35
  if codec_type is None: return self
36
36
  raise TMsgpackError(f'Unsupported codec_type: {codec_type}')
37
37
 
38
- def decompose_value(self, ectx):
38
+ def encode_value(self, ectx):
39
39
  raise TMsgpackError(f'Unsupported value: {ectx.value}')
40
40
 
41
- def value_from_bytes(self, obj_type, data: bytes):
42
- raise TMsgpackError(f'No bytes extension defined: {obj_type=} {data=}')
41
+ def decode_from_bytes(self, dctx):
42
+ raise TMsgpackError(f'No bytes extension defined: {dctx._type}')
43
43
 
44
- def value_from_list(self, obj_type, values: list):
45
- raise TMsgpackError(f'No tuple extension defined: {obj_type=} {values=}')
44
+ def decode_from_list(self, dctx):
45
+ raise TMsgpackError(f'No tuple extension defined: {dctx._type}')
46
46
 
47
47
 
48
48
  basic_codec = BasicCodec()
@@ -1555,7 +1555,7 @@ struct __pyx_obj_8tmsgpack_6cython_EncodeCtx {
1555
1555
 
1556
1556
 
1557
1557
  /* "tmsgpack/cython.pyx":211
1558
- * else: codec.decompose_value(ectx._v(value)); ectx._mark_use(True)
1558
+ * else: codec.encode_value(ectx._v(value)); ectx._mark_use(True)
1559
1559
  *
1560
1560
  * cdef class DecodeCtx: # <<<<<<<<<<<<<<
1561
1561
  * cdef readonly TMsgpackCodec codec
@@ -1647,7 +1647,7 @@ static struct __pyx_vtabstruct_8tmsgpack_6cython_EncodeCtx *__pyx_vtabptr_8tmsgp
1647
1647
 
1648
1648
 
1649
1649
  /* "tmsgpack/cython.pyx":211
1650
- * else: codec.decompose_value(ectx._v(value)); ectx._mark_use(True)
1650
+ * else: codec.encode_value(ectx._v(value)); ectx._mark_use(True)
1651
1651
  *
1652
1652
  * cdef class DecodeCtx: # <<<<<<<<<<<<<<
1653
1653
  * cdef readonly TMsgpackCodec codec
@@ -2730,7 +2730,7 @@ static const char __pyx_k_start[] = "start";
2730
2730
  static const char __pyx_k_state[] = "state";
2731
2731
  static const char __pyx_k_super[] = "super";
2732
2732
  static const char __pyx_k_value[] = "value";
2733
- static const char __pyx_k_0_2_13[] = "0.2.13";
2733
+ static const char __pyx_k_0_2_15[] = "0.2.15";
2734
2734
  static const char __pyx_k_dict_2[] = "_dict";
2735
2735
  static const char __pyx_k_enable[] = "enable";
2736
2736
  static const char __pyx_k_extend[] = "extend";
@@ -2796,6 +2796,7 @@ static const char __pyx_k_PickleError[] = "PickleError";
2796
2796
  static const char __pyx_k_mro_entries[] = "__mro_entries__";
2797
2797
  static const char __pyx_k_DecodeBuffer[] = "DecodeBuffer";
2798
2798
  static const char __pyx_k_EncodeBuffer[] = "EncodeBuffer";
2799
+ static const char __pyx_k_encode_value[] = "encode_value";
2799
2800
  static const char __pyx_k_initializing[] = "_initializing";
2800
2801
  static const char __pyx_k_is_coroutine[] = "_is_coroutine";
2801
2802
  static const char __pyx_k_put_sequence[] = "put_sequence";
@@ -2808,19 +2809,18 @@ static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
2808
2809
  static const char __pyx_k_ebuf_put_value[] = "ebuf_put_value";
2809
2810
  static const char __pyx_k_dbuf_take_value[] = "dbuf_take_value";
2810
2811
  static const char __pyx_k_dctx_used_twice[] = "dctx used twice.";
2811
- static const char __pyx_k_decompose_value[] = "decompose_value";
2812
2812
  static const char __pyx_k_ectx_used_twice[] = "ectx used twice.";
2813
2813
  static const char __pyx_k_pyx_PickleError[] = "__pyx_PickleError";
2814
2814
  static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
2815
2815
  static const char __pyx_k_tmsgpack_cython[] = "tmsgpack.cython";
2816
- static const char __pyx_k_value_from_list[] = "value_from_list";
2817
2816
  static const char __pyx_k_BaseDecodeBuffer[] = "BaseDecodeBuffer";
2818
2817
  static const char __pyx_k_BaseEncodeBuffer[] = "BaseEncodeBuffer";
2819
2818
  static const char __pyx_k_SafeDecodeBuffer[] = "SafeDecodeBuffer";
2820
2819
  static const char __pyx_k_SafeEncodeBuffer[] = "SafeEncodeBuffer";
2821
2820
  static const char __pyx_k_Undefined_opcode[] = "Undefined opcode: ";
2822
- static const char __pyx_k_value_from_bytes[] = "value_from_bytes";
2821
+ static const char __pyx_k_decode_from_list[] = "decode_from_list";
2823
2822
  static const char __pyx_k_dctx_was_not_used[] = "dctx was not used.";
2823
+ static const char __pyx_k_decode_from_bytes[] = "decode_from_bytes";
2824
2824
  static const char __pyx_k_ectx_was_not_used[] = "ectx was not used.";
2825
2825
  static const char __pyx_k_EncodeCtx_put_dict[] = "EncodeCtx.put_dict";
2826
2826
  static const char __pyx_k_asyncio_coroutines[] = "asyncio.coroutines";
@@ -3041,7 +3041,7 @@ typedef struct {
3041
3041
  PyTypeObject *__pyx_ptype_8tmsgpack_6cython_BaseDecodeBuffer;
3042
3042
  PyTypeObject *__pyx_ptype_8tmsgpack_6cython_SafeEncodeBuffer;
3043
3043
  PyTypeObject *__pyx_ptype_8tmsgpack_6cython_SafeDecodeBuffer;
3044
- PyObject *__pyx_kp_u_0_2_13;
3044
+ PyObject *__pyx_kp_u_0_2_15;
3045
3045
  PyObject *__pyx_kp_u_B;
3046
3046
  PyObject *__pyx_n_s_BaseDecodeBuffer;
3047
3047
  PyObject *__pyx_n_s_BaseDecodeBuffer___reduce_cython;
@@ -3138,7 +3138,8 @@ typedef struct {
3138
3138
  PyObject *__pyx_n_s_dbuf_take_value;
3139
3139
  PyObject *__pyx_kp_u_dctx_used_twice;
3140
3140
  PyObject *__pyx_kp_u_dctx_was_not_used;
3141
- PyObject *__pyx_n_s_decompose_value;
3141
+ PyObject *__pyx_n_s_decode_from_bytes;
3142
+ PyObject *__pyx_n_s_decode_from_list;
3142
3143
  PyObject *__pyx_n_s_dict;
3143
3144
  PyObject *__pyx_n_s_dict_2;
3144
3145
  PyObject *__pyx_kp_u_disable;
@@ -3148,6 +3149,7 @@ typedef struct {
3148
3149
  PyObject *__pyx_kp_u_ectx_used_twice;
3149
3150
  PyObject *__pyx_kp_u_ectx_was_not_used;
3150
3151
  PyObject *__pyx_kp_u_enable;
3152
+ PyObject *__pyx_n_s_encode_value;
3151
3153
  PyObject *__pyx_n_s_end;
3152
3154
  PyObject *__pyx_n_s_extend;
3153
3155
  PyObject *__pyx_kp_u_gc;
@@ -3232,8 +3234,6 @@ typedef struct {
3232
3234
  PyObject *__pyx_n_s_update;
3233
3235
  PyObject *__pyx_n_s_use_setstate;
3234
3236
  PyObject *__pyx_n_s_value;
3235
- PyObject *__pyx_n_s_value_from_bytes;
3236
- PyObject *__pyx_n_s_value_from_list;
3237
3237
  PyObject *__pyx_n_s_version;
3238
3238
  PyObject *__pyx_n_s_wr_bytes;
3239
3239
  PyObject *__pyx_n_s_wr_float8;
@@ -3394,7 +3394,7 @@ static int __pyx_m_clear(PyObject *m) {
3394
3394
  Py_CLEAR(clear_module_state->__pyx_type_8tmsgpack_6cython_SafeEncodeBuffer);
3395
3395
  Py_CLEAR(clear_module_state->__pyx_ptype_8tmsgpack_6cython_SafeDecodeBuffer);
3396
3396
  Py_CLEAR(clear_module_state->__pyx_type_8tmsgpack_6cython_SafeDecodeBuffer);
3397
- Py_CLEAR(clear_module_state->__pyx_kp_u_0_2_13);
3397
+ Py_CLEAR(clear_module_state->__pyx_kp_u_0_2_15);
3398
3398
  Py_CLEAR(clear_module_state->__pyx_kp_u_B);
3399
3399
  Py_CLEAR(clear_module_state->__pyx_n_s_BaseDecodeBuffer);
3400
3400
  Py_CLEAR(clear_module_state->__pyx_n_s_BaseDecodeBuffer___reduce_cython);
@@ -3491,7 +3491,8 @@ static int __pyx_m_clear(PyObject *m) {
3491
3491
  Py_CLEAR(clear_module_state->__pyx_n_s_dbuf_take_value);
3492
3492
  Py_CLEAR(clear_module_state->__pyx_kp_u_dctx_used_twice);
3493
3493
  Py_CLEAR(clear_module_state->__pyx_kp_u_dctx_was_not_used);
3494
- Py_CLEAR(clear_module_state->__pyx_n_s_decompose_value);
3494
+ Py_CLEAR(clear_module_state->__pyx_n_s_decode_from_bytes);
3495
+ Py_CLEAR(clear_module_state->__pyx_n_s_decode_from_list);
3495
3496
  Py_CLEAR(clear_module_state->__pyx_n_s_dict);
3496
3497
  Py_CLEAR(clear_module_state->__pyx_n_s_dict_2);
3497
3498
  Py_CLEAR(clear_module_state->__pyx_kp_u_disable);
@@ -3501,6 +3502,7 @@ static int __pyx_m_clear(PyObject *m) {
3501
3502
  Py_CLEAR(clear_module_state->__pyx_kp_u_ectx_used_twice);
3502
3503
  Py_CLEAR(clear_module_state->__pyx_kp_u_ectx_was_not_used);
3503
3504
  Py_CLEAR(clear_module_state->__pyx_kp_u_enable);
3505
+ Py_CLEAR(clear_module_state->__pyx_n_s_encode_value);
3504
3506
  Py_CLEAR(clear_module_state->__pyx_n_s_end);
3505
3507
  Py_CLEAR(clear_module_state->__pyx_n_s_extend);
3506
3508
  Py_CLEAR(clear_module_state->__pyx_kp_u_gc);
@@ -3585,8 +3587,6 @@ static int __pyx_m_clear(PyObject *m) {
3585
3587
  Py_CLEAR(clear_module_state->__pyx_n_s_update);
3586
3588
  Py_CLEAR(clear_module_state->__pyx_n_s_use_setstate);
3587
3589
  Py_CLEAR(clear_module_state->__pyx_n_s_value);
3588
- Py_CLEAR(clear_module_state->__pyx_n_s_value_from_bytes);
3589
- Py_CLEAR(clear_module_state->__pyx_n_s_value_from_list);
3590
3590
  Py_CLEAR(clear_module_state->__pyx_n_s_version);
3591
3591
  Py_CLEAR(clear_module_state->__pyx_n_s_wr_bytes);
3592
3592
  Py_CLEAR(clear_module_state->__pyx_n_s_wr_float8);
@@ -3725,7 +3725,7 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
3725
3725
  Py_VISIT(traverse_module_state->__pyx_type_8tmsgpack_6cython_SafeEncodeBuffer);
3726
3726
  Py_VISIT(traverse_module_state->__pyx_ptype_8tmsgpack_6cython_SafeDecodeBuffer);
3727
3727
  Py_VISIT(traverse_module_state->__pyx_type_8tmsgpack_6cython_SafeDecodeBuffer);
3728
- Py_VISIT(traverse_module_state->__pyx_kp_u_0_2_13);
3728
+ Py_VISIT(traverse_module_state->__pyx_kp_u_0_2_15);
3729
3729
  Py_VISIT(traverse_module_state->__pyx_kp_u_B);
3730
3730
  Py_VISIT(traverse_module_state->__pyx_n_s_BaseDecodeBuffer);
3731
3731
  Py_VISIT(traverse_module_state->__pyx_n_s_BaseDecodeBuffer___reduce_cython);
@@ -3822,7 +3822,8 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
3822
3822
  Py_VISIT(traverse_module_state->__pyx_n_s_dbuf_take_value);
3823
3823
  Py_VISIT(traverse_module_state->__pyx_kp_u_dctx_used_twice);
3824
3824
  Py_VISIT(traverse_module_state->__pyx_kp_u_dctx_was_not_used);
3825
- Py_VISIT(traverse_module_state->__pyx_n_s_decompose_value);
3825
+ Py_VISIT(traverse_module_state->__pyx_n_s_decode_from_bytes);
3826
+ Py_VISIT(traverse_module_state->__pyx_n_s_decode_from_list);
3826
3827
  Py_VISIT(traverse_module_state->__pyx_n_s_dict);
3827
3828
  Py_VISIT(traverse_module_state->__pyx_n_s_dict_2);
3828
3829
  Py_VISIT(traverse_module_state->__pyx_kp_u_disable);
@@ -3832,6 +3833,7 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
3832
3833
  Py_VISIT(traverse_module_state->__pyx_kp_u_ectx_used_twice);
3833
3834
  Py_VISIT(traverse_module_state->__pyx_kp_u_ectx_was_not_used);
3834
3835
  Py_VISIT(traverse_module_state->__pyx_kp_u_enable);
3836
+ Py_VISIT(traverse_module_state->__pyx_n_s_encode_value);
3835
3837
  Py_VISIT(traverse_module_state->__pyx_n_s_end);
3836
3838
  Py_VISIT(traverse_module_state->__pyx_n_s_extend);
3837
3839
  Py_VISIT(traverse_module_state->__pyx_kp_u_gc);
@@ -3916,8 +3918,6 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
3916
3918
  Py_VISIT(traverse_module_state->__pyx_n_s_update);
3917
3919
  Py_VISIT(traverse_module_state->__pyx_n_s_use_setstate);
3918
3920
  Py_VISIT(traverse_module_state->__pyx_n_s_value);
3919
- Py_VISIT(traverse_module_state->__pyx_n_s_value_from_bytes);
3920
- Py_VISIT(traverse_module_state->__pyx_n_s_value_from_list);
3921
3921
  Py_VISIT(traverse_module_state->__pyx_n_s_version);
3922
3922
  Py_VISIT(traverse_module_state->__pyx_n_s_wr_bytes);
3923
3923
  Py_VISIT(traverse_module_state->__pyx_n_s_wr_float8);
@@ -4084,7 +4084,7 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
4084
4084
  #define __pyx_ptype_8tmsgpack_6cython_BaseDecodeBuffer __pyx_mstate_global->__pyx_ptype_8tmsgpack_6cython_BaseDecodeBuffer
4085
4085
  #define __pyx_ptype_8tmsgpack_6cython_SafeEncodeBuffer __pyx_mstate_global->__pyx_ptype_8tmsgpack_6cython_SafeEncodeBuffer
4086
4086
  #define __pyx_ptype_8tmsgpack_6cython_SafeDecodeBuffer __pyx_mstate_global->__pyx_ptype_8tmsgpack_6cython_SafeDecodeBuffer
4087
- #define __pyx_kp_u_0_2_13 __pyx_mstate_global->__pyx_kp_u_0_2_13
4087
+ #define __pyx_kp_u_0_2_15 __pyx_mstate_global->__pyx_kp_u_0_2_15
4088
4088
  #define __pyx_kp_u_B __pyx_mstate_global->__pyx_kp_u_B
4089
4089
  #define __pyx_n_s_BaseDecodeBuffer __pyx_mstate_global->__pyx_n_s_BaseDecodeBuffer
4090
4090
  #define __pyx_n_s_BaseDecodeBuffer___reduce_cython __pyx_mstate_global->__pyx_n_s_BaseDecodeBuffer___reduce_cython
@@ -4181,7 +4181,8 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
4181
4181
  #define __pyx_n_s_dbuf_take_value __pyx_mstate_global->__pyx_n_s_dbuf_take_value
4182
4182
  #define __pyx_kp_u_dctx_used_twice __pyx_mstate_global->__pyx_kp_u_dctx_used_twice
4183
4183
  #define __pyx_kp_u_dctx_was_not_used __pyx_mstate_global->__pyx_kp_u_dctx_was_not_used
4184
- #define __pyx_n_s_decompose_value __pyx_mstate_global->__pyx_n_s_decompose_value
4184
+ #define __pyx_n_s_decode_from_bytes __pyx_mstate_global->__pyx_n_s_decode_from_bytes
4185
+ #define __pyx_n_s_decode_from_list __pyx_mstate_global->__pyx_n_s_decode_from_list
4185
4186
  #define __pyx_n_s_dict __pyx_mstate_global->__pyx_n_s_dict
4186
4187
  #define __pyx_n_s_dict_2 __pyx_mstate_global->__pyx_n_s_dict_2
4187
4188
  #define __pyx_kp_u_disable __pyx_mstate_global->__pyx_kp_u_disable
@@ -4191,6 +4192,7 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
4191
4192
  #define __pyx_kp_u_ectx_used_twice __pyx_mstate_global->__pyx_kp_u_ectx_used_twice
4192
4193
  #define __pyx_kp_u_ectx_was_not_used __pyx_mstate_global->__pyx_kp_u_ectx_was_not_used
4193
4194
  #define __pyx_kp_u_enable __pyx_mstate_global->__pyx_kp_u_enable
4195
+ #define __pyx_n_s_encode_value __pyx_mstate_global->__pyx_n_s_encode_value
4194
4196
  #define __pyx_n_s_end __pyx_mstate_global->__pyx_n_s_end
4195
4197
  #define __pyx_n_s_extend __pyx_mstate_global->__pyx_n_s_extend
4196
4198
  #define __pyx_kp_u_gc __pyx_mstate_global->__pyx_kp_u_gc
@@ -4275,8 +4277,6 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
4275
4277
  #define __pyx_n_s_update __pyx_mstate_global->__pyx_n_s_update
4276
4278
  #define __pyx_n_s_use_setstate __pyx_mstate_global->__pyx_n_s_use_setstate
4277
4279
  #define __pyx_n_s_value __pyx_mstate_global->__pyx_n_s_value
4278
- #define __pyx_n_s_value_from_bytes __pyx_mstate_global->__pyx_n_s_value_from_bytes
4279
- #define __pyx_n_s_value_from_list __pyx_mstate_global->__pyx_n_s_value_from_list
4280
4280
  #define __pyx_n_s_version __pyx_mstate_global->__pyx_n_s_version
4281
4281
  #define __pyx_n_s_wr_bytes __pyx_mstate_global->__pyx_n_s_wr_bytes
4282
4282
  #define __pyx_n_s_wr_float8 __pyx_mstate_global->__pyx_n_s_wr_float8
@@ -7506,7 +7506,7 @@ static PyObject *__pyx_f_8tmsgpack_6cython_ectx_put_value(struct __pyx_obj_8tmsg
7506
7506
  * elif t is tuple: ectx._v(None).put_sequence(True, value)
7507
7507
  * elif t is list: ectx._v(None).put_sequence(False, value) # <<<<<<<<<<<<<<
7508
7508
  * elif t is dict: ectx._v(None).put_dict(None, value, codec.sort_keys)
7509
- * else: codec.decompose_value(ectx._v(value)); ectx._mark_use(True)
7509
+ * else: codec.encode_value(ectx._v(value)); ectx._mark_use(True)
7510
7510
  */
7511
7511
  __pyx_t_2 = (__pyx_v_t == ((PyObject *)(&PyList_Type)));
7512
7512
  if (__pyx_t_2) {
@@ -7545,7 +7545,7 @@ static PyObject *__pyx_f_8tmsgpack_6cython_ectx_put_value(struct __pyx_obj_8tmsg
7545
7545
  * elif t is tuple: ectx._v(None).put_sequence(True, value)
7546
7546
  * elif t is list: ectx._v(None).put_sequence(False, value)
7547
7547
  * elif t is dict: ectx._v(None).put_dict(None, value, codec.sort_keys) # <<<<<<<<<<<<<<
7548
- * else: codec.decompose_value(ectx._v(value)); ectx._mark_use(True)
7548
+ * else: codec.encode_value(ectx._v(value)); ectx._mark_use(True)
7549
7549
  *
7550
7550
  */
7551
7551
  __pyx_t_2 = (__pyx_v_t == ((PyObject *)(&PyDict_Type)));
@@ -7587,12 +7587,12 @@ static PyObject *__pyx_f_8tmsgpack_6cython_ectx_put_value(struct __pyx_obj_8tmsg
7587
7587
  /* "tmsgpack/cython.pyx":209
7588
7588
  * elif t is list: ectx._v(None).put_sequence(False, value)
7589
7589
  * elif t is dict: ectx._v(None).put_dict(None, value, codec.sort_keys)
7590
- * else: codec.decompose_value(ectx._v(value)); ectx._mark_use(True) # <<<<<<<<<<<<<<
7590
+ * else: codec.encode_value(ectx._v(value)); ectx._mark_use(True) # <<<<<<<<<<<<<<
7591
7591
  *
7592
7592
  * cdef class DecodeCtx:
7593
7593
  */
7594
7594
  /*else*/ {
7595
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_codec), __pyx_n_s_decompose_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 209, __pyx_L1_error)
7595
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_codec), __pyx_n_s_encode_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 209, __pyx_L1_error)
7596
7596
  __Pyx_GOTREF(__pyx_t_1);
7597
7597
  __pyx_t_8 = ((struct __pyx_vtabstruct_8tmsgpack_6cython_EncodeCtx *)__pyx_v_ectx->__pyx_vtab)->_v(__pyx_v_ectx, __pyx_v_value); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 209, __pyx_L1_error)
7598
7598
  __Pyx_GOTREF(__pyx_t_8);
@@ -10026,7 +10026,7 @@ static PyObject *__pyx_f_8tmsgpack_6cython_dctx_take_value(struct __pyx_obj_8tms
10026
10026
  * if _type is True: return dctx._ltb(_len, _type, False).take_tuple()
10027
10027
  * if _type is False: return dctx._ltb(_len, _type, False).take_list() # <<<<<<<<<<<<<<
10028
10028
  * if _type is None: return dctx._ltb(_len, _type, False).take_dict()
10029
- * result = codec.value_from_list(dctx._ltb(_len, _type, False))
10029
+ * result = codec.decode_from_list(dctx._ltb(_len, _type, False))
10030
10030
  */
10031
10031
  __pyx_t_4 = (__pyx_v__type == Py_False);
10032
10032
  if (__pyx_t_4) {
@@ -10070,7 +10070,7 @@ static PyObject *__pyx_f_8tmsgpack_6cython_dctx_take_value(struct __pyx_obj_8tms
10070
10070
  * if _type is True: return dctx._ltb(_len, _type, False).take_tuple()
10071
10071
  * if _type is False: return dctx._ltb(_len, _type, False).take_list()
10072
10072
  * if _type is None: return dctx._ltb(_len, _type, False).take_dict() # <<<<<<<<<<<<<<
10073
- * result = codec.value_from_list(dctx._ltb(_len, _type, False))
10073
+ * result = codec.decode_from_list(dctx._ltb(_len, _type, False))
10074
10074
  * dctx._mark_use(True)
10075
10075
  */
10076
10076
  __pyx_t_4 = (__pyx_v__type == Py_None);
@@ -10114,11 +10114,11 @@ static PyObject *__pyx_f_8tmsgpack_6cython_dctx_take_value(struct __pyx_obj_8tms
10114
10114
  /* "tmsgpack/cython.pyx":304
10115
10115
  * if _type is False: return dctx._ltb(_len, _type, False).take_list()
10116
10116
  * if _type is None: return dctx._ltb(_len, _type, False).take_dict()
10117
- * result = codec.value_from_list(dctx._ltb(_len, _type, False)) # <<<<<<<<<<<<<<
10117
+ * result = codec.decode_from_list(dctx._ltb(_len, _type, False)) # <<<<<<<<<<<<<<
10118
10118
  * dctx._mark_use(True)
10119
10119
  * return result
10120
10120
  */
10121
- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_codec), __pyx_n_s_value_from_list); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 304, __pyx_L1_error)
10121
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_codec), __pyx_n_s_decode_from_list); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 304, __pyx_L1_error)
10122
10122
  __Pyx_GOTREF(__pyx_t_5);
10123
10123
  __pyx_t_6 = __Pyx_PyInt_From_uint64_t(__pyx_v__len); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 304, __pyx_L1_error)
10124
10124
  __Pyx_GOTREF(__pyx_t_6);
@@ -10153,7 +10153,7 @@ static PyObject *__pyx_f_8tmsgpack_6cython_dctx_take_value(struct __pyx_obj_8tms
10153
10153
 
10154
10154
  /* "tmsgpack/cython.pyx":305
10155
10155
  * if _type is None: return dctx._ltb(_len, _type, False).take_dict()
10156
- * result = codec.value_from_list(dctx._ltb(_len, _type, False))
10156
+ * result = codec.decode_from_list(dctx._ltb(_len, _type, False))
10157
10157
  * dctx._mark_use(True) # <<<<<<<<<<<<<<
10158
10158
  * return result
10159
10159
  *
@@ -10163,7 +10163,7 @@ static PyObject *__pyx_f_8tmsgpack_6cython_dctx_take_value(struct __pyx_obj_8tms
10163
10163
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10164
10164
 
10165
10165
  /* "tmsgpack/cython.pyx":306
10166
- * result = codec.value_from_list(dctx._ltb(_len, _type, False))
10166
+ * result = codec.decode_from_list(dctx._ltb(_len, _type, False))
10167
10167
  * dctx._mark_use(True)
10168
10168
  * return result # <<<<<<<<<<<<<<
10169
10169
  *
@@ -10272,7 +10272,7 @@ static PyObject *__pyx_f_8tmsgpack_6cython_dctx_take_value(struct __pyx_obj_8tms
10272
10272
  * _type = dbuf_take_value(codec, dbuf)
10273
10273
  *
10274
10274
  * if _type is True: return dctx._ltb(_len, _type, True).take_bytes() # <<<<<<<<<<<<<<
10275
- * result = codec.value_from_bytes(dctx._ltb(_len, _type, True))
10275
+ * result = codec.decode_from_bytes(dctx._ltb(_len, _type, True))
10276
10276
  * dctx._mark_use(True)
10277
10277
  */
10278
10278
  __pyx_t_4 = (__pyx_v__type == Py_True);
@@ -10316,11 +10316,11 @@ static PyObject *__pyx_f_8tmsgpack_6cython_dctx_take_value(struct __pyx_obj_8tms
10316
10316
  /* "tmsgpack/cython.pyx":318
10317
10317
  *
10318
10318
  * if _type is True: return dctx._ltb(_len, _type, True).take_bytes()
10319
- * result = codec.value_from_bytes(dctx._ltb(_len, _type, True)) # <<<<<<<<<<<<<<
10319
+ * result = codec.decode_from_bytes(dctx._ltb(_len, _type, True)) # <<<<<<<<<<<<<<
10320
10320
  * dctx._mark_use(True)
10321
10321
  * return result
10322
10322
  */
10323
- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_codec), __pyx_n_s_value_from_bytes); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 318, __pyx_L1_error)
10323
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_codec), __pyx_n_s_decode_from_bytes); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 318, __pyx_L1_error)
10324
10324
  __Pyx_GOTREF(__pyx_t_5);
10325
10325
  __pyx_t_7 = __Pyx_PyInt_From_uint64_t(__pyx_v__len); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 318, __pyx_L1_error)
10326
10326
  __Pyx_GOTREF(__pyx_t_7);
@@ -10355,7 +10355,7 @@ static PyObject *__pyx_f_8tmsgpack_6cython_dctx_take_value(struct __pyx_obj_8tms
10355
10355
 
10356
10356
  /* "tmsgpack/cython.pyx":319
10357
10357
  * if _type is True: return dctx._ltb(_len, _type, True).take_bytes()
10358
- * result = codec.value_from_bytes(dctx._ltb(_len, _type, True))
10358
+ * result = codec.decode_from_bytes(dctx._ltb(_len, _type, True))
10359
10359
  * dctx._mark_use(True) # <<<<<<<<<<<<<<
10360
10360
  * return result
10361
10361
  *
@@ -10365,7 +10365,7 @@ static PyObject *__pyx_f_8tmsgpack_6cython_dctx_take_value(struct __pyx_obj_8tms
10365
10365
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10366
10366
 
10367
10367
  /* "tmsgpack/cython.pyx":320
10368
- * result = codec.value_from_bytes(dctx._ltb(_len, _type, True))
10368
+ * result = codec.decode_from_bytes(dctx._ltb(_len, _type, True))
10369
10369
  * dctx._mark_use(True)
10370
10370
  * return result # <<<<<<<<<<<<<<
10371
10371
  *
@@ -25214,7 +25214,7 @@ static PyMethodDef __pyx_methods[] = {
25214
25214
 
25215
25215
  static int __Pyx_CreateStringTabAndInitStrings(void) {
25216
25216
  __Pyx_StringTabEntry __pyx_string_tab[] = {
25217
- {&__pyx_kp_u_0_2_13, __pyx_k_0_2_13, sizeof(__pyx_k_0_2_13), 0, 1, 0, 0},
25217
+ {&__pyx_kp_u_0_2_15, __pyx_k_0_2_15, sizeof(__pyx_k_0_2_15), 0, 1, 0, 0},
25218
25218
  {&__pyx_kp_u_B, __pyx_k_B, sizeof(__pyx_k_B), 0, 1, 0, 0},
25219
25219
  {&__pyx_n_s_BaseDecodeBuffer, __pyx_k_BaseDecodeBuffer, sizeof(__pyx_k_BaseDecodeBuffer), 0, 0, 1, 1},
25220
25220
  {&__pyx_n_s_BaseDecodeBuffer___reduce_cython, __pyx_k_BaseDecodeBuffer___reduce_cython, sizeof(__pyx_k_BaseDecodeBuffer___reduce_cython), 0, 0, 1, 1},
@@ -25311,7 +25311,8 @@ static int __Pyx_CreateStringTabAndInitStrings(void) {
25311
25311
  {&__pyx_n_s_dbuf_take_value, __pyx_k_dbuf_take_value, sizeof(__pyx_k_dbuf_take_value), 0, 0, 1, 1},
25312
25312
  {&__pyx_kp_u_dctx_used_twice, __pyx_k_dctx_used_twice, sizeof(__pyx_k_dctx_used_twice), 0, 1, 0, 0},
25313
25313
  {&__pyx_kp_u_dctx_was_not_used, __pyx_k_dctx_was_not_used, sizeof(__pyx_k_dctx_was_not_used), 0, 1, 0, 0},
25314
- {&__pyx_n_s_decompose_value, __pyx_k_decompose_value, sizeof(__pyx_k_decompose_value), 0, 0, 1, 1},
25314
+ {&__pyx_n_s_decode_from_bytes, __pyx_k_decode_from_bytes, sizeof(__pyx_k_decode_from_bytes), 0, 0, 1, 1},
25315
+ {&__pyx_n_s_decode_from_list, __pyx_k_decode_from_list, sizeof(__pyx_k_decode_from_list), 0, 0, 1, 1},
25315
25316
  {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1},
25316
25317
  {&__pyx_n_s_dict_2, __pyx_k_dict_2, sizeof(__pyx_k_dict_2), 0, 0, 1, 1},
25317
25318
  {&__pyx_kp_u_disable, __pyx_k_disable, sizeof(__pyx_k_disable), 0, 1, 0, 0},
@@ -25321,6 +25322,7 @@ static int __Pyx_CreateStringTabAndInitStrings(void) {
25321
25322
  {&__pyx_kp_u_ectx_used_twice, __pyx_k_ectx_used_twice, sizeof(__pyx_k_ectx_used_twice), 0, 1, 0, 0},
25322
25323
  {&__pyx_kp_u_ectx_was_not_used, __pyx_k_ectx_was_not_used, sizeof(__pyx_k_ectx_was_not_used), 0, 1, 0, 0},
25323
25324
  {&__pyx_kp_u_enable, __pyx_k_enable, sizeof(__pyx_k_enable), 0, 1, 0, 0},
25325
+ {&__pyx_n_s_encode_value, __pyx_k_encode_value, sizeof(__pyx_k_encode_value), 0, 0, 1, 1},
25324
25326
  {&__pyx_n_s_end, __pyx_k_end, sizeof(__pyx_k_end), 0, 0, 1, 1},
25325
25327
  {&__pyx_n_s_extend, __pyx_k_extend, sizeof(__pyx_k_extend), 0, 0, 1, 1},
25326
25328
  {&__pyx_kp_u_gc, __pyx_k_gc, sizeof(__pyx_k_gc), 0, 1, 0, 0},
@@ -25405,8 +25407,6 @@ static int __Pyx_CreateStringTabAndInitStrings(void) {
25405
25407
  {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1},
25406
25408
  {&__pyx_n_s_use_setstate, __pyx_k_use_setstate, sizeof(__pyx_k_use_setstate), 0, 0, 1, 1},
25407
25409
  {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1},
25408
- {&__pyx_n_s_value_from_bytes, __pyx_k_value_from_bytes, sizeof(__pyx_k_value_from_bytes), 0, 0, 1, 1},
25409
- {&__pyx_n_s_value_from_list, __pyx_k_value_from_list, sizeof(__pyx_k_value_from_list), 0, 0, 1, 1},
25410
25410
  {&__pyx_n_s_version, __pyx_k_version, sizeof(__pyx_k_version), 0, 0, 1, 1},
25411
25411
  {&__pyx_n_s_wr_bytes, __pyx_k_wr_bytes, sizeof(__pyx_k_wr_bytes), 0, 0, 1, 1},
25412
25412
  {&__pyx_n_s_wr_float8, __pyx_k_wr_float8, sizeof(__pyx_k_wr_float8), 0, 0, 1, 1},
@@ -26681,11 +26681,11 @@ if (!__Pyx_RefNanny) {
26681
26681
  /* "tmsgpack/cython.pyx":4
26682
26682
  * # DON'T EDIT THIS FILE. EDIT THE SOURCES, INSTEAD: tmsgpack/src-parts/[inserted by cython to avoid comment start]*
26683
26683
  *
26684
- * __version__ = "0.2.13" # <<<<<<<<<<<<<<
26684
+ * __version__ = "0.2.15" # <<<<<<<<<<<<<<
26685
26685
  *
26686
26686
  * from libc.stdint cimport int8_t, int16_t, int32_t, int64_t
26687
26687
  */
26688
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_version, __pyx_kp_u_0_2_13) < 0) __PYX_ERR(1, 4, __pyx_L1_error)
26688
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_version, __pyx_kp_u_0_2_15) < 0) __PYX_ERR(1, 4, __pyx_L1_error)
26689
26689
 
26690
26690
  /* "tmsgpack/cython.pyx":13
26691
26691
  * ctypedef double float64_t
@@ -1,7 +1,7 @@
1
1
  # THIS FILE IS AUTOMATICALLY CREATED BY THE test-run.sh SCRIPT!
2
2
  # DON'T EDIT THIS FILE. EDIT THE SOURCES, INSTEAD: tmsgpack/src-parts/*
3
3
 
4
- __version__ = "0.2.13"
4
+ __version__ = "0.2.15"
5
5
 
6
6
  from libc.stdint cimport int8_t, int16_t, int32_t, int64_t
7
7
  from libc.stdint cimport uint8_t, uint16_t, uint32_t, uint64_t
@@ -206,7 +206,7 @@ cdef ectx_put_value(EncodeCtx ectx, object value):
206
206
  elif t is tuple: ectx._v(None).put_sequence(True, value)
207
207
  elif t is list: ectx._v(None).put_sequence(False, value)
208
208
  elif t is dict: ectx._v(None).put_dict(None, value, codec.sort_keys)
209
- else: codec.decompose_value(ectx._v(value)); ectx._mark_use(True)
209
+ else: codec.encode_value(ectx._v(value)); ectx._mark_use(True)
210
210
 
211
211
  cdef class DecodeCtx:
212
212
  cdef readonly TMsgpackCodec codec
@@ -301,7 +301,7 @@ cdef dctx_take_value(DecodeCtx dctx):
301
301
  if _type is True: return dctx._ltb(_len, _type, False).take_tuple()
302
302
  if _type is False: return dctx._ltb(_len, _type, False).take_list()
303
303
  if _type is None: return dctx._ltb(_len, _type, False).take_dict()
304
- result = codec.value_from_list(dctx._ltb(_len, _type, False))
304
+ result = codec.decode_from_list(dctx._ltb(_len, _type, False))
305
305
  dctx._mark_use(True)
306
306
  return result
307
307
 
@@ -315,7 +315,7 @@ cdef dctx_take_value(DecodeCtx dctx):
315
315
  _type = dbuf_take_value(codec, dbuf)
316
316
 
317
317
  if _type is True: return dctx._ltb(_len, _type, True).take_bytes()
318
- result = codec.value_from_bytes(dctx._ltb(_len, _type, True))
318
+ result = codec.decode_from_bytes(dctx._ltb(_len, _type, True))
319
319
  dctx._mark_use(True)
320
320
  return result
321
321
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tmsgpack
3
- Version: 0.2.13
3
+ Version: 0.2.15
4
4
  Summary: Typed MessagePack serializer (inspired by but different from msgpack)
5
5
  Home-page: https://github.com/Yaakov-Belch/tmsgpack
6
6
  Author: Yaakov Belch
@@ -1 +0,0 @@
1
- 0.2.13
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes