From fcaeb399d9aecbc840c62fbaf3c7b6b46541a4b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juli=C3=A1n=20Cort=C3=A9s?= Date: Mon, 20 Jul 2020 17:04:03 -0500 Subject: [PATCH] feat: added choices param to field --- nyoibo/fields.c | 1971 +++++++++++++++++++++++++----------------- nyoibo/fields.pxd | 1 + nyoibo/fields.pyx | 7 +- tests/test_entity.py | 15 + tests/test_fields.py | 2 +- 5 files changed, 1179 insertions(+), 817 deletions(-) diff --git a/nyoibo/fields.c b/nyoibo/fields.c index d09ec18..f9871a9 100644 --- a/nyoibo/fields.c +++ b/nyoibo/fields.c @@ -852,10 +852,11 @@ struct __pyx_obj_6nyoibo_6fields_Field { PyObject *default_value; PyObject *private; PyObject *immutable; + PyObject *choices; }; -/* "nyoibo/fields.pxd":9 +/* "nyoibo/fields.pxd":10 * * * cdef class LinkField(Field): # <<<<<<<<<<<<<< @@ -867,7 +868,7 @@ struct __pyx_obj_6nyoibo_6fields_LinkField { }; -/* "nyoibo/fields.pyx":20 +/* "nyoibo/fields.pyx":25 * * * cdef class StrField(Field): # <<<<<<<<<<<<<< @@ -879,7 +880,7 @@ struct __pyx_obj_6nyoibo_6fields_StrField { }; -/* "nyoibo/fields.pyx":25 +/* "nyoibo/fields.pyx":30 * * * cdef class IntField(Field): # <<<<<<<<<<<<<< @@ -891,7 +892,7 @@ struct __pyx_obj_6nyoibo_6fields_IntField { }; -/* "nyoibo/fields.pyx":39 +/* "nyoibo/fields.pyx":44 * * * cdef class BoolField(Field): # <<<<<<<<<<<<<< @@ -903,7 +904,7 @@ struct __pyx_obj_6nyoibo_6fields_BoolField { }; -/* "nyoibo/fields.pyx":49 +/* "nyoibo/fields.pyx":54 * * * cdef class DateField(Field): # <<<<<<<<<<<<<< @@ -915,7 +916,7 @@ struct __pyx_obj_6nyoibo_6fields_DateField { }; -/* "nyoibo/fields.pyx":59 +/* "nyoibo/fields.pyx":64 * * * cdef class DatetimeField(Field): # <<<<<<<<<<<<<< @@ -927,7 +928,7 @@ struct __pyx_obj_6nyoibo_6fields_DatetimeField { }; -/* "nyoibo/fields.pyx":69 +/* "nyoibo/fields.pyx":74 * * * cdef class FloatField(Field): # <<<<<<<<<<<<<< @@ -939,7 +940,7 @@ struct __pyx_obj_6nyoibo_6fields_FloatField { }; -/* "nyoibo/fields.pyx":74 +/* "nyoibo/fields.pyx":79 * * * cdef class DecimalField(Field): # <<<<<<<<<<<<<< @@ -966,7 +967,7 @@ struct __pyx_vtabstruct_6nyoibo_6fields_Field { static struct __pyx_vtabstruct_6nyoibo_6fields_Field *__pyx_vtabptr_6nyoibo_6fields_Field; -/* "nyoibo/fields.pyx":79 +/* "nyoibo/fields.pyx":84 * * * cdef class LinkField(Field): # <<<<<<<<<<<<<< @@ -980,7 +981,7 @@ struct __pyx_vtabstruct_6nyoibo_6fields_LinkField { static struct __pyx_vtabstruct_6nyoibo_6fields_LinkField *__pyx_vtabptr_6nyoibo_6fields_LinkField; -/* "nyoibo/fields.pyx":20 +/* "nyoibo/fields.pyx":25 * * * cdef class StrField(Field): # <<<<<<<<<<<<<< @@ -994,7 +995,7 @@ struct __pyx_vtabstruct_6nyoibo_6fields_StrField { static struct __pyx_vtabstruct_6nyoibo_6fields_StrField *__pyx_vtabptr_6nyoibo_6fields_StrField; -/* "nyoibo/fields.pyx":25 +/* "nyoibo/fields.pyx":30 * * * cdef class IntField(Field): # <<<<<<<<<<<<<< @@ -1008,7 +1009,7 @@ struct __pyx_vtabstruct_6nyoibo_6fields_IntField { static struct __pyx_vtabstruct_6nyoibo_6fields_IntField *__pyx_vtabptr_6nyoibo_6fields_IntField; -/* "nyoibo/fields.pyx":39 +/* "nyoibo/fields.pyx":44 * * * cdef class BoolField(Field): # <<<<<<<<<<<<<< @@ -1022,7 +1023,7 @@ struct __pyx_vtabstruct_6nyoibo_6fields_BoolField { static struct __pyx_vtabstruct_6nyoibo_6fields_BoolField *__pyx_vtabptr_6nyoibo_6fields_BoolField; -/* "nyoibo/fields.pyx":49 +/* "nyoibo/fields.pyx":54 * * * cdef class DateField(Field): # <<<<<<<<<<<<<< @@ -1036,7 +1037,7 @@ struct __pyx_vtabstruct_6nyoibo_6fields_DateField { static struct __pyx_vtabstruct_6nyoibo_6fields_DateField *__pyx_vtabptr_6nyoibo_6fields_DateField; -/* "nyoibo/fields.pyx":59 +/* "nyoibo/fields.pyx":64 * * * cdef class DatetimeField(Field): # <<<<<<<<<<<<<< @@ -1050,7 +1051,7 @@ struct __pyx_vtabstruct_6nyoibo_6fields_DatetimeField { static struct __pyx_vtabstruct_6nyoibo_6fields_DatetimeField *__pyx_vtabptr_6nyoibo_6fields_DatetimeField; -/* "nyoibo/fields.pyx":69 +/* "nyoibo/fields.pyx":74 * * * cdef class FloatField(Field): # <<<<<<<<<<<<<< @@ -1064,7 +1065,7 @@ struct __pyx_vtabstruct_6nyoibo_6fields_FloatField { static struct __pyx_vtabstruct_6nyoibo_6fields_FloatField *__pyx_vtabptr_6nyoibo_6fields_FloatField; -/* "nyoibo/fields.pyx":74 +/* "nyoibo/fields.pyx":79 * * * cdef class DecimalField(Field): # <<<<<<<<<<<<<< @@ -1478,6 +1479,7 @@ static const char __pyx_k_pickle[] = "pickle"; static const char __pyx_k_reduce[] = "__reduce__"; static const char __pyx_k_update[] = "update"; static const char __pyx_k_Decimal[] = "Decimal"; +static const char __pyx_k_choices[] = "choices"; static const char __pyx_k_decimal[] = "decimal"; static const char __pyx_k_private[] = "private"; static const char __pyx_k_IntField[] = "IntField"; @@ -1517,8 +1519,8 @@ static const char __pyx_k_pyx_unpickle_LinkField[] = "__pyx_unpickle_LinkField"; static const char __pyx_k_pyx_unpickle_FloatField[] = "__pyx_unpickle_FloatField"; static const char __pyx_k_pyx_unpickle_DecimalField[] = "__pyx_unpickle_DecimalField"; static const char __pyx_k_pyx_unpickle_DatetimeField[] = "__pyx_unpickle_DatetimeField"; -static const char __pyx_k_Incompatible_checksums_s_vs_0x00[] = "Incompatible checksums (%s vs 0x0077a4c = (default_value, immutable, private))"; -static const char __pyx_k_Incompatible_checksums_s_vs_0x2b[] = "Incompatible checksums (%s vs 0x2bdffb3 = (default_value, immutable, private, to))"; +static const char __pyx_k_Incompatible_checksums_s_vs_0x22[] = "Incompatible checksums (%s vs 0x22a05d2 = (choices, default_value, immutable, private, to))"; +static const char __pyx_k_Incompatible_checksums_s_vs_0x82[] = "Incompatible checksums (%s vs 0x82d92b6 = (choices, default_value, immutable, private))"; static PyObject *__pyx_n_s_BoolField; static PyObject *__pyx_n_s_DateField; static PyObject *__pyx_n_s_DatetimeField; @@ -1527,12 +1529,13 @@ static PyObject *__pyx_n_s_DecimalField; static PyObject *__pyx_n_u_False; static PyObject *__pyx_n_s_Field; static PyObject *__pyx_n_s_FloatField; -static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x00; -static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x2b; +static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x22; +static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x82; static PyObject *__pyx_n_s_IntField; static PyObject *__pyx_n_s_LinkField; static PyObject *__pyx_n_s_PickleError; static PyObject *__pyx_n_s_StrField; +static PyObject *__pyx_n_s_choices; static PyObject *__pyx_n_s_cline_in_traceback; static PyObject *__pyx_n_s_date; static PyObject *__pyx_n_s_datetime; @@ -1578,11 +1581,12 @@ static PyObject *__pyx_n_s_super; static PyObject *__pyx_n_s_test; static PyObject *__pyx_n_s_to; static PyObject *__pyx_n_s_update; -static int __pyx_pf_6nyoibo_6fields_5Field___init__(struct __pyx_obj_6nyoibo_6fields_Field *__pyx_v_self, PyObject *__pyx_v_default_value, PyObject *__pyx_v_private, PyObject *__pyx_v_immutable); /* proto */ +static int __pyx_pf_6nyoibo_6fields_5Field___init__(struct __pyx_obj_6nyoibo_6fields_Field *__pyx_v_self, PyObject *__pyx_v_default_value, PyObject *__pyx_v_private, PyObject *__pyx_v_immutable, PyObject *__pyx_v_choices); /* proto */ static PyObject *__pyx_pf_6nyoibo_6fields_5Field_2parse(struct __pyx_obj_6nyoibo_6fields_Field *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_6nyoibo_6fields_5Field_13default_value___get__(struct __pyx_obj_6nyoibo_6fields_Field *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6nyoibo_6fields_5Field_7private___get__(struct __pyx_obj_6nyoibo_6fields_Field *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6nyoibo_6fields_5Field_9immutable___get__(struct __pyx_obj_6nyoibo_6fields_Field *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6nyoibo_6fields_5Field_7choices___get__(struct __pyx_obj_6nyoibo_6fields_Field *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6nyoibo_6fields_5Field_4__reduce_cython__(struct __pyx_obj_6nyoibo_6fields_Field *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6nyoibo_6fields_5Field_6__setstate_cython__(struct __pyx_obj_6nyoibo_6fields_Field *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_6nyoibo_6fields_8StrField___reduce_cython__(struct __pyx_obj_6nyoibo_6fields_StrField *__pyx_v_self); /* proto */ @@ -1626,8 +1630,8 @@ static PyObject *__pyx_tp_new_6nyoibo_6fields_DateField(PyTypeObject *t, PyObjec static PyObject *__pyx_tp_new_6nyoibo_6fields_DatetimeField(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6nyoibo_6fields_FloatField(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6nyoibo_6fields_DecimalField(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_int_490060; -static PyObject *__pyx_int_46006195; +static PyObject *__pyx_int_36308434; +static PyObject *__pyx_int_137204406; static PyObject *__pyx_tuple_; static PyObject *__pyx_tuple__3; static PyObject *__pyx_tuple__5; @@ -1651,9 +1655,9 @@ static PyObject *__pyx_codeobj__18; /* "nyoibo/fields.pyx":9 * _internal_type = None * - * def __init__(self, default_value=None, private=False, immutable=True): # <<<<<<<<<<<<<< + * def __init__(self, default_value=None, private=False, immutable=True, # <<<<<<<<<<<<<< + * choices=None): * self.default_value = default_value - * self.private = private */ /* Python wrapper */ @@ -1662,6 +1666,7 @@ static int __pyx_pw_6nyoibo_6fields_5Field_1__init__(PyObject *__pyx_v_self, PyO PyObject *__pyx_v_default_value = 0; PyObject *__pyx_v_private = 0; PyObject *__pyx_v_immutable = 0; + PyObject *__pyx_v_choices = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -1669,15 +1674,26 @@ static int __pyx_pw_6nyoibo_6fields_5Field_1__init__(PyObject *__pyx_v_self, PyO __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_default_value,&__pyx_n_s_private,&__pyx_n_s_immutable,0}; - PyObject* values[3] = {0,0,0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_default_value,&__pyx_n_s_private,&__pyx_n_s_immutable,&__pyx_n_s_choices,0}; + PyObject* values[4] = {0,0,0,0}; values[0] = ((PyObject *)Py_None); values[1] = ((PyObject *)Py_False); values[2] = ((PyObject *)Py_True); + + /* "nyoibo/fields.pyx":10 + * + * def __init__(self, default_value=None, private=False, immutable=True, + * choices=None): # <<<<<<<<<<<<<< + * self.default_value = default_value + * self.private = private + */ + values[3] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); @@ -1706,12 +1722,20 @@ static int __pyx_pw_6nyoibo_6fields_5Field_1__init__(PyObject *__pyx_v_self, PyO PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_immutable); if (value) { values[2] = value; kw_args--; } } + CYTHON_FALLTHROUGH; + case 3: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_choices); + if (value) { values[3] = value; kw_args--; } + } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 9, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); @@ -1725,30 +1749,39 @@ static int __pyx_pw_6nyoibo_6fields_5Field_1__init__(PyObject *__pyx_v_self, PyO __pyx_v_default_value = values[0]; __pyx_v_private = values[1]; __pyx_v_immutable = values[2]; + __pyx_v_choices = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 9, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 9, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("nyoibo.fields.Field.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_6nyoibo_6fields_5Field___init__(((struct __pyx_obj_6nyoibo_6fields_Field *)__pyx_v_self), __pyx_v_default_value, __pyx_v_private, __pyx_v_immutable); + __pyx_r = __pyx_pf_6nyoibo_6fields_5Field___init__(((struct __pyx_obj_6nyoibo_6fields_Field *)__pyx_v_self), __pyx_v_default_value, __pyx_v_private, __pyx_v_immutable, __pyx_v_choices); + + /* "nyoibo/fields.pyx":9 + * _internal_type = None + * + * def __init__(self, default_value=None, private=False, immutable=True, # <<<<<<<<<<<<<< + * choices=None): + * self.default_value = default_value + */ /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static int __pyx_pf_6nyoibo_6fields_5Field___init__(struct __pyx_obj_6nyoibo_6fields_Field *__pyx_v_self, PyObject *__pyx_v_default_value, PyObject *__pyx_v_private, PyObject *__pyx_v_immutable) { +static int __pyx_pf_6nyoibo_6fields_5Field___init__(struct __pyx_obj_6nyoibo_6fields_Field *__pyx_v_self, PyObject *__pyx_v_default_value, PyObject *__pyx_v_private, PyObject *__pyx_v_immutable, PyObject *__pyx_v_choices) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__", 0); - /* "nyoibo/fields.pyx":10 - * - * def __init__(self, default_value=None, private=False, immutable=True): + /* "nyoibo/fields.pyx":11 + * def __init__(self, default_value=None, private=False, immutable=True, + * choices=None): * self.default_value = default_value # <<<<<<<<<<<<<< * self.private = private * self.immutable = immutable @@ -1759,12 +1792,12 @@ static int __pyx_pf_6nyoibo_6fields_5Field___init__(struct __pyx_obj_6nyoibo_6fi __Pyx_DECREF(__pyx_v_self->default_value); __pyx_v_self->default_value = __pyx_v_default_value; - /* "nyoibo/fields.pyx":11 - * def __init__(self, default_value=None, private=False, immutable=True): + /* "nyoibo/fields.pyx":12 + * choices=None): * self.default_value = default_value * self.private = private # <<<<<<<<<<<<<< * self.immutable = immutable - * + * self.choices = choices */ __Pyx_INCREF(__pyx_v_private); __Pyx_GIVEREF(__pyx_v_private); @@ -1772,12 +1805,12 @@ static int __pyx_pf_6nyoibo_6fields_5Field___init__(struct __pyx_obj_6nyoibo_6fi __Pyx_DECREF(__pyx_v_self->private); __pyx_v_self->private = __pyx_v_private; - /* "nyoibo/fields.pyx":12 + /* "nyoibo/fields.pyx":13 * self.default_value = default_value * self.private = private * self.immutable = immutable # <<<<<<<<<<<<<< + * self.choices = choices * - * cpdef public parse(self, value): */ __Pyx_INCREF(__pyx_v_immutable); __Pyx_GIVEREF(__pyx_v_immutable); @@ -1785,12 +1818,25 @@ static int __pyx_pf_6nyoibo_6fields_5Field___init__(struct __pyx_obj_6nyoibo_6fi __Pyx_DECREF(__pyx_v_self->immutable); __pyx_v_self->immutable = __pyx_v_immutable; + /* "nyoibo/fields.pyx":14 + * self.private = private + * self.immutable = immutable + * self.choices = choices # <<<<<<<<<<<<<< + * + * cpdef public parse(self, value): + */ + __Pyx_INCREF(__pyx_v_choices); + __Pyx_GIVEREF(__pyx_v_choices); + __Pyx_GOTREF(__pyx_v_self->choices); + __Pyx_DECREF(__pyx_v_self->choices); + __pyx_v_self->choices = __pyx_v_choices; + /* "nyoibo/fields.pyx":9 * _internal_type = None * - * def __init__(self, default_value=None, private=False, immutable=True): # <<<<<<<<<<<<<< + * def __init__(self, default_value=None, private=False, immutable=True, # <<<<<<<<<<<<<< + * choices=None): * self.default_value = default_value - * self.private = private */ /* function exit code */ @@ -1799,12 +1845,12 @@ static int __pyx_pf_6nyoibo_6fields_5Field___init__(struct __pyx_obj_6nyoibo_6fi return __pyx_r; } -/* "nyoibo/fields.pyx":14 - * self.immutable = immutable +/* "nyoibo/fields.pyx":16 + * self.choices = choices * * cpdef public parse(self, value): # <<<<<<<<<<<<<< - * if value is None or type(value) is self._internal_type: - * return value + * if value and self.choices: + * return self.choices(value) */ static PyObject *__pyx_pw_6nyoibo_6fields_5Field_3parse(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ @@ -1831,7 +1877,7 @@ PyObject *__pyx_f_6nyoibo_6fields_5Field_parse(struct __pyx_obj_6nyoibo_6fields_ if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_parse); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_parse); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 16, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6nyoibo_6fields_5Field_3parse)) { __Pyx_XDECREF(__pyx_r); @@ -1848,7 +1894,7 @@ PyObject *__pyx_f_6nyoibo_6fields_5Field_parse(struct __pyx_obj_6nyoibo_6fields_ } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_value); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 14, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 16, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; @@ -1869,9 +1915,64 @@ PyObject *__pyx_f_6nyoibo_6fields_5Field_parse(struct __pyx_obj_6nyoibo_6fields_ #endif } - /* "nyoibo/fields.pyx":15 + /* "nyoibo/fields.pyx":17 + * + * cpdef public parse(self, value): + * if value and self.choices: # <<<<<<<<<<<<<< + * return self.choices(value) + * + */ + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 17, __pyx_L1_error) + if (__pyx_t_6) { + } else { + __pyx_t_5 = __pyx_t_6; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_self->choices); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 17, __pyx_L1_error) + __pyx_t_5 = __pyx_t_6; + __pyx_L4_bool_binop_done:; + if (__pyx_t_5) { + + /* "nyoibo/fields.pyx":18 + * cpdef public parse(self, value): + * if value and self.choices: + * return self.choices(value) # <<<<<<<<<<<<<< + * + * if value is None or type(value) is self._internal_type: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->choices); + __pyx_t_2 = __pyx_v_self->choices; __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 18, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "nyoibo/fields.pyx":17 * * cpdef public parse(self, value): + * if value and self.choices: # <<<<<<<<<<<<<< + * return self.choices(value) + * + */ + } + + /* "nyoibo/fields.pyx":20 + * return self.choices(value) + * * if value is None or type(value) is self._internal_type: # <<<<<<<<<<<<<< * return value * return self._internal_type(value) @@ -1881,19 +1982,19 @@ PyObject *__pyx_f_6nyoibo_6fields_5Field_parse(struct __pyx_obj_6nyoibo_6fields_ if (!__pyx_t_7) { } else { __pyx_t_5 = __pyx_t_7; - goto __pyx_L4_bool_binop_done; + goto __pyx_L7_bool_binop_done; } - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_internal_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_internal_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 20, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = (((PyObject *)Py_TYPE(__pyx_v_value)) == __pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_6 = (__pyx_t_7 != 0); __pyx_t_5 = __pyx_t_6; - __pyx_L4_bool_binop_done:; + __pyx_L7_bool_binop_done:; if (__pyx_t_5) { - /* "nyoibo/fields.pyx":16 - * cpdef public parse(self, value): + /* "nyoibo/fields.pyx":21 + * * if value is None or type(value) is self._internal_type: * return value # <<<<<<<<<<<<<< * return self._internal_type(value) @@ -1904,16 +2005,16 @@ PyObject *__pyx_f_6nyoibo_6fields_5Field_parse(struct __pyx_obj_6nyoibo_6fields_ __pyx_r = __pyx_v_value; goto __pyx_L0; - /* "nyoibo/fields.pyx":15 + /* "nyoibo/fields.pyx":20 + * return self.choices(value) * - * cpdef public parse(self, value): * if value is None or type(value) is self._internal_type: # <<<<<<<<<<<<<< * return value * return self._internal_type(value) */ } - /* "nyoibo/fields.pyx":17 + /* "nyoibo/fields.pyx":22 * if value is None or type(value) is self._internal_type: * return value * return self._internal_type(value) # <<<<<<<<<<<<<< @@ -1921,7 +2022,7 @@ PyObject *__pyx_f_6nyoibo_6fields_5Field_parse(struct __pyx_obj_6nyoibo_6fields_ * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_internal_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 17, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_internal_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 22, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -1935,19 +2036,19 @@ PyObject *__pyx_f_6nyoibo_6fields_5Field_parse(struct __pyx_obj_6nyoibo_6fields_ } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 17, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 22, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "nyoibo/fields.pyx":14 - * self.immutable = immutable + /* "nyoibo/fields.pyx":16 + * self.choices = choices * * cpdef public parse(self, value): # <<<<<<<<<<<<<< - * if value is None or type(value) is self._internal_type: - * return value + * if value and self.choices: + * return self.choices(value) */ /* function exit code */ @@ -1986,7 +2087,7 @@ static PyObject *__pyx_pf_6nyoibo_6fields_5Field_2parse(struct __pyx_obj_6nyoibo int __pyx_clineno = 0; __Pyx_RefNannySetupContext("parse", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_6nyoibo_6fields_5Field_parse(__pyx_v_self, __pyx_v_value, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14, __pyx_L1_error) + __pyx_t_1 = __pyx_f_6nyoibo_6fields_5Field_parse(__pyx_v_self, __pyx_v_value, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 16, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -2045,7 +2146,7 @@ static PyObject *__pyx_pf_6nyoibo_6fields_5Field_13default_value___get__(struct * cdef readonly default_value * cdef readonly private # <<<<<<<<<<<<<< * cdef readonly immutable - * cpdef public parse(self, value) + * cdef readonly choices */ /* Python wrapper */ @@ -2081,8 +2182,8 @@ static PyObject *__pyx_pf_6nyoibo_6fields_5Field_7private___get__(struct __pyx_o * cdef readonly default_value * cdef readonly private * cdef readonly immutable # <<<<<<<<<<<<<< + * cdef readonly choices * cpdef public parse(self, value) - * */ /* Python wrapper */ @@ -2114,6 +2215,43 @@ static PyObject *__pyx_pf_6nyoibo_6fields_5Field_9immutable___get__(struct __pyx return __pyx_r; } +/* "nyoibo/fields.pxd":6 + * cdef readonly private + * cdef readonly immutable + * cdef readonly choices # <<<<<<<<<<<<<< + * cpdef public parse(self, value) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6nyoibo_6fields_5Field_7choices_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6nyoibo_6fields_5Field_7choices_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6nyoibo_6fields_5Field_7choices___get__(((struct __pyx_obj_6nyoibo_6fields_Field *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6nyoibo_6fields_5Field_7choices___get__(struct __pyx_obj_6nyoibo_6fields_Field *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->choices); + __pyx_r = __pyx_v_self->choices; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state @@ -2153,27 +2291,30 @@ static PyObject *__pyx_pf_6nyoibo_6fields_5Field_4__reduce_cython__(struct __pyx /* "(tree fragment)":5 * cdef object _dict * cdef bint use_setstate - * state = (self.default_value, self.immutable, self.private) # <<<<<<<<<<<<<< + * state = (self.choices, self.default_value, self.immutable, self.private) # <<<<<<<<<<<<<< * _dict = getattr(self, '__dict__', None) * if _dict is not None: */ - __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_self->choices); + __Pyx_GIVEREF(__pyx_v_self->choices); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->choices); __Pyx_INCREF(__pyx_v_self->default_value); __Pyx_GIVEREF(__pyx_v_self->default_value); - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->default_value); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->default_value); __Pyx_INCREF(__pyx_v_self->immutable); __Pyx_GIVEREF(__pyx_v_self->immutable); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->immutable); + PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->immutable); __Pyx_INCREF(__pyx_v_self->private); __Pyx_GIVEREF(__pyx_v_self->private); - PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->private); + PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_self->private); __pyx_v_state = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":6 * cdef bint use_setstate - * state = (self.default_value, self.immutable, self.private) + * state = (self.choices, self.default_value, self.immutable, self.private) * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< * if _dict is not None: * state += (_dict,) @@ -2184,7 +2325,7 @@ static PyObject *__pyx_pf_6nyoibo_6fields_5Field_4__reduce_cython__(struct __pyx __pyx_t_1 = 0; /* "(tree fragment)":7 - * state = (self.default_value, self.immutable, self.private) + * state = (self.choices, self.default_value, self.immutable, self.private) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) @@ -2217,12 +2358,12 @@ static PyObject *__pyx_pf_6nyoibo_6fields_5Field_4__reduce_cython__(struct __pyx * state += (_dict,) * use_setstate = True # <<<<<<<<<<<<<< * else: - * use_setstate = self.default_value is not None or self.immutable is not None or self.private is not None + * use_setstate = self.choices is not None or self.default_value is not None or self.immutable is not None or self.private is not None */ __pyx_v_use_setstate = 1; /* "(tree fragment)":7 - * state = (self.default_value, self.immutable, self.private) + * state = (self.choices, self.default_value, self.immutable, self.private) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) @@ -2234,28 +2375,35 @@ static PyObject *__pyx_pf_6nyoibo_6fields_5Field_4__reduce_cython__(struct __pyx /* "(tree fragment)":11 * use_setstate = True * else: - * use_setstate = self.default_value is not None or self.immutable is not None or self.private is not None # <<<<<<<<<<<<<< + * use_setstate = self.choices is not None or self.default_value is not None or self.immutable is not None or self.private is not None # <<<<<<<<<<<<<< * if use_setstate: - * return __pyx_unpickle_Field, (type(self), 0x0077a4c, None), state + * return __pyx_unpickle_Field, (type(self), 0x82d92b6, None), state */ /*else*/ { - __pyx_t_2 = (__pyx_v_self->default_value != Py_None); + __pyx_t_2 = (__pyx_v_self->choices != Py_None); __pyx_t_5 = (__pyx_t_2 != 0); if (!__pyx_t_5) { } else { __pyx_t_3 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } - __pyx_t_5 = (__pyx_v_self->immutable != Py_None); + __pyx_t_5 = (__pyx_v_self->default_value != Py_None); __pyx_t_2 = (__pyx_t_5 != 0); if (!__pyx_t_2) { } else { __pyx_t_3 = __pyx_t_2; goto __pyx_L4_bool_binop_done; } - __pyx_t_2 = (__pyx_v_self->private != Py_None); + __pyx_t_2 = (__pyx_v_self->immutable != Py_None); __pyx_t_5 = (__pyx_t_2 != 0); - __pyx_t_3 = __pyx_t_5; + if (!__pyx_t_5) { + } else { + __pyx_t_3 = __pyx_t_5; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->private != Py_None); + __pyx_t_2 = (__pyx_t_5 != 0); + __pyx_t_3 = __pyx_t_2; __pyx_L4_bool_binop_done:; __pyx_v_use_setstate = __pyx_t_3; } @@ -2263,20 +2411,20 @@ static PyObject *__pyx_pf_6nyoibo_6fields_5Field_4__reduce_cython__(struct __pyx /* "(tree fragment)":12 * else: - * use_setstate = self.default_value is not None or self.immutable is not None or self.private is not None + * use_setstate = self.choices is not None or self.default_value is not None or self.immutable is not None or self.private is not None * if use_setstate: # <<<<<<<<<<<<<< - * return __pyx_unpickle_Field, (type(self), 0x0077a4c, None), state + * return __pyx_unpickle_Field, (type(self), 0x82d92b6, None), state * else: */ __pyx_t_3 = (__pyx_v_use_setstate != 0); if (__pyx_t_3) { /* "(tree fragment)":13 - * use_setstate = self.default_value is not None or self.immutable is not None or self.private is not None + * use_setstate = self.choices is not None or self.default_value is not None or self.immutable is not None or self.private is not None * if use_setstate: - * return __pyx_unpickle_Field, (type(self), 0x0077a4c, None), state # <<<<<<<<<<<<<< + * return __pyx_unpickle_Field, (type(self), 0x82d92b6, None), state # <<<<<<<<<<<<<< * else: - * return __pyx_unpickle_Field, (type(self), 0x0077a4c, state) + * return __pyx_unpickle_Field, (type(self), 0x82d92b6, state) */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_Field); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error) @@ -2286,9 +2434,9 @@ static PyObject *__pyx_pf_6nyoibo_6fields_5Field_4__reduce_cython__(struct __pyx __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); - __Pyx_INCREF(__pyx_int_490060); - __Pyx_GIVEREF(__pyx_int_490060); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_490060); + __Pyx_INCREF(__pyx_int_137204406); + __Pyx_GIVEREF(__pyx_int_137204406); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_137204406); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None); @@ -2309,17 +2457,17 @@ static PyObject *__pyx_pf_6nyoibo_6fields_5Field_4__reduce_cython__(struct __pyx /* "(tree fragment)":12 * else: - * use_setstate = self.default_value is not None or self.immutable is not None or self.private is not None + * use_setstate = self.choices is not None or self.default_value is not None or self.immutable is not None or self.private is not None * if use_setstate: # <<<<<<<<<<<<<< - * return __pyx_unpickle_Field, (type(self), 0x0077a4c, None), state + * return __pyx_unpickle_Field, (type(self), 0x82d92b6, None), state * else: */ } /* "(tree fragment)":15 - * return __pyx_unpickle_Field, (type(self), 0x0077a4c, None), state + * return __pyx_unpickle_Field, (type(self), 0x82d92b6, None), state * else: - * return __pyx_unpickle_Field, (type(self), 0x0077a4c, state) # <<<<<<<<<<<<<< + * return __pyx_unpickle_Field, (type(self), 0x82d92b6, state) # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_Field__set_state(self, __pyx_state) */ @@ -2332,9 +2480,9 @@ static PyObject *__pyx_pf_6nyoibo_6fields_5Field_4__reduce_cython__(struct __pyx __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); - __Pyx_INCREF(__pyx_int_490060); - __Pyx_GIVEREF(__pyx_int_490060); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_490060); + __Pyx_INCREF(__pyx_int_137204406); + __Pyx_GIVEREF(__pyx_int_137204406); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_137204406); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state); @@ -2374,7 +2522,7 @@ static PyObject *__pyx_pf_6nyoibo_6fields_5Field_4__reduce_cython__(struct __pyx /* "(tree fragment)":16 * else: - * return __pyx_unpickle_Field, (type(self), 0x0077a4c, state) + * return __pyx_unpickle_Field, (type(self), 0x82d92b6, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_Field__set_state(self, __pyx_state) */ @@ -2402,7 +2550,7 @@ static PyObject *__pyx_pf_6nyoibo_6fields_5Field_6__setstate_cython__(struct __p __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":17 - * return __pyx_unpickle_Field, (type(self), 0x0077a4c, state) + * return __pyx_unpickle_Field, (type(self), 0x82d92b6, state) * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_Field__set_state(self, __pyx_state) # <<<<<<<<<<<<<< */ @@ -2413,7 +2561,7 @@ static PyObject *__pyx_pf_6nyoibo_6fields_5Field_6__setstate_cython__(struct __p /* "(tree fragment)":16 * else: - * return __pyx_unpickle_Field, (type(self), 0x0077a4c, state) + * return __pyx_unpickle_Field, (type(self), 0x82d92b6, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_Field__set_state(self, __pyx_state) */ @@ -2470,27 +2618,30 @@ static PyObject *__pyx_pf_6nyoibo_6fields_8StrField___reduce_cython__(struct __p /* "(tree fragment)":5 * cdef object _dict * cdef bint use_setstate - * state = (self.default_value, self.immutable, self.private) # <<<<<<<<<<<<<< + * state = (self.choices, self.default_value, self.immutable, self.private) # <<<<<<<<<<<<<< * _dict = getattr(self, '__dict__', None) * if _dict is not None: */ - __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_self->__pyx_base.choices); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.choices); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->__pyx_base.choices); __Pyx_INCREF(__pyx_v_self->__pyx_base.default_value); __Pyx_GIVEREF(__pyx_v_self->__pyx_base.default_value); - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->__pyx_base.default_value); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->__pyx_base.default_value); __Pyx_INCREF(__pyx_v_self->__pyx_base.immutable); __Pyx_GIVEREF(__pyx_v_self->__pyx_base.immutable); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->__pyx_base.immutable); + PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->__pyx_base.immutable); __Pyx_INCREF(__pyx_v_self->__pyx_base.private); __Pyx_GIVEREF(__pyx_v_self->__pyx_base.private); - PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->__pyx_base.private); + PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_self->__pyx_base.private); __pyx_v_state = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":6 * cdef bint use_setstate - * state = (self.default_value, self.immutable, self.private) + * state = (self.choices, self.default_value, self.immutable, self.private) * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< * if _dict is not None: * state += (_dict,) @@ -2501,7 +2652,7 @@ static PyObject *__pyx_pf_6nyoibo_6fields_8StrField___reduce_cython__(struct __p __pyx_t_1 = 0; /* "(tree fragment)":7 - * state = (self.default_value, self.immutable, self.private) + * state = (self.choices, self.default_value, self.immutable, self.private) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) @@ -2534,12 +2685,12 @@ static PyObject *__pyx_pf_6nyoibo_6fields_8StrField___reduce_cython__(struct __p * state += (_dict,) * use_setstate = True # <<<<<<<<<<<<<< * else: - * use_setstate = self.default_value is not None or self.immutable is not None or self.private is not None + * use_setstate = self.choices is not None or self.default_value is not None or self.immutable is not None or self.private is not None */ __pyx_v_use_setstate = 1; /* "(tree fragment)":7 - * state = (self.default_value, self.immutable, self.private) + * state = (self.choices, self.default_value, self.immutable, self.private) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) @@ -2551,28 +2702,35 @@ static PyObject *__pyx_pf_6nyoibo_6fields_8StrField___reduce_cython__(struct __p /* "(tree fragment)":11 * use_setstate = True * else: - * use_setstate = self.default_value is not None or self.immutable is not None or self.private is not None # <<<<<<<<<<<<<< + * use_setstate = self.choices is not None or self.default_value is not None or self.immutable is not None or self.private is not None # <<<<<<<<<<<<<< * if use_setstate: - * return __pyx_unpickle_StrField, (type(self), 0x0077a4c, None), state + * return __pyx_unpickle_StrField, (type(self), 0x82d92b6, None), state */ /*else*/ { - __pyx_t_2 = (__pyx_v_self->__pyx_base.default_value != Py_None); + __pyx_t_2 = (__pyx_v_self->__pyx_base.choices != Py_None); __pyx_t_5 = (__pyx_t_2 != 0); if (!__pyx_t_5) { } else { __pyx_t_3 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } - __pyx_t_5 = (__pyx_v_self->__pyx_base.immutable != Py_None); + __pyx_t_5 = (__pyx_v_self->__pyx_base.default_value != Py_None); __pyx_t_2 = (__pyx_t_5 != 0); if (!__pyx_t_2) { } else { __pyx_t_3 = __pyx_t_2; goto __pyx_L4_bool_binop_done; } - __pyx_t_2 = (__pyx_v_self->__pyx_base.private != Py_None); + __pyx_t_2 = (__pyx_v_self->__pyx_base.immutable != Py_None); __pyx_t_5 = (__pyx_t_2 != 0); - __pyx_t_3 = __pyx_t_5; + if (!__pyx_t_5) { + } else { + __pyx_t_3 = __pyx_t_5; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.private != Py_None); + __pyx_t_2 = (__pyx_t_5 != 0); + __pyx_t_3 = __pyx_t_2; __pyx_L4_bool_binop_done:; __pyx_v_use_setstate = __pyx_t_3; } @@ -2580,20 +2738,20 @@ static PyObject *__pyx_pf_6nyoibo_6fields_8StrField___reduce_cython__(struct __p /* "(tree fragment)":12 * else: - * use_setstate = self.default_value is not None or self.immutable is not None or self.private is not None + * use_setstate = self.choices is not None or self.default_value is not None or self.immutable is not None or self.private is not None * if use_setstate: # <<<<<<<<<<<<<< - * return __pyx_unpickle_StrField, (type(self), 0x0077a4c, None), state + * return __pyx_unpickle_StrField, (type(self), 0x82d92b6, None), state * else: */ __pyx_t_3 = (__pyx_v_use_setstate != 0); if (__pyx_t_3) { /* "(tree fragment)":13 - * use_setstate = self.default_value is not None or self.immutable is not None or self.private is not None + * use_setstate = self.choices is not None or self.default_value is not None or self.immutable is not None or self.private is not None * if use_setstate: - * return __pyx_unpickle_StrField, (type(self), 0x0077a4c, None), state # <<<<<<<<<<<<<< + * return __pyx_unpickle_StrField, (type(self), 0x82d92b6, None), state # <<<<<<<<<<<<<< * else: - * return __pyx_unpickle_StrField, (type(self), 0x0077a4c, state) + * return __pyx_unpickle_StrField, (type(self), 0x82d92b6, state) */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_StrField); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error) @@ -2603,9 +2761,9 @@ static PyObject *__pyx_pf_6nyoibo_6fields_8StrField___reduce_cython__(struct __p __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); - __Pyx_INCREF(__pyx_int_490060); - __Pyx_GIVEREF(__pyx_int_490060); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_490060); + __Pyx_INCREF(__pyx_int_137204406); + __Pyx_GIVEREF(__pyx_int_137204406); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_137204406); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None); @@ -2626,17 +2784,17 @@ static PyObject *__pyx_pf_6nyoibo_6fields_8StrField___reduce_cython__(struct __p /* "(tree fragment)":12 * else: - * use_setstate = self.default_value is not None or self.immutable is not None or self.private is not None + * use_setstate = self.choices is not None or self.default_value is not None or self.immutable is not None or self.private is not None * if use_setstate: # <<<<<<<<<<<<<< - * return __pyx_unpickle_StrField, (type(self), 0x0077a4c, None), state + * return __pyx_unpickle_StrField, (type(self), 0x82d92b6, None), state * else: */ } /* "(tree fragment)":15 - * return __pyx_unpickle_StrField, (type(self), 0x0077a4c, None), state + * return __pyx_unpickle_StrField, (type(self), 0x82d92b6, None), state * else: - * return __pyx_unpickle_StrField, (type(self), 0x0077a4c, state) # <<<<<<<<<<<<<< + * return __pyx_unpickle_StrField, (type(self), 0x82d92b6, state) # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_StrField__set_state(self, __pyx_state) */ @@ -2649,9 +2807,9 @@ static PyObject *__pyx_pf_6nyoibo_6fields_8StrField___reduce_cython__(struct __p __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); - __Pyx_INCREF(__pyx_int_490060); - __Pyx_GIVEREF(__pyx_int_490060); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_490060); + __Pyx_INCREF(__pyx_int_137204406); + __Pyx_GIVEREF(__pyx_int_137204406); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_137204406); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state); @@ -2691,7 +2849,7 @@ static PyObject *__pyx_pf_6nyoibo_6fields_8StrField___reduce_cython__(struct __p /* "(tree fragment)":16 * else: - * return __pyx_unpickle_StrField, (type(self), 0x0077a4c, state) + * return __pyx_unpickle_StrField, (type(self), 0x82d92b6, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_StrField__set_state(self, __pyx_state) */ @@ -2719,7 +2877,7 @@ static PyObject *__pyx_pf_6nyoibo_6fields_8StrField_2__setstate_cython__(struct __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":17 - * return __pyx_unpickle_StrField, (type(self), 0x0077a4c, state) + * return __pyx_unpickle_StrField, (type(self), 0x82d92b6, state) * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_StrField__set_state(self, __pyx_state) # <<<<<<<<<<<<<< */ @@ -2730,7 +2888,7 @@ static PyObject *__pyx_pf_6nyoibo_6fields_8StrField_2__setstate_cython__(struct /* "(tree fragment)":16 * else: - * return __pyx_unpickle_StrField, (type(self), 0x0077a4c, state) + * return __pyx_unpickle_StrField, (type(self), 0x82d92b6, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_StrField__set_state(self, __pyx_state) */ @@ -2748,7 +2906,7 @@ static PyObject *__pyx_pf_6nyoibo_6fields_8StrField_2__setstate_cython__(struct return __pyx_r; } -/* "nyoibo/fields.pyx":29 +/* "nyoibo/fields.pyx":34 * _internal_type = int * * cpdef public parse(self, value): # <<<<<<<<<<<<<< @@ -2780,7 +2938,7 @@ PyObject *__pyx_f_6nyoibo_6fields_8IntField_parse(struct __pyx_obj_6nyoibo_6fiel if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_parse); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 29, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_parse); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 34, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6nyoibo_6fields_8IntField_1parse)) { __Pyx_XDECREF(__pyx_r); @@ -2797,7 +2955,7 @@ PyObject *__pyx_f_6nyoibo_6fields_8IntField_parse(struct __pyx_obj_6nyoibo_6fiel } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_value); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 29, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 34, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; @@ -2818,7 +2976,7 @@ PyObject *__pyx_f_6nyoibo_6fields_8IntField_parse(struct __pyx_obj_6nyoibo_6fiel #endif } - /* "nyoibo/fields.pyx":30 + /* "nyoibo/fields.pyx":35 * * cpdef public parse(self, value): * if isinstance(value, str): # <<<<<<<<<<<<<< @@ -2829,19 +2987,19 @@ PyObject *__pyx_f_6nyoibo_6fields_8IntField_parse(struct __pyx_obj_6nyoibo_6fiel __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { - /* "nyoibo/fields.pyx":31 + /* "nyoibo/fields.pyx":36 * cpdef public parse(self, value): * if isinstance(value, str): * value = float(value) # <<<<<<<<<<<<<< * * # I implemented super in python 2 form because cython */ - __pyx_t_1 = __Pyx_PyNumber_Float(__pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 31, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyNumber_Float(__pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 36, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_1); __pyx_t_1 = 0; - /* "nyoibo/fields.pyx":30 + /* "nyoibo/fields.pyx":35 * * cpdef public parse(self, value): * if isinstance(value, str): # <<<<<<<<<<<<<< @@ -2850,7 +3008,7 @@ PyObject *__pyx_f_6nyoibo_6fields_8IntField_parse(struct __pyx_obj_6nyoibo_6fiel */ } - /* "nyoibo/fields.pyx":36 + /* "nyoibo/fields.pyx":41 * # has an issue with super without arguments * # https://github.com/cython/cython/issues/3726 * return super(IntField, self).parse(value) # <<<<<<<<<<<<<< @@ -2858,7 +3016,7 @@ PyObject *__pyx_f_6nyoibo_6fields_8IntField_parse(struct __pyx_obj_6nyoibo_6fiel * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 36, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 41, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_ptype_6nyoibo_6fields_IntField)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_6nyoibo_6fields_IntField)); @@ -2866,10 +3024,10 @@ PyObject *__pyx_f_6nyoibo_6fields_8IntField_parse(struct __pyx_obj_6nyoibo_6fiel __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self)); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 36, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 41, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_parse); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 36, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_parse); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 41, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -2884,14 +3042,14 @@ PyObject *__pyx_f_6nyoibo_6fields_8IntField_parse(struct __pyx_obj_6nyoibo_6fiel } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 36, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 41, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "nyoibo/fields.pyx":29 + /* "nyoibo/fields.pyx":34 * _internal_type = int * * cpdef public parse(self, value): # <<<<<<<<<<<<<< @@ -2936,7 +3094,7 @@ static PyObject *__pyx_pf_6nyoibo_6fields_8IntField_parse(struct __pyx_obj_6nyoi int __pyx_clineno = 0; __Pyx_RefNannySetupContext("parse", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_6nyoibo_6fields_8IntField_parse(__pyx_v_self, __pyx_v_value, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 29, __pyx_L1_error) + __pyx_t_1 = __pyx_f_6nyoibo_6fields_8IntField_parse(__pyx_v_self, __pyx_v_value, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 34, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -2992,27 +3150,30 @@ static PyObject *__pyx_pf_6nyoibo_6fields_8IntField_2__reduce_cython__(struct __ /* "(tree fragment)":5 * cdef object _dict * cdef bint use_setstate - * state = (self.default_value, self.immutable, self.private) # <<<<<<<<<<<<<< + * state = (self.choices, self.default_value, self.immutable, self.private) # <<<<<<<<<<<<<< * _dict = getattr(self, '__dict__', None) * if _dict is not None: */ - __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_self->__pyx_base.choices); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.choices); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->__pyx_base.choices); __Pyx_INCREF(__pyx_v_self->__pyx_base.default_value); __Pyx_GIVEREF(__pyx_v_self->__pyx_base.default_value); - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->__pyx_base.default_value); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->__pyx_base.default_value); __Pyx_INCREF(__pyx_v_self->__pyx_base.immutable); __Pyx_GIVEREF(__pyx_v_self->__pyx_base.immutable); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->__pyx_base.immutable); + PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->__pyx_base.immutable); __Pyx_INCREF(__pyx_v_self->__pyx_base.private); __Pyx_GIVEREF(__pyx_v_self->__pyx_base.private); - PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->__pyx_base.private); + PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_self->__pyx_base.private); __pyx_v_state = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":6 * cdef bint use_setstate - * state = (self.default_value, self.immutable, self.private) + * state = (self.choices, self.default_value, self.immutable, self.private) * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< * if _dict is not None: * state += (_dict,) @@ -3023,7 +3184,7 @@ static PyObject *__pyx_pf_6nyoibo_6fields_8IntField_2__reduce_cython__(struct __ __pyx_t_1 = 0; /* "(tree fragment)":7 - * state = (self.default_value, self.immutable, self.private) + * state = (self.choices, self.default_value, self.immutable, self.private) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) @@ -3056,12 +3217,12 @@ static PyObject *__pyx_pf_6nyoibo_6fields_8IntField_2__reduce_cython__(struct __ * state += (_dict,) * use_setstate = True # <<<<<<<<<<<<<< * else: - * use_setstate = self.default_value is not None or self.immutable is not None or self.private is not None + * use_setstate = self.choices is not None or self.default_value is not None or self.immutable is not None or self.private is not None */ __pyx_v_use_setstate = 1; /* "(tree fragment)":7 - * state = (self.default_value, self.immutable, self.private) + * state = (self.choices, self.default_value, self.immutable, self.private) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) @@ -3073,28 +3234,35 @@ static PyObject *__pyx_pf_6nyoibo_6fields_8IntField_2__reduce_cython__(struct __ /* "(tree fragment)":11 * use_setstate = True * else: - * use_setstate = self.default_value is not None or self.immutable is not None or self.private is not None # <<<<<<<<<<<<<< + * use_setstate = self.choices is not None or self.default_value is not None or self.immutable is not None or self.private is not None # <<<<<<<<<<<<<< * if use_setstate: - * return __pyx_unpickle_IntField, (type(self), 0x0077a4c, None), state + * return __pyx_unpickle_IntField, (type(self), 0x82d92b6, None), state */ /*else*/ { - __pyx_t_2 = (__pyx_v_self->__pyx_base.default_value != Py_None); + __pyx_t_2 = (__pyx_v_self->__pyx_base.choices != Py_None); __pyx_t_5 = (__pyx_t_2 != 0); if (!__pyx_t_5) { } else { __pyx_t_3 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } - __pyx_t_5 = (__pyx_v_self->__pyx_base.immutable != Py_None); + __pyx_t_5 = (__pyx_v_self->__pyx_base.default_value != Py_None); __pyx_t_2 = (__pyx_t_5 != 0); if (!__pyx_t_2) { } else { __pyx_t_3 = __pyx_t_2; goto __pyx_L4_bool_binop_done; } - __pyx_t_2 = (__pyx_v_self->__pyx_base.private != Py_None); + __pyx_t_2 = (__pyx_v_self->__pyx_base.immutable != Py_None); __pyx_t_5 = (__pyx_t_2 != 0); - __pyx_t_3 = __pyx_t_5; + if (!__pyx_t_5) { + } else { + __pyx_t_3 = __pyx_t_5; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.private != Py_None); + __pyx_t_2 = (__pyx_t_5 != 0); + __pyx_t_3 = __pyx_t_2; __pyx_L4_bool_binop_done:; __pyx_v_use_setstate = __pyx_t_3; } @@ -3102,20 +3270,20 @@ static PyObject *__pyx_pf_6nyoibo_6fields_8IntField_2__reduce_cython__(struct __ /* "(tree fragment)":12 * else: - * use_setstate = self.default_value is not None or self.immutable is not None or self.private is not None + * use_setstate = self.choices is not None or self.default_value is not None or self.immutable is not None or self.private is not None * if use_setstate: # <<<<<<<<<<<<<< - * return __pyx_unpickle_IntField, (type(self), 0x0077a4c, None), state + * return __pyx_unpickle_IntField, (type(self), 0x82d92b6, None), state * else: */ __pyx_t_3 = (__pyx_v_use_setstate != 0); if (__pyx_t_3) { /* "(tree fragment)":13 - * use_setstate = self.default_value is not None or self.immutable is not None or self.private is not None + * use_setstate = self.choices is not None or self.default_value is not None or self.immutable is not None or self.private is not None * if use_setstate: - * return __pyx_unpickle_IntField, (type(self), 0x0077a4c, None), state # <<<<<<<<<<<<<< + * return __pyx_unpickle_IntField, (type(self), 0x82d92b6, None), state # <<<<<<<<<<<<<< * else: - * return __pyx_unpickle_IntField, (type(self), 0x0077a4c, state) + * return __pyx_unpickle_IntField, (type(self), 0x82d92b6, state) */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_IntField); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error) @@ -3125,9 +3293,9 @@ static PyObject *__pyx_pf_6nyoibo_6fields_8IntField_2__reduce_cython__(struct __ __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); - __Pyx_INCREF(__pyx_int_490060); - __Pyx_GIVEREF(__pyx_int_490060); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_490060); + __Pyx_INCREF(__pyx_int_137204406); + __Pyx_GIVEREF(__pyx_int_137204406); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_137204406); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None); @@ -3148,17 +3316,17 @@ static PyObject *__pyx_pf_6nyoibo_6fields_8IntField_2__reduce_cython__(struct __ /* "(tree fragment)":12 * else: - * use_setstate = self.default_value is not None or self.immutable is not None or self.private is not None + * use_setstate = self.choices is not None or self.default_value is not None or self.immutable is not None or self.private is not None * if use_setstate: # <<<<<<<<<<<<<< - * return __pyx_unpickle_IntField, (type(self), 0x0077a4c, None), state + * return __pyx_unpickle_IntField, (type(self), 0x82d92b6, None), state * else: */ } /* "(tree fragment)":15 - * return __pyx_unpickle_IntField, (type(self), 0x0077a4c, None), state + * return __pyx_unpickle_IntField, (type(self), 0x82d92b6, None), state * else: - * return __pyx_unpickle_IntField, (type(self), 0x0077a4c, state) # <<<<<<<<<<<<<< + * return __pyx_unpickle_IntField, (type(self), 0x82d92b6, state) # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_IntField__set_state(self, __pyx_state) */ @@ -3171,9 +3339,9 @@ static PyObject *__pyx_pf_6nyoibo_6fields_8IntField_2__reduce_cython__(struct __ __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); - __Pyx_INCREF(__pyx_int_490060); - __Pyx_GIVEREF(__pyx_int_490060); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_490060); + __Pyx_INCREF(__pyx_int_137204406); + __Pyx_GIVEREF(__pyx_int_137204406); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_137204406); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state); @@ -3213,7 +3381,7 @@ static PyObject *__pyx_pf_6nyoibo_6fields_8IntField_2__reduce_cython__(struct __ /* "(tree fragment)":16 * else: - * return __pyx_unpickle_IntField, (type(self), 0x0077a4c, state) + * return __pyx_unpickle_IntField, (type(self), 0x82d92b6, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_IntField__set_state(self, __pyx_state) */ @@ -3241,7 +3409,7 @@ static PyObject *__pyx_pf_6nyoibo_6fields_8IntField_4__setstate_cython__(struct __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":17 - * return __pyx_unpickle_IntField, (type(self), 0x0077a4c, state) + * return __pyx_unpickle_IntField, (type(self), 0x82d92b6, state) * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_IntField__set_state(self, __pyx_state) # <<<<<<<<<<<<<< */ @@ -3252,7 +3420,7 @@ static PyObject *__pyx_pf_6nyoibo_6fields_8IntField_4__setstate_cython__(struct /* "(tree fragment)":16 * else: - * return __pyx_unpickle_IntField, (type(self), 0x0077a4c, state) + * return __pyx_unpickle_IntField, (type(self), 0x82d92b6, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_IntField__set_state(self, __pyx_state) */ @@ -3270,7 +3438,7 @@ static PyObject *__pyx_pf_6nyoibo_6fields_8IntField_4__setstate_cython__(struct return __pyx_r; } -/* "nyoibo/fields.pyx":43 +/* "nyoibo/fields.pyx":48 * _internal_type = bool * * cpdef public parse(self, value): # <<<<<<<<<<<<<< @@ -3301,7 +3469,7 @@ PyObject *__pyx_f_6nyoibo_6fields_9BoolField_parse(struct __pyx_obj_6nyoibo_6fie if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_parse); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 43, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_parse); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 48, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6nyoibo_6fields_9BoolField_1parse)) { __Pyx_XDECREF(__pyx_r); @@ -3318,7 +3486,7 @@ PyObject *__pyx_f_6nyoibo_6fields_9BoolField_parse(struct __pyx_obj_6nyoibo_6fie } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_value); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 43, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 48, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; @@ -3339,7 +3507,7 @@ PyObject *__pyx_f_6nyoibo_6fields_9BoolField_parse(struct __pyx_obj_6nyoibo_6fie #endif } - /* "nyoibo/fields.pyx":44 + /* "nyoibo/fields.pyx":49 * * cpdef public parse(self, value): * if value in ('false', 'False'): # <<<<<<<<<<<<<< @@ -3348,20 +3516,20 @@ PyObject *__pyx_f_6nyoibo_6fields_9BoolField_parse(struct __pyx_obj_6nyoibo_6fie */ __Pyx_INCREF(__pyx_v_value); __pyx_t_1 = __pyx_v_value; - __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_false, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 44, __pyx_L1_error) + __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_false, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 49, __pyx_L1_error) if (!__pyx_t_6) { } else { __pyx_t_5 = __pyx_t_6; goto __pyx_L4_bool_binop_done; } - __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_False, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 44, __pyx_L1_error) + __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_False, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 49, __pyx_L1_error) __pyx_t_5 = __pyx_t_6; __pyx_L4_bool_binop_done:; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { - /* "nyoibo/fields.pyx":45 + /* "nyoibo/fields.pyx":50 * cpdef public parse(self, value): * if value in ('false', 'False'): * return False # <<<<<<<<<<<<<< @@ -3373,7 +3541,7 @@ PyObject *__pyx_f_6nyoibo_6fields_9BoolField_parse(struct __pyx_obj_6nyoibo_6fie __pyx_r = Py_False; goto __pyx_L0; - /* "nyoibo/fields.pyx":44 + /* "nyoibo/fields.pyx":49 * * cpdef public parse(self, value): * if value in ('false', 'False'): # <<<<<<<<<<<<<< @@ -3382,7 +3550,7 @@ PyObject *__pyx_f_6nyoibo_6fields_9BoolField_parse(struct __pyx_obj_6nyoibo_6fie */ } - /* "nyoibo/fields.pyx":46 + /* "nyoibo/fields.pyx":51 * if value in ('false', 'False'): * return False * return super(BoolField, self).parse(value) # <<<<<<<<<<<<<< @@ -3390,7 +3558,7 @@ PyObject *__pyx_f_6nyoibo_6fields_9BoolField_parse(struct __pyx_obj_6nyoibo_6fie * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 51, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_ptype_6nyoibo_6fields_BoolField)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_6nyoibo_6fields_BoolField)); @@ -3398,10 +3566,10 @@ PyObject *__pyx_f_6nyoibo_6fields_9BoolField_parse(struct __pyx_obj_6nyoibo_6fie __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self)); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 51, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_parse); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_parse); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 51, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -3416,14 +3584,14 @@ PyObject *__pyx_f_6nyoibo_6fields_9BoolField_parse(struct __pyx_obj_6nyoibo_6fie } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 46, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 51, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "nyoibo/fields.pyx":43 + /* "nyoibo/fields.pyx":48 * _internal_type = bool * * cpdef public parse(self, value): # <<<<<<<<<<<<<< @@ -3467,7 +3635,7 @@ static PyObject *__pyx_pf_6nyoibo_6fields_9BoolField_parse(struct __pyx_obj_6nyo int __pyx_clineno = 0; __Pyx_RefNannySetupContext("parse", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_6nyoibo_6fields_9BoolField_parse(__pyx_v_self, __pyx_v_value, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 43, __pyx_L1_error) + __pyx_t_1 = __pyx_f_6nyoibo_6fields_9BoolField_parse(__pyx_v_self, __pyx_v_value, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 48, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -3523,27 +3691,30 @@ static PyObject *__pyx_pf_6nyoibo_6fields_9BoolField_2__reduce_cython__(struct _ /* "(tree fragment)":5 * cdef object _dict * cdef bint use_setstate - * state = (self.default_value, self.immutable, self.private) # <<<<<<<<<<<<<< + * state = (self.choices, self.default_value, self.immutable, self.private) # <<<<<<<<<<<<<< * _dict = getattr(self, '__dict__', None) * if _dict is not None: */ - __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_self->__pyx_base.choices); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.choices); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->__pyx_base.choices); __Pyx_INCREF(__pyx_v_self->__pyx_base.default_value); __Pyx_GIVEREF(__pyx_v_self->__pyx_base.default_value); - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->__pyx_base.default_value); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->__pyx_base.default_value); __Pyx_INCREF(__pyx_v_self->__pyx_base.immutable); __Pyx_GIVEREF(__pyx_v_self->__pyx_base.immutable); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->__pyx_base.immutable); + PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->__pyx_base.immutable); __Pyx_INCREF(__pyx_v_self->__pyx_base.private); __Pyx_GIVEREF(__pyx_v_self->__pyx_base.private); - PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->__pyx_base.private); + PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_self->__pyx_base.private); __pyx_v_state = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":6 * cdef bint use_setstate - * state = (self.default_value, self.immutable, self.private) + * state = (self.choices, self.default_value, self.immutable, self.private) * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< * if _dict is not None: * state += (_dict,) @@ -3554,7 +3725,7 @@ static PyObject *__pyx_pf_6nyoibo_6fields_9BoolField_2__reduce_cython__(struct _ __pyx_t_1 = 0; /* "(tree fragment)":7 - * state = (self.default_value, self.immutable, self.private) + * state = (self.choices, self.default_value, self.immutable, self.private) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) @@ -3587,12 +3758,12 @@ static PyObject *__pyx_pf_6nyoibo_6fields_9BoolField_2__reduce_cython__(struct _ * state += (_dict,) * use_setstate = True # <<<<<<<<<<<<<< * else: - * use_setstate = self.default_value is not None or self.immutable is not None or self.private is not None + * use_setstate = self.choices is not None or self.default_value is not None or self.immutable is not None or self.private is not None */ __pyx_v_use_setstate = 1; /* "(tree fragment)":7 - * state = (self.default_value, self.immutable, self.private) + * state = (self.choices, self.default_value, self.immutable, self.private) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) @@ -3604,28 +3775,35 @@ static PyObject *__pyx_pf_6nyoibo_6fields_9BoolField_2__reduce_cython__(struct _ /* "(tree fragment)":11 * use_setstate = True * else: - * use_setstate = self.default_value is not None or self.immutable is not None or self.private is not None # <<<<<<<<<<<<<< + * use_setstate = self.choices is not None or self.default_value is not None or self.immutable is not None or self.private is not None # <<<<<<<<<<<<<< * if use_setstate: - * return __pyx_unpickle_BoolField, (type(self), 0x0077a4c, None), state + * return __pyx_unpickle_BoolField, (type(self), 0x82d92b6, None), state */ /*else*/ { - __pyx_t_2 = (__pyx_v_self->__pyx_base.default_value != Py_None); + __pyx_t_2 = (__pyx_v_self->__pyx_base.choices != Py_None); __pyx_t_5 = (__pyx_t_2 != 0); if (!__pyx_t_5) { } else { __pyx_t_3 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } - __pyx_t_5 = (__pyx_v_self->__pyx_base.immutable != Py_None); + __pyx_t_5 = (__pyx_v_self->__pyx_base.default_value != Py_None); __pyx_t_2 = (__pyx_t_5 != 0); if (!__pyx_t_2) { } else { __pyx_t_3 = __pyx_t_2; goto __pyx_L4_bool_binop_done; } - __pyx_t_2 = (__pyx_v_self->__pyx_base.private != Py_None); + __pyx_t_2 = (__pyx_v_self->__pyx_base.immutable != Py_None); __pyx_t_5 = (__pyx_t_2 != 0); - __pyx_t_3 = __pyx_t_5; + if (!__pyx_t_5) { + } else { + __pyx_t_3 = __pyx_t_5; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.private != Py_None); + __pyx_t_2 = (__pyx_t_5 != 0); + __pyx_t_3 = __pyx_t_2; __pyx_L4_bool_binop_done:; __pyx_v_use_setstate = __pyx_t_3; } @@ -3633,20 +3811,20 @@ static PyObject *__pyx_pf_6nyoibo_6fields_9BoolField_2__reduce_cython__(struct _ /* "(tree fragment)":12 * else: - * use_setstate = self.default_value is not None or self.immutable is not None or self.private is not None + * use_setstate = self.choices is not None or self.default_value is not None or self.immutable is not None or self.private is not None * if use_setstate: # <<<<<<<<<<<<<< - * return __pyx_unpickle_BoolField, (type(self), 0x0077a4c, None), state + * return __pyx_unpickle_BoolField, (type(self), 0x82d92b6, None), state * else: */ __pyx_t_3 = (__pyx_v_use_setstate != 0); if (__pyx_t_3) { /* "(tree fragment)":13 - * use_setstate = self.default_value is not None or self.immutable is not None or self.private is not None + * use_setstate = self.choices is not None or self.default_value is not None or self.immutable is not None or self.private is not None * if use_setstate: - * return __pyx_unpickle_BoolField, (type(self), 0x0077a4c, None), state # <<<<<<<<<<<<<< + * return __pyx_unpickle_BoolField, (type(self), 0x82d92b6, None), state # <<<<<<<<<<<<<< * else: - * return __pyx_unpickle_BoolField, (type(self), 0x0077a4c, state) + * return __pyx_unpickle_BoolField, (type(self), 0x82d92b6, state) */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_BoolField); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error) @@ -3656,9 +3834,9 @@ static PyObject *__pyx_pf_6nyoibo_6fields_9BoolField_2__reduce_cython__(struct _ __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); - __Pyx_INCREF(__pyx_int_490060); - __Pyx_GIVEREF(__pyx_int_490060); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_490060); + __Pyx_INCREF(__pyx_int_137204406); + __Pyx_GIVEREF(__pyx_int_137204406); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_137204406); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None); @@ -3679,17 +3857,17 @@ static PyObject *__pyx_pf_6nyoibo_6fields_9BoolField_2__reduce_cython__(struct _ /* "(tree fragment)":12 * else: - * use_setstate = self.default_value is not None or self.immutable is not None or self.private is not None + * use_setstate = self.choices is not None or self.default_value is not None or self.immutable is not None or self.private is not None * if use_setstate: # <<<<<<<<<<<<<< - * return __pyx_unpickle_BoolField, (type(self), 0x0077a4c, None), state + * return __pyx_unpickle_BoolField, (type(self), 0x82d92b6, None), state * else: */ } /* "(tree fragment)":15 - * return __pyx_unpickle_BoolField, (type(self), 0x0077a4c, None), state + * return __pyx_unpickle_BoolField, (type(self), 0x82d92b6, None), state * else: - * return __pyx_unpickle_BoolField, (type(self), 0x0077a4c, state) # <<<<<<<<<<<<<< + * return __pyx_unpickle_BoolField, (type(self), 0x82d92b6, state) # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_BoolField__set_state(self, __pyx_state) */ @@ -3702,9 +3880,9 @@ static PyObject *__pyx_pf_6nyoibo_6fields_9BoolField_2__reduce_cython__(struct _ __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); - __Pyx_INCREF(__pyx_int_490060); - __Pyx_GIVEREF(__pyx_int_490060); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_490060); + __Pyx_INCREF(__pyx_int_137204406); + __Pyx_GIVEREF(__pyx_int_137204406); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_137204406); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state); @@ -3744,7 +3922,7 @@ static PyObject *__pyx_pf_6nyoibo_6fields_9BoolField_2__reduce_cython__(struct _ /* "(tree fragment)":16 * else: - * return __pyx_unpickle_BoolField, (type(self), 0x0077a4c, state) + * return __pyx_unpickle_BoolField, (type(self), 0x82d92b6, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_BoolField__set_state(self, __pyx_state) */ @@ -3772,7 +3950,7 @@ static PyObject *__pyx_pf_6nyoibo_6fields_9BoolField_4__setstate_cython__(struct __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":17 - * return __pyx_unpickle_BoolField, (type(self), 0x0077a4c, state) + * return __pyx_unpickle_BoolField, (type(self), 0x82d92b6, state) * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_BoolField__set_state(self, __pyx_state) # <<<<<<<<<<<<<< */ @@ -3783,7 +3961,7 @@ static PyObject *__pyx_pf_6nyoibo_6fields_9BoolField_4__setstate_cython__(struct /* "(tree fragment)":16 * else: - * return __pyx_unpickle_BoolField, (type(self), 0x0077a4c, state) + * return __pyx_unpickle_BoolField, (type(self), 0x82d92b6, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_BoolField__set_state(self, __pyx_state) */ @@ -3801,7 +3979,7 @@ static PyObject *__pyx_pf_6nyoibo_6fields_9BoolField_4__setstate_cython__(struct return __pyx_r; } -/* "nyoibo/fields.pyx":53 +/* "nyoibo/fields.pyx":58 * _internal_type = datetime.date * * cpdef public parse(self, value): # <<<<<<<<<<<<<< @@ -3832,7 +4010,7 @@ PyObject *__pyx_f_6nyoibo_6fields_9DateField_parse(struct __pyx_obj_6nyoibo_6fie if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_parse); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 53, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_parse); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 58, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6nyoibo_6fields_9DateField_1parse)) { __Pyx_XDECREF(__pyx_r); @@ -3849,7 +4027,7 @@ PyObject *__pyx_f_6nyoibo_6fields_9DateField_parse(struct __pyx_obj_6nyoibo_6fie } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_value); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 53, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 58, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; @@ -3870,7 +4048,7 @@ PyObject *__pyx_f_6nyoibo_6fields_9DateField_parse(struct __pyx_obj_6nyoibo_6fie #endif } - /* "nyoibo/fields.pyx":54 + /* "nyoibo/fields.pyx":59 * * cpdef public parse(self, value): * if isinstance(value, str): # <<<<<<<<<<<<<< @@ -3881,7 +4059,7 @@ PyObject *__pyx_f_6nyoibo_6fields_9DateField_parse(struct __pyx_obj_6nyoibo_6fie __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { - /* "nyoibo/fields.pyx":55 + /* "nyoibo/fields.pyx":60 * cpdef public parse(self, value): * if isinstance(value, str): * return datetime.date.fromisoformat(value) # <<<<<<<<<<<<<< @@ -3889,12 +4067,12 @@ PyObject *__pyx_f_6nyoibo_6fields_9DateField_parse(struct __pyx_obj_6nyoibo_6fie * */ __Pyx_XDECREF(__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_datetime); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 55, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_datetime); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 60, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_date); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 55, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_date); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 60, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_fromisoformat); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 55, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_fromisoformat); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 60, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -3909,14 +4087,14 @@ PyObject *__pyx_f_6nyoibo_6fields_9DateField_parse(struct __pyx_obj_6nyoibo_6fie } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 55, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 60, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "nyoibo/fields.pyx":54 + /* "nyoibo/fields.pyx":59 * * cpdef public parse(self, value): * if isinstance(value, str): # <<<<<<<<<<<<<< @@ -3925,7 +4103,7 @@ PyObject *__pyx_f_6nyoibo_6fields_9DateField_parse(struct __pyx_obj_6nyoibo_6fie */ } - /* "nyoibo/fields.pyx":56 + /* "nyoibo/fields.pyx":61 * if isinstance(value, str): * return datetime.date.fromisoformat(value) * return super(DateField, self).parse(value) # <<<<<<<<<<<<<< @@ -3933,7 +4111,7 @@ PyObject *__pyx_f_6nyoibo_6fields_9DateField_parse(struct __pyx_obj_6nyoibo_6fie * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 56, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 61, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_ptype_6nyoibo_6fields_DateField)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_6nyoibo_6fields_DateField)); @@ -3941,10 +4119,10 @@ PyObject *__pyx_f_6nyoibo_6fields_9DateField_parse(struct __pyx_obj_6nyoibo_6fie __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self)); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 56, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 61, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_parse); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 56, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_parse); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 61, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -3959,14 +4137,14 @@ PyObject *__pyx_f_6nyoibo_6fields_9DateField_parse(struct __pyx_obj_6nyoibo_6fie } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 56, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 61, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "nyoibo/fields.pyx":53 + /* "nyoibo/fields.pyx":58 * _internal_type = datetime.date * * cpdef public parse(self, value): # <<<<<<<<<<<<<< @@ -4010,7 +4188,7 @@ static PyObject *__pyx_pf_6nyoibo_6fields_9DateField_parse(struct __pyx_obj_6nyo int __pyx_clineno = 0; __Pyx_RefNannySetupContext("parse", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_6nyoibo_6fields_9DateField_parse(__pyx_v_self, __pyx_v_value, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 53, __pyx_L1_error) + __pyx_t_1 = __pyx_f_6nyoibo_6fields_9DateField_parse(__pyx_v_self, __pyx_v_value, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 58, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -4066,27 +4244,30 @@ static PyObject *__pyx_pf_6nyoibo_6fields_9DateField_2__reduce_cython__(struct _ /* "(tree fragment)":5 * cdef object _dict * cdef bint use_setstate - * state = (self.default_value, self.immutable, self.private) # <<<<<<<<<<<<<< + * state = (self.choices, self.default_value, self.immutable, self.private) # <<<<<<<<<<<<<< * _dict = getattr(self, '__dict__', None) * if _dict is not None: */ - __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_self->__pyx_base.choices); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.choices); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->__pyx_base.choices); __Pyx_INCREF(__pyx_v_self->__pyx_base.default_value); __Pyx_GIVEREF(__pyx_v_self->__pyx_base.default_value); - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->__pyx_base.default_value); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->__pyx_base.default_value); __Pyx_INCREF(__pyx_v_self->__pyx_base.immutable); __Pyx_GIVEREF(__pyx_v_self->__pyx_base.immutable); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->__pyx_base.immutable); + PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->__pyx_base.immutable); __Pyx_INCREF(__pyx_v_self->__pyx_base.private); __Pyx_GIVEREF(__pyx_v_self->__pyx_base.private); - PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->__pyx_base.private); + PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_self->__pyx_base.private); __pyx_v_state = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":6 * cdef bint use_setstate - * state = (self.default_value, self.immutable, self.private) + * state = (self.choices, self.default_value, self.immutable, self.private) * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< * if _dict is not None: * state += (_dict,) @@ -4097,7 +4278,7 @@ static PyObject *__pyx_pf_6nyoibo_6fields_9DateField_2__reduce_cython__(struct _ __pyx_t_1 = 0; /* "(tree fragment)":7 - * state = (self.default_value, self.immutable, self.private) + * state = (self.choices, self.default_value, self.immutable, self.private) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) @@ -4130,12 +4311,12 @@ static PyObject *__pyx_pf_6nyoibo_6fields_9DateField_2__reduce_cython__(struct _ * state += (_dict,) * use_setstate = True # <<<<<<<<<<<<<< * else: - * use_setstate = self.default_value is not None or self.immutable is not None or self.private is not None + * use_setstate = self.choices is not None or self.default_value is not None or self.immutable is not None or self.private is not None */ __pyx_v_use_setstate = 1; /* "(tree fragment)":7 - * state = (self.default_value, self.immutable, self.private) + * state = (self.choices, self.default_value, self.immutable, self.private) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) @@ -4147,28 +4328,35 @@ static PyObject *__pyx_pf_6nyoibo_6fields_9DateField_2__reduce_cython__(struct _ /* "(tree fragment)":11 * use_setstate = True * else: - * use_setstate = self.default_value is not None or self.immutable is not None or self.private is not None # <<<<<<<<<<<<<< + * use_setstate = self.choices is not None or self.default_value is not None or self.immutable is not None or self.private is not None # <<<<<<<<<<<<<< * if use_setstate: - * return __pyx_unpickle_DateField, (type(self), 0x0077a4c, None), state + * return __pyx_unpickle_DateField, (type(self), 0x82d92b6, None), state */ /*else*/ { - __pyx_t_2 = (__pyx_v_self->__pyx_base.default_value != Py_None); + __pyx_t_2 = (__pyx_v_self->__pyx_base.choices != Py_None); __pyx_t_5 = (__pyx_t_2 != 0); if (!__pyx_t_5) { } else { __pyx_t_3 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } - __pyx_t_5 = (__pyx_v_self->__pyx_base.immutable != Py_None); + __pyx_t_5 = (__pyx_v_self->__pyx_base.default_value != Py_None); __pyx_t_2 = (__pyx_t_5 != 0); if (!__pyx_t_2) { } else { __pyx_t_3 = __pyx_t_2; goto __pyx_L4_bool_binop_done; } - __pyx_t_2 = (__pyx_v_self->__pyx_base.private != Py_None); + __pyx_t_2 = (__pyx_v_self->__pyx_base.immutable != Py_None); __pyx_t_5 = (__pyx_t_2 != 0); - __pyx_t_3 = __pyx_t_5; + if (!__pyx_t_5) { + } else { + __pyx_t_3 = __pyx_t_5; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.private != Py_None); + __pyx_t_2 = (__pyx_t_5 != 0); + __pyx_t_3 = __pyx_t_2; __pyx_L4_bool_binop_done:; __pyx_v_use_setstate = __pyx_t_3; } @@ -4176,20 +4364,20 @@ static PyObject *__pyx_pf_6nyoibo_6fields_9DateField_2__reduce_cython__(struct _ /* "(tree fragment)":12 * else: - * use_setstate = self.default_value is not None or self.immutable is not None or self.private is not None + * use_setstate = self.choices is not None or self.default_value is not None or self.immutable is not None or self.private is not None * if use_setstate: # <<<<<<<<<<<<<< - * return __pyx_unpickle_DateField, (type(self), 0x0077a4c, None), state + * return __pyx_unpickle_DateField, (type(self), 0x82d92b6, None), state * else: */ __pyx_t_3 = (__pyx_v_use_setstate != 0); if (__pyx_t_3) { /* "(tree fragment)":13 - * use_setstate = self.default_value is not None or self.immutable is not None or self.private is not None + * use_setstate = self.choices is not None or self.default_value is not None or self.immutable is not None or self.private is not None * if use_setstate: - * return __pyx_unpickle_DateField, (type(self), 0x0077a4c, None), state # <<<<<<<<<<<<<< + * return __pyx_unpickle_DateField, (type(self), 0x82d92b6, None), state # <<<<<<<<<<<<<< * else: - * return __pyx_unpickle_DateField, (type(self), 0x0077a4c, state) + * return __pyx_unpickle_DateField, (type(self), 0x82d92b6, state) */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_DateField); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error) @@ -4199,9 +4387,9 @@ static PyObject *__pyx_pf_6nyoibo_6fields_9DateField_2__reduce_cython__(struct _ __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); - __Pyx_INCREF(__pyx_int_490060); - __Pyx_GIVEREF(__pyx_int_490060); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_490060); + __Pyx_INCREF(__pyx_int_137204406); + __Pyx_GIVEREF(__pyx_int_137204406); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_137204406); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None); @@ -4222,17 +4410,17 @@ static PyObject *__pyx_pf_6nyoibo_6fields_9DateField_2__reduce_cython__(struct _ /* "(tree fragment)":12 * else: - * use_setstate = self.default_value is not None or self.immutable is not None or self.private is not None + * use_setstate = self.choices is not None or self.default_value is not None or self.immutable is not None or self.private is not None * if use_setstate: # <<<<<<<<<<<<<< - * return __pyx_unpickle_DateField, (type(self), 0x0077a4c, None), state + * return __pyx_unpickle_DateField, (type(self), 0x82d92b6, None), state * else: */ } /* "(tree fragment)":15 - * return __pyx_unpickle_DateField, (type(self), 0x0077a4c, None), state + * return __pyx_unpickle_DateField, (type(self), 0x82d92b6, None), state * else: - * return __pyx_unpickle_DateField, (type(self), 0x0077a4c, state) # <<<<<<<<<<<<<< + * return __pyx_unpickle_DateField, (type(self), 0x82d92b6, state) # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_DateField__set_state(self, __pyx_state) */ @@ -4245,9 +4433,9 @@ static PyObject *__pyx_pf_6nyoibo_6fields_9DateField_2__reduce_cython__(struct _ __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); - __Pyx_INCREF(__pyx_int_490060); - __Pyx_GIVEREF(__pyx_int_490060); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_490060); + __Pyx_INCREF(__pyx_int_137204406); + __Pyx_GIVEREF(__pyx_int_137204406); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_137204406); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state); @@ -4287,7 +4475,7 @@ static PyObject *__pyx_pf_6nyoibo_6fields_9DateField_2__reduce_cython__(struct _ /* "(tree fragment)":16 * else: - * return __pyx_unpickle_DateField, (type(self), 0x0077a4c, state) + * return __pyx_unpickle_DateField, (type(self), 0x82d92b6, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_DateField__set_state(self, __pyx_state) */ @@ -4315,7 +4503,7 @@ static PyObject *__pyx_pf_6nyoibo_6fields_9DateField_4__setstate_cython__(struct __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":17 - * return __pyx_unpickle_DateField, (type(self), 0x0077a4c, state) + * return __pyx_unpickle_DateField, (type(self), 0x82d92b6, state) * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_DateField__set_state(self, __pyx_state) # <<<<<<<<<<<<<< */ @@ -4326,7 +4514,7 @@ static PyObject *__pyx_pf_6nyoibo_6fields_9DateField_4__setstate_cython__(struct /* "(tree fragment)":16 * else: - * return __pyx_unpickle_DateField, (type(self), 0x0077a4c, state) + * return __pyx_unpickle_DateField, (type(self), 0x82d92b6, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_DateField__set_state(self, __pyx_state) */ @@ -4344,7 +4532,7 @@ static PyObject *__pyx_pf_6nyoibo_6fields_9DateField_4__setstate_cython__(struct return __pyx_r; } -/* "nyoibo/fields.pyx":63 +/* "nyoibo/fields.pyx":68 * _internal_type = datetime.datetime * * cpdef public parse(self, value): # <<<<<<<<<<<<<< @@ -4375,7 +4563,7 @@ PyObject *__pyx_f_6nyoibo_6fields_13DatetimeField_parse(struct __pyx_obj_6nyoibo if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_parse); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 63, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_parse); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 68, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6nyoibo_6fields_13DatetimeField_1parse)) { __Pyx_XDECREF(__pyx_r); @@ -4392,7 +4580,7 @@ PyObject *__pyx_f_6nyoibo_6fields_13DatetimeField_parse(struct __pyx_obj_6nyoibo } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_value); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 63, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 68, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; @@ -4413,7 +4601,7 @@ PyObject *__pyx_f_6nyoibo_6fields_13DatetimeField_parse(struct __pyx_obj_6nyoibo #endif } - /* "nyoibo/fields.pyx":64 + /* "nyoibo/fields.pyx":69 * * cpdef public parse(self, value): * if isinstance(value, str): # <<<<<<<<<<<<<< @@ -4424,7 +4612,7 @@ PyObject *__pyx_f_6nyoibo_6fields_13DatetimeField_parse(struct __pyx_obj_6nyoibo __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { - /* "nyoibo/fields.pyx":65 + /* "nyoibo/fields.pyx":70 * cpdef public parse(self, value): * if isinstance(value, str): * return datetime.datetime.fromisoformat(value) # <<<<<<<<<<<<<< @@ -4432,12 +4620,12 @@ PyObject *__pyx_f_6nyoibo_6fields_13DatetimeField_parse(struct __pyx_obj_6nyoibo * */ __Pyx_XDECREF(__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_datetime); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 65, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_datetime); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 70, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_datetime); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 65, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_datetime); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 70, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_fromisoformat); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 65, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_fromisoformat); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 70, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -4452,14 +4640,14 @@ PyObject *__pyx_f_6nyoibo_6fields_13DatetimeField_parse(struct __pyx_obj_6nyoibo } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 65, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 70, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "nyoibo/fields.pyx":64 + /* "nyoibo/fields.pyx":69 * * cpdef public parse(self, value): * if isinstance(value, str): # <<<<<<<<<<<<<< @@ -4468,7 +4656,7 @@ PyObject *__pyx_f_6nyoibo_6fields_13DatetimeField_parse(struct __pyx_obj_6nyoibo */ } - /* "nyoibo/fields.pyx":66 + /* "nyoibo/fields.pyx":71 * if isinstance(value, str): * return datetime.datetime.fromisoformat(value) * return super(DatetimeField, self).parse(value) # <<<<<<<<<<<<<< @@ -4476,7 +4664,7 @@ PyObject *__pyx_f_6nyoibo_6fields_13DatetimeField_parse(struct __pyx_obj_6nyoibo * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 66, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 71, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_ptype_6nyoibo_6fields_DatetimeField)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_6nyoibo_6fields_DatetimeField)); @@ -4484,10 +4672,10 @@ PyObject *__pyx_f_6nyoibo_6fields_13DatetimeField_parse(struct __pyx_obj_6nyoibo __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self)); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 66, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 71, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_parse); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 66, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_parse); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 71, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -4502,14 +4690,14 @@ PyObject *__pyx_f_6nyoibo_6fields_13DatetimeField_parse(struct __pyx_obj_6nyoibo } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 66, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 71, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "nyoibo/fields.pyx":63 + /* "nyoibo/fields.pyx":68 * _internal_type = datetime.datetime * * cpdef public parse(self, value): # <<<<<<<<<<<<<< @@ -4553,7 +4741,7 @@ static PyObject *__pyx_pf_6nyoibo_6fields_13DatetimeField_parse(struct __pyx_obj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("parse", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_6nyoibo_6fields_13DatetimeField_parse(__pyx_v_self, __pyx_v_value, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 63, __pyx_L1_error) + __pyx_t_1 = __pyx_f_6nyoibo_6fields_13DatetimeField_parse(__pyx_v_self, __pyx_v_value, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 68, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -4609,27 +4797,30 @@ static PyObject *__pyx_pf_6nyoibo_6fields_13DatetimeField_2__reduce_cython__(str /* "(tree fragment)":5 * cdef object _dict * cdef bint use_setstate - * state = (self.default_value, self.immutable, self.private) # <<<<<<<<<<<<<< + * state = (self.choices, self.default_value, self.immutable, self.private) # <<<<<<<<<<<<<< * _dict = getattr(self, '__dict__', None) * if _dict is not None: */ - __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_self->__pyx_base.choices); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.choices); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->__pyx_base.choices); __Pyx_INCREF(__pyx_v_self->__pyx_base.default_value); __Pyx_GIVEREF(__pyx_v_self->__pyx_base.default_value); - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->__pyx_base.default_value); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->__pyx_base.default_value); __Pyx_INCREF(__pyx_v_self->__pyx_base.immutable); __Pyx_GIVEREF(__pyx_v_self->__pyx_base.immutable); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->__pyx_base.immutable); + PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->__pyx_base.immutable); __Pyx_INCREF(__pyx_v_self->__pyx_base.private); __Pyx_GIVEREF(__pyx_v_self->__pyx_base.private); - PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->__pyx_base.private); + PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_self->__pyx_base.private); __pyx_v_state = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":6 * cdef bint use_setstate - * state = (self.default_value, self.immutable, self.private) + * state = (self.choices, self.default_value, self.immutable, self.private) * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< * if _dict is not None: * state += (_dict,) @@ -4640,7 +4831,7 @@ static PyObject *__pyx_pf_6nyoibo_6fields_13DatetimeField_2__reduce_cython__(str __pyx_t_1 = 0; /* "(tree fragment)":7 - * state = (self.default_value, self.immutable, self.private) + * state = (self.choices, self.default_value, self.immutable, self.private) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) @@ -4673,12 +4864,12 @@ static PyObject *__pyx_pf_6nyoibo_6fields_13DatetimeField_2__reduce_cython__(str * state += (_dict,) * use_setstate = True # <<<<<<<<<<<<<< * else: - * use_setstate = self.default_value is not None or self.immutable is not None or self.private is not None + * use_setstate = self.choices is not None or self.default_value is not None or self.immutable is not None or self.private is not None */ __pyx_v_use_setstate = 1; /* "(tree fragment)":7 - * state = (self.default_value, self.immutable, self.private) + * state = (self.choices, self.default_value, self.immutable, self.private) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) @@ -4690,28 +4881,35 @@ static PyObject *__pyx_pf_6nyoibo_6fields_13DatetimeField_2__reduce_cython__(str /* "(tree fragment)":11 * use_setstate = True * else: - * use_setstate = self.default_value is not None or self.immutable is not None or self.private is not None # <<<<<<<<<<<<<< + * use_setstate = self.choices is not None or self.default_value is not None or self.immutable is not None or self.private is not None # <<<<<<<<<<<<<< * if use_setstate: - * return __pyx_unpickle_DatetimeField, (type(self), 0x0077a4c, None), state + * return __pyx_unpickle_DatetimeField, (type(self), 0x82d92b6, None), state */ /*else*/ { - __pyx_t_2 = (__pyx_v_self->__pyx_base.default_value != Py_None); + __pyx_t_2 = (__pyx_v_self->__pyx_base.choices != Py_None); __pyx_t_5 = (__pyx_t_2 != 0); if (!__pyx_t_5) { } else { __pyx_t_3 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } - __pyx_t_5 = (__pyx_v_self->__pyx_base.immutable != Py_None); + __pyx_t_5 = (__pyx_v_self->__pyx_base.default_value != Py_None); __pyx_t_2 = (__pyx_t_5 != 0); if (!__pyx_t_2) { } else { __pyx_t_3 = __pyx_t_2; goto __pyx_L4_bool_binop_done; } - __pyx_t_2 = (__pyx_v_self->__pyx_base.private != Py_None); + __pyx_t_2 = (__pyx_v_self->__pyx_base.immutable != Py_None); __pyx_t_5 = (__pyx_t_2 != 0); - __pyx_t_3 = __pyx_t_5; + if (!__pyx_t_5) { + } else { + __pyx_t_3 = __pyx_t_5; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.private != Py_None); + __pyx_t_2 = (__pyx_t_5 != 0); + __pyx_t_3 = __pyx_t_2; __pyx_L4_bool_binop_done:; __pyx_v_use_setstate = __pyx_t_3; } @@ -4719,20 +4917,20 @@ static PyObject *__pyx_pf_6nyoibo_6fields_13DatetimeField_2__reduce_cython__(str /* "(tree fragment)":12 * else: - * use_setstate = self.default_value is not None or self.immutable is not None or self.private is not None + * use_setstate = self.choices is not None or self.default_value is not None or self.immutable is not None or self.private is not None * if use_setstate: # <<<<<<<<<<<<<< - * return __pyx_unpickle_DatetimeField, (type(self), 0x0077a4c, None), state + * return __pyx_unpickle_DatetimeField, (type(self), 0x82d92b6, None), state * else: */ __pyx_t_3 = (__pyx_v_use_setstate != 0); if (__pyx_t_3) { /* "(tree fragment)":13 - * use_setstate = self.default_value is not None or self.immutable is not None or self.private is not None + * use_setstate = self.choices is not None or self.default_value is not None or self.immutable is not None or self.private is not None * if use_setstate: - * return __pyx_unpickle_DatetimeField, (type(self), 0x0077a4c, None), state # <<<<<<<<<<<<<< + * return __pyx_unpickle_DatetimeField, (type(self), 0x82d92b6, None), state # <<<<<<<<<<<<<< * else: - * return __pyx_unpickle_DatetimeField, (type(self), 0x0077a4c, state) + * return __pyx_unpickle_DatetimeField, (type(self), 0x82d92b6, state) */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_DatetimeField); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error) @@ -4742,9 +4940,9 @@ static PyObject *__pyx_pf_6nyoibo_6fields_13DatetimeField_2__reduce_cython__(str __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); - __Pyx_INCREF(__pyx_int_490060); - __Pyx_GIVEREF(__pyx_int_490060); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_490060); + __Pyx_INCREF(__pyx_int_137204406); + __Pyx_GIVEREF(__pyx_int_137204406); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_137204406); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None); @@ -4765,17 +4963,17 @@ static PyObject *__pyx_pf_6nyoibo_6fields_13DatetimeField_2__reduce_cython__(str /* "(tree fragment)":12 * else: - * use_setstate = self.default_value is not None or self.immutable is not None or self.private is not None + * use_setstate = self.choices is not None or self.default_value is not None or self.immutable is not None or self.private is not None * if use_setstate: # <<<<<<<<<<<<<< - * return __pyx_unpickle_DatetimeField, (type(self), 0x0077a4c, None), state + * return __pyx_unpickle_DatetimeField, (type(self), 0x82d92b6, None), state * else: */ } /* "(tree fragment)":15 - * return __pyx_unpickle_DatetimeField, (type(self), 0x0077a4c, None), state + * return __pyx_unpickle_DatetimeField, (type(self), 0x82d92b6, None), state * else: - * return __pyx_unpickle_DatetimeField, (type(self), 0x0077a4c, state) # <<<<<<<<<<<<<< + * return __pyx_unpickle_DatetimeField, (type(self), 0x82d92b6, state) # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_DatetimeField__set_state(self, __pyx_state) */ @@ -4788,9 +4986,9 @@ static PyObject *__pyx_pf_6nyoibo_6fields_13DatetimeField_2__reduce_cython__(str __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); - __Pyx_INCREF(__pyx_int_490060); - __Pyx_GIVEREF(__pyx_int_490060); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_490060); + __Pyx_INCREF(__pyx_int_137204406); + __Pyx_GIVEREF(__pyx_int_137204406); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_137204406); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state); @@ -4830,7 +5028,7 @@ static PyObject *__pyx_pf_6nyoibo_6fields_13DatetimeField_2__reduce_cython__(str /* "(tree fragment)":16 * else: - * return __pyx_unpickle_DatetimeField, (type(self), 0x0077a4c, state) + * return __pyx_unpickle_DatetimeField, (type(self), 0x82d92b6, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_DatetimeField__set_state(self, __pyx_state) */ @@ -4858,7 +5056,7 @@ static PyObject *__pyx_pf_6nyoibo_6fields_13DatetimeField_4__setstate_cython__(s __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":17 - * return __pyx_unpickle_DatetimeField, (type(self), 0x0077a4c, state) + * return __pyx_unpickle_DatetimeField, (type(self), 0x82d92b6, state) * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_DatetimeField__set_state(self, __pyx_state) # <<<<<<<<<<<<<< */ @@ -4869,7 +5067,7 @@ static PyObject *__pyx_pf_6nyoibo_6fields_13DatetimeField_4__setstate_cython__(s /* "(tree fragment)":16 * else: - * return __pyx_unpickle_DatetimeField, (type(self), 0x0077a4c, state) + * return __pyx_unpickle_DatetimeField, (type(self), 0x82d92b6, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_DatetimeField__set_state(self, __pyx_state) */ @@ -4926,27 +5124,30 @@ static PyObject *__pyx_pf_6nyoibo_6fields_10FloatField___reduce_cython__(struct /* "(tree fragment)":5 * cdef object _dict * cdef bint use_setstate - * state = (self.default_value, self.immutable, self.private) # <<<<<<<<<<<<<< + * state = (self.choices, self.default_value, self.immutable, self.private) # <<<<<<<<<<<<<< * _dict = getattr(self, '__dict__', None) * if _dict is not None: */ - __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_self->__pyx_base.choices); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.choices); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->__pyx_base.choices); __Pyx_INCREF(__pyx_v_self->__pyx_base.default_value); __Pyx_GIVEREF(__pyx_v_self->__pyx_base.default_value); - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->__pyx_base.default_value); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->__pyx_base.default_value); __Pyx_INCREF(__pyx_v_self->__pyx_base.immutable); __Pyx_GIVEREF(__pyx_v_self->__pyx_base.immutable); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->__pyx_base.immutable); + PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->__pyx_base.immutable); __Pyx_INCREF(__pyx_v_self->__pyx_base.private); __Pyx_GIVEREF(__pyx_v_self->__pyx_base.private); - PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->__pyx_base.private); + PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_self->__pyx_base.private); __pyx_v_state = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":6 * cdef bint use_setstate - * state = (self.default_value, self.immutable, self.private) + * state = (self.choices, self.default_value, self.immutable, self.private) * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< * if _dict is not None: * state += (_dict,) @@ -4957,7 +5158,7 @@ static PyObject *__pyx_pf_6nyoibo_6fields_10FloatField___reduce_cython__(struct __pyx_t_1 = 0; /* "(tree fragment)":7 - * state = (self.default_value, self.immutable, self.private) + * state = (self.choices, self.default_value, self.immutable, self.private) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) @@ -4990,12 +5191,12 @@ static PyObject *__pyx_pf_6nyoibo_6fields_10FloatField___reduce_cython__(struct * state += (_dict,) * use_setstate = True # <<<<<<<<<<<<<< * else: - * use_setstate = self.default_value is not None or self.immutable is not None or self.private is not None + * use_setstate = self.choices is not None or self.default_value is not None or self.immutable is not None or self.private is not None */ __pyx_v_use_setstate = 1; /* "(tree fragment)":7 - * state = (self.default_value, self.immutable, self.private) + * state = (self.choices, self.default_value, self.immutable, self.private) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) @@ -5007,28 +5208,35 @@ static PyObject *__pyx_pf_6nyoibo_6fields_10FloatField___reduce_cython__(struct /* "(tree fragment)":11 * use_setstate = True * else: - * use_setstate = self.default_value is not None or self.immutable is not None or self.private is not None # <<<<<<<<<<<<<< + * use_setstate = self.choices is not None or self.default_value is not None or self.immutable is not None or self.private is not None # <<<<<<<<<<<<<< * if use_setstate: - * return __pyx_unpickle_FloatField, (type(self), 0x0077a4c, None), state + * return __pyx_unpickle_FloatField, (type(self), 0x82d92b6, None), state */ /*else*/ { - __pyx_t_2 = (__pyx_v_self->__pyx_base.default_value != Py_None); + __pyx_t_2 = (__pyx_v_self->__pyx_base.choices != Py_None); __pyx_t_5 = (__pyx_t_2 != 0); if (!__pyx_t_5) { } else { __pyx_t_3 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } - __pyx_t_5 = (__pyx_v_self->__pyx_base.immutable != Py_None); + __pyx_t_5 = (__pyx_v_self->__pyx_base.default_value != Py_None); __pyx_t_2 = (__pyx_t_5 != 0); if (!__pyx_t_2) { } else { __pyx_t_3 = __pyx_t_2; goto __pyx_L4_bool_binop_done; } - __pyx_t_2 = (__pyx_v_self->__pyx_base.private != Py_None); + __pyx_t_2 = (__pyx_v_self->__pyx_base.immutable != Py_None); __pyx_t_5 = (__pyx_t_2 != 0); - __pyx_t_3 = __pyx_t_5; + if (!__pyx_t_5) { + } else { + __pyx_t_3 = __pyx_t_5; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.private != Py_None); + __pyx_t_2 = (__pyx_t_5 != 0); + __pyx_t_3 = __pyx_t_2; __pyx_L4_bool_binop_done:; __pyx_v_use_setstate = __pyx_t_3; } @@ -5036,20 +5244,20 @@ static PyObject *__pyx_pf_6nyoibo_6fields_10FloatField___reduce_cython__(struct /* "(tree fragment)":12 * else: - * use_setstate = self.default_value is not None or self.immutable is not None or self.private is not None + * use_setstate = self.choices is not None or self.default_value is not None or self.immutable is not None or self.private is not None * if use_setstate: # <<<<<<<<<<<<<< - * return __pyx_unpickle_FloatField, (type(self), 0x0077a4c, None), state + * return __pyx_unpickle_FloatField, (type(self), 0x82d92b6, None), state * else: */ __pyx_t_3 = (__pyx_v_use_setstate != 0); if (__pyx_t_3) { /* "(tree fragment)":13 - * use_setstate = self.default_value is not None or self.immutable is not None or self.private is not None + * use_setstate = self.choices is not None or self.default_value is not None or self.immutable is not None or self.private is not None * if use_setstate: - * return __pyx_unpickle_FloatField, (type(self), 0x0077a4c, None), state # <<<<<<<<<<<<<< + * return __pyx_unpickle_FloatField, (type(self), 0x82d92b6, None), state # <<<<<<<<<<<<<< * else: - * return __pyx_unpickle_FloatField, (type(self), 0x0077a4c, state) + * return __pyx_unpickle_FloatField, (type(self), 0x82d92b6, state) */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_FloatField); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error) @@ -5059,9 +5267,9 @@ static PyObject *__pyx_pf_6nyoibo_6fields_10FloatField___reduce_cython__(struct __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); - __Pyx_INCREF(__pyx_int_490060); - __Pyx_GIVEREF(__pyx_int_490060); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_490060); + __Pyx_INCREF(__pyx_int_137204406); + __Pyx_GIVEREF(__pyx_int_137204406); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_137204406); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None); @@ -5082,17 +5290,17 @@ static PyObject *__pyx_pf_6nyoibo_6fields_10FloatField___reduce_cython__(struct /* "(tree fragment)":12 * else: - * use_setstate = self.default_value is not None or self.immutable is not None or self.private is not None + * use_setstate = self.choices is not None or self.default_value is not None or self.immutable is not None or self.private is not None * if use_setstate: # <<<<<<<<<<<<<< - * return __pyx_unpickle_FloatField, (type(self), 0x0077a4c, None), state + * return __pyx_unpickle_FloatField, (type(self), 0x82d92b6, None), state * else: */ } /* "(tree fragment)":15 - * return __pyx_unpickle_FloatField, (type(self), 0x0077a4c, None), state + * return __pyx_unpickle_FloatField, (type(self), 0x82d92b6, None), state * else: - * return __pyx_unpickle_FloatField, (type(self), 0x0077a4c, state) # <<<<<<<<<<<<<< + * return __pyx_unpickle_FloatField, (type(self), 0x82d92b6, state) # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_FloatField__set_state(self, __pyx_state) */ @@ -5105,9 +5313,9 @@ static PyObject *__pyx_pf_6nyoibo_6fields_10FloatField___reduce_cython__(struct __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); - __Pyx_INCREF(__pyx_int_490060); - __Pyx_GIVEREF(__pyx_int_490060); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_490060); + __Pyx_INCREF(__pyx_int_137204406); + __Pyx_GIVEREF(__pyx_int_137204406); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_137204406); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state); @@ -5147,7 +5355,7 @@ static PyObject *__pyx_pf_6nyoibo_6fields_10FloatField___reduce_cython__(struct /* "(tree fragment)":16 * else: - * return __pyx_unpickle_FloatField, (type(self), 0x0077a4c, state) + * return __pyx_unpickle_FloatField, (type(self), 0x82d92b6, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_FloatField__set_state(self, __pyx_state) */ @@ -5175,7 +5383,7 @@ static PyObject *__pyx_pf_6nyoibo_6fields_10FloatField_2__setstate_cython__(stru __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":17 - * return __pyx_unpickle_FloatField, (type(self), 0x0077a4c, state) + * return __pyx_unpickle_FloatField, (type(self), 0x82d92b6, state) * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_FloatField__set_state(self, __pyx_state) # <<<<<<<<<<<<<< */ @@ -5186,7 +5394,7 @@ static PyObject *__pyx_pf_6nyoibo_6fields_10FloatField_2__setstate_cython__(stru /* "(tree fragment)":16 * else: - * return __pyx_unpickle_FloatField, (type(self), 0x0077a4c, state) + * return __pyx_unpickle_FloatField, (type(self), 0x82d92b6, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_FloatField__set_state(self, __pyx_state) */ @@ -5243,27 +5451,30 @@ static PyObject *__pyx_pf_6nyoibo_6fields_12DecimalField___reduce_cython__(struc /* "(tree fragment)":5 * cdef object _dict * cdef bint use_setstate - * state = (self.default_value, self.immutable, self.private) # <<<<<<<<<<<<<< + * state = (self.choices, self.default_value, self.immutable, self.private) # <<<<<<<<<<<<<< * _dict = getattr(self, '__dict__', None) * if _dict is not None: */ - __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_self->__pyx_base.choices); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.choices); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->__pyx_base.choices); __Pyx_INCREF(__pyx_v_self->__pyx_base.default_value); __Pyx_GIVEREF(__pyx_v_self->__pyx_base.default_value); - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->__pyx_base.default_value); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->__pyx_base.default_value); __Pyx_INCREF(__pyx_v_self->__pyx_base.immutable); __Pyx_GIVEREF(__pyx_v_self->__pyx_base.immutable); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->__pyx_base.immutable); + PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->__pyx_base.immutable); __Pyx_INCREF(__pyx_v_self->__pyx_base.private); __Pyx_GIVEREF(__pyx_v_self->__pyx_base.private); - PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->__pyx_base.private); + PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_self->__pyx_base.private); __pyx_v_state = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":6 * cdef bint use_setstate - * state = (self.default_value, self.immutable, self.private) + * state = (self.choices, self.default_value, self.immutable, self.private) * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< * if _dict is not None: * state += (_dict,) @@ -5274,7 +5485,7 @@ static PyObject *__pyx_pf_6nyoibo_6fields_12DecimalField___reduce_cython__(struc __pyx_t_1 = 0; /* "(tree fragment)":7 - * state = (self.default_value, self.immutable, self.private) + * state = (self.choices, self.default_value, self.immutable, self.private) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) @@ -5307,12 +5518,12 @@ static PyObject *__pyx_pf_6nyoibo_6fields_12DecimalField___reduce_cython__(struc * state += (_dict,) * use_setstate = True # <<<<<<<<<<<<<< * else: - * use_setstate = self.default_value is not None or self.immutable is not None or self.private is not None + * use_setstate = self.choices is not None or self.default_value is not None or self.immutable is not None or self.private is not None */ __pyx_v_use_setstate = 1; /* "(tree fragment)":7 - * state = (self.default_value, self.immutable, self.private) + * state = (self.choices, self.default_value, self.immutable, self.private) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) @@ -5324,28 +5535,35 @@ static PyObject *__pyx_pf_6nyoibo_6fields_12DecimalField___reduce_cython__(struc /* "(tree fragment)":11 * use_setstate = True * else: - * use_setstate = self.default_value is not None or self.immutable is not None or self.private is not None # <<<<<<<<<<<<<< + * use_setstate = self.choices is not None or self.default_value is not None or self.immutable is not None or self.private is not None # <<<<<<<<<<<<<< * if use_setstate: - * return __pyx_unpickle_DecimalField, (type(self), 0x0077a4c, None), state + * return __pyx_unpickle_DecimalField, (type(self), 0x82d92b6, None), state */ /*else*/ { - __pyx_t_2 = (__pyx_v_self->__pyx_base.default_value != Py_None); + __pyx_t_2 = (__pyx_v_self->__pyx_base.choices != Py_None); __pyx_t_5 = (__pyx_t_2 != 0); if (!__pyx_t_5) { } else { __pyx_t_3 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } - __pyx_t_5 = (__pyx_v_self->__pyx_base.immutable != Py_None); + __pyx_t_5 = (__pyx_v_self->__pyx_base.default_value != Py_None); __pyx_t_2 = (__pyx_t_5 != 0); if (!__pyx_t_2) { } else { __pyx_t_3 = __pyx_t_2; goto __pyx_L4_bool_binop_done; } - __pyx_t_2 = (__pyx_v_self->__pyx_base.private != Py_None); + __pyx_t_2 = (__pyx_v_self->__pyx_base.immutable != Py_None); __pyx_t_5 = (__pyx_t_2 != 0); - __pyx_t_3 = __pyx_t_5; + if (!__pyx_t_5) { + } else { + __pyx_t_3 = __pyx_t_5; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_self->__pyx_base.private != Py_None); + __pyx_t_2 = (__pyx_t_5 != 0); + __pyx_t_3 = __pyx_t_2; __pyx_L4_bool_binop_done:; __pyx_v_use_setstate = __pyx_t_3; } @@ -5353,20 +5571,20 @@ static PyObject *__pyx_pf_6nyoibo_6fields_12DecimalField___reduce_cython__(struc /* "(tree fragment)":12 * else: - * use_setstate = self.default_value is not None or self.immutable is not None or self.private is not None + * use_setstate = self.choices is not None or self.default_value is not None or self.immutable is not None or self.private is not None * if use_setstate: # <<<<<<<<<<<<<< - * return __pyx_unpickle_DecimalField, (type(self), 0x0077a4c, None), state + * return __pyx_unpickle_DecimalField, (type(self), 0x82d92b6, None), state * else: */ __pyx_t_3 = (__pyx_v_use_setstate != 0); if (__pyx_t_3) { /* "(tree fragment)":13 - * use_setstate = self.default_value is not None or self.immutable is not None or self.private is not None + * use_setstate = self.choices is not None or self.default_value is not None or self.immutable is not None or self.private is not None * if use_setstate: - * return __pyx_unpickle_DecimalField, (type(self), 0x0077a4c, None), state # <<<<<<<<<<<<<< + * return __pyx_unpickle_DecimalField, (type(self), 0x82d92b6, None), state # <<<<<<<<<<<<<< * else: - * return __pyx_unpickle_DecimalField, (type(self), 0x0077a4c, state) + * return __pyx_unpickle_DecimalField, (type(self), 0x82d92b6, state) */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_DecimalField); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error) @@ -5376,9 +5594,9 @@ static PyObject *__pyx_pf_6nyoibo_6fields_12DecimalField___reduce_cython__(struc __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); - __Pyx_INCREF(__pyx_int_490060); - __Pyx_GIVEREF(__pyx_int_490060); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_490060); + __Pyx_INCREF(__pyx_int_137204406); + __Pyx_GIVEREF(__pyx_int_137204406); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_137204406); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None); @@ -5399,17 +5617,17 @@ static PyObject *__pyx_pf_6nyoibo_6fields_12DecimalField___reduce_cython__(struc /* "(tree fragment)":12 * else: - * use_setstate = self.default_value is not None or self.immutable is not None or self.private is not None + * use_setstate = self.choices is not None or self.default_value is not None or self.immutable is not None or self.private is not None * if use_setstate: # <<<<<<<<<<<<<< - * return __pyx_unpickle_DecimalField, (type(self), 0x0077a4c, None), state + * return __pyx_unpickle_DecimalField, (type(self), 0x82d92b6, None), state * else: */ } /* "(tree fragment)":15 - * return __pyx_unpickle_DecimalField, (type(self), 0x0077a4c, None), state + * return __pyx_unpickle_DecimalField, (type(self), 0x82d92b6, None), state * else: - * return __pyx_unpickle_DecimalField, (type(self), 0x0077a4c, state) # <<<<<<<<<<<<<< + * return __pyx_unpickle_DecimalField, (type(self), 0x82d92b6, state) # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_DecimalField__set_state(self, __pyx_state) */ @@ -5422,9 +5640,9 @@ static PyObject *__pyx_pf_6nyoibo_6fields_12DecimalField___reduce_cython__(struc __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); - __Pyx_INCREF(__pyx_int_490060); - __Pyx_GIVEREF(__pyx_int_490060); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_490060); + __Pyx_INCREF(__pyx_int_137204406); + __Pyx_GIVEREF(__pyx_int_137204406); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_137204406); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state); @@ -5464,7 +5682,7 @@ static PyObject *__pyx_pf_6nyoibo_6fields_12DecimalField___reduce_cython__(struc /* "(tree fragment)":16 * else: - * return __pyx_unpickle_DecimalField, (type(self), 0x0077a4c, state) + * return __pyx_unpickle_DecimalField, (type(self), 0x82d92b6, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_DecimalField__set_state(self, __pyx_state) */ @@ -5492,7 +5710,7 @@ static PyObject *__pyx_pf_6nyoibo_6fields_12DecimalField_2__setstate_cython__(st __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":17 - * return __pyx_unpickle_DecimalField, (type(self), 0x0077a4c, state) + * return __pyx_unpickle_DecimalField, (type(self), 0x82d92b6, state) * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_DecimalField__set_state(self, __pyx_state) # <<<<<<<<<<<<<< */ @@ -5503,7 +5721,7 @@ static PyObject *__pyx_pf_6nyoibo_6fields_12DecimalField_2__setstate_cython__(st /* "(tree fragment)":16 * else: - * return __pyx_unpickle_DecimalField, (type(self), 0x0077a4c, state) + * return __pyx_unpickle_DecimalField, (type(self), 0x82d92b6, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_DecimalField__set_state(self, __pyx_state) */ @@ -5521,7 +5739,7 @@ static PyObject *__pyx_pf_6nyoibo_6fields_12DecimalField_2__setstate_cython__(st return __pyx_r; } -/* "nyoibo/fields.pyx":81 +/* "nyoibo/fields.pyx":86 * cdef class LinkField(Field): * * def __init__(self, to, *args, **kwargs): # <<<<<<<<<<<<<< @@ -5574,7 +5792,7 @@ static int __pyx_pw_6nyoibo_6fields_9LinkField_1__init__(PyObject *__pyx_v_self, } if (unlikely(kw_args > 0)) { const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "__init__") < 0)) __PYX_ERR(0, 81, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "__init__") < 0)) __PYX_ERR(0, 86, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) < 1) { goto __pyx_L5_argtuple_error; @@ -5585,7 +5803,7 @@ static int __pyx_pw_6nyoibo_6fields_9LinkField_1__init__(PyObject *__pyx_v_self, } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 81, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 86, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0; __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; @@ -5612,14 +5830,14 @@ static int __pyx_pf_6nyoibo_6fields_9LinkField___init__(struct __pyx_obj_6nyoibo int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "nyoibo/fields.pyx":82 + /* "nyoibo/fields.pyx":87 * * def __init__(self, to, *args, **kwargs): * super(LinkField, self).__init__(*args, **kwargs) # <<<<<<<<<<<<<< * self.to = to * */ - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 82, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 87, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_ptype_6nyoibo_6fields_LinkField)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_6nyoibo_6fields_LinkField)); @@ -5627,18 +5845,18 @@ static int __pyx_pf_6nyoibo_6fields_9LinkField___init__(struct __pyx_obj_6nyoibo __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self)); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 82, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 87, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 82, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 87, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 82, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 87, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "nyoibo/fields.pyx":83 + /* "nyoibo/fields.pyx":88 * def __init__(self, to, *args, **kwargs): * super(LinkField, self).__init__(*args, **kwargs) * self.to = to # <<<<<<<<<<<<<< @@ -5651,7 +5869,7 @@ static int __pyx_pf_6nyoibo_6fields_9LinkField___init__(struct __pyx_obj_6nyoibo __Pyx_DECREF(__pyx_v_self->to); __pyx_v_self->to = __pyx_v_to; - /* "nyoibo/fields.pyx":81 + /* "nyoibo/fields.pyx":86 * cdef class LinkField(Field): * * def __init__(self, to, *args, **kwargs): # <<<<<<<<<<<<<< @@ -5672,7 +5890,7 @@ static int __pyx_pf_6nyoibo_6fields_9LinkField___init__(struct __pyx_obj_6nyoibo return __pyx_r; } -/* "nyoibo/fields.pyx":85 +/* "nyoibo/fields.pyx":90 * self.to = to * * cpdef public parse(self, value): # <<<<<<<<<<<<<< @@ -5700,7 +5918,7 @@ PyObject *__pyx_f_6nyoibo_6fields_9LinkField_parse(CYTHON_UNUSED struct __pyx_ob if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_parse); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 85, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_parse); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6nyoibo_6fields_9LinkField_3parse)) { __Pyx_XDECREF(__pyx_r); @@ -5717,7 +5935,7 @@ PyObject *__pyx_f_6nyoibo_6fields_9LinkField_parse(CYTHON_UNUSED struct __pyx_ob } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_value); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 85, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; @@ -5738,7 +5956,7 @@ PyObject *__pyx_f_6nyoibo_6fields_9LinkField_parse(CYTHON_UNUSED struct __pyx_ob #endif } - /* "nyoibo/fields.pyx":86 + /* "nyoibo/fields.pyx":91 * * cpdef public parse(self, value): * return value # <<<<<<<<<<<<<< @@ -5748,7 +5966,7 @@ PyObject *__pyx_f_6nyoibo_6fields_9LinkField_parse(CYTHON_UNUSED struct __pyx_ob __pyx_r = __pyx_v_value; goto __pyx_L0; - /* "nyoibo/fields.pyx":85 + /* "nyoibo/fields.pyx":90 * self.to = to * * cpdef public parse(self, value): # <<<<<<<<<<<<<< @@ -5791,7 +6009,7 @@ static PyObject *__pyx_pf_6nyoibo_6fields_9LinkField_2parse(struct __pyx_obj_6ny int __pyx_clineno = 0; __Pyx_RefNannySetupContext("parse", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_6nyoibo_6fields_9LinkField_parse(__pyx_v_self, __pyx_v_value, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 85, __pyx_L1_error) + __pyx_t_1 = __pyx_f_6nyoibo_6fields_9LinkField_parse(__pyx_v_self, __pyx_v_value, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -5808,7 +6026,7 @@ static PyObject *__pyx_pf_6nyoibo_6fields_9LinkField_2parse(struct __pyx_obj_6ny return __pyx_r; } -/* "nyoibo/fields.pxd":10 +/* "nyoibo/fields.pxd":11 * * cdef class LinkField(Field): * cdef readonly to # <<<<<<<<<<<<<< @@ -5882,30 +6100,33 @@ static PyObject *__pyx_pf_6nyoibo_6fields_9LinkField_4__reduce_cython__(struct _ /* "(tree fragment)":5 * cdef object _dict * cdef bint use_setstate - * state = (self.default_value, self.immutable, self.private, self.to) # <<<<<<<<<<<<<< + * state = (self.choices, self.default_value, self.immutable, self.private, self.to) # <<<<<<<<<<<<<< * _dict = getattr(self, '__dict__', None) * if _dict is not None: */ - __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_self->__pyx_base.choices); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.choices); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->__pyx_base.choices); __Pyx_INCREF(__pyx_v_self->__pyx_base.default_value); __Pyx_GIVEREF(__pyx_v_self->__pyx_base.default_value); - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->__pyx_base.default_value); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->__pyx_base.default_value); __Pyx_INCREF(__pyx_v_self->__pyx_base.immutable); __Pyx_GIVEREF(__pyx_v_self->__pyx_base.immutable); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->__pyx_base.immutable); + PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->__pyx_base.immutable); __Pyx_INCREF(__pyx_v_self->__pyx_base.private); __Pyx_GIVEREF(__pyx_v_self->__pyx_base.private); - PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->__pyx_base.private); + PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_self->__pyx_base.private); __Pyx_INCREF(__pyx_v_self->to); __Pyx_GIVEREF(__pyx_v_self->to); - PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_self->to); + PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_v_self->to); __pyx_v_state = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":6 * cdef bint use_setstate - * state = (self.default_value, self.immutable, self.private, self.to) + * state = (self.choices, self.default_value, self.immutable, self.private, self.to) * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< * if _dict is not None: * state += (_dict,) @@ -5916,7 +6137,7 @@ static PyObject *__pyx_pf_6nyoibo_6fields_9LinkField_4__reduce_cython__(struct _ __pyx_t_1 = 0; /* "(tree fragment)":7 - * state = (self.default_value, self.immutable, self.private, self.to) + * state = (self.choices, self.default_value, self.immutable, self.private, self.to) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) @@ -5949,12 +6170,12 @@ static PyObject *__pyx_pf_6nyoibo_6fields_9LinkField_4__reduce_cython__(struct _ * state += (_dict,) * use_setstate = True # <<<<<<<<<<<<<< * else: - * use_setstate = self.default_value is not None or self.immutable is not None or self.private is not None or self.to is not None + * use_setstate = self.choices is not None or self.default_value is not None or self.immutable is not None or self.private is not None or self.to is not None */ __pyx_v_use_setstate = 1; /* "(tree fragment)":7 - * state = (self.default_value, self.immutable, self.private, self.to) + * state = (self.choices, self.default_value, self.immutable, self.private, self.to) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) @@ -5966,35 +6187,42 @@ static PyObject *__pyx_pf_6nyoibo_6fields_9LinkField_4__reduce_cython__(struct _ /* "(tree fragment)":11 * use_setstate = True * else: - * use_setstate = self.default_value is not None or self.immutable is not None or self.private is not None or self.to is not None # <<<<<<<<<<<<<< + * use_setstate = self.choices is not None or self.default_value is not None or self.immutable is not None or self.private is not None or self.to is not None # <<<<<<<<<<<<<< * if use_setstate: - * return __pyx_unpickle_LinkField, (type(self), 0x2bdffb3, None), state + * return __pyx_unpickle_LinkField, (type(self), 0x22a05d2, None), state */ /*else*/ { - __pyx_t_2 = (__pyx_v_self->__pyx_base.default_value != Py_None); + __pyx_t_2 = (__pyx_v_self->__pyx_base.choices != Py_None); __pyx_t_5 = (__pyx_t_2 != 0); if (!__pyx_t_5) { } else { __pyx_t_3 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } - __pyx_t_5 = (__pyx_v_self->__pyx_base.immutable != Py_None); + __pyx_t_5 = (__pyx_v_self->__pyx_base.default_value != Py_None); __pyx_t_2 = (__pyx_t_5 != 0); if (!__pyx_t_2) { } else { __pyx_t_3 = __pyx_t_2; goto __pyx_L4_bool_binop_done; } - __pyx_t_2 = (__pyx_v_self->__pyx_base.private != Py_None); + __pyx_t_2 = (__pyx_v_self->__pyx_base.immutable != Py_None); __pyx_t_5 = (__pyx_t_2 != 0); if (!__pyx_t_5) { } else { __pyx_t_3 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } - __pyx_t_5 = (__pyx_v_self->to != Py_None); + __pyx_t_5 = (__pyx_v_self->__pyx_base.private != Py_None); __pyx_t_2 = (__pyx_t_5 != 0); - __pyx_t_3 = __pyx_t_2; + if (!__pyx_t_2) { + } else { + __pyx_t_3 = __pyx_t_2; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_2 = (__pyx_v_self->to != Py_None); + __pyx_t_5 = (__pyx_t_2 != 0); + __pyx_t_3 = __pyx_t_5; __pyx_L4_bool_binop_done:; __pyx_v_use_setstate = __pyx_t_3; } @@ -6002,20 +6230,20 @@ static PyObject *__pyx_pf_6nyoibo_6fields_9LinkField_4__reduce_cython__(struct _ /* "(tree fragment)":12 * else: - * use_setstate = self.default_value is not None or self.immutable is not None or self.private is not None or self.to is not None + * use_setstate = self.choices is not None or self.default_value is not None or self.immutable is not None or self.private is not None or self.to is not None * if use_setstate: # <<<<<<<<<<<<<< - * return __pyx_unpickle_LinkField, (type(self), 0x2bdffb3, None), state + * return __pyx_unpickle_LinkField, (type(self), 0x22a05d2, None), state * else: */ __pyx_t_3 = (__pyx_v_use_setstate != 0); if (__pyx_t_3) { /* "(tree fragment)":13 - * use_setstate = self.default_value is not None or self.immutable is not None or self.private is not None or self.to is not None + * use_setstate = self.choices is not None or self.default_value is not None or self.immutable is not None or self.private is not None or self.to is not None * if use_setstate: - * return __pyx_unpickle_LinkField, (type(self), 0x2bdffb3, None), state # <<<<<<<<<<<<<< + * return __pyx_unpickle_LinkField, (type(self), 0x22a05d2, None), state # <<<<<<<<<<<<<< * else: - * return __pyx_unpickle_LinkField, (type(self), 0x2bdffb3, state) + * return __pyx_unpickle_LinkField, (type(self), 0x22a05d2, state) */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_LinkField); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error) @@ -6025,9 +6253,9 @@ static PyObject *__pyx_pf_6nyoibo_6fields_9LinkField_4__reduce_cython__(struct _ __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); - __Pyx_INCREF(__pyx_int_46006195); - __Pyx_GIVEREF(__pyx_int_46006195); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_46006195); + __Pyx_INCREF(__pyx_int_36308434); + __Pyx_GIVEREF(__pyx_int_36308434); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_36308434); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None); @@ -6048,17 +6276,17 @@ static PyObject *__pyx_pf_6nyoibo_6fields_9LinkField_4__reduce_cython__(struct _ /* "(tree fragment)":12 * else: - * use_setstate = self.default_value is not None or self.immutable is not None or self.private is not None or self.to is not None + * use_setstate = self.choices is not None or self.default_value is not None or self.immutable is not None or self.private is not None or self.to is not None * if use_setstate: # <<<<<<<<<<<<<< - * return __pyx_unpickle_LinkField, (type(self), 0x2bdffb3, None), state + * return __pyx_unpickle_LinkField, (type(self), 0x22a05d2, None), state * else: */ } /* "(tree fragment)":15 - * return __pyx_unpickle_LinkField, (type(self), 0x2bdffb3, None), state + * return __pyx_unpickle_LinkField, (type(self), 0x22a05d2, None), state * else: - * return __pyx_unpickle_LinkField, (type(self), 0x2bdffb3, state) # <<<<<<<<<<<<<< + * return __pyx_unpickle_LinkField, (type(self), 0x22a05d2, state) # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_LinkField__set_state(self, __pyx_state) */ @@ -6071,9 +6299,9 @@ static PyObject *__pyx_pf_6nyoibo_6fields_9LinkField_4__reduce_cython__(struct _ __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); - __Pyx_INCREF(__pyx_int_46006195); - __Pyx_GIVEREF(__pyx_int_46006195); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_46006195); + __Pyx_INCREF(__pyx_int_36308434); + __Pyx_GIVEREF(__pyx_int_36308434); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_36308434); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state); @@ -6113,7 +6341,7 @@ static PyObject *__pyx_pf_6nyoibo_6fields_9LinkField_4__reduce_cython__(struct _ /* "(tree fragment)":16 * else: - * return __pyx_unpickle_LinkField, (type(self), 0x2bdffb3, state) + * return __pyx_unpickle_LinkField, (type(self), 0x22a05d2, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_LinkField__set_state(self, __pyx_state) */ @@ -6141,7 +6369,7 @@ static PyObject *__pyx_pf_6nyoibo_6fields_9LinkField_6__setstate_cython__(struct __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":17 - * return __pyx_unpickle_LinkField, (type(self), 0x2bdffb3, state) + * return __pyx_unpickle_LinkField, (type(self), 0x22a05d2, state) * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_LinkField__set_state(self, __pyx_state) # <<<<<<<<<<<<<< */ @@ -6152,7 +6380,7 @@ static PyObject *__pyx_pf_6nyoibo_6fields_9LinkField_6__setstate_cython__(struct /* "(tree fragment)":16 * else: - * return __pyx_unpickle_LinkField, (type(self), 0x2bdffb3, state) + * return __pyx_unpickle_LinkField, (type(self), 0x22a05d2, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_LinkField__set_state(self, __pyx_state) */ @@ -6271,18 +6499,18 @@ static PyObject *__pyx_pf_6nyoibo_6fields___pyx_unpickle_Field(CYTHON_UNUSED PyO /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result - * if __pyx_checksum != 0x0077a4c: # <<<<<<<<<<<<<< + * if __pyx_checksum != 0x82d92b6: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0077a4c = (default_value, immutable, private))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x82d92b6 = (choices, default_value, immutable, private))" % __pyx_checksum) */ - __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x0077a4c) != 0); + __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x82d92b6) != 0); if (__pyx_t_1) { /* "(tree fragment)":5 * cdef object __pyx_result - * if __pyx_checksum != 0x0077a4c: + * if __pyx_checksum != 0x82d92b6: * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0077a4c = (default_value, immutable, private))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x82d92b6 = (choices, default_value, immutable, private))" % __pyx_checksum) * __pyx_result = Field.__new__(__pyx_type) */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error) @@ -6301,15 +6529,15 @@ static PyObject *__pyx_pf_6nyoibo_6fields___pyx_unpickle_Field(CYTHON_UNUSED PyO __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":6 - * if __pyx_checksum != 0x0077a4c: + * if __pyx_checksum != 0x82d92b6: * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0077a4c = (default_value, immutable, private))" % __pyx_checksum) # <<<<<<<<<<<<<< + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x82d92b6 = (choices, default_value, immutable, private))" % __pyx_checksum) # <<<<<<<<<<<<<< * __pyx_result = Field.__new__(__pyx_type) * if __pyx_state is not None: */ __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x00, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x82, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_INCREF(__pyx_v___pyx_PickleError); @@ -6336,15 +6564,15 @@ static PyObject *__pyx_pf_6nyoibo_6fields___pyx_unpickle_Field(CYTHON_UNUSED PyO /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result - * if __pyx_checksum != 0x0077a4c: # <<<<<<<<<<<<<< + * if __pyx_checksum != 0x82d92b6: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0077a4c = (default_value, immutable, private))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x82d92b6 = (choices, default_value, immutable, private))" % __pyx_checksum) */ } /* "(tree fragment)":7 * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0077a4c = (default_value, immutable, private))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x82d92b6 = (choices, default_value, immutable, private))" % __pyx_checksum) * __pyx_result = Field.__new__(__pyx_type) # <<<<<<<<<<<<<< * if __pyx_state is not None: * __pyx_unpickle_Field__set_state( __pyx_result, __pyx_state) @@ -6370,7 +6598,7 @@ static PyObject *__pyx_pf_6nyoibo_6fields___pyx_unpickle_Field(CYTHON_UNUSED PyO __pyx_t_3 = 0; /* "(tree fragment)":8 - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0077a4c = (default_value, immutable, private))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x82d92b6 = (choices, default_value, immutable, private))" % __pyx_checksum) * __pyx_result = Field.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_Field__set_state( __pyx_result, __pyx_state) @@ -6393,7 +6621,7 @@ static PyObject *__pyx_pf_6nyoibo_6fields___pyx_unpickle_Field(CYTHON_UNUSED PyO __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":8 - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0077a4c = (default_value, immutable, private))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x82d92b6 = (choices, default_value, immutable, private))" % __pyx_checksum) * __pyx_result = Field.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_Field__set_state( __pyx_result, __pyx_state) @@ -6406,7 +6634,7 @@ static PyObject *__pyx_pf_6nyoibo_6fields___pyx_unpickle_Field(CYTHON_UNUSED PyO * __pyx_unpickle_Field__set_state( __pyx_result, __pyx_state) * return __pyx_result # <<<<<<<<<<<<<< * cdef __pyx_unpickle_Field__set_state(Field __pyx_result, tuple __pyx_state): - * __pyx_result.default_value = __pyx_state[0]; __pyx_result.immutable = __pyx_state[1]; __pyx_result.private = __pyx_state[2] + * __pyx_result.choices = __pyx_state[0]; __pyx_result.default_value = __pyx_state[1]; __pyx_result.immutable = __pyx_state[2]; __pyx_result.private = __pyx_state[3] */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v___pyx_result); @@ -6439,8 +6667,8 @@ static PyObject *__pyx_pf_6nyoibo_6fields___pyx_unpickle_Field(CYTHON_UNUSED PyO * __pyx_unpickle_Field__set_state( __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_Field__set_state(Field __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< - * __pyx_result.default_value = __pyx_state[0]; __pyx_result.immutable = __pyx_state[1]; __pyx_result.private = __pyx_state[2] - * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.choices = __pyx_state[0]; __pyx_result.default_value = __pyx_state[1]; __pyx_result.immutable = __pyx_state[2]; __pyx_result.private = __pyx_state[3] + * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): */ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_Field__set_state(struct __pyx_obj_6nyoibo_6fields_Field *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { @@ -6462,9 +6690,9 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_Field__set_state(struct /* "(tree fragment)":12 * return __pyx_result * cdef __pyx_unpickle_Field__set_state(Field __pyx_result, tuple __pyx_state): - * __pyx_result.default_value = __pyx_state[0]; __pyx_result.immutable = __pyx_state[1]; __pyx_result.private = __pyx_state[2] # <<<<<<<<<<<<<< - * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): - * __pyx_result.__dict__.update(__pyx_state[3]) + * __pyx_result.choices = __pyx_state[0]; __pyx_result.default_value = __pyx_state[1]; __pyx_result.immutable = __pyx_state[2]; __pyx_result.private = __pyx_state[3] # <<<<<<<<<<<<<< + * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.__dict__.update(__pyx_state[4]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); @@ -6473,6 +6701,17 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_Field__set_state(struct __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->choices); + __Pyx_DECREF(__pyx_v___pyx_result->choices); + __pyx_v___pyx_result->choices = __pyx_t_1; + __pyx_t_1 = 0; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(1, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->default_value); __Pyx_DECREF(__pyx_v___pyx_result->default_value); __pyx_v___pyx_result->default_value = __pyx_t_1; @@ -6481,7 +6720,7 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_Field__set_state(struct PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->immutable); @@ -6492,7 +6731,7 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_Field__set_state(struct PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->private); @@ -6502,16 +6741,16 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_Field__set_state(struct /* "(tree fragment)":13 * cdef __pyx_unpickle_Field__set_state(Field __pyx_result, tuple __pyx_state): - * __pyx_result.default_value = __pyx_state[0]; __pyx_result.immutable = __pyx_state[1]; __pyx_result.private = __pyx_state[2] - * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< - * __pyx_result.__dict__.update(__pyx_state[3]) + * __pyx_result.choices = __pyx_state[0]; __pyx_result.default_value = __pyx_state[1]; __pyx_result.immutable = __pyx_state[2]; __pyx_result.private = __pyx_state[3] + * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< + * __pyx_result.__dict__.update(__pyx_state[4]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(1, 13, __pyx_L1_error) } __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error) - __pyx_t_4 = ((__pyx_t_3 > 3) != 0); + __pyx_t_4 = ((__pyx_t_3 > 4) != 0); if (__pyx_t_4) { } else { __pyx_t_2 = __pyx_t_4; @@ -6524,9 +6763,9 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_Field__set_state(struct if (__pyx_t_2) { /* "(tree fragment)":14 - * __pyx_result.default_value = __pyx_state[0]; __pyx_result.immutable = __pyx_state[1]; __pyx_result.private = __pyx_state[2] - * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): - * __pyx_result.__dict__.update(__pyx_state[3]) # <<<<<<<<<<<<<< + * __pyx_result.choices = __pyx_state[0]; __pyx_result.default_value = __pyx_state[1]; __pyx_result.immutable = __pyx_state[2]; __pyx_result.private = __pyx_state[3] + * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.__dict__.update(__pyx_state[4]) # <<<<<<<<<<<<<< */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); @@ -6537,7 +6776,7 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_Field__set_state(struct PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 14, __pyx_L1_error) } - __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { @@ -6559,9 +6798,9 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_Field__set_state(struct /* "(tree fragment)":13 * cdef __pyx_unpickle_Field__set_state(Field __pyx_result, tuple __pyx_state): - * __pyx_result.default_value = __pyx_state[0]; __pyx_result.immutable = __pyx_state[1]; __pyx_result.private = __pyx_state[2] - * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< - * __pyx_result.__dict__.update(__pyx_state[3]) + * __pyx_result.choices = __pyx_state[0]; __pyx_result.default_value = __pyx_state[1]; __pyx_result.immutable = __pyx_state[2]; __pyx_result.private = __pyx_state[3] + * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< + * __pyx_result.__dict__.update(__pyx_state[4]) */ } @@ -6569,8 +6808,8 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_Field__set_state(struct * __pyx_unpickle_Field__set_state( __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_Field__set_state(Field __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< - * __pyx_result.default_value = __pyx_state[0]; __pyx_result.immutable = __pyx_state[1]; __pyx_result.private = __pyx_state[2] - * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.choices = __pyx_state[0]; __pyx_result.default_value = __pyx_state[1]; __pyx_result.immutable = __pyx_state[2]; __pyx_result.private = __pyx_state[3] + * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): */ /* function exit code */ @@ -6690,18 +6929,18 @@ static PyObject *__pyx_pf_6nyoibo_6fields_2__pyx_unpickle_StrField(CYTHON_UNUSED /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result - * if __pyx_checksum != 0x0077a4c: # <<<<<<<<<<<<<< + * if __pyx_checksum != 0x82d92b6: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0077a4c = (default_value, immutable, private))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x82d92b6 = (choices, default_value, immutable, private))" % __pyx_checksum) */ - __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x0077a4c) != 0); + __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x82d92b6) != 0); if (__pyx_t_1) { /* "(tree fragment)":5 * cdef object __pyx_result - * if __pyx_checksum != 0x0077a4c: + * if __pyx_checksum != 0x82d92b6: * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0077a4c = (default_value, immutable, private))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x82d92b6 = (choices, default_value, immutable, private))" % __pyx_checksum) * __pyx_result = StrField.__new__(__pyx_type) */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error) @@ -6720,15 +6959,15 @@ static PyObject *__pyx_pf_6nyoibo_6fields_2__pyx_unpickle_StrField(CYTHON_UNUSED __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":6 - * if __pyx_checksum != 0x0077a4c: + * if __pyx_checksum != 0x82d92b6: * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0077a4c = (default_value, immutable, private))" % __pyx_checksum) # <<<<<<<<<<<<<< + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x82d92b6 = (choices, default_value, immutable, private))" % __pyx_checksum) # <<<<<<<<<<<<<< * __pyx_result = StrField.__new__(__pyx_type) * if __pyx_state is not None: */ __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x00, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x82, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_INCREF(__pyx_v___pyx_PickleError); @@ -6755,15 +6994,15 @@ static PyObject *__pyx_pf_6nyoibo_6fields_2__pyx_unpickle_StrField(CYTHON_UNUSED /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result - * if __pyx_checksum != 0x0077a4c: # <<<<<<<<<<<<<< + * if __pyx_checksum != 0x82d92b6: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0077a4c = (default_value, immutable, private))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x82d92b6 = (choices, default_value, immutable, private))" % __pyx_checksum) */ } /* "(tree fragment)":7 * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0077a4c = (default_value, immutable, private))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x82d92b6 = (choices, default_value, immutable, private))" % __pyx_checksum) * __pyx_result = StrField.__new__(__pyx_type) # <<<<<<<<<<<<<< * if __pyx_state is not None: * __pyx_unpickle_StrField__set_state( __pyx_result, __pyx_state) @@ -6789,7 +7028,7 @@ static PyObject *__pyx_pf_6nyoibo_6fields_2__pyx_unpickle_StrField(CYTHON_UNUSED __pyx_t_3 = 0; /* "(tree fragment)":8 - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0077a4c = (default_value, immutable, private))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x82d92b6 = (choices, default_value, immutable, private))" % __pyx_checksum) * __pyx_result = StrField.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_StrField__set_state( __pyx_result, __pyx_state) @@ -6812,7 +7051,7 @@ static PyObject *__pyx_pf_6nyoibo_6fields_2__pyx_unpickle_StrField(CYTHON_UNUSED __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":8 - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0077a4c = (default_value, immutable, private))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x82d92b6 = (choices, default_value, immutable, private))" % __pyx_checksum) * __pyx_result = StrField.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_StrField__set_state( __pyx_result, __pyx_state) @@ -6825,7 +7064,7 @@ static PyObject *__pyx_pf_6nyoibo_6fields_2__pyx_unpickle_StrField(CYTHON_UNUSED * __pyx_unpickle_StrField__set_state( __pyx_result, __pyx_state) * return __pyx_result # <<<<<<<<<<<<<< * cdef __pyx_unpickle_StrField__set_state(StrField __pyx_result, tuple __pyx_state): - * __pyx_result.default_value = __pyx_state[0]; __pyx_result.immutable = __pyx_state[1]; __pyx_result.private = __pyx_state[2] + * __pyx_result.choices = __pyx_state[0]; __pyx_result.default_value = __pyx_state[1]; __pyx_result.immutable = __pyx_state[2]; __pyx_result.private = __pyx_state[3] */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v___pyx_result); @@ -6858,8 +7097,8 @@ static PyObject *__pyx_pf_6nyoibo_6fields_2__pyx_unpickle_StrField(CYTHON_UNUSED * __pyx_unpickle_StrField__set_state( __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_StrField__set_state(StrField __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< - * __pyx_result.default_value = __pyx_state[0]; __pyx_result.immutable = __pyx_state[1]; __pyx_result.private = __pyx_state[2] - * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.choices = __pyx_state[0]; __pyx_result.default_value = __pyx_state[1]; __pyx_result.immutable = __pyx_state[2]; __pyx_result.private = __pyx_state[3] + * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): */ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_StrField__set_state(struct __pyx_obj_6nyoibo_6fields_StrField *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { @@ -6881,9 +7120,9 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_StrField__set_state(stru /* "(tree fragment)":12 * return __pyx_result * cdef __pyx_unpickle_StrField__set_state(StrField __pyx_result, tuple __pyx_state): - * __pyx_result.default_value = __pyx_state[0]; __pyx_result.immutable = __pyx_state[1]; __pyx_result.private = __pyx_state[2] # <<<<<<<<<<<<<< - * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): - * __pyx_result.__dict__.update(__pyx_state[3]) + * __pyx_result.choices = __pyx_state[0]; __pyx_result.default_value = __pyx_state[1]; __pyx_result.immutable = __pyx_state[2]; __pyx_result.private = __pyx_state[3] # <<<<<<<<<<<<<< + * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.__dict__.update(__pyx_state[4]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); @@ -6892,6 +7131,17 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_StrField__set_state(stru __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.choices); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.choices); + __pyx_v___pyx_result->__pyx_base.choices = __pyx_t_1; + __pyx_t_1 = 0; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(1, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.default_value); __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.default_value); __pyx_v___pyx_result->__pyx_base.default_value = __pyx_t_1; @@ -6900,7 +7150,7 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_StrField__set_state(stru PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.immutable); @@ -6911,7 +7161,7 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_StrField__set_state(stru PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.private); @@ -6921,16 +7171,16 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_StrField__set_state(stru /* "(tree fragment)":13 * cdef __pyx_unpickle_StrField__set_state(StrField __pyx_result, tuple __pyx_state): - * __pyx_result.default_value = __pyx_state[0]; __pyx_result.immutable = __pyx_state[1]; __pyx_result.private = __pyx_state[2] - * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< - * __pyx_result.__dict__.update(__pyx_state[3]) + * __pyx_result.choices = __pyx_state[0]; __pyx_result.default_value = __pyx_state[1]; __pyx_result.immutable = __pyx_state[2]; __pyx_result.private = __pyx_state[3] + * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< + * __pyx_result.__dict__.update(__pyx_state[4]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(1, 13, __pyx_L1_error) } __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error) - __pyx_t_4 = ((__pyx_t_3 > 3) != 0); + __pyx_t_4 = ((__pyx_t_3 > 4) != 0); if (__pyx_t_4) { } else { __pyx_t_2 = __pyx_t_4; @@ -6943,9 +7193,9 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_StrField__set_state(stru if (__pyx_t_2) { /* "(tree fragment)":14 - * __pyx_result.default_value = __pyx_state[0]; __pyx_result.immutable = __pyx_state[1]; __pyx_result.private = __pyx_state[2] - * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): - * __pyx_result.__dict__.update(__pyx_state[3]) # <<<<<<<<<<<<<< + * __pyx_result.choices = __pyx_state[0]; __pyx_result.default_value = __pyx_state[1]; __pyx_result.immutable = __pyx_state[2]; __pyx_result.private = __pyx_state[3] + * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.__dict__.update(__pyx_state[4]) # <<<<<<<<<<<<<< */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); @@ -6956,7 +7206,7 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_StrField__set_state(stru PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 14, __pyx_L1_error) } - __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { @@ -6978,9 +7228,9 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_StrField__set_state(stru /* "(tree fragment)":13 * cdef __pyx_unpickle_StrField__set_state(StrField __pyx_result, tuple __pyx_state): - * __pyx_result.default_value = __pyx_state[0]; __pyx_result.immutable = __pyx_state[1]; __pyx_result.private = __pyx_state[2] - * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< - * __pyx_result.__dict__.update(__pyx_state[3]) + * __pyx_result.choices = __pyx_state[0]; __pyx_result.default_value = __pyx_state[1]; __pyx_result.immutable = __pyx_state[2]; __pyx_result.private = __pyx_state[3] + * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< + * __pyx_result.__dict__.update(__pyx_state[4]) */ } @@ -6988,8 +7238,8 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_StrField__set_state(stru * __pyx_unpickle_StrField__set_state( __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_StrField__set_state(StrField __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< - * __pyx_result.default_value = __pyx_state[0]; __pyx_result.immutable = __pyx_state[1]; __pyx_result.private = __pyx_state[2] - * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.choices = __pyx_state[0]; __pyx_result.default_value = __pyx_state[1]; __pyx_result.immutable = __pyx_state[2]; __pyx_result.private = __pyx_state[3] + * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): */ /* function exit code */ @@ -7109,18 +7359,18 @@ static PyObject *__pyx_pf_6nyoibo_6fields_4__pyx_unpickle_IntField(CYTHON_UNUSED /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result - * if __pyx_checksum != 0x0077a4c: # <<<<<<<<<<<<<< + * if __pyx_checksum != 0x82d92b6: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0077a4c = (default_value, immutable, private))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x82d92b6 = (choices, default_value, immutable, private))" % __pyx_checksum) */ - __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x0077a4c) != 0); + __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x82d92b6) != 0); if (__pyx_t_1) { /* "(tree fragment)":5 * cdef object __pyx_result - * if __pyx_checksum != 0x0077a4c: + * if __pyx_checksum != 0x82d92b6: * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0077a4c = (default_value, immutable, private))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x82d92b6 = (choices, default_value, immutable, private))" % __pyx_checksum) * __pyx_result = IntField.__new__(__pyx_type) */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error) @@ -7139,15 +7389,15 @@ static PyObject *__pyx_pf_6nyoibo_6fields_4__pyx_unpickle_IntField(CYTHON_UNUSED __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":6 - * if __pyx_checksum != 0x0077a4c: + * if __pyx_checksum != 0x82d92b6: * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0077a4c = (default_value, immutable, private))" % __pyx_checksum) # <<<<<<<<<<<<<< + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x82d92b6 = (choices, default_value, immutable, private))" % __pyx_checksum) # <<<<<<<<<<<<<< * __pyx_result = IntField.__new__(__pyx_type) * if __pyx_state is not None: */ __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x00, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x82, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_INCREF(__pyx_v___pyx_PickleError); @@ -7174,15 +7424,15 @@ static PyObject *__pyx_pf_6nyoibo_6fields_4__pyx_unpickle_IntField(CYTHON_UNUSED /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result - * if __pyx_checksum != 0x0077a4c: # <<<<<<<<<<<<<< + * if __pyx_checksum != 0x82d92b6: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0077a4c = (default_value, immutable, private))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x82d92b6 = (choices, default_value, immutable, private))" % __pyx_checksum) */ } /* "(tree fragment)":7 * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0077a4c = (default_value, immutable, private))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x82d92b6 = (choices, default_value, immutable, private))" % __pyx_checksum) * __pyx_result = IntField.__new__(__pyx_type) # <<<<<<<<<<<<<< * if __pyx_state is not None: * __pyx_unpickle_IntField__set_state( __pyx_result, __pyx_state) @@ -7208,7 +7458,7 @@ static PyObject *__pyx_pf_6nyoibo_6fields_4__pyx_unpickle_IntField(CYTHON_UNUSED __pyx_t_3 = 0; /* "(tree fragment)":8 - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0077a4c = (default_value, immutable, private))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x82d92b6 = (choices, default_value, immutable, private))" % __pyx_checksum) * __pyx_result = IntField.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_IntField__set_state( __pyx_result, __pyx_state) @@ -7231,7 +7481,7 @@ static PyObject *__pyx_pf_6nyoibo_6fields_4__pyx_unpickle_IntField(CYTHON_UNUSED __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":8 - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0077a4c = (default_value, immutable, private))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x82d92b6 = (choices, default_value, immutable, private))" % __pyx_checksum) * __pyx_result = IntField.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_IntField__set_state( __pyx_result, __pyx_state) @@ -7244,7 +7494,7 @@ static PyObject *__pyx_pf_6nyoibo_6fields_4__pyx_unpickle_IntField(CYTHON_UNUSED * __pyx_unpickle_IntField__set_state( __pyx_result, __pyx_state) * return __pyx_result # <<<<<<<<<<<<<< * cdef __pyx_unpickle_IntField__set_state(IntField __pyx_result, tuple __pyx_state): - * __pyx_result.default_value = __pyx_state[0]; __pyx_result.immutable = __pyx_state[1]; __pyx_result.private = __pyx_state[2] + * __pyx_result.choices = __pyx_state[0]; __pyx_result.default_value = __pyx_state[1]; __pyx_result.immutable = __pyx_state[2]; __pyx_result.private = __pyx_state[3] */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v___pyx_result); @@ -7277,8 +7527,8 @@ static PyObject *__pyx_pf_6nyoibo_6fields_4__pyx_unpickle_IntField(CYTHON_UNUSED * __pyx_unpickle_IntField__set_state( __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_IntField__set_state(IntField __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< - * __pyx_result.default_value = __pyx_state[0]; __pyx_result.immutable = __pyx_state[1]; __pyx_result.private = __pyx_state[2] - * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.choices = __pyx_state[0]; __pyx_result.default_value = __pyx_state[1]; __pyx_result.immutable = __pyx_state[2]; __pyx_result.private = __pyx_state[3] + * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): */ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_IntField__set_state(struct __pyx_obj_6nyoibo_6fields_IntField *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { @@ -7300,9 +7550,9 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_IntField__set_state(stru /* "(tree fragment)":12 * return __pyx_result * cdef __pyx_unpickle_IntField__set_state(IntField __pyx_result, tuple __pyx_state): - * __pyx_result.default_value = __pyx_state[0]; __pyx_result.immutable = __pyx_state[1]; __pyx_result.private = __pyx_state[2] # <<<<<<<<<<<<<< - * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): - * __pyx_result.__dict__.update(__pyx_state[3]) + * __pyx_result.choices = __pyx_state[0]; __pyx_result.default_value = __pyx_state[1]; __pyx_result.immutable = __pyx_state[2]; __pyx_result.private = __pyx_state[3] # <<<<<<<<<<<<<< + * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.__dict__.update(__pyx_state[4]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); @@ -7311,6 +7561,17 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_IntField__set_state(stru __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.choices); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.choices); + __pyx_v___pyx_result->__pyx_base.choices = __pyx_t_1; + __pyx_t_1 = 0; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(1, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.default_value); __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.default_value); __pyx_v___pyx_result->__pyx_base.default_value = __pyx_t_1; @@ -7319,7 +7580,7 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_IntField__set_state(stru PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.immutable); @@ -7330,7 +7591,7 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_IntField__set_state(stru PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.private); @@ -7340,16 +7601,16 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_IntField__set_state(stru /* "(tree fragment)":13 * cdef __pyx_unpickle_IntField__set_state(IntField __pyx_result, tuple __pyx_state): - * __pyx_result.default_value = __pyx_state[0]; __pyx_result.immutable = __pyx_state[1]; __pyx_result.private = __pyx_state[2] - * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< - * __pyx_result.__dict__.update(__pyx_state[3]) + * __pyx_result.choices = __pyx_state[0]; __pyx_result.default_value = __pyx_state[1]; __pyx_result.immutable = __pyx_state[2]; __pyx_result.private = __pyx_state[3] + * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< + * __pyx_result.__dict__.update(__pyx_state[4]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(1, 13, __pyx_L1_error) } __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error) - __pyx_t_4 = ((__pyx_t_3 > 3) != 0); + __pyx_t_4 = ((__pyx_t_3 > 4) != 0); if (__pyx_t_4) { } else { __pyx_t_2 = __pyx_t_4; @@ -7362,9 +7623,9 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_IntField__set_state(stru if (__pyx_t_2) { /* "(tree fragment)":14 - * __pyx_result.default_value = __pyx_state[0]; __pyx_result.immutable = __pyx_state[1]; __pyx_result.private = __pyx_state[2] - * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): - * __pyx_result.__dict__.update(__pyx_state[3]) # <<<<<<<<<<<<<< + * __pyx_result.choices = __pyx_state[0]; __pyx_result.default_value = __pyx_state[1]; __pyx_result.immutable = __pyx_state[2]; __pyx_result.private = __pyx_state[3] + * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.__dict__.update(__pyx_state[4]) # <<<<<<<<<<<<<< */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); @@ -7375,7 +7636,7 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_IntField__set_state(stru PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 14, __pyx_L1_error) } - __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { @@ -7397,9 +7658,9 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_IntField__set_state(stru /* "(tree fragment)":13 * cdef __pyx_unpickle_IntField__set_state(IntField __pyx_result, tuple __pyx_state): - * __pyx_result.default_value = __pyx_state[0]; __pyx_result.immutable = __pyx_state[1]; __pyx_result.private = __pyx_state[2] - * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< - * __pyx_result.__dict__.update(__pyx_state[3]) + * __pyx_result.choices = __pyx_state[0]; __pyx_result.default_value = __pyx_state[1]; __pyx_result.immutable = __pyx_state[2]; __pyx_result.private = __pyx_state[3] + * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< + * __pyx_result.__dict__.update(__pyx_state[4]) */ } @@ -7407,8 +7668,8 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_IntField__set_state(stru * __pyx_unpickle_IntField__set_state( __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_IntField__set_state(IntField __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< - * __pyx_result.default_value = __pyx_state[0]; __pyx_result.immutable = __pyx_state[1]; __pyx_result.private = __pyx_state[2] - * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.choices = __pyx_state[0]; __pyx_result.default_value = __pyx_state[1]; __pyx_result.immutable = __pyx_state[2]; __pyx_result.private = __pyx_state[3] + * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): */ /* function exit code */ @@ -7528,18 +7789,18 @@ static PyObject *__pyx_pf_6nyoibo_6fields_6__pyx_unpickle_BoolField(CYTHON_UNUSE /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result - * if __pyx_checksum != 0x0077a4c: # <<<<<<<<<<<<<< + * if __pyx_checksum != 0x82d92b6: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0077a4c = (default_value, immutable, private))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x82d92b6 = (choices, default_value, immutable, private))" % __pyx_checksum) */ - __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x0077a4c) != 0); + __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x82d92b6) != 0); if (__pyx_t_1) { /* "(tree fragment)":5 * cdef object __pyx_result - * if __pyx_checksum != 0x0077a4c: + * if __pyx_checksum != 0x82d92b6: * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0077a4c = (default_value, immutable, private))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x82d92b6 = (choices, default_value, immutable, private))" % __pyx_checksum) * __pyx_result = BoolField.__new__(__pyx_type) */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error) @@ -7558,15 +7819,15 @@ static PyObject *__pyx_pf_6nyoibo_6fields_6__pyx_unpickle_BoolField(CYTHON_UNUSE __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":6 - * if __pyx_checksum != 0x0077a4c: + * if __pyx_checksum != 0x82d92b6: * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0077a4c = (default_value, immutable, private))" % __pyx_checksum) # <<<<<<<<<<<<<< + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x82d92b6 = (choices, default_value, immutable, private))" % __pyx_checksum) # <<<<<<<<<<<<<< * __pyx_result = BoolField.__new__(__pyx_type) * if __pyx_state is not None: */ __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x00, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x82, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_INCREF(__pyx_v___pyx_PickleError); @@ -7593,15 +7854,15 @@ static PyObject *__pyx_pf_6nyoibo_6fields_6__pyx_unpickle_BoolField(CYTHON_UNUSE /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result - * if __pyx_checksum != 0x0077a4c: # <<<<<<<<<<<<<< + * if __pyx_checksum != 0x82d92b6: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0077a4c = (default_value, immutable, private))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x82d92b6 = (choices, default_value, immutable, private))" % __pyx_checksum) */ } /* "(tree fragment)":7 * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0077a4c = (default_value, immutable, private))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x82d92b6 = (choices, default_value, immutable, private))" % __pyx_checksum) * __pyx_result = BoolField.__new__(__pyx_type) # <<<<<<<<<<<<<< * if __pyx_state is not None: * __pyx_unpickle_BoolField__set_state( __pyx_result, __pyx_state) @@ -7627,7 +7888,7 @@ static PyObject *__pyx_pf_6nyoibo_6fields_6__pyx_unpickle_BoolField(CYTHON_UNUSE __pyx_t_3 = 0; /* "(tree fragment)":8 - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0077a4c = (default_value, immutable, private))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x82d92b6 = (choices, default_value, immutable, private))" % __pyx_checksum) * __pyx_result = BoolField.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_BoolField__set_state( __pyx_result, __pyx_state) @@ -7650,7 +7911,7 @@ static PyObject *__pyx_pf_6nyoibo_6fields_6__pyx_unpickle_BoolField(CYTHON_UNUSE __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":8 - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0077a4c = (default_value, immutable, private))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x82d92b6 = (choices, default_value, immutable, private))" % __pyx_checksum) * __pyx_result = BoolField.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_BoolField__set_state( __pyx_result, __pyx_state) @@ -7663,7 +7924,7 @@ static PyObject *__pyx_pf_6nyoibo_6fields_6__pyx_unpickle_BoolField(CYTHON_UNUSE * __pyx_unpickle_BoolField__set_state( __pyx_result, __pyx_state) * return __pyx_result # <<<<<<<<<<<<<< * cdef __pyx_unpickle_BoolField__set_state(BoolField __pyx_result, tuple __pyx_state): - * __pyx_result.default_value = __pyx_state[0]; __pyx_result.immutable = __pyx_state[1]; __pyx_result.private = __pyx_state[2] + * __pyx_result.choices = __pyx_state[0]; __pyx_result.default_value = __pyx_state[1]; __pyx_result.immutable = __pyx_state[2]; __pyx_result.private = __pyx_state[3] */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v___pyx_result); @@ -7696,8 +7957,8 @@ static PyObject *__pyx_pf_6nyoibo_6fields_6__pyx_unpickle_BoolField(CYTHON_UNUSE * __pyx_unpickle_BoolField__set_state( __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_BoolField__set_state(BoolField __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< - * __pyx_result.default_value = __pyx_state[0]; __pyx_result.immutable = __pyx_state[1]; __pyx_result.private = __pyx_state[2] - * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.choices = __pyx_state[0]; __pyx_result.default_value = __pyx_state[1]; __pyx_result.immutable = __pyx_state[2]; __pyx_result.private = __pyx_state[3] + * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): */ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_BoolField__set_state(struct __pyx_obj_6nyoibo_6fields_BoolField *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { @@ -7719,9 +7980,9 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_BoolField__set_state(str /* "(tree fragment)":12 * return __pyx_result * cdef __pyx_unpickle_BoolField__set_state(BoolField __pyx_result, tuple __pyx_state): - * __pyx_result.default_value = __pyx_state[0]; __pyx_result.immutable = __pyx_state[1]; __pyx_result.private = __pyx_state[2] # <<<<<<<<<<<<<< - * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): - * __pyx_result.__dict__.update(__pyx_state[3]) + * __pyx_result.choices = __pyx_state[0]; __pyx_result.default_value = __pyx_state[1]; __pyx_result.immutable = __pyx_state[2]; __pyx_result.private = __pyx_state[3] # <<<<<<<<<<<<<< + * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.__dict__.update(__pyx_state[4]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); @@ -7730,6 +7991,17 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_BoolField__set_state(str __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.choices); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.choices); + __pyx_v___pyx_result->__pyx_base.choices = __pyx_t_1; + __pyx_t_1 = 0; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(1, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.default_value); __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.default_value); __pyx_v___pyx_result->__pyx_base.default_value = __pyx_t_1; @@ -7738,7 +8010,7 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_BoolField__set_state(str PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.immutable); @@ -7749,7 +8021,7 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_BoolField__set_state(str PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.private); @@ -7759,16 +8031,16 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_BoolField__set_state(str /* "(tree fragment)":13 * cdef __pyx_unpickle_BoolField__set_state(BoolField __pyx_result, tuple __pyx_state): - * __pyx_result.default_value = __pyx_state[0]; __pyx_result.immutable = __pyx_state[1]; __pyx_result.private = __pyx_state[2] - * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< - * __pyx_result.__dict__.update(__pyx_state[3]) + * __pyx_result.choices = __pyx_state[0]; __pyx_result.default_value = __pyx_state[1]; __pyx_result.immutable = __pyx_state[2]; __pyx_result.private = __pyx_state[3] + * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< + * __pyx_result.__dict__.update(__pyx_state[4]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(1, 13, __pyx_L1_error) } __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error) - __pyx_t_4 = ((__pyx_t_3 > 3) != 0); + __pyx_t_4 = ((__pyx_t_3 > 4) != 0); if (__pyx_t_4) { } else { __pyx_t_2 = __pyx_t_4; @@ -7781,9 +8053,9 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_BoolField__set_state(str if (__pyx_t_2) { /* "(tree fragment)":14 - * __pyx_result.default_value = __pyx_state[0]; __pyx_result.immutable = __pyx_state[1]; __pyx_result.private = __pyx_state[2] - * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): - * __pyx_result.__dict__.update(__pyx_state[3]) # <<<<<<<<<<<<<< + * __pyx_result.choices = __pyx_state[0]; __pyx_result.default_value = __pyx_state[1]; __pyx_result.immutable = __pyx_state[2]; __pyx_result.private = __pyx_state[3] + * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.__dict__.update(__pyx_state[4]) # <<<<<<<<<<<<<< */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); @@ -7794,7 +8066,7 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_BoolField__set_state(str PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 14, __pyx_L1_error) } - __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { @@ -7816,9 +8088,9 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_BoolField__set_state(str /* "(tree fragment)":13 * cdef __pyx_unpickle_BoolField__set_state(BoolField __pyx_result, tuple __pyx_state): - * __pyx_result.default_value = __pyx_state[0]; __pyx_result.immutable = __pyx_state[1]; __pyx_result.private = __pyx_state[2] - * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< - * __pyx_result.__dict__.update(__pyx_state[3]) + * __pyx_result.choices = __pyx_state[0]; __pyx_result.default_value = __pyx_state[1]; __pyx_result.immutable = __pyx_state[2]; __pyx_result.private = __pyx_state[3] + * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< + * __pyx_result.__dict__.update(__pyx_state[4]) */ } @@ -7826,8 +8098,8 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_BoolField__set_state(str * __pyx_unpickle_BoolField__set_state( __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_BoolField__set_state(BoolField __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< - * __pyx_result.default_value = __pyx_state[0]; __pyx_result.immutable = __pyx_state[1]; __pyx_result.private = __pyx_state[2] - * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.choices = __pyx_state[0]; __pyx_result.default_value = __pyx_state[1]; __pyx_result.immutable = __pyx_state[2]; __pyx_result.private = __pyx_state[3] + * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): */ /* function exit code */ @@ -7947,18 +8219,18 @@ static PyObject *__pyx_pf_6nyoibo_6fields_8__pyx_unpickle_DateField(CYTHON_UNUSE /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result - * if __pyx_checksum != 0x0077a4c: # <<<<<<<<<<<<<< + * if __pyx_checksum != 0x82d92b6: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0077a4c = (default_value, immutable, private))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x82d92b6 = (choices, default_value, immutable, private))" % __pyx_checksum) */ - __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x0077a4c) != 0); + __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x82d92b6) != 0); if (__pyx_t_1) { /* "(tree fragment)":5 * cdef object __pyx_result - * if __pyx_checksum != 0x0077a4c: + * if __pyx_checksum != 0x82d92b6: * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0077a4c = (default_value, immutable, private))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x82d92b6 = (choices, default_value, immutable, private))" % __pyx_checksum) * __pyx_result = DateField.__new__(__pyx_type) */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error) @@ -7977,15 +8249,15 @@ static PyObject *__pyx_pf_6nyoibo_6fields_8__pyx_unpickle_DateField(CYTHON_UNUSE __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":6 - * if __pyx_checksum != 0x0077a4c: + * if __pyx_checksum != 0x82d92b6: * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0077a4c = (default_value, immutable, private))" % __pyx_checksum) # <<<<<<<<<<<<<< + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x82d92b6 = (choices, default_value, immutable, private))" % __pyx_checksum) # <<<<<<<<<<<<<< * __pyx_result = DateField.__new__(__pyx_type) * if __pyx_state is not None: */ __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x00, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x82, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_INCREF(__pyx_v___pyx_PickleError); @@ -8012,15 +8284,15 @@ static PyObject *__pyx_pf_6nyoibo_6fields_8__pyx_unpickle_DateField(CYTHON_UNUSE /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result - * if __pyx_checksum != 0x0077a4c: # <<<<<<<<<<<<<< + * if __pyx_checksum != 0x82d92b6: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0077a4c = (default_value, immutable, private))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x82d92b6 = (choices, default_value, immutable, private))" % __pyx_checksum) */ } /* "(tree fragment)":7 * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0077a4c = (default_value, immutable, private))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x82d92b6 = (choices, default_value, immutable, private))" % __pyx_checksum) * __pyx_result = DateField.__new__(__pyx_type) # <<<<<<<<<<<<<< * if __pyx_state is not None: * __pyx_unpickle_DateField__set_state( __pyx_result, __pyx_state) @@ -8046,7 +8318,7 @@ static PyObject *__pyx_pf_6nyoibo_6fields_8__pyx_unpickle_DateField(CYTHON_UNUSE __pyx_t_3 = 0; /* "(tree fragment)":8 - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0077a4c = (default_value, immutable, private))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x82d92b6 = (choices, default_value, immutable, private))" % __pyx_checksum) * __pyx_result = DateField.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_DateField__set_state( __pyx_result, __pyx_state) @@ -8069,7 +8341,7 @@ static PyObject *__pyx_pf_6nyoibo_6fields_8__pyx_unpickle_DateField(CYTHON_UNUSE __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":8 - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0077a4c = (default_value, immutable, private))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x82d92b6 = (choices, default_value, immutable, private))" % __pyx_checksum) * __pyx_result = DateField.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_DateField__set_state( __pyx_result, __pyx_state) @@ -8082,7 +8354,7 @@ static PyObject *__pyx_pf_6nyoibo_6fields_8__pyx_unpickle_DateField(CYTHON_UNUSE * __pyx_unpickle_DateField__set_state( __pyx_result, __pyx_state) * return __pyx_result # <<<<<<<<<<<<<< * cdef __pyx_unpickle_DateField__set_state(DateField __pyx_result, tuple __pyx_state): - * __pyx_result.default_value = __pyx_state[0]; __pyx_result.immutable = __pyx_state[1]; __pyx_result.private = __pyx_state[2] + * __pyx_result.choices = __pyx_state[0]; __pyx_result.default_value = __pyx_state[1]; __pyx_result.immutable = __pyx_state[2]; __pyx_result.private = __pyx_state[3] */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v___pyx_result); @@ -8115,8 +8387,8 @@ static PyObject *__pyx_pf_6nyoibo_6fields_8__pyx_unpickle_DateField(CYTHON_UNUSE * __pyx_unpickle_DateField__set_state( __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_DateField__set_state(DateField __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< - * __pyx_result.default_value = __pyx_state[0]; __pyx_result.immutable = __pyx_state[1]; __pyx_result.private = __pyx_state[2] - * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.choices = __pyx_state[0]; __pyx_result.default_value = __pyx_state[1]; __pyx_result.immutable = __pyx_state[2]; __pyx_result.private = __pyx_state[3] + * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): */ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_DateField__set_state(struct __pyx_obj_6nyoibo_6fields_DateField *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { @@ -8138,9 +8410,9 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_DateField__set_state(str /* "(tree fragment)":12 * return __pyx_result * cdef __pyx_unpickle_DateField__set_state(DateField __pyx_result, tuple __pyx_state): - * __pyx_result.default_value = __pyx_state[0]; __pyx_result.immutable = __pyx_state[1]; __pyx_result.private = __pyx_state[2] # <<<<<<<<<<<<<< - * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): - * __pyx_result.__dict__.update(__pyx_state[3]) + * __pyx_result.choices = __pyx_state[0]; __pyx_result.default_value = __pyx_state[1]; __pyx_result.immutable = __pyx_state[2]; __pyx_result.private = __pyx_state[3] # <<<<<<<<<<<<<< + * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.__dict__.update(__pyx_state[4]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); @@ -8149,6 +8421,17 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_DateField__set_state(str __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.choices); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.choices); + __pyx_v___pyx_result->__pyx_base.choices = __pyx_t_1; + __pyx_t_1 = 0; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(1, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.default_value); __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.default_value); __pyx_v___pyx_result->__pyx_base.default_value = __pyx_t_1; @@ -8157,7 +8440,7 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_DateField__set_state(str PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.immutable); @@ -8168,7 +8451,7 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_DateField__set_state(str PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.private); @@ -8178,16 +8461,16 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_DateField__set_state(str /* "(tree fragment)":13 * cdef __pyx_unpickle_DateField__set_state(DateField __pyx_result, tuple __pyx_state): - * __pyx_result.default_value = __pyx_state[0]; __pyx_result.immutable = __pyx_state[1]; __pyx_result.private = __pyx_state[2] - * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< - * __pyx_result.__dict__.update(__pyx_state[3]) + * __pyx_result.choices = __pyx_state[0]; __pyx_result.default_value = __pyx_state[1]; __pyx_result.immutable = __pyx_state[2]; __pyx_result.private = __pyx_state[3] + * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< + * __pyx_result.__dict__.update(__pyx_state[4]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(1, 13, __pyx_L1_error) } __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error) - __pyx_t_4 = ((__pyx_t_3 > 3) != 0); + __pyx_t_4 = ((__pyx_t_3 > 4) != 0); if (__pyx_t_4) { } else { __pyx_t_2 = __pyx_t_4; @@ -8200,9 +8483,9 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_DateField__set_state(str if (__pyx_t_2) { /* "(tree fragment)":14 - * __pyx_result.default_value = __pyx_state[0]; __pyx_result.immutable = __pyx_state[1]; __pyx_result.private = __pyx_state[2] - * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): - * __pyx_result.__dict__.update(__pyx_state[3]) # <<<<<<<<<<<<<< + * __pyx_result.choices = __pyx_state[0]; __pyx_result.default_value = __pyx_state[1]; __pyx_result.immutable = __pyx_state[2]; __pyx_result.private = __pyx_state[3] + * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.__dict__.update(__pyx_state[4]) # <<<<<<<<<<<<<< */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); @@ -8213,7 +8496,7 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_DateField__set_state(str PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 14, __pyx_L1_error) } - __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { @@ -8235,9 +8518,9 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_DateField__set_state(str /* "(tree fragment)":13 * cdef __pyx_unpickle_DateField__set_state(DateField __pyx_result, tuple __pyx_state): - * __pyx_result.default_value = __pyx_state[0]; __pyx_result.immutable = __pyx_state[1]; __pyx_result.private = __pyx_state[2] - * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< - * __pyx_result.__dict__.update(__pyx_state[3]) + * __pyx_result.choices = __pyx_state[0]; __pyx_result.default_value = __pyx_state[1]; __pyx_result.immutable = __pyx_state[2]; __pyx_result.private = __pyx_state[3] + * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< + * __pyx_result.__dict__.update(__pyx_state[4]) */ } @@ -8245,8 +8528,8 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_DateField__set_state(str * __pyx_unpickle_DateField__set_state( __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_DateField__set_state(DateField __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< - * __pyx_result.default_value = __pyx_state[0]; __pyx_result.immutable = __pyx_state[1]; __pyx_result.private = __pyx_state[2] - * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.choices = __pyx_state[0]; __pyx_result.default_value = __pyx_state[1]; __pyx_result.immutable = __pyx_state[2]; __pyx_result.private = __pyx_state[3] + * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): */ /* function exit code */ @@ -8366,18 +8649,18 @@ static PyObject *__pyx_pf_6nyoibo_6fields_10__pyx_unpickle_DatetimeField(CYTHON_ /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result - * if __pyx_checksum != 0x0077a4c: # <<<<<<<<<<<<<< + * if __pyx_checksum != 0x82d92b6: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0077a4c = (default_value, immutable, private))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x82d92b6 = (choices, default_value, immutable, private))" % __pyx_checksum) */ - __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x0077a4c) != 0); + __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x82d92b6) != 0); if (__pyx_t_1) { /* "(tree fragment)":5 * cdef object __pyx_result - * if __pyx_checksum != 0x0077a4c: + * if __pyx_checksum != 0x82d92b6: * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0077a4c = (default_value, immutable, private))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x82d92b6 = (choices, default_value, immutable, private))" % __pyx_checksum) * __pyx_result = DatetimeField.__new__(__pyx_type) */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error) @@ -8396,15 +8679,15 @@ static PyObject *__pyx_pf_6nyoibo_6fields_10__pyx_unpickle_DatetimeField(CYTHON_ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":6 - * if __pyx_checksum != 0x0077a4c: + * if __pyx_checksum != 0x82d92b6: * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0077a4c = (default_value, immutable, private))" % __pyx_checksum) # <<<<<<<<<<<<<< + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x82d92b6 = (choices, default_value, immutable, private))" % __pyx_checksum) # <<<<<<<<<<<<<< * __pyx_result = DatetimeField.__new__(__pyx_type) * if __pyx_state is not None: */ __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x00, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x82, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_INCREF(__pyx_v___pyx_PickleError); @@ -8431,15 +8714,15 @@ static PyObject *__pyx_pf_6nyoibo_6fields_10__pyx_unpickle_DatetimeField(CYTHON_ /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result - * if __pyx_checksum != 0x0077a4c: # <<<<<<<<<<<<<< + * if __pyx_checksum != 0x82d92b6: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0077a4c = (default_value, immutable, private))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x82d92b6 = (choices, default_value, immutable, private))" % __pyx_checksum) */ } /* "(tree fragment)":7 * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0077a4c = (default_value, immutable, private))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x82d92b6 = (choices, default_value, immutable, private))" % __pyx_checksum) * __pyx_result = DatetimeField.__new__(__pyx_type) # <<<<<<<<<<<<<< * if __pyx_state is not None: * __pyx_unpickle_DatetimeField__set_state( __pyx_result, __pyx_state) @@ -8465,7 +8748,7 @@ static PyObject *__pyx_pf_6nyoibo_6fields_10__pyx_unpickle_DatetimeField(CYTHON_ __pyx_t_3 = 0; /* "(tree fragment)":8 - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0077a4c = (default_value, immutable, private))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x82d92b6 = (choices, default_value, immutable, private))" % __pyx_checksum) * __pyx_result = DatetimeField.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_DatetimeField__set_state( __pyx_result, __pyx_state) @@ -8488,7 +8771,7 @@ static PyObject *__pyx_pf_6nyoibo_6fields_10__pyx_unpickle_DatetimeField(CYTHON_ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":8 - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0077a4c = (default_value, immutable, private))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x82d92b6 = (choices, default_value, immutable, private))" % __pyx_checksum) * __pyx_result = DatetimeField.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_DatetimeField__set_state( __pyx_result, __pyx_state) @@ -8501,7 +8784,7 @@ static PyObject *__pyx_pf_6nyoibo_6fields_10__pyx_unpickle_DatetimeField(CYTHON_ * __pyx_unpickle_DatetimeField__set_state( __pyx_result, __pyx_state) * return __pyx_result # <<<<<<<<<<<<<< * cdef __pyx_unpickle_DatetimeField__set_state(DatetimeField __pyx_result, tuple __pyx_state): - * __pyx_result.default_value = __pyx_state[0]; __pyx_result.immutable = __pyx_state[1]; __pyx_result.private = __pyx_state[2] + * __pyx_result.choices = __pyx_state[0]; __pyx_result.default_value = __pyx_state[1]; __pyx_result.immutable = __pyx_state[2]; __pyx_result.private = __pyx_state[3] */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v___pyx_result); @@ -8534,8 +8817,8 @@ static PyObject *__pyx_pf_6nyoibo_6fields_10__pyx_unpickle_DatetimeField(CYTHON_ * __pyx_unpickle_DatetimeField__set_state( __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_DatetimeField__set_state(DatetimeField __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< - * __pyx_result.default_value = __pyx_state[0]; __pyx_result.immutable = __pyx_state[1]; __pyx_result.private = __pyx_state[2] - * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.choices = __pyx_state[0]; __pyx_result.default_value = __pyx_state[1]; __pyx_result.immutable = __pyx_state[2]; __pyx_result.private = __pyx_state[3] + * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): */ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_DatetimeField__set_state(struct __pyx_obj_6nyoibo_6fields_DatetimeField *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { @@ -8557,9 +8840,9 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_DatetimeField__set_state /* "(tree fragment)":12 * return __pyx_result * cdef __pyx_unpickle_DatetimeField__set_state(DatetimeField __pyx_result, tuple __pyx_state): - * __pyx_result.default_value = __pyx_state[0]; __pyx_result.immutable = __pyx_state[1]; __pyx_result.private = __pyx_state[2] # <<<<<<<<<<<<<< - * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): - * __pyx_result.__dict__.update(__pyx_state[3]) + * __pyx_result.choices = __pyx_state[0]; __pyx_result.default_value = __pyx_state[1]; __pyx_result.immutable = __pyx_state[2]; __pyx_result.private = __pyx_state[3] # <<<<<<<<<<<<<< + * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.__dict__.update(__pyx_state[4]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); @@ -8568,6 +8851,17 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_DatetimeField__set_state __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.choices); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.choices); + __pyx_v___pyx_result->__pyx_base.choices = __pyx_t_1; + __pyx_t_1 = 0; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(1, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.default_value); __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.default_value); __pyx_v___pyx_result->__pyx_base.default_value = __pyx_t_1; @@ -8576,7 +8870,7 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_DatetimeField__set_state PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.immutable); @@ -8587,7 +8881,7 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_DatetimeField__set_state PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.private); @@ -8597,16 +8891,16 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_DatetimeField__set_state /* "(tree fragment)":13 * cdef __pyx_unpickle_DatetimeField__set_state(DatetimeField __pyx_result, tuple __pyx_state): - * __pyx_result.default_value = __pyx_state[0]; __pyx_result.immutable = __pyx_state[1]; __pyx_result.private = __pyx_state[2] - * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< - * __pyx_result.__dict__.update(__pyx_state[3]) + * __pyx_result.choices = __pyx_state[0]; __pyx_result.default_value = __pyx_state[1]; __pyx_result.immutable = __pyx_state[2]; __pyx_result.private = __pyx_state[3] + * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< + * __pyx_result.__dict__.update(__pyx_state[4]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(1, 13, __pyx_L1_error) } __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error) - __pyx_t_4 = ((__pyx_t_3 > 3) != 0); + __pyx_t_4 = ((__pyx_t_3 > 4) != 0); if (__pyx_t_4) { } else { __pyx_t_2 = __pyx_t_4; @@ -8619,9 +8913,9 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_DatetimeField__set_state if (__pyx_t_2) { /* "(tree fragment)":14 - * __pyx_result.default_value = __pyx_state[0]; __pyx_result.immutable = __pyx_state[1]; __pyx_result.private = __pyx_state[2] - * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): - * __pyx_result.__dict__.update(__pyx_state[3]) # <<<<<<<<<<<<<< + * __pyx_result.choices = __pyx_state[0]; __pyx_result.default_value = __pyx_state[1]; __pyx_result.immutable = __pyx_state[2]; __pyx_result.private = __pyx_state[3] + * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.__dict__.update(__pyx_state[4]) # <<<<<<<<<<<<<< */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); @@ -8632,7 +8926,7 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_DatetimeField__set_state PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 14, __pyx_L1_error) } - __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { @@ -8654,9 +8948,9 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_DatetimeField__set_state /* "(tree fragment)":13 * cdef __pyx_unpickle_DatetimeField__set_state(DatetimeField __pyx_result, tuple __pyx_state): - * __pyx_result.default_value = __pyx_state[0]; __pyx_result.immutable = __pyx_state[1]; __pyx_result.private = __pyx_state[2] - * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< - * __pyx_result.__dict__.update(__pyx_state[3]) + * __pyx_result.choices = __pyx_state[0]; __pyx_result.default_value = __pyx_state[1]; __pyx_result.immutable = __pyx_state[2]; __pyx_result.private = __pyx_state[3] + * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< + * __pyx_result.__dict__.update(__pyx_state[4]) */ } @@ -8664,8 +8958,8 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_DatetimeField__set_state * __pyx_unpickle_DatetimeField__set_state( __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_DatetimeField__set_state(DatetimeField __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< - * __pyx_result.default_value = __pyx_state[0]; __pyx_result.immutable = __pyx_state[1]; __pyx_result.private = __pyx_state[2] - * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.choices = __pyx_state[0]; __pyx_result.default_value = __pyx_state[1]; __pyx_result.immutable = __pyx_state[2]; __pyx_result.private = __pyx_state[3] + * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): */ /* function exit code */ @@ -8785,18 +9079,18 @@ static PyObject *__pyx_pf_6nyoibo_6fields_12__pyx_unpickle_FloatField(CYTHON_UNU /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result - * if __pyx_checksum != 0x0077a4c: # <<<<<<<<<<<<<< + * if __pyx_checksum != 0x82d92b6: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0077a4c = (default_value, immutable, private))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x82d92b6 = (choices, default_value, immutable, private))" % __pyx_checksum) */ - __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x0077a4c) != 0); + __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x82d92b6) != 0); if (__pyx_t_1) { /* "(tree fragment)":5 * cdef object __pyx_result - * if __pyx_checksum != 0x0077a4c: + * if __pyx_checksum != 0x82d92b6: * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0077a4c = (default_value, immutable, private))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x82d92b6 = (choices, default_value, immutable, private))" % __pyx_checksum) * __pyx_result = FloatField.__new__(__pyx_type) */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error) @@ -8815,15 +9109,15 @@ static PyObject *__pyx_pf_6nyoibo_6fields_12__pyx_unpickle_FloatField(CYTHON_UNU __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":6 - * if __pyx_checksum != 0x0077a4c: + * if __pyx_checksum != 0x82d92b6: * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0077a4c = (default_value, immutable, private))" % __pyx_checksum) # <<<<<<<<<<<<<< + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x82d92b6 = (choices, default_value, immutable, private))" % __pyx_checksum) # <<<<<<<<<<<<<< * __pyx_result = FloatField.__new__(__pyx_type) * if __pyx_state is not None: */ __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x00, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x82, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_INCREF(__pyx_v___pyx_PickleError); @@ -8850,15 +9144,15 @@ static PyObject *__pyx_pf_6nyoibo_6fields_12__pyx_unpickle_FloatField(CYTHON_UNU /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result - * if __pyx_checksum != 0x0077a4c: # <<<<<<<<<<<<<< + * if __pyx_checksum != 0x82d92b6: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0077a4c = (default_value, immutable, private))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x82d92b6 = (choices, default_value, immutable, private))" % __pyx_checksum) */ } /* "(tree fragment)":7 * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0077a4c = (default_value, immutable, private))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x82d92b6 = (choices, default_value, immutable, private))" % __pyx_checksum) * __pyx_result = FloatField.__new__(__pyx_type) # <<<<<<<<<<<<<< * if __pyx_state is not None: * __pyx_unpickle_FloatField__set_state( __pyx_result, __pyx_state) @@ -8884,7 +9178,7 @@ static PyObject *__pyx_pf_6nyoibo_6fields_12__pyx_unpickle_FloatField(CYTHON_UNU __pyx_t_3 = 0; /* "(tree fragment)":8 - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0077a4c = (default_value, immutable, private))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x82d92b6 = (choices, default_value, immutable, private))" % __pyx_checksum) * __pyx_result = FloatField.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_FloatField__set_state( __pyx_result, __pyx_state) @@ -8907,7 +9201,7 @@ static PyObject *__pyx_pf_6nyoibo_6fields_12__pyx_unpickle_FloatField(CYTHON_UNU __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":8 - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0077a4c = (default_value, immutable, private))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x82d92b6 = (choices, default_value, immutable, private))" % __pyx_checksum) * __pyx_result = FloatField.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_FloatField__set_state( __pyx_result, __pyx_state) @@ -8920,7 +9214,7 @@ static PyObject *__pyx_pf_6nyoibo_6fields_12__pyx_unpickle_FloatField(CYTHON_UNU * __pyx_unpickle_FloatField__set_state( __pyx_result, __pyx_state) * return __pyx_result # <<<<<<<<<<<<<< * cdef __pyx_unpickle_FloatField__set_state(FloatField __pyx_result, tuple __pyx_state): - * __pyx_result.default_value = __pyx_state[0]; __pyx_result.immutable = __pyx_state[1]; __pyx_result.private = __pyx_state[2] + * __pyx_result.choices = __pyx_state[0]; __pyx_result.default_value = __pyx_state[1]; __pyx_result.immutable = __pyx_state[2]; __pyx_result.private = __pyx_state[3] */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v___pyx_result); @@ -8953,8 +9247,8 @@ static PyObject *__pyx_pf_6nyoibo_6fields_12__pyx_unpickle_FloatField(CYTHON_UNU * __pyx_unpickle_FloatField__set_state( __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_FloatField__set_state(FloatField __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< - * __pyx_result.default_value = __pyx_state[0]; __pyx_result.immutable = __pyx_state[1]; __pyx_result.private = __pyx_state[2] - * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.choices = __pyx_state[0]; __pyx_result.default_value = __pyx_state[1]; __pyx_result.immutable = __pyx_state[2]; __pyx_result.private = __pyx_state[3] + * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): */ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_FloatField__set_state(struct __pyx_obj_6nyoibo_6fields_FloatField *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { @@ -8976,9 +9270,9 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_FloatField__set_state(st /* "(tree fragment)":12 * return __pyx_result * cdef __pyx_unpickle_FloatField__set_state(FloatField __pyx_result, tuple __pyx_state): - * __pyx_result.default_value = __pyx_state[0]; __pyx_result.immutable = __pyx_state[1]; __pyx_result.private = __pyx_state[2] # <<<<<<<<<<<<<< - * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): - * __pyx_result.__dict__.update(__pyx_state[3]) + * __pyx_result.choices = __pyx_state[0]; __pyx_result.default_value = __pyx_state[1]; __pyx_result.immutable = __pyx_state[2]; __pyx_result.private = __pyx_state[3] # <<<<<<<<<<<<<< + * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.__dict__.update(__pyx_state[4]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); @@ -8987,6 +9281,17 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_FloatField__set_state(st __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.choices); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.choices); + __pyx_v___pyx_result->__pyx_base.choices = __pyx_t_1; + __pyx_t_1 = 0; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(1, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.default_value); __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.default_value); __pyx_v___pyx_result->__pyx_base.default_value = __pyx_t_1; @@ -8995,7 +9300,7 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_FloatField__set_state(st PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.immutable); @@ -9006,7 +9311,7 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_FloatField__set_state(st PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.private); @@ -9016,16 +9321,16 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_FloatField__set_state(st /* "(tree fragment)":13 * cdef __pyx_unpickle_FloatField__set_state(FloatField __pyx_result, tuple __pyx_state): - * __pyx_result.default_value = __pyx_state[0]; __pyx_result.immutable = __pyx_state[1]; __pyx_result.private = __pyx_state[2] - * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< - * __pyx_result.__dict__.update(__pyx_state[3]) + * __pyx_result.choices = __pyx_state[0]; __pyx_result.default_value = __pyx_state[1]; __pyx_result.immutable = __pyx_state[2]; __pyx_result.private = __pyx_state[3] + * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< + * __pyx_result.__dict__.update(__pyx_state[4]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(1, 13, __pyx_L1_error) } __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error) - __pyx_t_4 = ((__pyx_t_3 > 3) != 0); + __pyx_t_4 = ((__pyx_t_3 > 4) != 0); if (__pyx_t_4) { } else { __pyx_t_2 = __pyx_t_4; @@ -9038,9 +9343,9 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_FloatField__set_state(st if (__pyx_t_2) { /* "(tree fragment)":14 - * __pyx_result.default_value = __pyx_state[0]; __pyx_result.immutable = __pyx_state[1]; __pyx_result.private = __pyx_state[2] - * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): - * __pyx_result.__dict__.update(__pyx_state[3]) # <<<<<<<<<<<<<< + * __pyx_result.choices = __pyx_state[0]; __pyx_result.default_value = __pyx_state[1]; __pyx_result.immutable = __pyx_state[2]; __pyx_result.private = __pyx_state[3] + * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.__dict__.update(__pyx_state[4]) # <<<<<<<<<<<<<< */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); @@ -9051,7 +9356,7 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_FloatField__set_state(st PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 14, __pyx_L1_error) } - __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { @@ -9073,9 +9378,9 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_FloatField__set_state(st /* "(tree fragment)":13 * cdef __pyx_unpickle_FloatField__set_state(FloatField __pyx_result, tuple __pyx_state): - * __pyx_result.default_value = __pyx_state[0]; __pyx_result.immutable = __pyx_state[1]; __pyx_result.private = __pyx_state[2] - * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< - * __pyx_result.__dict__.update(__pyx_state[3]) + * __pyx_result.choices = __pyx_state[0]; __pyx_result.default_value = __pyx_state[1]; __pyx_result.immutable = __pyx_state[2]; __pyx_result.private = __pyx_state[3] + * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< + * __pyx_result.__dict__.update(__pyx_state[4]) */ } @@ -9083,8 +9388,8 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_FloatField__set_state(st * __pyx_unpickle_FloatField__set_state( __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_FloatField__set_state(FloatField __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< - * __pyx_result.default_value = __pyx_state[0]; __pyx_result.immutable = __pyx_state[1]; __pyx_result.private = __pyx_state[2] - * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.choices = __pyx_state[0]; __pyx_result.default_value = __pyx_state[1]; __pyx_result.immutable = __pyx_state[2]; __pyx_result.private = __pyx_state[3] + * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): */ /* function exit code */ @@ -9204,18 +9509,18 @@ static PyObject *__pyx_pf_6nyoibo_6fields_14__pyx_unpickle_DecimalField(CYTHON_U /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result - * if __pyx_checksum != 0x0077a4c: # <<<<<<<<<<<<<< + * if __pyx_checksum != 0x82d92b6: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0077a4c = (default_value, immutable, private))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x82d92b6 = (choices, default_value, immutable, private))" % __pyx_checksum) */ - __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x0077a4c) != 0); + __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x82d92b6) != 0); if (__pyx_t_1) { /* "(tree fragment)":5 * cdef object __pyx_result - * if __pyx_checksum != 0x0077a4c: + * if __pyx_checksum != 0x82d92b6: * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0077a4c = (default_value, immutable, private))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x82d92b6 = (choices, default_value, immutable, private))" % __pyx_checksum) * __pyx_result = DecimalField.__new__(__pyx_type) */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error) @@ -9234,15 +9539,15 @@ static PyObject *__pyx_pf_6nyoibo_6fields_14__pyx_unpickle_DecimalField(CYTHON_U __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":6 - * if __pyx_checksum != 0x0077a4c: + * if __pyx_checksum != 0x82d92b6: * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0077a4c = (default_value, immutable, private))" % __pyx_checksum) # <<<<<<<<<<<<<< + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x82d92b6 = (choices, default_value, immutable, private))" % __pyx_checksum) # <<<<<<<<<<<<<< * __pyx_result = DecimalField.__new__(__pyx_type) * if __pyx_state is not None: */ __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x00, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x82, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_INCREF(__pyx_v___pyx_PickleError); @@ -9269,15 +9574,15 @@ static PyObject *__pyx_pf_6nyoibo_6fields_14__pyx_unpickle_DecimalField(CYTHON_U /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result - * if __pyx_checksum != 0x0077a4c: # <<<<<<<<<<<<<< + * if __pyx_checksum != 0x82d92b6: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0077a4c = (default_value, immutable, private))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x82d92b6 = (choices, default_value, immutable, private))" % __pyx_checksum) */ } /* "(tree fragment)":7 * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0077a4c = (default_value, immutable, private))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x82d92b6 = (choices, default_value, immutable, private))" % __pyx_checksum) * __pyx_result = DecimalField.__new__(__pyx_type) # <<<<<<<<<<<<<< * if __pyx_state is not None: * __pyx_unpickle_DecimalField__set_state( __pyx_result, __pyx_state) @@ -9303,7 +9608,7 @@ static PyObject *__pyx_pf_6nyoibo_6fields_14__pyx_unpickle_DecimalField(CYTHON_U __pyx_t_3 = 0; /* "(tree fragment)":8 - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0077a4c = (default_value, immutable, private))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x82d92b6 = (choices, default_value, immutable, private))" % __pyx_checksum) * __pyx_result = DecimalField.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_DecimalField__set_state( __pyx_result, __pyx_state) @@ -9326,7 +9631,7 @@ static PyObject *__pyx_pf_6nyoibo_6fields_14__pyx_unpickle_DecimalField(CYTHON_U __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":8 - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0077a4c = (default_value, immutable, private))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x82d92b6 = (choices, default_value, immutable, private))" % __pyx_checksum) * __pyx_result = DecimalField.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_DecimalField__set_state( __pyx_result, __pyx_state) @@ -9339,7 +9644,7 @@ static PyObject *__pyx_pf_6nyoibo_6fields_14__pyx_unpickle_DecimalField(CYTHON_U * __pyx_unpickle_DecimalField__set_state( __pyx_result, __pyx_state) * return __pyx_result # <<<<<<<<<<<<<< * cdef __pyx_unpickle_DecimalField__set_state(DecimalField __pyx_result, tuple __pyx_state): - * __pyx_result.default_value = __pyx_state[0]; __pyx_result.immutable = __pyx_state[1]; __pyx_result.private = __pyx_state[2] + * __pyx_result.choices = __pyx_state[0]; __pyx_result.default_value = __pyx_state[1]; __pyx_result.immutable = __pyx_state[2]; __pyx_result.private = __pyx_state[3] */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v___pyx_result); @@ -9372,8 +9677,8 @@ static PyObject *__pyx_pf_6nyoibo_6fields_14__pyx_unpickle_DecimalField(CYTHON_U * __pyx_unpickle_DecimalField__set_state( __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_DecimalField__set_state(DecimalField __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< - * __pyx_result.default_value = __pyx_state[0]; __pyx_result.immutable = __pyx_state[1]; __pyx_result.private = __pyx_state[2] - * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.choices = __pyx_state[0]; __pyx_result.default_value = __pyx_state[1]; __pyx_result.immutable = __pyx_state[2]; __pyx_result.private = __pyx_state[3] + * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): */ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_DecimalField__set_state(struct __pyx_obj_6nyoibo_6fields_DecimalField *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { @@ -9395,9 +9700,9 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_DecimalField__set_state( /* "(tree fragment)":12 * return __pyx_result * cdef __pyx_unpickle_DecimalField__set_state(DecimalField __pyx_result, tuple __pyx_state): - * __pyx_result.default_value = __pyx_state[0]; __pyx_result.immutable = __pyx_state[1]; __pyx_result.private = __pyx_state[2] # <<<<<<<<<<<<<< - * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): - * __pyx_result.__dict__.update(__pyx_state[3]) + * __pyx_result.choices = __pyx_state[0]; __pyx_result.default_value = __pyx_state[1]; __pyx_result.immutable = __pyx_state[2]; __pyx_result.private = __pyx_state[3] # <<<<<<<<<<<<<< + * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.__dict__.update(__pyx_state[4]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); @@ -9406,6 +9711,17 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_DecimalField__set_state( __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.choices); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.choices); + __pyx_v___pyx_result->__pyx_base.choices = __pyx_t_1; + __pyx_t_1 = 0; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(1, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.default_value); __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.default_value); __pyx_v___pyx_result->__pyx_base.default_value = __pyx_t_1; @@ -9414,7 +9730,7 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_DecimalField__set_state( PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.immutable); @@ -9425,7 +9741,7 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_DecimalField__set_state( PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.private); @@ -9435,16 +9751,16 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_DecimalField__set_state( /* "(tree fragment)":13 * cdef __pyx_unpickle_DecimalField__set_state(DecimalField __pyx_result, tuple __pyx_state): - * __pyx_result.default_value = __pyx_state[0]; __pyx_result.immutable = __pyx_state[1]; __pyx_result.private = __pyx_state[2] - * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< - * __pyx_result.__dict__.update(__pyx_state[3]) + * __pyx_result.choices = __pyx_state[0]; __pyx_result.default_value = __pyx_state[1]; __pyx_result.immutable = __pyx_state[2]; __pyx_result.private = __pyx_state[3] + * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< + * __pyx_result.__dict__.update(__pyx_state[4]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(1, 13, __pyx_L1_error) } __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error) - __pyx_t_4 = ((__pyx_t_3 > 3) != 0); + __pyx_t_4 = ((__pyx_t_3 > 4) != 0); if (__pyx_t_4) { } else { __pyx_t_2 = __pyx_t_4; @@ -9457,9 +9773,9 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_DecimalField__set_state( if (__pyx_t_2) { /* "(tree fragment)":14 - * __pyx_result.default_value = __pyx_state[0]; __pyx_result.immutable = __pyx_state[1]; __pyx_result.private = __pyx_state[2] - * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): - * __pyx_result.__dict__.update(__pyx_state[3]) # <<<<<<<<<<<<<< + * __pyx_result.choices = __pyx_state[0]; __pyx_result.default_value = __pyx_state[1]; __pyx_result.immutable = __pyx_state[2]; __pyx_result.private = __pyx_state[3] + * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.__dict__.update(__pyx_state[4]) # <<<<<<<<<<<<<< */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); @@ -9470,7 +9786,7 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_DecimalField__set_state( PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 14, __pyx_L1_error) } - __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { @@ -9492,9 +9808,9 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_DecimalField__set_state( /* "(tree fragment)":13 * cdef __pyx_unpickle_DecimalField__set_state(DecimalField __pyx_result, tuple __pyx_state): - * __pyx_result.default_value = __pyx_state[0]; __pyx_result.immutable = __pyx_state[1]; __pyx_result.private = __pyx_state[2] - * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< - * __pyx_result.__dict__.update(__pyx_state[3]) + * __pyx_result.choices = __pyx_state[0]; __pyx_result.default_value = __pyx_state[1]; __pyx_result.immutable = __pyx_state[2]; __pyx_result.private = __pyx_state[3] + * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< + * __pyx_result.__dict__.update(__pyx_state[4]) */ } @@ -9502,8 +9818,8 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_DecimalField__set_state( * __pyx_unpickle_DecimalField__set_state( __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_DecimalField__set_state(DecimalField __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< - * __pyx_result.default_value = __pyx_state[0]; __pyx_result.immutable = __pyx_state[1]; __pyx_result.private = __pyx_state[2] - * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.choices = __pyx_state[0]; __pyx_result.default_value = __pyx_state[1]; __pyx_result.immutable = __pyx_state[2]; __pyx_result.private = __pyx_state[3] + * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): */ /* function exit code */ @@ -9623,18 +9939,18 @@ static PyObject *__pyx_pf_6nyoibo_6fields_16__pyx_unpickle_LinkField(CYTHON_UNUS /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result - * if __pyx_checksum != 0x2bdffb3: # <<<<<<<<<<<<<< + * if __pyx_checksum != 0x22a05d2: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x2bdffb3 = (default_value, immutable, private, to))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x22a05d2 = (choices, default_value, immutable, private, to))" % __pyx_checksum) */ - __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x2bdffb3) != 0); + __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x22a05d2) != 0); if (__pyx_t_1) { /* "(tree fragment)":5 * cdef object __pyx_result - * if __pyx_checksum != 0x2bdffb3: + * if __pyx_checksum != 0x22a05d2: * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x2bdffb3 = (default_value, immutable, private, to))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x22a05d2 = (choices, default_value, immutable, private, to))" % __pyx_checksum) * __pyx_result = LinkField.__new__(__pyx_type) */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error) @@ -9653,15 +9969,15 @@ static PyObject *__pyx_pf_6nyoibo_6fields_16__pyx_unpickle_LinkField(CYTHON_UNUS __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":6 - * if __pyx_checksum != 0x2bdffb3: + * if __pyx_checksum != 0x22a05d2: * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x2bdffb3 = (default_value, immutable, private, to))" % __pyx_checksum) # <<<<<<<<<<<<<< + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x22a05d2 = (choices, default_value, immutable, private, to))" % __pyx_checksum) # <<<<<<<<<<<<<< * __pyx_result = LinkField.__new__(__pyx_type) * if __pyx_state is not None: */ __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x2b, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x22, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_INCREF(__pyx_v___pyx_PickleError); @@ -9688,15 +10004,15 @@ static PyObject *__pyx_pf_6nyoibo_6fields_16__pyx_unpickle_LinkField(CYTHON_UNUS /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result - * if __pyx_checksum != 0x2bdffb3: # <<<<<<<<<<<<<< + * if __pyx_checksum != 0x22a05d2: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x2bdffb3 = (default_value, immutable, private, to))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x22a05d2 = (choices, default_value, immutable, private, to))" % __pyx_checksum) */ } /* "(tree fragment)":7 * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x2bdffb3 = (default_value, immutable, private, to))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x22a05d2 = (choices, default_value, immutable, private, to))" % __pyx_checksum) * __pyx_result = LinkField.__new__(__pyx_type) # <<<<<<<<<<<<<< * if __pyx_state is not None: * __pyx_unpickle_LinkField__set_state( __pyx_result, __pyx_state) @@ -9722,7 +10038,7 @@ static PyObject *__pyx_pf_6nyoibo_6fields_16__pyx_unpickle_LinkField(CYTHON_UNUS __pyx_t_3 = 0; /* "(tree fragment)":8 - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x2bdffb3 = (default_value, immutable, private, to))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x22a05d2 = (choices, default_value, immutable, private, to))" % __pyx_checksum) * __pyx_result = LinkField.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_LinkField__set_state( __pyx_result, __pyx_state) @@ -9745,7 +10061,7 @@ static PyObject *__pyx_pf_6nyoibo_6fields_16__pyx_unpickle_LinkField(CYTHON_UNUS __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":8 - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x2bdffb3 = (default_value, immutable, private, to))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x22a05d2 = (choices, default_value, immutable, private, to))" % __pyx_checksum) * __pyx_result = LinkField.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_LinkField__set_state( __pyx_result, __pyx_state) @@ -9758,7 +10074,7 @@ static PyObject *__pyx_pf_6nyoibo_6fields_16__pyx_unpickle_LinkField(CYTHON_UNUS * __pyx_unpickle_LinkField__set_state( __pyx_result, __pyx_state) * return __pyx_result # <<<<<<<<<<<<<< * cdef __pyx_unpickle_LinkField__set_state(LinkField __pyx_result, tuple __pyx_state): - * __pyx_result.default_value = __pyx_state[0]; __pyx_result.immutable = __pyx_state[1]; __pyx_result.private = __pyx_state[2]; __pyx_result.to = __pyx_state[3] + * __pyx_result.choices = __pyx_state[0]; __pyx_result.default_value = __pyx_state[1]; __pyx_result.immutable = __pyx_state[2]; __pyx_result.private = __pyx_state[3]; __pyx_result.to = __pyx_state[4] */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v___pyx_result); @@ -9791,8 +10107,8 @@ static PyObject *__pyx_pf_6nyoibo_6fields_16__pyx_unpickle_LinkField(CYTHON_UNUS * __pyx_unpickle_LinkField__set_state( __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_LinkField__set_state(LinkField __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< - * __pyx_result.default_value = __pyx_state[0]; __pyx_result.immutable = __pyx_state[1]; __pyx_result.private = __pyx_state[2]; __pyx_result.to = __pyx_state[3] - * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.choices = __pyx_state[0]; __pyx_result.default_value = __pyx_state[1]; __pyx_result.immutable = __pyx_state[2]; __pyx_result.private = __pyx_state[3]; __pyx_result.to = __pyx_state[4] + * if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'): */ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_LinkField__set_state(struct __pyx_obj_6nyoibo_6fields_LinkField *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { @@ -9814,9 +10130,9 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_LinkField__set_state(str /* "(tree fragment)":12 * return __pyx_result * cdef __pyx_unpickle_LinkField__set_state(LinkField __pyx_result, tuple __pyx_state): - * __pyx_result.default_value = __pyx_state[0]; __pyx_result.immutable = __pyx_state[1]; __pyx_result.private = __pyx_state[2]; __pyx_result.to = __pyx_state[3] # <<<<<<<<<<<<<< - * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): - * __pyx_result.__dict__.update(__pyx_state[4]) + * __pyx_result.choices = __pyx_state[0]; __pyx_result.default_value = __pyx_state[1]; __pyx_result.immutable = __pyx_state[2]; __pyx_result.private = __pyx_state[3]; __pyx_result.to = __pyx_state[4] # <<<<<<<<<<<<<< + * if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.__dict__.update(__pyx_state[5]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); @@ -9825,6 +10141,17 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_LinkField__set_state(str __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.choices); + __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.choices); + __pyx_v___pyx_result->__pyx_base.choices = __pyx_t_1; + __pyx_t_1 = 0; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(1, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.default_value); __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.default_value); __pyx_v___pyx_result->__pyx_base.default_value = __pyx_t_1; @@ -9833,7 +10160,7 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_LinkField__set_state(str PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.immutable); @@ -9844,7 +10171,7 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_LinkField__set_state(str PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.private); @@ -9855,7 +10182,7 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_LinkField__set_state(str PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->to); @@ -9865,16 +10192,16 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_LinkField__set_state(str /* "(tree fragment)":13 * cdef __pyx_unpickle_LinkField__set_state(LinkField __pyx_result, tuple __pyx_state): - * __pyx_result.default_value = __pyx_state[0]; __pyx_result.immutable = __pyx_state[1]; __pyx_result.private = __pyx_state[2]; __pyx_result.to = __pyx_state[3] - * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< - * __pyx_result.__dict__.update(__pyx_state[4]) + * __pyx_result.choices = __pyx_state[0]; __pyx_result.default_value = __pyx_state[1]; __pyx_result.immutable = __pyx_state[2]; __pyx_result.private = __pyx_state[3]; __pyx_result.to = __pyx_state[4] + * if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< + * __pyx_result.__dict__.update(__pyx_state[5]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(1, 13, __pyx_L1_error) } __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error) - __pyx_t_4 = ((__pyx_t_3 > 4) != 0); + __pyx_t_4 = ((__pyx_t_3 > 5) != 0); if (__pyx_t_4) { } else { __pyx_t_2 = __pyx_t_4; @@ -9887,9 +10214,9 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_LinkField__set_state(str if (__pyx_t_2) { /* "(tree fragment)":14 - * __pyx_result.default_value = __pyx_state[0]; __pyx_result.immutable = __pyx_state[1]; __pyx_result.private = __pyx_state[2]; __pyx_result.to = __pyx_state[3] - * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): - * __pyx_result.__dict__.update(__pyx_state[4]) # <<<<<<<<<<<<<< + * __pyx_result.choices = __pyx_state[0]; __pyx_result.default_value = __pyx_state[1]; __pyx_result.immutable = __pyx_state[2]; __pyx_result.private = __pyx_state[3]; __pyx_result.to = __pyx_state[4] + * if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.__dict__.update(__pyx_state[5]) # <<<<<<<<<<<<<< */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); @@ -9900,7 +10227,7 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_LinkField__set_state(str PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 14, __pyx_L1_error) } - __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { @@ -9922,9 +10249,9 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_LinkField__set_state(str /* "(tree fragment)":13 * cdef __pyx_unpickle_LinkField__set_state(LinkField __pyx_result, tuple __pyx_state): - * __pyx_result.default_value = __pyx_state[0]; __pyx_result.immutable = __pyx_state[1]; __pyx_result.private = __pyx_state[2]; __pyx_result.to = __pyx_state[3] - * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< - * __pyx_result.__dict__.update(__pyx_state[4]) + * __pyx_result.choices = __pyx_state[0]; __pyx_result.default_value = __pyx_state[1]; __pyx_result.immutable = __pyx_state[2]; __pyx_result.private = __pyx_state[3]; __pyx_result.to = __pyx_state[4] + * if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< + * __pyx_result.__dict__.update(__pyx_state[5]) */ } @@ -9932,8 +10259,8 @@ static PyObject *__pyx_f_6nyoibo_6fields___pyx_unpickle_LinkField__set_state(str * __pyx_unpickle_LinkField__set_state( __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_LinkField__set_state(LinkField __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< - * __pyx_result.default_value = __pyx_state[0]; __pyx_result.immutable = __pyx_state[1]; __pyx_result.private = __pyx_state[2]; __pyx_result.to = __pyx_state[3] - * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.choices = __pyx_state[0]; __pyx_result.default_value = __pyx_state[1]; __pyx_result.immutable = __pyx_state[2]; __pyx_result.private = __pyx_state[3]; __pyx_result.to = __pyx_state[4] + * if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'): */ /* function exit code */ @@ -9967,6 +10294,7 @@ static PyObject *__pyx_tp_new_6nyoibo_6fields_Field(PyTypeObject *t, CYTHON_UNUS p->default_value = Py_None; Py_INCREF(Py_None); p->private = Py_None; Py_INCREF(Py_None); p->immutable = Py_None; Py_INCREF(Py_None); + p->choices = Py_None; Py_INCREF(Py_None); return o; } @@ -9981,6 +10309,7 @@ static void __pyx_tp_dealloc_6nyoibo_6fields_Field(PyObject *o) { Py_CLEAR(p->default_value); Py_CLEAR(p->private); Py_CLEAR(p->immutable); + Py_CLEAR(p->choices); (*Py_TYPE(o)->tp_free)(o); } @@ -9996,6 +10325,9 @@ static int __pyx_tp_traverse_6nyoibo_6fields_Field(PyObject *o, visitproc v, voi if (p->immutable) { e = (*v)(p->immutable, a); if (e) return e; } + if (p->choices) { + e = (*v)(p->choices, a); if (e) return e; + } return 0; } @@ -10011,6 +10343,9 @@ static int __pyx_tp_clear_6nyoibo_6fields_Field(PyObject *o) { tmp = ((PyObject*)p->immutable); p->immutable = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); + tmp = ((PyObject*)p->choices); + p->choices = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); return 0; } @@ -10026,6 +10361,10 @@ static PyObject *__pyx_getprop_6nyoibo_6fields_5Field_immutable(PyObject *o, CYT return __pyx_pw_6nyoibo_6fields_5Field_9immutable_1__get__(o); } +static PyObject *__pyx_getprop_6nyoibo_6fields_5Field_choices(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6nyoibo_6fields_5Field_7choices_1__get__(o); +} + static PyMethodDef __pyx_methods_6nyoibo_6fields_Field[] = { {"parse", (PyCFunction)__pyx_pw_6nyoibo_6fields_5Field_3parse, METH_O, 0}, {"__reduce_cython__", (PyCFunction)__pyx_pw_6nyoibo_6fields_5Field_5__reduce_cython__, METH_NOARGS, 0}, @@ -10037,6 +10376,7 @@ static struct PyGetSetDef __pyx_getsets_6nyoibo_6fields_Field[] = { {(char *)"default_value", __pyx_getprop_6nyoibo_6fields_5Field_default_value, 0, (char *)0, 0}, {(char *)"private", __pyx_getprop_6nyoibo_6fields_5Field_private, 0, (char *)0, 0}, {(char *)"immutable", __pyx_getprop_6nyoibo_6fields_5Field_immutable, 0, (char *)0, 0}, + {(char *)"choices", __pyx_getprop_6nyoibo_6fields_5Field_choices, 0, (char *)0, 0}, {0, 0, 0, 0, 0} }; @@ -10919,12 +11259,13 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_u_False, __pyx_k_False, sizeof(__pyx_k_False), 0, 1, 0, 1}, {&__pyx_n_s_Field, __pyx_k_Field, sizeof(__pyx_k_Field), 0, 0, 1, 1}, {&__pyx_n_s_FloatField, __pyx_k_FloatField, sizeof(__pyx_k_FloatField), 0, 0, 1, 1}, - {&__pyx_kp_s_Incompatible_checksums_s_vs_0x00, __pyx_k_Incompatible_checksums_s_vs_0x00, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x00), 0, 0, 1, 0}, - {&__pyx_kp_s_Incompatible_checksums_s_vs_0x2b, __pyx_k_Incompatible_checksums_s_vs_0x2b, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x2b), 0, 0, 1, 0}, + {&__pyx_kp_s_Incompatible_checksums_s_vs_0x22, __pyx_k_Incompatible_checksums_s_vs_0x22, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x22), 0, 0, 1, 0}, + {&__pyx_kp_s_Incompatible_checksums_s_vs_0x82, __pyx_k_Incompatible_checksums_s_vs_0x82, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x82), 0, 0, 1, 0}, {&__pyx_n_s_IntField, __pyx_k_IntField, sizeof(__pyx_k_IntField), 0, 0, 1, 1}, {&__pyx_n_s_LinkField, __pyx_k_LinkField, sizeof(__pyx_k_LinkField), 0, 0, 1, 1}, {&__pyx_n_s_PickleError, __pyx_k_PickleError, sizeof(__pyx_k_PickleError), 0, 0, 1, 1}, {&__pyx_n_s_StrField, __pyx_k_StrField, sizeof(__pyx_k_StrField), 0, 0, 1, 1}, + {&__pyx_n_s_choices, __pyx_k_choices, sizeof(__pyx_k_choices), 0, 0, 1, 1}, {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1}, {&__pyx_n_s_date, __pyx_k_date, sizeof(__pyx_k_date), 0, 0, 1, 1}, {&__pyx_n_s_datetime, __pyx_k_datetime, sizeof(__pyx_k_datetime), 0, 0, 1, 1}, @@ -10973,7 +11314,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {0, 0, 0, 0, 0, 0, 0} }; static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { - __pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_n_s_super); if (!__pyx_builtin_super) __PYX_ERR(0, 36, __pyx_L1_error) + __pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_n_s_super); if (!__pyx_builtin_super) __PYX_ERR(0, 41, __pyx_L1_error) return 0; __pyx_L1_error:; return -1; @@ -11033,8 +11374,8 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) { if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error); - __pyx_int_490060 = PyInt_FromLong(490060L); if (unlikely(!__pyx_int_490060)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_46006195 = PyInt_FromLong(46006195L); if (unlikely(!__pyx_int_46006195)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_int_36308434 = PyInt_FromLong(36308434L); if (unlikely(!__pyx_int_36308434)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_int_137204406 = PyInt_FromLong(137204406L); if (unlikely(!__pyx_int_137204406)) __PYX_ERR(0, 1, __pyx_L1_error) return 0; __pyx_L1_error:; return -1; @@ -11096,118 +11437,118 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_vtable_6nyoibo_6fields_LinkField.__pyx_base = *__pyx_vtabptr_6nyoibo_6fields_Field; __pyx_vtable_6nyoibo_6fields_LinkField.__pyx_base.parse = (PyObject *(*)(struct __pyx_obj_6nyoibo_6fields_Field *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6nyoibo_6fields_9LinkField_parse; __pyx_type_6nyoibo_6fields_LinkField.tp_base = __pyx_ptype_6nyoibo_6fields_Field; - if (PyType_Ready(&__pyx_type_6nyoibo_6fields_LinkField) < 0) __PYX_ERR(0, 79, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_6nyoibo_6fields_LinkField) < 0) __PYX_ERR(0, 84, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_6nyoibo_6fields_LinkField.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6nyoibo_6fields_LinkField.tp_dictoffset && __pyx_type_6nyoibo_6fields_LinkField.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_6nyoibo_6fields_LinkField.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (__Pyx_SetVtable(__pyx_type_6nyoibo_6fields_LinkField.tp_dict, __pyx_vtabptr_6nyoibo_6fields_LinkField) < 0) __PYX_ERR(0, 79, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_LinkField, (PyObject *)&__pyx_type_6nyoibo_6fields_LinkField) < 0) __PYX_ERR(0, 79, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6nyoibo_6fields_LinkField) < 0) __PYX_ERR(0, 79, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_6nyoibo_6fields_LinkField.tp_dict, __pyx_vtabptr_6nyoibo_6fields_LinkField) < 0) __PYX_ERR(0, 84, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_LinkField, (PyObject *)&__pyx_type_6nyoibo_6fields_LinkField) < 0) __PYX_ERR(0, 84, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6nyoibo_6fields_LinkField) < 0) __PYX_ERR(0, 84, __pyx_L1_error) __pyx_ptype_6nyoibo_6fields_LinkField = &__pyx_type_6nyoibo_6fields_LinkField; __pyx_vtabptr_6nyoibo_6fields_StrField = &__pyx_vtable_6nyoibo_6fields_StrField; __pyx_vtable_6nyoibo_6fields_StrField.__pyx_base = *__pyx_vtabptr_6nyoibo_6fields_Field; __pyx_type_6nyoibo_6fields_StrField.tp_base = __pyx_ptype_6nyoibo_6fields_Field; - if (PyType_Ready(&__pyx_type_6nyoibo_6fields_StrField) < 0) __PYX_ERR(0, 20, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_6nyoibo_6fields_StrField) < 0) __PYX_ERR(0, 25, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_6nyoibo_6fields_StrField.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6nyoibo_6fields_StrField.tp_dictoffset && __pyx_type_6nyoibo_6fields_StrField.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_6nyoibo_6fields_StrField.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (__Pyx_SetVtable(__pyx_type_6nyoibo_6fields_StrField.tp_dict, __pyx_vtabptr_6nyoibo_6fields_StrField) < 0) __PYX_ERR(0, 20, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_StrField, (PyObject *)&__pyx_type_6nyoibo_6fields_StrField) < 0) __PYX_ERR(0, 20, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6nyoibo_6fields_StrField) < 0) __PYX_ERR(0, 20, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_6nyoibo_6fields_StrField.tp_dict, __pyx_vtabptr_6nyoibo_6fields_StrField) < 0) __PYX_ERR(0, 25, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_StrField, (PyObject *)&__pyx_type_6nyoibo_6fields_StrField) < 0) __PYX_ERR(0, 25, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6nyoibo_6fields_StrField) < 0) __PYX_ERR(0, 25, __pyx_L1_error) __pyx_ptype_6nyoibo_6fields_StrField = &__pyx_type_6nyoibo_6fields_StrField; __pyx_vtabptr_6nyoibo_6fields_IntField = &__pyx_vtable_6nyoibo_6fields_IntField; __pyx_vtable_6nyoibo_6fields_IntField.__pyx_base = *__pyx_vtabptr_6nyoibo_6fields_Field; __pyx_vtable_6nyoibo_6fields_IntField.__pyx_base.parse = (PyObject *(*)(struct __pyx_obj_6nyoibo_6fields_Field *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6nyoibo_6fields_8IntField_parse; __pyx_type_6nyoibo_6fields_IntField.tp_base = __pyx_ptype_6nyoibo_6fields_Field; - if (PyType_Ready(&__pyx_type_6nyoibo_6fields_IntField) < 0) __PYX_ERR(0, 25, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_6nyoibo_6fields_IntField) < 0) __PYX_ERR(0, 30, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_6nyoibo_6fields_IntField.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6nyoibo_6fields_IntField.tp_dictoffset && __pyx_type_6nyoibo_6fields_IntField.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_6nyoibo_6fields_IntField.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (__Pyx_SetVtable(__pyx_type_6nyoibo_6fields_IntField.tp_dict, __pyx_vtabptr_6nyoibo_6fields_IntField) < 0) __PYX_ERR(0, 25, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_IntField, (PyObject *)&__pyx_type_6nyoibo_6fields_IntField) < 0) __PYX_ERR(0, 25, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6nyoibo_6fields_IntField) < 0) __PYX_ERR(0, 25, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_6nyoibo_6fields_IntField.tp_dict, __pyx_vtabptr_6nyoibo_6fields_IntField) < 0) __PYX_ERR(0, 30, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_IntField, (PyObject *)&__pyx_type_6nyoibo_6fields_IntField) < 0) __PYX_ERR(0, 30, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6nyoibo_6fields_IntField) < 0) __PYX_ERR(0, 30, __pyx_L1_error) __pyx_ptype_6nyoibo_6fields_IntField = &__pyx_type_6nyoibo_6fields_IntField; __pyx_vtabptr_6nyoibo_6fields_BoolField = &__pyx_vtable_6nyoibo_6fields_BoolField; __pyx_vtable_6nyoibo_6fields_BoolField.__pyx_base = *__pyx_vtabptr_6nyoibo_6fields_Field; __pyx_vtable_6nyoibo_6fields_BoolField.__pyx_base.parse = (PyObject *(*)(struct __pyx_obj_6nyoibo_6fields_Field *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6nyoibo_6fields_9BoolField_parse; __pyx_type_6nyoibo_6fields_BoolField.tp_base = __pyx_ptype_6nyoibo_6fields_Field; - if (PyType_Ready(&__pyx_type_6nyoibo_6fields_BoolField) < 0) __PYX_ERR(0, 39, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_6nyoibo_6fields_BoolField) < 0) __PYX_ERR(0, 44, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_6nyoibo_6fields_BoolField.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6nyoibo_6fields_BoolField.tp_dictoffset && __pyx_type_6nyoibo_6fields_BoolField.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_6nyoibo_6fields_BoolField.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (__Pyx_SetVtable(__pyx_type_6nyoibo_6fields_BoolField.tp_dict, __pyx_vtabptr_6nyoibo_6fields_BoolField) < 0) __PYX_ERR(0, 39, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_BoolField, (PyObject *)&__pyx_type_6nyoibo_6fields_BoolField) < 0) __PYX_ERR(0, 39, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6nyoibo_6fields_BoolField) < 0) __PYX_ERR(0, 39, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_6nyoibo_6fields_BoolField.tp_dict, __pyx_vtabptr_6nyoibo_6fields_BoolField) < 0) __PYX_ERR(0, 44, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_BoolField, (PyObject *)&__pyx_type_6nyoibo_6fields_BoolField) < 0) __PYX_ERR(0, 44, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6nyoibo_6fields_BoolField) < 0) __PYX_ERR(0, 44, __pyx_L1_error) __pyx_ptype_6nyoibo_6fields_BoolField = &__pyx_type_6nyoibo_6fields_BoolField; __pyx_vtabptr_6nyoibo_6fields_DateField = &__pyx_vtable_6nyoibo_6fields_DateField; __pyx_vtable_6nyoibo_6fields_DateField.__pyx_base = *__pyx_vtabptr_6nyoibo_6fields_Field; __pyx_vtable_6nyoibo_6fields_DateField.__pyx_base.parse = (PyObject *(*)(struct __pyx_obj_6nyoibo_6fields_Field *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6nyoibo_6fields_9DateField_parse; __pyx_type_6nyoibo_6fields_DateField.tp_base = __pyx_ptype_6nyoibo_6fields_Field; - if (PyType_Ready(&__pyx_type_6nyoibo_6fields_DateField) < 0) __PYX_ERR(0, 49, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_6nyoibo_6fields_DateField) < 0) __PYX_ERR(0, 54, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_6nyoibo_6fields_DateField.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6nyoibo_6fields_DateField.tp_dictoffset && __pyx_type_6nyoibo_6fields_DateField.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_6nyoibo_6fields_DateField.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (__Pyx_SetVtable(__pyx_type_6nyoibo_6fields_DateField.tp_dict, __pyx_vtabptr_6nyoibo_6fields_DateField) < 0) __PYX_ERR(0, 49, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_DateField, (PyObject *)&__pyx_type_6nyoibo_6fields_DateField) < 0) __PYX_ERR(0, 49, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6nyoibo_6fields_DateField) < 0) __PYX_ERR(0, 49, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_6nyoibo_6fields_DateField.tp_dict, __pyx_vtabptr_6nyoibo_6fields_DateField) < 0) __PYX_ERR(0, 54, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_DateField, (PyObject *)&__pyx_type_6nyoibo_6fields_DateField) < 0) __PYX_ERR(0, 54, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6nyoibo_6fields_DateField) < 0) __PYX_ERR(0, 54, __pyx_L1_error) __pyx_ptype_6nyoibo_6fields_DateField = &__pyx_type_6nyoibo_6fields_DateField; __pyx_vtabptr_6nyoibo_6fields_DatetimeField = &__pyx_vtable_6nyoibo_6fields_DatetimeField; __pyx_vtable_6nyoibo_6fields_DatetimeField.__pyx_base = *__pyx_vtabptr_6nyoibo_6fields_Field; __pyx_vtable_6nyoibo_6fields_DatetimeField.__pyx_base.parse = (PyObject *(*)(struct __pyx_obj_6nyoibo_6fields_Field *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6nyoibo_6fields_13DatetimeField_parse; __pyx_type_6nyoibo_6fields_DatetimeField.tp_base = __pyx_ptype_6nyoibo_6fields_Field; - if (PyType_Ready(&__pyx_type_6nyoibo_6fields_DatetimeField) < 0) __PYX_ERR(0, 59, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_6nyoibo_6fields_DatetimeField) < 0) __PYX_ERR(0, 64, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_6nyoibo_6fields_DatetimeField.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6nyoibo_6fields_DatetimeField.tp_dictoffset && __pyx_type_6nyoibo_6fields_DatetimeField.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_6nyoibo_6fields_DatetimeField.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (__Pyx_SetVtable(__pyx_type_6nyoibo_6fields_DatetimeField.tp_dict, __pyx_vtabptr_6nyoibo_6fields_DatetimeField) < 0) __PYX_ERR(0, 59, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_DatetimeField, (PyObject *)&__pyx_type_6nyoibo_6fields_DatetimeField) < 0) __PYX_ERR(0, 59, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6nyoibo_6fields_DatetimeField) < 0) __PYX_ERR(0, 59, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_6nyoibo_6fields_DatetimeField.tp_dict, __pyx_vtabptr_6nyoibo_6fields_DatetimeField) < 0) __PYX_ERR(0, 64, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_DatetimeField, (PyObject *)&__pyx_type_6nyoibo_6fields_DatetimeField) < 0) __PYX_ERR(0, 64, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6nyoibo_6fields_DatetimeField) < 0) __PYX_ERR(0, 64, __pyx_L1_error) __pyx_ptype_6nyoibo_6fields_DatetimeField = &__pyx_type_6nyoibo_6fields_DatetimeField; __pyx_vtabptr_6nyoibo_6fields_FloatField = &__pyx_vtable_6nyoibo_6fields_FloatField; __pyx_vtable_6nyoibo_6fields_FloatField.__pyx_base = *__pyx_vtabptr_6nyoibo_6fields_Field; __pyx_type_6nyoibo_6fields_FloatField.tp_base = __pyx_ptype_6nyoibo_6fields_Field; - if (PyType_Ready(&__pyx_type_6nyoibo_6fields_FloatField) < 0) __PYX_ERR(0, 69, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_6nyoibo_6fields_FloatField) < 0) __PYX_ERR(0, 74, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_6nyoibo_6fields_FloatField.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6nyoibo_6fields_FloatField.tp_dictoffset && __pyx_type_6nyoibo_6fields_FloatField.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_6nyoibo_6fields_FloatField.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (__Pyx_SetVtable(__pyx_type_6nyoibo_6fields_FloatField.tp_dict, __pyx_vtabptr_6nyoibo_6fields_FloatField) < 0) __PYX_ERR(0, 69, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_FloatField, (PyObject *)&__pyx_type_6nyoibo_6fields_FloatField) < 0) __PYX_ERR(0, 69, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6nyoibo_6fields_FloatField) < 0) __PYX_ERR(0, 69, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_6nyoibo_6fields_FloatField.tp_dict, __pyx_vtabptr_6nyoibo_6fields_FloatField) < 0) __PYX_ERR(0, 74, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_FloatField, (PyObject *)&__pyx_type_6nyoibo_6fields_FloatField) < 0) __PYX_ERR(0, 74, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6nyoibo_6fields_FloatField) < 0) __PYX_ERR(0, 74, __pyx_L1_error) __pyx_ptype_6nyoibo_6fields_FloatField = &__pyx_type_6nyoibo_6fields_FloatField; __pyx_vtabptr_6nyoibo_6fields_DecimalField = &__pyx_vtable_6nyoibo_6fields_DecimalField; __pyx_vtable_6nyoibo_6fields_DecimalField.__pyx_base = *__pyx_vtabptr_6nyoibo_6fields_Field; __pyx_type_6nyoibo_6fields_DecimalField.tp_base = __pyx_ptype_6nyoibo_6fields_Field; - if (PyType_Ready(&__pyx_type_6nyoibo_6fields_DecimalField) < 0) __PYX_ERR(0, 74, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_6nyoibo_6fields_DecimalField) < 0) __PYX_ERR(0, 79, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_6nyoibo_6fields_DecimalField.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6nyoibo_6fields_DecimalField.tp_dictoffset && __pyx_type_6nyoibo_6fields_DecimalField.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_6nyoibo_6fields_DecimalField.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (__Pyx_SetVtable(__pyx_type_6nyoibo_6fields_DecimalField.tp_dict, __pyx_vtabptr_6nyoibo_6fields_DecimalField) < 0) __PYX_ERR(0, 74, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_DecimalField, (PyObject *)&__pyx_type_6nyoibo_6fields_DecimalField) < 0) __PYX_ERR(0, 74, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6nyoibo_6fields_DecimalField) < 0) __PYX_ERR(0, 74, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_6nyoibo_6fields_DecimalField.tp_dict, __pyx_vtabptr_6nyoibo_6fields_DecimalField) < 0) __PYX_ERR(0, 79, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_DecimalField, (PyObject *)&__pyx_type_6nyoibo_6fields_DecimalField) < 0) __PYX_ERR(0, 79, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6nyoibo_6fields_DecimalField) < 0) __PYX_ERR(0, 79, __pyx_L1_error) __pyx_ptype_6nyoibo_6fields_DecimalField = &__pyx_type_6nyoibo_6fields_DecimalField; __Pyx_RefNannyFinishContext(); return 0; @@ -11478,93 +11819,93 @@ if (!__Pyx_RefNanny) { * * _internal_type = None # <<<<<<<<<<<<<< * - * def __init__(self, default_value=None, private=False, immutable=True): + * def __init__(self, default_value=None, private=False, immutable=True, */ if (PyDict_SetItem((PyObject *)__pyx_ptype_6nyoibo_6fields_Field->tp_dict, __pyx_n_s_internal_type, Py_None) < 0) __PYX_ERR(0, 7, __pyx_L1_error) PyType_Modified(__pyx_ptype_6nyoibo_6fields_Field); - /* "nyoibo/fields.pyx":22 + /* "nyoibo/fields.pyx":27 * cdef class StrField(Field): * * _internal_type = str # <<<<<<<<<<<<<< * * */ - if (PyDict_SetItem((PyObject *)__pyx_ptype_6nyoibo_6fields_StrField->tp_dict, __pyx_n_s_internal_type, ((PyObject *)(&PyUnicode_Type))) < 0) __PYX_ERR(0, 22, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_6nyoibo_6fields_StrField->tp_dict, __pyx_n_s_internal_type, ((PyObject *)(&PyUnicode_Type))) < 0) __PYX_ERR(0, 27, __pyx_L1_error) PyType_Modified(__pyx_ptype_6nyoibo_6fields_StrField); - /* "nyoibo/fields.pyx":27 + /* "nyoibo/fields.pyx":32 * cdef class IntField(Field): * * _internal_type = int # <<<<<<<<<<<<<< * * cpdef public parse(self, value): */ - if (PyDict_SetItem((PyObject *)__pyx_ptype_6nyoibo_6fields_IntField->tp_dict, __pyx_n_s_internal_type, ((PyObject *)(&PyInt_Type))) < 0) __PYX_ERR(0, 27, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_6nyoibo_6fields_IntField->tp_dict, __pyx_n_s_internal_type, ((PyObject *)(&PyInt_Type))) < 0) __PYX_ERR(0, 32, __pyx_L1_error) PyType_Modified(__pyx_ptype_6nyoibo_6fields_IntField); - /* "nyoibo/fields.pyx":41 + /* "nyoibo/fields.pyx":46 * cdef class BoolField(Field): * * _internal_type = bool # <<<<<<<<<<<<<< * * cpdef public parse(self, value): */ - if (PyDict_SetItem((PyObject *)__pyx_ptype_6nyoibo_6fields_BoolField->tp_dict, __pyx_n_s_internal_type, ((PyObject*)&PyBool_Type)) < 0) __PYX_ERR(0, 41, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_6nyoibo_6fields_BoolField->tp_dict, __pyx_n_s_internal_type, ((PyObject*)&PyBool_Type)) < 0) __PYX_ERR(0, 46, __pyx_L1_error) PyType_Modified(__pyx_ptype_6nyoibo_6fields_BoolField); - /* "nyoibo/fields.pyx":51 + /* "nyoibo/fields.pyx":56 * cdef class DateField(Field): * * _internal_type = datetime.date # <<<<<<<<<<<<<< * * cpdef public parse(self, value): */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_datetime); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 51, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_datetime); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 56, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_date); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 51, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_date); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 56, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem((PyObject *)__pyx_ptype_6nyoibo_6fields_DateField->tp_dict, __pyx_n_s_internal_type, __pyx_t_1) < 0) __PYX_ERR(0, 51, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_6nyoibo_6fields_DateField->tp_dict, __pyx_n_s_internal_type, __pyx_t_1) < 0) __PYX_ERR(0, 56, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_6nyoibo_6fields_DateField); - /* "nyoibo/fields.pyx":61 + /* "nyoibo/fields.pyx":66 * cdef class DatetimeField(Field): * * _internal_type = datetime.datetime # <<<<<<<<<<<<<< * * cpdef public parse(self, value): */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_datetime); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 61, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_datetime); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 66, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_datetime); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 61, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_datetime); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 66, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (PyDict_SetItem((PyObject *)__pyx_ptype_6nyoibo_6fields_DatetimeField->tp_dict, __pyx_n_s_internal_type, __pyx_t_2) < 0) __PYX_ERR(0, 61, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_6nyoibo_6fields_DatetimeField->tp_dict, __pyx_n_s_internal_type, __pyx_t_2) < 0) __PYX_ERR(0, 66, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_6nyoibo_6fields_DatetimeField); - /* "nyoibo/fields.pyx":71 + /* "nyoibo/fields.pyx":76 * cdef class FloatField(Field): * * _internal_type = float # <<<<<<<<<<<<<< * * */ - if (PyDict_SetItem((PyObject *)__pyx_ptype_6nyoibo_6fields_FloatField->tp_dict, __pyx_n_s_internal_type, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 71, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_6nyoibo_6fields_FloatField->tp_dict, __pyx_n_s_internal_type, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 76, __pyx_L1_error) PyType_Modified(__pyx_ptype_6nyoibo_6fields_FloatField); - /* "nyoibo/fields.pyx":76 + /* "nyoibo/fields.pyx":81 * cdef class DecimalField(Field): * * _internal_type = Decimal # <<<<<<<<<<<<<< * * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Decimal); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 76, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Decimal); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 81, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem((PyObject *)__pyx_ptype_6nyoibo_6fields_DecimalField->tp_dict, __pyx_n_s_internal_type, __pyx_t_2) < 0) __PYX_ERR(0, 76, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_6nyoibo_6fields_DecimalField->tp_dict, __pyx_n_s_internal_type, __pyx_t_2) < 0) __PYX_ERR(0, 81, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_6nyoibo_6fields_DecimalField); @@ -11582,8 +11923,8 @@ if (!__Pyx_RefNanny) { * __pyx_unpickle_Field__set_state( __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_Field__set_state(Field __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< - * __pyx_result.default_value = __pyx_state[0]; __pyx_result.immutable = __pyx_state[1]; __pyx_result.private = __pyx_state[2] - * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.choices = __pyx_state[0]; __pyx_result.default_value = __pyx_state[1]; __pyx_result.immutable = __pyx_state[2]; __pyx_result.private = __pyx_state[3] + * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6nyoibo_6fields_3__pyx_unpickle_StrField, NULL, __pyx_n_s_nyoibo_fields); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -11604,8 +11945,8 @@ if (!__Pyx_RefNanny) { * __pyx_unpickle_IntField__set_state( __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_IntField__set_state(IntField __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< - * __pyx_result.default_value = __pyx_state[0]; __pyx_result.immutable = __pyx_state[1]; __pyx_result.private = __pyx_state[2] - * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.choices = __pyx_state[0]; __pyx_result.default_value = __pyx_state[1]; __pyx_result.immutable = __pyx_state[2]; __pyx_result.private = __pyx_state[3] + * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6nyoibo_6fields_7__pyx_unpickle_BoolField, NULL, __pyx_n_s_nyoibo_fields); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -11626,8 +11967,8 @@ if (!__Pyx_RefNanny) { * __pyx_unpickle_DateField__set_state( __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_DateField__set_state(DateField __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< - * __pyx_result.default_value = __pyx_state[0]; __pyx_result.immutable = __pyx_state[1]; __pyx_result.private = __pyx_state[2] - * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.choices = __pyx_state[0]; __pyx_result.default_value = __pyx_state[1]; __pyx_result.immutable = __pyx_state[2]; __pyx_result.private = __pyx_state[3] + * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6nyoibo_6fields_11__pyx_unpickle_DatetimeField, NULL, __pyx_n_s_nyoibo_fields); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -11648,8 +11989,8 @@ if (!__Pyx_RefNanny) { * __pyx_unpickle_FloatField__set_state( __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_FloatField__set_state(FloatField __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< - * __pyx_result.default_value = __pyx_state[0]; __pyx_result.immutable = __pyx_state[1]; __pyx_result.private = __pyx_state[2] - * if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.choices = __pyx_state[0]; __pyx_result.default_value = __pyx_state[1]; __pyx_result.immutable = __pyx_state[2]; __pyx_result.private = __pyx_state[3] + * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6nyoibo_6fields_15__pyx_unpickle_DecimalField, NULL, __pyx_n_s_nyoibo_fields); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); diff --git a/nyoibo/fields.pxd b/nyoibo/fields.pxd index 75fff57..b3ee72a 100644 --- a/nyoibo/fields.pxd +++ b/nyoibo/fields.pxd @@ -3,6 +3,7 @@ cdef class Field: cdef readonly default_value cdef readonly private cdef readonly immutable + cdef readonly choices cpdef public parse(self, value) diff --git a/nyoibo/fields.pyx b/nyoibo/fields.pyx index 79e50d9..33b2c17 100644 --- a/nyoibo/fields.pyx +++ b/nyoibo/fields.pyx @@ -6,12 +6,17 @@ cdef class Field: _internal_type = None - def __init__(self, default_value=None, private=False, immutable=True): + def __init__(self, default_value=None, private=False, immutable=True, + choices=None): self.default_value = default_value self.private = private self.immutable = immutable + self.choices = choices cpdef public parse(self, value): + if value and self.choices: + return self.choices(value) + if value is None or type(value) is self._internal_type: return value return self._internal_type(value) diff --git a/tests/test_entity.py b/tests/test_entity.py index fbe6968..09d4cc7 100644 --- a/tests/test_entity.py +++ b/tests/test_entity.py @@ -1,9 +1,17 @@ +from enum import Enum + from pytest import raises from nyoibo import Entity, fields from nyoibo.exceptions import PrivateField +class Types(Enum): + value0 = 'value0' + value1 = 'value1' + value2 = 'value2' + + class Rate(Entity): _value = fields.StrField(immutable=False) _other_value = fields.StrField() @@ -11,6 +19,7 @@ class Rate(Entity): _other_default = fields.IntField(default_value=1) _private = fields.StrField(private=True) _immutable = fields.StrField() + _type = fields.StrField(choices=Types) def test_get_value(): @@ -114,3 +123,9 @@ def get_value(self): private = Private(add=5, value=5) assert private.value == 10 + + +def test_choices(): + entity = Rate(type='value0') + + assert entity.type == Types.value0 diff --git a/tests/test_fields.py b/tests/test_fields.py index 49a2e78..f6b6f08 100644 --- a/tests/test_fields.py +++ b/tests/test_fields.py @@ -132,7 +132,7 @@ def test_parse_immutable_value(): def test_entity_field(): class NewEntity(Entity): - _test_entity = fields.LinkField(private=False, to=TestEntity) + _test_entity = fields.LinkField(to=TestEntity) test_entity = TestEntity() new_entity = NewEntity(test_entity=test_entity)