From 4f5c45c7fc31a36355ddf0ce262f01944a9b0168 Mon Sep 17 00:00:00 2001 From: Siddhant Goel Date: Sun, 21 Apr 2024 20:49:33 +0200 Subject: [PATCH] feat: extract PS_START handler --- streaming_form_data/_parser.c | 2410 ++++++++++++++++++------------- streaming_form_data/_parser.pyx | 38 +- 2 files changed, 1429 insertions(+), 1019 deletions(-) diff --git a/streaming_form_data/_parser.c b/streaming_form_data/_parser.c index 1b9fe6d3..356e437e 100644 --- a/streaming_form_data/_parser.c +++ b/streaming_form_data/_parser.c @@ -1546,17 +1546,18 @@ struct __pyx_obj_19streaming_form_data_7_parser_Finder { * * * cdef class _Part: # <<<<<<<<<<<<<< - * """One part of a multipart/form-data request * """ + * A single part of a multipart/form-data request */ struct __pyx_obj_19streaming_form_data_7_parser__Part { PyObject_HEAD + struct __pyx_vtabstruct_19streaming_form_data_7_parser__Part *__pyx_vtab; PyObject *name; PyObject *targets; }; -/* "streaming_form_data/_parser.pyx":146 +/* "streaming_form_data/_parser.pyx":150 * * * cdef class Part(_Part): # <<<<<<<<<<<<<< @@ -1568,7 +1569,7 @@ struct __pyx_obj_19streaming_form_data_7_parser_Part { }; -/* "streaming_form_data/_parser.pyx":160 +/* "streaming_form_data/_parser.pyx":167 * * * cdef class AsyncPart(_Part): # <<<<<<<<<<<<<< @@ -1580,7 +1581,7 @@ struct __pyx_obj_19streaming_form_data_7_parser_AsyncPart { }; -/* "streaming_form_data/_parser.pyx":174 +/* "streaming_form_data/_parser.pyx":184 * * * cdef class _Parser: # <<<<<<<<<<<<<< @@ -1604,7 +1605,7 @@ struct __pyx_obj_19streaming_form_data_7_parser__Parser { }; -/* "streaming_form_data/_parser.pyx":161 +/* "streaming_form_data/_parser.pyx":168 * * cdef class AsyncPart(_Part): * async def start(self): # <<<<<<<<<<<<<< @@ -1620,7 +1621,7 @@ struct __pyx_obj_19streaming_form_data_7_parser___pyx_scope_struct__start { }; -/* "streaming_form_data/_parser.pyx":165 +/* "streaming_form_data/_parser.pyx":172 * await target.start() * * async def data_received(self, bytes chunk): # <<<<<<<<<<<<<< @@ -1637,7 +1638,7 @@ struct __pyx_obj_19streaming_form_data_7_parser___pyx_scope_struct_1_data_receiv }; -/* "streaming_form_data/_parser.pyx":169 +/* "streaming_form_data/_parser.pyx":176 * await target.data_received(chunk) * * async def finish(self): # <<<<<<<<<<<<<< @@ -1653,7 +1654,7 @@ struct __pyx_obj_19streaming_form_data_7_parser___pyx_scope_struct_2_finish { }; -/* "streaming_form_data/_parser.pyx":221 +/* "streaming_form_data/_parser.pyx":231 * self.active_part.start() * * async def async_set_active_part(self, part, str filename): # <<<<<<<<<<<<<< @@ -1668,7 +1669,7 @@ struct __pyx_obj_19streaming_form_data_7_parser___pyx_scope_struct_3_async_set_a }; -/* "streaming_form_data/_parser.pyx":231 +/* "streaming_form_data/_parser.pyx":241 * self.active_part = None * * async def async_unset_active_part(self): # <<<<<<<<<<<<<< @@ -1681,7 +1682,7 @@ struct __pyx_obj_19streaming_form_data_7_parser___pyx_scope_struct_4_async_unset }; -/* "streaming_form_data/_parser.pyx":240 +/* "streaming_form_data/_parser.pyx":250 * self.active_part.data_received(value) * * async def async_on_body(self, bytes value): # <<<<<<<<<<<<<< @@ -1695,7 +1696,7 @@ struct __pyx_obj_19streaming_form_data_7_parser___pyx_scope_struct_5_async_on_bo }; -/* "streaming_form_data/_parser.pyx":260 +/* "streaming_form_data/_parser.pyx":270 * return self._parse(chunk, index) * * async def async_data_received(self, bytes data): # <<<<<<<<<<<<<< @@ -1743,7 +1744,49 @@ struct __pyx_vtabstruct_19streaming_form_data_7_parser_Finder { static struct __pyx_vtabstruct_19streaming_form_data_7_parser_Finder *__pyx_vtabptr_19streaming_form_data_7_parser_Finder; -/* "streaming_form_data/_parser.pyx":174 +/* "streaming_form_data/_parser.pyx":123 + * + * + * cdef class _Part: # <<<<<<<<<<<<<< + * """ + * A single part of a multipart/form-data request + */ + +struct __pyx_vtabstruct_19streaming_form_data_7_parser__Part { + PyObject *(*is_sync)(struct __pyx_obj_19streaming_form_data_7_parser__Part *); +}; +static struct __pyx_vtabstruct_19streaming_form_data_7_parser__Part *__pyx_vtabptr_19streaming_form_data_7_parser__Part; + + +/* "streaming_form_data/_parser.pyx":150 + * + * + * cdef class Part(_Part): # <<<<<<<<<<<<<< + * def start(self): + * for target in self.targets: + */ + +struct __pyx_vtabstruct_19streaming_form_data_7_parser_Part { + struct __pyx_vtabstruct_19streaming_form_data_7_parser__Part __pyx_base; +}; +static struct __pyx_vtabstruct_19streaming_form_data_7_parser_Part *__pyx_vtabptr_19streaming_form_data_7_parser_Part; + + +/* "streaming_form_data/_parser.pyx":167 + * + * + * cdef class AsyncPart(_Part): # <<<<<<<<<<<<<< + * async def start(self): + * for target in self.targets: + */ + +struct __pyx_vtabstruct_19streaming_form_data_7_parser_AsyncPart { + struct __pyx_vtabstruct_19streaming_form_data_7_parser__Part __pyx_base; +}; +static struct __pyx_vtabstruct_19streaming_form_data_7_parser_AsyncPart *__pyx_vtabptr_19streaming_form_data_7_parser_AsyncPart; + + +/* "streaming_form_data/_parser.pyx":184 * * * cdef class _Parser: # <<<<<<<<<<<<<< @@ -1754,8 +1797,10 @@ static struct __pyx_vtabstruct_19streaming_form_data_7_parser_Finder *__pyx_vtab struct __pyx_vtabstruct_19streaming_form_data_7_parser__Parser { PyObject *(*_part_for)(struct __pyx_obj_19streaming_form_data_7_parser__Parser *, PyObject *); PyObject *(*include_leftover_buffer)(struct __pyx_obj_19streaming_form_data_7_parser__Parser *, PyObject *); + PyObject *(*handle_ps_start)(struct __pyx_obj_19streaming_form_data_7_parser__Parser *, __pyx_t_19streaming_form_data_7_parser_Byte const *, size_t *, size_t *); size_t (*rewind_fast_forward)(struct __pyx_obj_19streaming_form_data_7_parser__Parser *, __pyx_t_19streaming_form_data_7_parser_Byte const *, size_t, size_t); PyObject *(*mark_error)(struct __pyx_obj_19streaming_form_data_7_parser__Parser *); + PyObject *(*has_error)(struct __pyx_obj_19streaming_form_data_7_parser__Parser *); }; static struct __pyx_vtabstruct_19streaming_form_data_7_parser__Parser *__pyx_vtabptr_19streaming_form_data_7_parser__Parser; /* #### Code section: utility_code_proto ### */ @@ -2181,6 +2226,9 @@ static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) { #define __Pyx_PyList_Append(L,x) PyList_Append(L,x) #endif +/* PyObjectCallNoArg.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func); + /* IncludeStructmemberH.proto */ #include @@ -2232,9 +2280,6 @@ static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **me /* PyObjectCallMethod1.proto */ static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg); -/* PyObjectCallNoArg.proto */ -static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func); - /* CoroutineBase.proto */ struct __pyx_CoroutineObject; typedef PyObject *(*__pyx_coroutine_body_t)(struct __pyx_CoroutineObject *, PyThreadState *, PyObject *); @@ -2774,10 +2819,15 @@ static int __pyx_f_19streaming_form_data_7_parser_6Finder_inactive(struct __pyx_ static int __pyx_f_19streaming_form_data_7_parser_6Finder_active(struct __pyx_obj_19streaming_form_data_7_parser_Finder *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ static int __pyx_f_19streaming_form_data_7_parser_6Finder_found(struct __pyx_obj_19streaming_form_data_7_parser_Finder *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ static size_t __pyx_f_19streaming_form_data_7_parser_6Finder_matched_length(struct __pyx_obj_19streaming_form_data_7_parser_Finder *__pyx_v_self); /* proto*/ +static PyObject *__pyx_f_19streaming_form_data_7_parser_5_Part_is_sync(CYTHON_UNUSED struct __pyx_obj_19streaming_form_data_7_parser__Part *__pyx_v_self); /* proto*/ +static PyObject *__pyx_f_19streaming_form_data_7_parser_4Part_is_sync(CYTHON_UNUSED struct __pyx_obj_19streaming_form_data_7_parser_Part *__pyx_v_self); /* proto*/ +static PyObject *__pyx_f_19streaming_form_data_7_parser_9AsyncPart_is_sync(CYTHON_UNUSED struct __pyx_obj_19streaming_form_data_7_parser_AsyncPart *__pyx_v_self); /* proto*/ static PyObject *__pyx_f_19streaming_form_data_7_parser_7_Parser__part_for(struct __pyx_obj_19streaming_form_data_7_parser__Parser *__pyx_v_self, PyObject *__pyx_v_name); /* proto*/ static PyObject *__pyx_f_19streaming_form_data_7_parser_7_Parser_include_leftover_buffer(struct __pyx_obj_19streaming_form_data_7_parser__Parser *__pyx_v_self, PyObject *__pyx_v_data); /* proto*/ +static PyObject *__pyx_f_19streaming_form_data_7_parser_7_Parser_handle_ps_start(struct __pyx_obj_19streaming_form_data_7_parser__Parser *__pyx_v_self, __pyx_t_19streaming_form_data_7_parser_Byte const *__pyx_v_chunk_ptr, size_t *__pyx_v_idx, size_t *__pyx_v_buffer_start); /* proto*/ static size_t __pyx_f_19streaming_form_data_7_parser_7_Parser_rewind_fast_forward(struct __pyx_obj_19streaming_form_data_7_parser__Parser *__pyx_v_self, __pyx_t_19streaming_form_data_7_parser_Byte const *__pyx_v_chunk_ptr, size_t __pyx_v_pos_first, size_t __pyx_v_pos_last); /* proto*/ static PyObject *__pyx_f_19streaming_form_data_7_parser_7_Parser_mark_error(struct __pyx_obj_19streaming_form_data_7_parser__Parser *__pyx_v_self); /* proto*/ +static PyObject *__pyx_f_19streaming_form_data_7_parser_7_Parser_has_error(struct __pyx_obj_19streaming_form_data_7_parser__Parser *__pyx_v_self); /* proto*/ /* Module declarations from "streaming_form_data._parser" */ static int __pyx_v_19streaming_form_data_7_parser_c_hyphen; @@ -2804,6 +2854,7 @@ int __pyx_module_is_main_streaming_form_data___parser = 0; /* Implementation of "streaming_form_data._parser" */ /* #### Code section: global_var ### */ static PyObject *__pyx_builtin_ValueError; +static PyObject *__pyx_builtin_NotImplementedError; /* #### Code section: string_decls ### */ static const char __pyx_k_[] = ""; static const char __pyx_k_v[] = "v"; @@ -2878,6 +2929,7 @@ static const char __pyx_k_asyncio[] = "asyncio"; static const char __pyx_k_default[] = "_default"; static const char __pyx_k_disable[] = "disable"; static const char __pyx_k_inspect[] = "inspect"; +static const char __pyx_k_is_sync[] = "is_sync"; static const char __pyx_k_members[] = "__members__"; static const char __pyx_k_message[] = "message"; static const char __pyx_k_on_body[] = "on_body"; @@ -2970,6 +3022,7 @@ static const char __pyx_k_asyncio_coroutines[] = "asyncio.coroutines"; static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; static const char __pyx_k_multipart_filename[] = "multipart_filename"; static const char __pyx_k_pyx_unpickle__Part[] = "__pyx_unpickle__Part"; +static const char __pyx_k_NotImplementedError[] = "NotImplementedError"; static const char __pyx_k_Pyx_EnumBase___repr[] = "__Pyx_EnumBase.__repr__"; static const char __pyx_k_Pyx_FlagBase___repr[] = "__Pyx_FlagBase.__repr__"; static const char __pyx_k_async_data_received[] = "async_data_received"; @@ -3080,6 +3133,8 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_6__pyx_unpickle_AsyncPa static PyObject *__pyx_pf_19streaming_form_data_7_parser_8__pyx_unpickle__Parser(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_tp_new_19streaming_form_data_7_parser_Finder(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_19streaming_form_data_7_parser__Part(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_19streaming_form_data_7_parser_Part(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_19streaming_form_data_7_parser_AsyncPart(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_19streaming_form_data_7_parser__Parser(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_19streaming_form_data_7_parser___pyx_scope_struct__start(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_19streaming_form_data_7_parser___pyx_scope_struct_1_data_received(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ @@ -3176,6 +3231,7 @@ typedef struct { PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_4; PyObject *__pyx_n_s_IntEnum; PyObject *__pyx_n_s_IntFlag; + PyObject *__pyx_n_s_NotImplementedError; PyObject *__pyx_n_s_NullTarget; PyObject *__pyx_n_s_OrderedDict; PyObject *__pyx_n_s_Parser; @@ -3283,6 +3339,7 @@ typedef struct { PyObject *__pyx_n_s_inspect; PyObject *__pyx_n_s_is_async_target; PyObject *__pyx_n_s_is_coroutine; + PyObject *__pyx_n_s_is_sync; PyObject *__pyx_kp_u_isenabled; PyObject *__pyx_n_s_main; PyObject *__pyx_n_s_match_start; @@ -3538,6 +3595,7 @@ static int __pyx_m_clear(PyObject *m) { Py_CLEAR(clear_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_4); Py_CLEAR(clear_module_state->__pyx_n_s_IntEnum); Py_CLEAR(clear_module_state->__pyx_n_s_IntFlag); + Py_CLEAR(clear_module_state->__pyx_n_s_NotImplementedError); Py_CLEAR(clear_module_state->__pyx_n_s_NullTarget); Py_CLEAR(clear_module_state->__pyx_n_s_OrderedDict); Py_CLEAR(clear_module_state->__pyx_n_s_Parser); @@ -3645,6 +3703,7 @@ static int __pyx_m_clear(PyObject *m) { Py_CLEAR(clear_module_state->__pyx_n_s_inspect); Py_CLEAR(clear_module_state->__pyx_n_s_is_async_target); Py_CLEAR(clear_module_state->__pyx_n_s_is_coroutine); + Py_CLEAR(clear_module_state->__pyx_n_s_is_sync); Py_CLEAR(clear_module_state->__pyx_kp_u_isenabled); Py_CLEAR(clear_module_state->__pyx_n_s_main); Py_CLEAR(clear_module_state->__pyx_n_s_match_start); @@ -3878,6 +3937,7 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { Py_VISIT(traverse_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_4); Py_VISIT(traverse_module_state->__pyx_n_s_IntEnum); Py_VISIT(traverse_module_state->__pyx_n_s_IntFlag); + Py_VISIT(traverse_module_state->__pyx_n_s_NotImplementedError); Py_VISIT(traverse_module_state->__pyx_n_s_NullTarget); Py_VISIT(traverse_module_state->__pyx_n_s_OrderedDict); Py_VISIT(traverse_module_state->__pyx_n_s_Parser); @@ -3985,6 +4045,7 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { Py_VISIT(traverse_module_state->__pyx_n_s_inspect); Py_VISIT(traverse_module_state->__pyx_n_s_is_async_target); Py_VISIT(traverse_module_state->__pyx_n_s_is_coroutine); + Py_VISIT(traverse_module_state->__pyx_n_s_is_sync); Py_VISIT(traverse_module_state->__pyx_kp_u_isenabled); Py_VISIT(traverse_module_state->__pyx_n_s_main); Py_VISIT(traverse_module_state->__pyx_n_s_match_start); @@ -4228,6 +4289,7 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { #define __pyx_kp_s_Incompatible_checksums_0x_x_vs_0_4 __pyx_mstate_global->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_4 #define __pyx_n_s_IntEnum __pyx_mstate_global->__pyx_n_s_IntEnum #define __pyx_n_s_IntFlag __pyx_mstate_global->__pyx_n_s_IntFlag +#define __pyx_n_s_NotImplementedError __pyx_mstate_global->__pyx_n_s_NotImplementedError #define __pyx_n_s_NullTarget __pyx_mstate_global->__pyx_n_s_NullTarget #define __pyx_n_s_OrderedDict __pyx_mstate_global->__pyx_n_s_OrderedDict #define __pyx_n_s_Parser __pyx_mstate_global->__pyx_n_s_Parser @@ -4335,6 +4397,7 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { #define __pyx_n_s_inspect __pyx_mstate_global->__pyx_n_s_inspect #define __pyx_n_s_is_async_target __pyx_mstate_global->__pyx_n_s_is_async_target #define __pyx_n_s_is_coroutine __pyx_mstate_global->__pyx_n_s_is_coroutine +#define __pyx_n_s_is_sync __pyx_mstate_global->__pyx_n_s_is_sync #define __pyx_kp_u_isenabled __pyx_mstate_global->__pyx_kp_u_isenabled #define __pyx_n_s_main __pyx_mstate_global->__pyx_n_s_main #define __pyx_n_s_match_start __pyx_mstate_global->__pyx_n_s_match_start @@ -9084,7 +9147,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_6Finder_12__setstate_cy return __pyx_r; } -/* "streaming_form_data/_parser.pyx":130 +/* "streaming_form_data/_parser.pyx":131 * cdef list targets * * def __init__(self, str name, object target): # <<<<<<<<<<<<<< @@ -9131,7 +9194,7 @@ static int __pyx_pw_19streaming_form_data_7_parser_5_Part_1__init__(PyObject *__ (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 130, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 131, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -9139,14 +9202,14 @@ static int __pyx_pw_19streaming_form_data_7_parser_5_Part_1__init__(PyObject *__ (void)__Pyx_Arg_NewRef_VARARGS(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 130, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 131, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 130, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 131, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 130, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 131, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; @@ -9159,7 +9222,7 @@ static int __pyx_pw_19streaming_form_data_7_parser_5_Part_1__init__(PyObject *__ } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 130, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 131, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -9173,7 +9236,7 @@ static int __pyx_pw_19streaming_form_data_7_parser_5_Part_1__init__(PyObject *__ __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyUnicode_Type), 1, "name", 1))) __PYX_ERR(0, 130, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyUnicode_Type), 1, "name", 1))) __PYX_ERR(0, 131, __pyx_L1_error) __pyx_r = __pyx_pf_19streaming_form_data_7_parser_5_Part___init__(((struct __pyx_obj_19streaming_form_data_7_parser__Part *)__pyx_v_self), __pyx_v_name, __pyx_v_target); /* function exit code */ @@ -9200,7 +9263,7 @@ static int __pyx_pf_19streaming_form_data_7_parser_5_Part___init__(struct __pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 1); - /* "streaming_form_data/_parser.pyx":131 + /* "streaming_form_data/_parser.pyx":132 * * def __init__(self, str name, object target): * self.name = name # <<<<<<<<<<<<<< @@ -9213,25 +9276,25 @@ static int __pyx_pf_19streaming_form_data_7_parser_5_Part___init__(struct __pyx_ __Pyx_DECREF(__pyx_v_self->name); __pyx_v_self->name = __pyx_v_name; - /* "streaming_form_data/_parser.pyx":132 + /* "streaming_form_data/_parser.pyx":133 * def __init__(self, str name, object target): * self.name = name * self.targets = [target] # <<<<<<<<<<<<<< * * def add_target(self, object target): */ - __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 132, __pyx_L1_error) + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_target); __Pyx_GIVEREF(__pyx_v_target); - if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_v_target)) __PYX_ERR(0, 132, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_v_target)) __PYX_ERR(0, 133, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->targets); __Pyx_DECREF(__pyx_v_self->targets); __pyx_v_self->targets = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "streaming_form_data/_parser.pyx":130 + /* "streaming_form_data/_parser.pyx":131 * cdef list targets * * def __init__(self, str name, object target): # <<<<<<<<<<<<<< @@ -9251,7 +9314,7 @@ static int __pyx_pf_19streaming_form_data_7_parser_5_Part___init__(struct __pyx_ return __pyx_r; } -/* "streaming_form_data/_parser.pyx":134 +/* "streaming_form_data/_parser.pyx":135 * self.targets = [target] * * def add_target(self, object target): # <<<<<<<<<<<<<< @@ -9312,12 +9375,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 134, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 135, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "add_target") < 0)) __PYX_ERR(0, 134, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "add_target") < 0)) __PYX_ERR(0, 135, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; @@ -9328,7 +9391,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("add_target", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 134, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("add_target", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 135, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -9364,7 +9427,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_5_Part_2add_target(stru int __pyx_clineno = 0; __Pyx_RefNannySetupContext("add_target", 1); - /* "streaming_form_data/_parser.pyx":135 + /* "streaming_form_data/_parser.pyx":136 * * def add_target(self, object target): * self.targets.append(target) # <<<<<<<<<<<<<< @@ -9373,11 +9436,11 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_5_Part_2add_target(stru */ if (unlikely(__pyx_v_self->targets == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); - __PYX_ERR(0, 135, __pyx_L1_error) + __PYX_ERR(0, 136, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyList_Append(__pyx_v_self->targets, __pyx_v_target); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 135, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyList_Append(__pyx_v_self->targets, __pyx_v_target); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 136, __pyx_L1_error) - /* "streaming_form_data/_parser.pyx":134 + /* "streaming_form_data/_parser.pyx":135 * self.targets = [target] * * def add_target(self, object target): # <<<<<<<<<<<<<< @@ -9397,7 +9460,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_5_Part_2add_target(stru return __pyx_r; } -/* "streaming_form_data/_parser.pyx":137 +/* "streaming_form_data/_parser.pyx":138 * self.targets.append(target) * * def set_multipart_filename(self, str value): # <<<<<<<<<<<<<< @@ -9458,12 +9521,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 137, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 138, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "set_multipart_filename") < 0)) __PYX_ERR(0, 137, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "set_multipart_filename") < 0)) __PYX_ERR(0, 138, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; @@ -9474,7 +9537,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("set_multipart_filename", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 137, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("set_multipart_filename", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 138, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -9488,7 +9551,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_value), (&PyUnicode_Type), 1, "value", 1))) __PYX_ERR(0, 137, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_value), (&PyUnicode_Type), 1, "value", 1))) __PYX_ERR(0, 138, __pyx_L1_error) __pyx_r = __pyx_pf_19streaming_form_data_7_parser_5_Part_4set_multipart_filename(((struct __pyx_obj_19streaming_form_data_7_parser__Part *)__pyx_v_self), __pyx_v_value); /* function exit code */ @@ -9518,7 +9581,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_5_Part_4set_multipart_f int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_multipart_filename", 1); - /* "streaming_form_data/_parser.pyx":138 + /* "streaming_form_data/_parser.pyx":139 * * def set_multipart_filename(self, str value): * for target in self.targets: # <<<<<<<<<<<<<< @@ -9527,7 +9590,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_5_Part_4set_multipart_f */ if (unlikely(__pyx_v_self->targets == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 138, __pyx_L1_error) + __PYX_ERR(0, 139, __pyx_L1_error) } __pyx_t_1 = __pyx_v_self->targets; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; @@ -9535,29 +9598,29 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_5_Part_4set_multipart_f { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 138, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 139, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 138, __pyx_L1_error) + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 139, __pyx_L1_error) #else - __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 138, __pyx_L1_error) + __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_XDECREF_SET(__pyx_v_target, __pyx_t_3); __pyx_t_3 = 0; - /* "streaming_form_data/_parser.pyx":139 + /* "streaming_form_data/_parser.pyx":140 * def set_multipart_filename(self, str value): * for target in self.targets: * target.multipart_filename = value # <<<<<<<<<<<<<< * * def set_multipart_content_type(self, str value): */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_target, __pyx_n_s_multipart_filename, __pyx_v_value) < 0) __PYX_ERR(0, 139, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_target, __pyx_n_s_multipart_filename, __pyx_v_value) < 0) __PYX_ERR(0, 140, __pyx_L1_error) - /* "streaming_form_data/_parser.pyx":138 + /* "streaming_form_data/_parser.pyx":139 * * def set_multipart_filename(self, str value): * for target in self.targets: # <<<<<<<<<<<<<< @@ -9567,7 +9630,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_5_Part_4set_multipart_f } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "streaming_form_data/_parser.pyx":137 + /* "streaming_form_data/_parser.pyx":138 * self.targets.append(target) * * def set_multipart_filename(self, str value): # <<<<<<<<<<<<<< @@ -9590,7 +9653,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_5_Part_4set_multipart_f return __pyx_r; } -/* "streaming_form_data/_parser.pyx":141 +/* "streaming_form_data/_parser.pyx":142 * target.multipart_filename = value * * def set_multipart_content_type(self, str value): # <<<<<<<<<<<<<< @@ -9651,12 +9714,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 141, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 142, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "set_multipart_content_type") < 0)) __PYX_ERR(0, 141, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "set_multipart_content_type") < 0)) __PYX_ERR(0, 142, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; @@ -9667,7 +9730,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("set_multipart_content_type", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 141, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("set_multipart_content_type", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 142, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -9681,7 +9744,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_value), (&PyUnicode_Type), 1, "value", 1))) __PYX_ERR(0, 141, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_value), (&PyUnicode_Type), 1, "value", 1))) __PYX_ERR(0, 142, __pyx_L1_error) __pyx_r = __pyx_pf_19streaming_form_data_7_parser_5_Part_6set_multipart_content_type(((struct __pyx_obj_19streaming_form_data_7_parser__Part *)__pyx_v_self), __pyx_v_value); /* function exit code */ @@ -9711,7 +9774,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_5_Part_6set_multipart_c int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_multipart_content_type", 1); - /* "streaming_form_data/_parser.pyx":142 + /* "streaming_form_data/_parser.pyx":143 * * def set_multipart_content_type(self, str value): * for target in self.targets: # <<<<<<<<<<<<<< @@ -9720,7 +9783,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_5_Part_6set_multipart_c */ if (unlikely(__pyx_v_self->targets == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 142, __pyx_L1_error) + __PYX_ERR(0, 143, __pyx_L1_error) } __pyx_t_1 = __pyx_v_self->targets; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; @@ -9728,29 +9791,29 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_5_Part_6set_multipart_c { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 142, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 143, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 142, __pyx_L1_error) + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 143, __pyx_L1_error) #else - __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 142, __pyx_L1_error) + __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 143, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_XDECREF_SET(__pyx_v_target, __pyx_t_3); __pyx_t_3 = 0; - /* "streaming_form_data/_parser.pyx":143 + /* "streaming_form_data/_parser.pyx":144 * def set_multipart_content_type(self, str value): * for target in self.targets: * target.multipart_content_type = value # <<<<<<<<<<<<<< * - * + * cdef is_sync(self): */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_target, __pyx_n_s_multipart_content_type, __pyx_v_value) < 0) __PYX_ERR(0, 143, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_target, __pyx_n_s_multipart_content_type, __pyx_v_value) < 0) __PYX_ERR(0, 144, __pyx_L1_error) - /* "streaming_form_data/_parser.pyx":142 + /* "streaming_form_data/_parser.pyx":143 * * def set_multipart_content_type(self, str value): * for target in self.targets: # <<<<<<<<<<<<<< @@ -9760,7 +9823,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_5_Part_6set_multipart_c } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "streaming_form_data/_parser.pyx":141 + /* "streaming_form_data/_parser.pyx":142 * target.multipart_filename = value * * def set_multipart_content_type(self, str value): # <<<<<<<<<<<<<< @@ -9783,7 +9846,55 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_5_Part_6set_multipart_c return __pyx_r; } -/* "streaming_form_data/_parser.pyx":127 +/* "streaming_form_data/_parser.pyx":146 + * target.multipart_content_type = value + * + * cdef is_sync(self): # <<<<<<<<<<<<<< + * raise NotImplementedError() + * + */ + +static PyObject *__pyx_f_19streaming_form_data_7_parser_5_Part_is_sync(CYTHON_UNUSED struct __pyx_obj_19streaming_form_data_7_parser__Part *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("is_sync", 1); + + /* "streaming_form_data/_parser.pyx":147 + * + * cdef is_sync(self): + * raise NotImplementedError() # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_builtin_NotImplementedError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 147, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 147, __pyx_L1_error) + + /* "streaming_form_data/_parser.pyx":146 + * target.multipart_content_type = value + * + * cdef is_sync(self): # <<<<<<<<<<<<<< + * raise NotImplementedError() + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("streaming_form_data._parser._Part.is_sync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "streaming_form_data/_parser.pyx":128 * """ * * cdef public str name # <<<<<<<<<<<<<< @@ -9845,7 +9956,7 @@ static int __pyx_pf_19streaming_form_data_7_parser_5_Part_4name_2__set__(struct const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 1); - if (!(likely(PyUnicode_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None) || __Pyx_RaiseUnexpectedTypeError("unicode", __pyx_v_value))) __PYX_ERR(0, 127, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None) || __Pyx_RaiseUnexpectedTypeError("unicode", __pyx_v_value))) __PYX_ERR(0, 128, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -10310,7 +10421,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_5_Part_10__setstate_cyt return __pyx_r; } -/* "streaming_form_data/_parser.pyx":147 +/* "streaming_form_data/_parser.pyx":151 * * cdef class Part(_Part): * def start(self): # <<<<<<<<<<<<<< @@ -10374,7 +10485,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_4Part_start(struct __py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("start", 1); - /* "streaming_form_data/_parser.pyx":148 + /* "streaming_form_data/_parser.pyx":152 * cdef class Part(_Part): * def start(self): * for target in self.targets: # <<<<<<<<<<<<<< @@ -10383,7 +10494,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_4Part_start(struct __py */ if (unlikely(__pyx_v_self->__pyx_base.targets == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 148, __pyx_L1_error) + __PYX_ERR(0, 152, __pyx_L1_error) } __pyx_t_1 = __pyx_v_self->__pyx_base.targets; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; @@ -10391,27 +10502,27 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_4Part_start(struct __py { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 148, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 152, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 148, __pyx_L1_error) + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 152, __pyx_L1_error) #else - __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 148, __pyx_L1_error) + __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 152, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_XDECREF_SET(__pyx_v_target, __pyx_t_3); __pyx_t_3 = 0; - /* "streaming_form_data/_parser.pyx":149 + /* "streaming_form_data/_parser.pyx":153 * def start(self): * for target in self.targets: * target.start() # <<<<<<<<<<<<<< * * def data_received(self, bytes chunk): */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_target, __pyx_n_s_start); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 149, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_target, __pyx_n_s_start); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 153, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_6 = 0; @@ -10431,13 +10542,13 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_4Part_start(struct __py PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 149, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 153, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "streaming_form_data/_parser.pyx":148 + /* "streaming_form_data/_parser.pyx":152 * cdef class Part(_Part): * def start(self): * for target in self.targets: # <<<<<<<<<<<<<< @@ -10447,7 +10558,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_4Part_start(struct __py } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "streaming_form_data/_parser.pyx":147 + /* "streaming_form_data/_parser.pyx":151 * * cdef class Part(_Part): * def start(self): # <<<<<<<<<<<<<< @@ -10472,7 +10583,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_4Part_start(struct __py return __pyx_r; } -/* "streaming_form_data/_parser.pyx":151 +/* "streaming_form_data/_parser.pyx":155 * target.start() * * def data_received(self, bytes chunk): # <<<<<<<<<<<<<< @@ -10533,12 +10644,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 151, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 155, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "data_received") < 0)) __PYX_ERR(0, 151, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "data_received") < 0)) __PYX_ERR(0, 155, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; @@ -10549,7 +10660,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("data_received", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 151, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("data_received", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 155, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -10563,7 +10674,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_chunk), (&PyBytes_Type), 1, "chunk", 1))) __PYX_ERR(0, 151, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_chunk), (&PyBytes_Type), 1, "chunk", 1))) __PYX_ERR(0, 155, __pyx_L1_error) __pyx_r = __pyx_pf_19streaming_form_data_7_parser_4Part_2data_received(((struct __pyx_obj_19streaming_form_data_7_parser_Part *)__pyx_v_self), __pyx_v_chunk); /* function exit code */ @@ -10596,7 +10707,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_4Part_2data_received(st int __pyx_clineno = 0; __Pyx_RefNannySetupContext("data_received", 1); - /* "streaming_form_data/_parser.pyx":152 + /* "streaming_form_data/_parser.pyx":156 * * def data_received(self, bytes chunk): * for target in self.targets: # <<<<<<<<<<<<<< @@ -10605,7 +10716,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_4Part_2data_received(st */ if (unlikely(__pyx_v_self->__pyx_base.targets == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 152, __pyx_L1_error) + __PYX_ERR(0, 156, __pyx_L1_error) } __pyx_t_1 = __pyx_v_self->__pyx_base.targets; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; @@ -10613,27 +10724,27 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_4Part_2data_received(st { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 152, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 156, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 152, __pyx_L1_error) + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 156, __pyx_L1_error) #else - __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 152, __pyx_L1_error) + __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 156, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_XDECREF_SET(__pyx_v_target, __pyx_t_3); __pyx_t_3 = 0; - /* "streaming_form_data/_parser.pyx":153 + /* "streaming_form_data/_parser.pyx":157 * def data_received(self, bytes chunk): * for target in self.targets: * target.data_received(chunk) # <<<<<<<<<<<<<< * * def finish(self): */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_target, __pyx_n_s_data_received); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 153, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_target, __pyx_n_s_data_received); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 157, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_6 = 0; @@ -10653,13 +10764,13 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_4Part_2data_received(st PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_chunk}; __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 153, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 157, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "streaming_form_data/_parser.pyx":152 + /* "streaming_form_data/_parser.pyx":156 * * def data_received(self, bytes chunk): * for target in self.targets: # <<<<<<<<<<<<<< @@ -10669,7 +10780,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_4Part_2data_received(st } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "streaming_form_data/_parser.pyx":151 + /* "streaming_form_data/_parser.pyx":155 * target.start() * * def data_received(self, bytes chunk): # <<<<<<<<<<<<<< @@ -10694,7 +10805,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_4Part_2data_received(st return __pyx_r; } -/* "streaming_form_data/_parser.pyx":155 +/* "streaming_form_data/_parser.pyx":159 * target.data_received(chunk) * * def finish(self): # <<<<<<<<<<<<<< @@ -10758,7 +10869,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_4Part_4finish(struct __ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("finish", 1); - /* "streaming_form_data/_parser.pyx":156 + /* "streaming_form_data/_parser.pyx":160 * * def finish(self): * for target in self.targets: # <<<<<<<<<<<<<< @@ -10767,7 +10878,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_4Part_4finish(struct __ */ if (unlikely(__pyx_v_self->__pyx_base.targets == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 156, __pyx_L1_error) + __PYX_ERR(0, 160, __pyx_L1_error) } __pyx_t_1 = __pyx_v_self->__pyx_base.targets; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; @@ -10775,27 +10886,27 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_4Part_4finish(struct __ { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 156, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 160, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 156, __pyx_L1_error) + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 160, __pyx_L1_error) #else - __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 156, __pyx_L1_error) + __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 160, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_XDECREF_SET(__pyx_v_target, __pyx_t_3); __pyx_t_3 = 0; - /* "streaming_form_data/_parser.pyx":157 + /* "streaming_form_data/_parser.pyx":161 * def finish(self): * for target in self.targets: * target.finish() # <<<<<<<<<<<<<< * - * + * cdef is_sync(self): */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_target, __pyx_n_s_finish); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 157, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_target, __pyx_n_s_finish); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 161, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_6 = 0; @@ -10815,13 +10926,13 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_4Part_4finish(struct __ PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 157, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 161, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "streaming_form_data/_parser.pyx":156 + /* "streaming_form_data/_parser.pyx":160 * * def finish(self): * for target in self.targets: # <<<<<<<<<<<<<< @@ -10831,7 +10942,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_4Part_4finish(struct __ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "streaming_form_data/_parser.pyx":155 + /* "streaming_form_data/_parser.pyx":159 * target.data_received(chunk) * * def finish(self): # <<<<<<<<<<<<<< @@ -10856,6 +10967,46 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_4Part_4finish(struct __ return __pyx_r; } +/* "streaming_form_data/_parser.pyx":163 + * target.finish() + * + * cdef is_sync(self): # <<<<<<<<<<<<<< + * return True + * + */ + +static PyObject *__pyx_f_19streaming_form_data_7_parser_4Part_is_sync(CYTHON_UNUSED struct __pyx_obj_19streaming_form_data_7_parser_Part *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("is_sync", 1); + + /* "streaming_form_data/_parser.pyx":164 + * + * cdef is_sync(self): + * return True # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_True); + __pyx_r = Py_True; + goto __pyx_L0; + + /* "streaming_form_data/_parser.pyx":163 + * target.finish() + * + * cdef is_sync(self): # <<<<<<<<<<<<<< + * return True + * + */ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state @@ -11270,7 +11421,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_4Part_8__setstate_cytho } static PyObject *__pyx_gb_19streaming_form_data_7_parser_9AsyncPart_2generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "streaming_form_data/_parser.pyx":161 +/* "streaming_form_data/_parser.pyx":168 * * cdef class AsyncPart(_Part): * async def start(self): # <<<<<<<<<<<<<< @@ -11331,7 +11482,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_9AsyncPart_start(struct if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_19streaming_form_data_7_parser___pyx_scope_struct__start *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 161, __pyx_L1_error) + __PYX_ERR(0, 168, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } @@ -11339,7 +11490,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_9AsyncPart_start(struct __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); { - __pyx_CoroutineObject *gen = __Pyx_Coroutine_New((__pyx_coroutine_body_t) __pyx_gb_19streaming_form_data_7_parser_9AsyncPart_2generator, __pyx_codeobj__5, (PyObject *) __pyx_cur_scope, __pyx_n_s_start, __pyx_n_s_AsyncPart_start, __pyx_n_s_streaming_form_data__parser); if (unlikely(!gen)) __PYX_ERR(0, 161, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Coroutine_New((__pyx_coroutine_body_t) __pyx_gb_19streaming_form_data_7_parser_9AsyncPart_2generator, __pyx_codeobj__5, (PyObject *) __pyx_cur_scope, __pyx_n_s_start, __pyx_n_s_AsyncPart_start, __pyx_n_s_streaming_form_data__parser); if (unlikely(!gen)) __PYX_ERR(0, 168, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -11378,9 +11529,9 @@ static PyObject *__pyx_gb_19streaming_form_data_7_parser_9AsyncPart_2generator(_ return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 161, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 168, __pyx_L1_error) - /* "streaming_form_data/_parser.pyx":162 + /* "streaming_form_data/_parser.pyx":169 * cdef class AsyncPart(_Part): * async def start(self): * for target in self.targets: # <<<<<<<<<<<<<< @@ -11389,7 +11540,7 @@ static PyObject *__pyx_gb_19streaming_form_data_7_parser_9AsyncPart_2generator(_ */ if (unlikely(__pyx_cur_scope->__pyx_v_self->__pyx_base.targets == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 162, __pyx_L1_error) + __PYX_ERR(0, 169, __pyx_L1_error) } __pyx_t_1 = __pyx_cur_scope->__pyx_v_self->__pyx_base.targets; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; @@ -11397,14 +11548,14 @@ static PyObject *__pyx_gb_19streaming_form_data_7_parser_9AsyncPart_2generator(_ { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 162, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 169, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 162, __pyx_L1_error) + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 169, __pyx_L1_error) #else - __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 162, __pyx_L1_error) + __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 169, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_target); @@ -11412,14 +11563,14 @@ static PyObject *__pyx_gb_19streaming_form_data_7_parser_9AsyncPart_2generator(_ __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; - /* "streaming_form_data/_parser.pyx":163 + /* "streaming_form_data/_parser.pyx":170 * async def start(self): * for target in self.targets: * await target.start() # <<<<<<<<<<<<<< * * async def data_received(self, bytes chunk): */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_target, __pyx_n_s_start); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 163, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_target, __pyx_n_s_start); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 170, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_6 = 0; @@ -11439,7 +11590,7 @@ static PyObject *__pyx_gb_19streaming_form_data_7_parser_9AsyncPart_2generator(_ PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 163, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 170, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } @@ -11461,16 +11612,16 @@ static PyObject *__pyx_gb_19streaming_form_data_7_parser_9AsyncPart_2generator(_ __pyx_cur_scope->__pyx_t_0 = 0; __Pyx_XGOTREF(__pyx_t_1); __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 163, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 170, __pyx_L1_error) } else { PyObject* exc_type = __Pyx_PyErr_CurrentExceptionType(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || (exc_type != PyExc_GeneratorExit && __Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))) PyErr_Clear(); - else __PYX_ERR(0, 163, __pyx_L1_error) + else __PYX_ERR(0, 170, __pyx_L1_error) } } - /* "streaming_form_data/_parser.pyx":162 + /* "streaming_form_data/_parser.pyx":169 * cdef class AsyncPart(_Part): * async def start(self): * for target in self.targets: # <<<<<<<<<<<<<< @@ -11481,7 +11632,7 @@ static PyObject *__pyx_gb_19streaming_form_data_7_parser_9AsyncPart_2generator(_ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - /* "streaming_form_data/_parser.pyx":161 + /* "streaming_form_data/_parser.pyx":168 * * cdef class AsyncPart(_Part): * async def start(self): # <<<<<<<<<<<<<< @@ -11511,7 +11662,7 @@ static PyObject *__pyx_gb_19streaming_form_data_7_parser_9AsyncPart_2generator(_ } static PyObject *__pyx_gb_19streaming_form_data_7_parser_9AsyncPart_5generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "streaming_form_data/_parser.pyx":165 +/* "streaming_form_data/_parser.pyx":172 * await target.start() * * async def data_received(self, bytes chunk): # <<<<<<<<<<<<<< @@ -11572,12 +11723,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 165, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 172, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "data_received") < 0)) __PYX_ERR(0, 165, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "data_received") < 0)) __PYX_ERR(0, 172, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; @@ -11588,7 +11739,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("data_received", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 165, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("data_received", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 172, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -11602,7 +11753,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_chunk), (&PyBytes_Type), 1, "chunk", 1))) __PYX_ERR(0, 165, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_chunk), (&PyBytes_Type), 1, "chunk", 1))) __PYX_ERR(0, 172, __pyx_L1_error) __pyx_r = __pyx_pf_19streaming_form_data_7_parser_9AsyncPart_3data_received(((struct __pyx_obj_19streaming_form_data_7_parser_AsyncPart *)__pyx_v_self), __pyx_v_chunk); /* function exit code */ @@ -11632,7 +11783,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_9AsyncPart_3data_receiv if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_19streaming_form_data_7_parser___pyx_scope_struct_1_data_received *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 165, __pyx_L1_error) + __PYX_ERR(0, 172, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } @@ -11643,7 +11794,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_9AsyncPart_3data_receiv __Pyx_INCREF(__pyx_cur_scope->__pyx_v_chunk); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_chunk); { - __pyx_CoroutineObject *gen = __Pyx_Coroutine_New((__pyx_coroutine_body_t) __pyx_gb_19streaming_form_data_7_parser_9AsyncPart_5generator1, __pyx_codeobj__6, (PyObject *) __pyx_cur_scope, __pyx_n_s_data_received, __pyx_n_s_AsyncPart_data_received, __pyx_n_s_streaming_form_data__parser); if (unlikely(!gen)) __PYX_ERR(0, 165, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Coroutine_New((__pyx_coroutine_body_t) __pyx_gb_19streaming_form_data_7_parser_9AsyncPart_5generator1, __pyx_codeobj__6, (PyObject *) __pyx_cur_scope, __pyx_n_s_data_received, __pyx_n_s_AsyncPart_data_received, __pyx_n_s_streaming_form_data__parser); if (unlikely(!gen)) __PYX_ERR(0, 172, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -11682,9 +11833,9 @@ static PyObject *__pyx_gb_19streaming_form_data_7_parser_9AsyncPart_5generator1( return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 165, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 172, __pyx_L1_error) - /* "streaming_form_data/_parser.pyx":166 + /* "streaming_form_data/_parser.pyx":173 * * async def data_received(self, bytes chunk): * for target in self.targets: # <<<<<<<<<<<<<< @@ -11693,7 +11844,7 @@ static PyObject *__pyx_gb_19streaming_form_data_7_parser_9AsyncPart_5generator1( */ if (unlikely(__pyx_cur_scope->__pyx_v_self->__pyx_base.targets == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 166, __pyx_L1_error) + __PYX_ERR(0, 173, __pyx_L1_error) } __pyx_t_1 = __pyx_cur_scope->__pyx_v_self->__pyx_base.targets; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; @@ -11701,14 +11852,14 @@ static PyObject *__pyx_gb_19streaming_form_data_7_parser_9AsyncPart_5generator1( { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 166, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 173, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 166, __pyx_L1_error) + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 173, __pyx_L1_error) #else - __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 166, __pyx_L1_error) + __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 173, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_target); @@ -11716,14 +11867,14 @@ static PyObject *__pyx_gb_19streaming_form_data_7_parser_9AsyncPart_5generator1( __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; - /* "streaming_form_data/_parser.pyx":167 + /* "streaming_form_data/_parser.pyx":174 * async def data_received(self, bytes chunk): * for target in self.targets: * await target.data_received(chunk) # <<<<<<<<<<<<<< * * async def finish(self): */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_target, __pyx_n_s_data_received); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 167, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_target, __pyx_n_s_data_received); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 174, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_6 = 0; @@ -11743,7 +11894,7 @@ static PyObject *__pyx_gb_19streaming_form_data_7_parser_9AsyncPart_5generator1( PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_cur_scope->__pyx_v_chunk}; __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 167, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 174, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } @@ -11765,16 +11916,16 @@ static PyObject *__pyx_gb_19streaming_form_data_7_parser_9AsyncPart_5generator1( __pyx_cur_scope->__pyx_t_0 = 0; __Pyx_XGOTREF(__pyx_t_1); __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 167, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 174, __pyx_L1_error) } else { PyObject* exc_type = __Pyx_PyErr_CurrentExceptionType(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || (exc_type != PyExc_GeneratorExit && __Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))) PyErr_Clear(); - else __PYX_ERR(0, 167, __pyx_L1_error) + else __PYX_ERR(0, 174, __pyx_L1_error) } } - /* "streaming_form_data/_parser.pyx":166 + /* "streaming_form_data/_parser.pyx":173 * * async def data_received(self, bytes chunk): * for target in self.targets: # <<<<<<<<<<<<<< @@ -11785,7 +11936,7 @@ static PyObject *__pyx_gb_19streaming_form_data_7_parser_9AsyncPart_5generator1( __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - /* "streaming_form_data/_parser.pyx":165 + /* "streaming_form_data/_parser.pyx":172 * await target.start() * * async def data_received(self, bytes chunk): # <<<<<<<<<<<<<< @@ -11815,7 +11966,7 @@ static PyObject *__pyx_gb_19streaming_form_data_7_parser_9AsyncPart_5generator1( } static PyObject *__pyx_gb_19streaming_form_data_7_parser_9AsyncPart_8generator2(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "streaming_form_data/_parser.pyx":169 +/* "streaming_form_data/_parser.pyx":176 * await target.data_received(chunk) * * async def finish(self): # <<<<<<<<<<<<<< @@ -11876,7 +12027,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_9AsyncPart_6finish(stru if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_19streaming_form_data_7_parser___pyx_scope_struct_2_finish *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 169, __pyx_L1_error) + __PYX_ERR(0, 176, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } @@ -11884,7 +12035,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_9AsyncPart_6finish(stru __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); { - __pyx_CoroutineObject *gen = __Pyx_Coroutine_New((__pyx_coroutine_body_t) __pyx_gb_19streaming_form_data_7_parser_9AsyncPart_8generator2, __pyx_codeobj__7, (PyObject *) __pyx_cur_scope, __pyx_n_s_finish, __pyx_n_s_AsyncPart_finish, __pyx_n_s_streaming_form_data__parser); if (unlikely(!gen)) __PYX_ERR(0, 169, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Coroutine_New((__pyx_coroutine_body_t) __pyx_gb_19streaming_form_data_7_parser_9AsyncPart_8generator2, __pyx_codeobj__7, (PyObject *) __pyx_cur_scope, __pyx_n_s_finish, __pyx_n_s_AsyncPart_finish, __pyx_n_s_streaming_form_data__parser); if (unlikely(!gen)) __PYX_ERR(0, 176, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -11923,9 +12074,9 @@ static PyObject *__pyx_gb_19streaming_form_data_7_parser_9AsyncPart_8generator2( return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 169, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 176, __pyx_L1_error) - /* "streaming_form_data/_parser.pyx":170 + /* "streaming_form_data/_parser.pyx":177 * * async def finish(self): * for target in self.targets: # <<<<<<<<<<<<<< @@ -11934,7 +12085,7 @@ static PyObject *__pyx_gb_19streaming_form_data_7_parser_9AsyncPart_8generator2( */ if (unlikely(__pyx_cur_scope->__pyx_v_self->__pyx_base.targets == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 170, __pyx_L1_error) + __PYX_ERR(0, 177, __pyx_L1_error) } __pyx_t_1 = __pyx_cur_scope->__pyx_v_self->__pyx_base.targets; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; @@ -11942,14 +12093,14 @@ static PyObject *__pyx_gb_19streaming_form_data_7_parser_9AsyncPart_8generator2( { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 170, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 177, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 170, __pyx_L1_error) + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 177, __pyx_L1_error) #else - __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 170, __pyx_L1_error) + __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 177, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_target); @@ -11957,14 +12108,14 @@ static PyObject *__pyx_gb_19streaming_form_data_7_parser_9AsyncPart_8generator2( __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; - /* "streaming_form_data/_parser.pyx":171 + /* "streaming_form_data/_parser.pyx":178 * async def finish(self): * for target in self.targets: * await target.finish() # <<<<<<<<<<<<<< * - * + * cdef is_sync(self): */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_target, __pyx_n_s_finish); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 171, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_target, __pyx_n_s_finish); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 178, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_6 = 0; @@ -11984,7 +12135,7 @@ static PyObject *__pyx_gb_19streaming_form_data_7_parser_9AsyncPart_8generator2( PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 171, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 178, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } @@ -12006,16 +12157,16 @@ static PyObject *__pyx_gb_19streaming_form_data_7_parser_9AsyncPart_8generator2( __pyx_cur_scope->__pyx_t_0 = 0; __Pyx_XGOTREF(__pyx_t_1); __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 171, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 178, __pyx_L1_error) } else { PyObject* exc_type = __Pyx_PyErr_CurrentExceptionType(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || (exc_type != PyExc_GeneratorExit && __Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))) PyErr_Clear(); - else __PYX_ERR(0, 171, __pyx_L1_error) + else __PYX_ERR(0, 178, __pyx_L1_error) } } - /* "streaming_form_data/_parser.pyx":170 + /* "streaming_form_data/_parser.pyx":177 * * async def finish(self): * for target in self.targets: # <<<<<<<<<<<<<< @@ -12026,7 +12177,7 @@ static PyObject *__pyx_gb_19streaming_form_data_7_parser_9AsyncPart_8generator2( __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - /* "streaming_form_data/_parser.pyx":169 + /* "streaming_form_data/_parser.pyx":176 * await target.data_received(chunk) * * async def finish(self): # <<<<<<<<<<<<<< @@ -12055,6 +12206,46 @@ static PyObject *__pyx_gb_19streaming_form_data_7_parser_9AsyncPart_8generator2( return __pyx_r; } +/* "streaming_form_data/_parser.pyx":180 + * await target.finish() + * + * cdef is_sync(self): # <<<<<<<<<<<<<< + * return False + * + */ + +static PyObject *__pyx_f_19streaming_form_data_7_parser_9AsyncPart_is_sync(CYTHON_UNUSED struct __pyx_obj_19streaming_form_data_7_parser_AsyncPart *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("is_sync", 1); + + /* "streaming_form_data/_parser.pyx":181 + * + * cdef is_sync(self): + * return False # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_False); + __pyx_r = Py_False; + goto __pyx_L0; + + /* "streaming_form_data/_parser.pyx":180 + * await target.finish() + * + * cdef is_sync(self): # <<<<<<<<<<<<<< + * return False + * + */ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state @@ -12468,7 +12659,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_9AsyncPart_11__setstate return __pyx_r; } -/* "streaming_form_data/_parser.pyx":188 +/* "streaming_form_data/_parser.pyx":198 * cdef public str unexpected_part_name * * def __init__(self, bytes delimiter, bytes ender, bint strict): # <<<<<<<<<<<<<< @@ -12518,7 +12709,7 @@ static int __pyx_pw_19streaming_form_data_7_parser_7_Parser_1__init__(PyObject * (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 188, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 198, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -12526,9 +12717,9 @@ static int __pyx_pw_19streaming_form_data_7_parser_7_Parser_1__init__(PyObject * (void)__Pyx_Arg_NewRef_VARARGS(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 188, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 198, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); __PYX_ERR(0, 188, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); __PYX_ERR(0, 198, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: @@ -12536,14 +12727,14 @@ static int __pyx_pw_19streaming_form_data_7_parser_7_Parser_1__init__(PyObject * (void)__Pyx_Arg_NewRef_VARARGS(values[2]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 188, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 198, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); __PYX_ERR(0, 188, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); __PYX_ERR(0, 198, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 188, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 198, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 3)) { goto __pyx_L5_argtuple_error; @@ -12554,11 +12745,11 @@ static int __pyx_pw_19streaming_form_data_7_parser_7_Parser_1__init__(PyObject * } __pyx_v_delimiter = ((PyObject*)values[0]); __pyx_v_ender = ((PyObject*)values[1]); - __pyx_v_strict = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_strict == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 188, __pyx_L3_error) + __pyx_v_strict = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_strict == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 198, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 188, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 198, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -12572,8 +12763,8 @@ static int __pyx_pw_19streaming_form_data_7_parser_7_Parser_1__init__(PyObject * __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_delimiter), (&PyBytes_Type), 1, "delimiter", 1))) __PYX_ERR(0, 188, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ender), (&PyBytes_Type), 1, "ender", 1))) __PYX_ERR(0, 188, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_delimiter), (&PyBytes_Type), 1, "delimiter", 1))) __PYX_ERR(0, 198, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ender), (&PyBytes_Type), 1, "ender", 1))) __PYX_ERR(0, 198, __pyx_L1_error) __pyx_r = __pyx_pf_19streaming_form_data_7_parser_7_Parser___init__(((struct __pyx_obj_19streaming_form_data_7_parser__Parser *)__pyx_v_self), __pyx_v_delimiter, __pyx_v_ender, __pyx_v_strict); /* function exit code */ @@ -12604,14 +12795,14 @@ static int __pyx_pf_19streaming_form_data_7_parser_7_Parser___init__(struct __py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 1); - /* "streaming_form_data/_parser.pyx":189 + /* "streaming_form_data/_parser.pyx":199 * * def __init__(self, bytes delimiter, bytes ender, bint strict): * self.delimiter_finder = Finder(delimiter) # <<<<<<<<<<<<<< * self.ender_finder = Finder(ender) * */ - __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_19streaming_form_data_7_parser_Finder), __pyx_v_delimiter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 189, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_19streaming_form_data_7_parser_Finder), __pyx_v_delimiter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF((PyObject *)__pyx_v_self->delimiter_finder); @@ -12619,14 +12810,14 @@ static int __pyx_pf_19streaming_form_data_7_parser_7_Parser___init__(struct __py __pyx_v_self->delimiter_finder = ((struct __pyx_obj_19streaming_form_data_7_parser_Finder *)__pyx_t_1); __pyx_t_1 = 0; - /* "streaming_form_data/_parser.pyx":190 + /* "streaming_form_data/_parser.pyx":200 * def __init__(self, bytes delimiter, bytes ender, bint strict): * self.delimiter_finder = Finder(delimiter) * self.ender_finder = Finder(ender) # <<<<<<<<<<<<<< * * self.delimiter_length = len(delimiter) */ - __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_19streaming_form_data_7_parser_Finder), __pyx_v_ender); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 190, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_19streaming_form_data_7_parser_Finder), __pyx_v_ender); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 200, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF((PyObject *)__pyx_v_self->ender_finder); @@ -12634,7 +12825,7 @@ static int __pyx_pf_19streaming_form_data_7_parser_7_Parser___init__(struct __py __pyx_v_self->ender_finder = ((struct __pyx_obj_19streaming_form_data_7_parser_Finder *)__pyx_t_1); __pyx_t_1 = 0; - /* "streaming_form_data/_parser.pyx":192 + /* "streaming_form_data/_parser.pyx":202 * self.ender_finder = Finder(ender) * * self.delimiter_length = len(delimiter) # <<<<<<<<<<<<<< @@ -12643,12 +12834,12 @@ static int __pyx_pf_19streaming_form_data_7_parser_7_Parser___init__(struct __py */ if (unlikely(__pyx_v_delimiter == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 192, __pyx_L1_error) + __PYX_ERR(0, 202, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_GET_SIZE(__pyx_v_delimiter); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 192, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_GET_SIZE(__pyx_v_delimiter); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 202, __pyx_L1_error) __pyx_v_self->delimiter_length = __pyx_t_2; - /* "streaming_form_data/_parser.pyx":193 + /* "streaming_form_data/_parser.pyx":203 * * self.delimiter_length = len(delimiter) * self.ender_length = len(ender) # <<<<<<<<<<<<<< @@ -12657,12 +12848,12 @@ static int __pyx_pf_19streaming_form_data_7_parser_7_Parser___init__(struct __py */ if (unlikely(__pyx_v_ender == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 193, __pyx_L1_error) + __PYX_ERR(0, 203, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_GET_SIZE(__pyx_v_ender); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 193, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_GET_SIZE(__pyx_v_ender); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 203, __pyx_L1_error) __pyx_v_self->ender_length = __pyx_t_2; - /* "streaming_form_data/_parser.pyx":195 + /* "streaming_form_data/_parser.pyx":205 * self.ender_length = len(ender) * * self.state = ParserState.PS_START # <<<<<<<<<<<<<< @@ -12671,14 +12862,14 @@ static int __pyx_pf_19streaming_form_data_7_parser_7_Parser___init__(struct __py */ __pyx_v_self->state = __pyx_e_19streaming_form_data_7_parser_PS_START; - /* "streaming_form_data/_parser.pyx":197 + /* "streaming_form_data/_parser.pyx":207 * self.state = ParserState.PS_START * * self.expected_parts = [] # <<<<<<<<<<<<<< * * self.active_part = None */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 197, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 207, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->expected_parts); @@ -12686,7 +12877,7 @@ static int __pyx_pf_19streaming_form_data_7_parser_7_Parser___init__(struct __py __pyx_v_self->expected_parts = __pyx_t_1; __pyx_t_1 = 0; - /* "streaming_form_data/_parser.pyx":199 + /* "streaming_form_data/_parser.pyx":209 * self.expected_parts = [] * * self.active_part = None # <<<<<<<<<<<<<< @@ -12699,14 +12890,14 @@ static int __pyx_pf_19streaming_form_data_7_parser_7_Parser___init__(struct __py __Pyx_DECREF(__pyx_v_self->active_part); __pyx_v_self->active_part = Py_None; - /* "streaming_form_data/_parser.pyx":200 + /* "streaming_form_data/_parser.pyx":210 * * self.active_part = None * self.default_part = Part("_default", NullTarget()) # <<<<<<<<<<<<<< * * self._leftover_buffer = None */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_NullTarget); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 200, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_NullTarget); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 210, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; @@ -12726,19 +12917,19 @@ static int __pyx_pf_19streaming_form_data_7_parser_7_Parser___init__(struct __py PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 200, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 210, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 200, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 210, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_n_u_default); __Pyx_GIVEREF(__pyx_n_u_default); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_n_u_default)) __PYX_ERR(0, 200, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_n_u_default)) __PYX_ERR(0, 210, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1)) __PYX_ERR(0, 200, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1)) __PYX_ERR(0, 210, __pyx_L1_error); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_19streaming_form_data_7_parser_Part), __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 200, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_19streaming_form_data_7_parser_Part), __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 210, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GIVEREF(__pyx_t_1); @@ -12747,7 +12938,7 @@ static int __pyx_pf_19streaming_form_data_7_parser_7_Parser___init__(struct __py __pyx_v_self->default_part = __pyx_t_1; __pyx_t_1 = 0; - /* "streaming_form_data/_parser.pyx":202 + /* "streaming_form_data/_parser.pyx":212 * self.default_part = Part("_default", NullTarget()) * * self._leftover_buffer = None # <<<<<<<<<<<<<< @@ -12760,7 +12951,7 @@ static int __pyx_pf_19streaming_form_data_7_parser_7_Parser___init__(struct __py __Pyx_DECREF(__pyx_v_self->_leftover_buffer); __pyx_v_self->_leftover_buffer = ((PyObject*)Py_None); - /* "streaming_form_data/_parser.pyx":204 + /* "streaming_form_data/_parser.pyx":214 * self._leftover_buffer = None * * self.strict = strict # <<<<<<<<<<<<<< @@ -12769,7 +12960,7 @@ static int __pyx_pf_19streaming_form_data_7_parser_7_Parser___init__(struct __py */ __pyx_v_self->strict = __pyx_v_strict; - /* "streaming_form_data/_parser.pyx":205 + /* "streaming_form_data/_parser.pyx":215 * * self.strict = strict * self.unexpected_part_name = "" # <<<<<<<<<<<<<< @@ -12782,7 +12973,7 @@ static int __pyx_pf_19streaming_form_data_7_parser_7_Parser___init__(struct __py __Pyx_DECREF(__pyx_v_self->unexpected_part_name); __pyx_v_self->unexpected_part_name = __pyx_kp_u_; - /* "streaming_form_data/_parser.pyx":188 + /* "streaming_form_data/_parser.pyx":198 * cdef public str unexpected_part_name * * def __init__(self, bytes delimiter, bytes ender, bint strict): # <<<<<<<<<<<<<< @@ -12804,7 +12995,7 @@ static int __pyx_pf_19streaming_form_data_7_parser_7_Parser___init__(struct __py return __pyx_r; } -/* "streaming_form_data/_parser.pyx":207 +/* "streaming_form_data/_parser.pyx":217 * self.unexpected_part_name = "" * * def register(self, str name, object target): # <<<<<<<<<<<<<< @@ -12868,7 +13059,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 207, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 217, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -12876,14 +13067,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 207, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 217, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("register", 1, 2, 2, 1); __PYX_ERR(0, 207, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("register", 1, 2, 2, 1); __PYX_ERR(0, 217, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "register") < 0)) __PYX_ERR(0, 207, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "register") < 0)) __PYX_ERR(0, 217, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; @@ -12896,7 +13087,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("register", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 207, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("register", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 217, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -12910,7 +13101,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyUnicode_Type), 1, "name", 1))) __PYX_ERR(0, 207, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyUnicode_Type), 1, "name", 1))) __PYX_ERR(0, 217, __pyx_L1_error) __pyx_r = __pyx_pf_19streaming_form_data_7_parser_7_Parser_2register(((struct __pyx_obj_19streaming_form_data_7_parser__Parser *)__pyx_v_self), __pyx_v_name, __pyx_v_target); /* function exit code */ @@ -12945,36 +13136,36 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_2register(stru int __pyx_clineno = 0; __Pyx_RefNannySetupContext("register", 1); - /* "streaming_form_data/_parser.pyx":208 + /* "streaming_form_data/_parser.pyx":218 * * def register(self, str name, object target): * part = self._part_for(name) # <<<<<<<<<<<<<< * * if part: */ - __pyx_t_1 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser__Parser *)__pyx_v_self->__pyx_vtab)->_part_for(__pyx_v_self, __pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 208, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser__Parser *)__pyx_v_self->__pyx_vtab)->_part_for(__pyx_v_self, __pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_part = __pyx_t_1; __pyx_t_1 = 0; - /* "streaming_form_data/_parser.pyx":210 + /* "streaming_form_data/_parser.pyx":220 * part = self._part_for(name) * * if part: # <<<<<<<<<<<<<< * part.add_target(target) * else: */ - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_part); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 210, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_part); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 220, __pyx_L1_error) if (__pyx_t_2) { - /* "streaming_form_data/_parser.pyx":211 + /* "streaming_form_data/_parser.pyx":221 * * if part: * part.add_target(target) # <<<<<<<<<<<<<< * else: * part_cls = AsyncPart if is_async_target(target) else Part */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_part, __pyx_n_s_add_target); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 211, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_part, __pyx_n_s_add_target); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 221, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; @@ -12994,13 +13185,13 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_2register(stru PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_target}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 211, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 221, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "streaming_form_data/_parser.pyx":210 + /* "streaming_form_data/_parser.pyx":220 * part = self._part_for(name) * * if part: # <<<<<<<<<<<<<< @@ -13010,7 +13201,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_2register(stru goto __pyx_L3; } - /* "streaming_form_data/_parser.pyx":213 + /* "streaming_form_data/_parser.pyx":223 * part.add_target(target) * else: * part_cls = AsyncPart if is_async_target(target) else Part # <<<<<<<<<<<<<< @@ -13018,7 +13209,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_2register(stru * */ /*else*/ { - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_is_async_target); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 213, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_is_async_target); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 223, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = NULL; __pyx_t_5 = 0; @@ -13038,11 +13229,11 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_2register(stru PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_target}; __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 213, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 223, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 213, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 223, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { __Pyx_INCREF((PyObject *)__pyx_ptype_19streaming_form_data_7_parser_AsyncPart); @@ -13054,30 +13245,30 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_2register(stru __pyx_v_part_cls = ((PyTypeObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "streaming_form_data/_parser.pyx":214 + /* "streaming_form_data/_parser.pyx":224 * else: * part_cls = AsyncPart if is_async_target(target) else Part * self.expected_parts.append(part_cls(name, target)) # <<<<<<<<<<<<<< * * def set_active_part(self, part, str filename): */ - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 214, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_name)) __PYX_ERR(0, 214, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_name)) __PYX_ERR(0, 224, __pyx_L1_error); __Pyx_INCREF(__pyx_v_target); __Pyx_GIVEREF(__pyx_v_target); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_target)) __PYX_ERR(0, 214, __pyx_L1_error); - __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_v_part_cls), __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 214, __pyx_L1_error) + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_target)) __PYX_ERR(0, 224, __pyx_L1_error); + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_v_part_cls), __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_7 = __Pyx_PyObject_Append(__pyx_v_self->expected_parts, __pyx_t_3); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 214, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Append(__pyx_v_self->expected_parts, __pyx_t_3); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 224, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_L3:; - /* "streaming_form_data/_parser.pyx":207 + /* "streaming_form_data/_parser.pyx":217 * self.unexpected_part_name = "" * * def register(self, str name, object target): # <<<<<<<<<<<<<< @@ -13103,7 +13294,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_2register(stru return __pyx_r; } -/* "streaming_form_data/_parser.pyx":216 +/* "streaming_form_data/_parser.pyx":226 * self.expected_parts.append(part_cls(name, target)) * * def set_active_part(self, part, str filename): # <<<<<<<<<<<<<< @@ -13167,7 +13358,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 216, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 226, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -13175,14 +13366,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 216, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 226, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("set_active_part", 1, 2, 2, 1); __PYX_ERR(0, 216, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("set_active_part", 1, 2, 2, 1); __PYX_ERR(0, 226, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "set_active_part") < 0)) __PYX_ERR(0, 216, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "set_active_part") < 0)) __PYX_ERR(0, 226, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; @@ -13195,7 +13386,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("set_active_part", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 216, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("set_active_part", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 226, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -13209,7 +13400,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_filename), (&PyUnicode_Type), 1, "filename", 1))) __PYX_ERR(0, 216, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_filename), (&PyUnicode_Type), 1, "filename", 1))) __PYX_ERR(0, 226, __pyx_L1_error) __pyx_r = __pyx_pf_19streaming_form_data_7_parser_7_Parser_4set_active_part(((struct __pyx_obj_19streaming_form_data_7_parser__Parser *)__pyx_v_self), __pyx_v_part, __pyx_v_filename); /* function exit code */ @@ -13239,7 +13430,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_4set_active_pa int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_active_part", 1); - /* "streaming_form_data/_parser.pyx":217 + /* "streaming_form_data/_parser.pyx":227 * * def set_active_part(self, part, str filename): * self.active_part = part # <<<<<<<<<<<<<< @@ -13252,14 +13443,14 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_4set_active_pa __Pyx_DECREF(__pyx_v_self->active_part); __pyx_v_self->active_part = __pyx_v_part; - /* "streaming_form_data/_parser.pyx":218 + /* "streaming_form_data/_parser.pyx":228 * def set_active_part(self, part, str filename): * self.active_part = part * self.active_part.set_multipart_filename(filename) # <<<<<<<<<<<<<< * self.active_part.start() * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->active_part, __pyx_n_s_set_multipart_filename); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 218, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->active_part, __pyx_n_s_set_multipart_filename); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 228, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; @@ -13279,20 +13470,20 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_4set_active_pa PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_filename}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 218, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 228, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "streaming_form_data/_parser.pyx":219 + /* "streaming_form_data/_parser.pyx":229 * self.active_part = part * self.active_part.set_multipart_filename(filename) * self.active_part.start() # <<<<<<<<<<<<<< * * async def async_set_active_part(self, part, str filename): */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->active_part, __pyx_n_s_start); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 219, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->active_part, __pyx_n_s_start); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 229, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; @@ -13312,13 +13503,13 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_4set_active_pa PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 219, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 229, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "streaming_form_data/_parser.pyx":216 + /* "streaming_form_data/_parser.pyx":226 * self.expected_parts.append(part_cls(name, target)) * * def set_active_part(self, part, str filename): # <<<<<<<<<<<<<< @@ -13342,7 +13533,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_4set_active_pa } static PyObject *__pyx_gb_19streaming_form_data_7_parser_7_Parser_8generator3(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "streaming_form_data/_parser.pyx":221 +/* "streaming_form_data/_parser.pyx":231 * self.active_part.start() * * async def async_set_active_part(self, part, str filename): # <<<<<<<<<<<<<< @@ -13406,7 +13597,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 221, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 231, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -13414,14 +13605,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 221, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 231, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("async_set_active_part", 1, 2, 2, 1); __PYX_ERR(0, 221, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("async_set_active_part", 1, 2, 2, 1); __PYX_ERR(0, 231, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "async_set_active_part") < 0)) __PYX_ERR(0, 221, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "async_set_active_part") < 0)) __PYX_ERR(0, 231, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; @@ -13434,7 +13625,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("async_set_active_part", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 221, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("async_set_active_part", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 231, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -13448,7 +13639,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_filename), (&PyUnicode_Type), 1, "filename", 1))) __PYX_ERR(0, 221, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_filename), (&PyUnicode_Type), 1, "filename", 1))) __PYX_ERR(0, 231, __pyx_L1_error) __pyx_r = __pyx_pf_19streaming_form_data_7_parser_7_Parser_6async_set_active_part(((struct __pyx_obj_19streaming_form_data_7_parser__Parser *)__pyx_v_self), __pyx_v_part, __pyx_v_filename); /* function exit code */ @@ -13478,7 +13669,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_6async_set_act if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_19streaming_form_data_7_parser___pyx_scope_struct_3_async_set_active_part *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 221, __pyx_L1_error) + __PYX_ERR(0, 231, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } @@ -13492,7 +13683,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_6async_set_act __Pyx_INCREF(__pyx_cur_scope->__pyx_v_filename); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_filename); { - __pyx_CoroutineObject *gen = __Pyx_Coroutine_New((__pyx_coroutine_body_t) __pyx_gb_19streaming_form_data_7_parser_7_Parser_8generator3, __pyx_codeobj__8, (PyObject *) __pyx_cur_scope, __pyx_n_s_async_set_active_part, __pyx_n_s_Parser_async_set_active_part, __pyx_n_s_streaming_form_data__parser); if (unlikely(!gen)) __PYX_ERR(0, 221, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Coroutine_New((__pyx_coroutine_body_t) __pyx_gb_19streaming_form_data_7_parser_7_Parser_8generator3, __pyx_codeobj__8, (PyObject *) __pyx_cur_scope, __pyx_n_s_async_set_active_part, __pyx_n_s_Parser_async_set_active_part, __pyx_n_s_streaming_form_data__parser); if (unlikely(!gen)) __PYX_ERR(0, 231, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -13529,9 +13720,9 @@ static PyObject *__pyx_gb_19streaming_form_data_7_parser_7_Parser_8generator3(__ return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 221, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 231, __pyx_L1_error) - /* "streaming_form_data/_parser.pyx":222 + /* "streaming_form_data/_parser.pyx":232 * * async def async_set_active_part(self, part, str filename): * self.active_part = part # <<<<<<<<<<<<<< @@ -13544,14 +13735,14 @@ static PyObject *__pyx_gb_19streaming_form_data_7_parser_7_Parser_8generator3(__ __Pyx_DECREF(__pyx_cur_scope->__pyx_v_self->active_part); __pyx_cur_scope->__pyx_v_self->active_part = __pyx_cur_scope->__pyx_v_part; - /* "streaming_form_data/_parser.pyx":223 + /* "streaming_form_data/_parser.pyx":233 * async def async_set_active_part(self, part, str filename): * self.active_part = part * self.active_part.set_multipart_filename(filename) # <<<<<<<<<<<<<< * await self.active_part.start() * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self->active_part, __pyx_n_s_set_multipart_filename); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 223, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self->active_part, __pyx_n_s_set_multipart_filename); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; @@ -13571,20 +13762,20 @@ static PyObject *__pyx_gb_19streaming_form_data_7_parser_7_Parser_8generator3(__ PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_cur_scope->__pyx_v_filename}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 223, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "streaming_form_data/_parser.pyx":224 + /* "streaming_form_data/_parser.pyx":234 * self.active_part = part * self.active_part.set_multipart_filename(filename) * await self.active_part.start() # <<<<<<<<<<<<<< * * def unset_active_part(self): */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self->active_part, __pyx_n_s_start); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self->active_part, __pyx_n_s_start); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 234, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; @@ -13604,7 +13795,7 @@ static PyObject *__pyx_gb_19streaming_form_data_7_parser_7_Parser_8generator3(__ PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 224, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 234, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } @@ -13619,17 +13810,17 @@ static PyObject *__pyx_gb_19streaming_form_data_7_parser_7_Parser_8generator3(__ __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L4_resume_from_await:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 224, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 234, __pyx_L1_error) } else { PyObject* exc_type = __Pyx_PyErr_CurrentExceptionType(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || (exc_type != PyExc_GeneratorExit && __Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))) PyErr_Clear(); - else __PYX_ERR(0, 224, __pyx_L1_error) + else __PYX_ERR(0, 234, __pyx_L1_error) } } CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - /* "streaming_form_data/_parser.pyx":221 + /* "streaming_form_data/_parser.pyx":231 * self.active_part.start() * * async def async_set_active_part(self, part, str filename): # <<<<<<<<<<<<<< @@ -13657,7 +13848,7 @@ static PyObject *__pyx_gb_19streaming_form_data_7_parser_7_Parser_8generator3(__ return __pyx_r; } -/* "streaming_form_data/_parser.pyx":226 +/* "streaming_form_data/_parser.pyx":236 * await self.active_part.start() * * def unset_active_part(self): # <<<<<<<<<<<<<< @@ -13719,24 +13910,24 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_9unset_active_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("unset_active_part", 1); - /* "streaming_form_data/_parser.pyx":227 + /* "streaming_form_data/_parser.pyx":237 * * def unset_active_part(self): * if self.active_part: # <<<<<<<<<<<<<< * self.active_part.finish() * self.active_part = None */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->active_part); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 227, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->active_part); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 237, __pyx_L1_error) if (__pyx_t_1) { - /* "streaming_form_data/_parser.pyx":228 + /* "streaming_form_data/_parser.pyx":238 * def unset_active_part(self): * if self.active_part: * self.active_part.finish() # <<<<<<<<<<<<<< * self.active_part = None * */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->active_part, __pyx_n_s_finish); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 228, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->active_part, __pyx_n_s_finish); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; @@ -13756,13 +13947,13 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_9unset_active_ PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 228, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "streaming_form_data/_parser.pyx":227 + /* "streaming_form_data/_parser.pyx":237 * * def unset_active_part(self): * if self.active_part: # <<<<<<<<<<<<<< @@ -13771,7 +13962,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_9unset_active_ */ } - /* "streaming_form_data/_parser.pyx":229 + /* "streaming_form_data/_parser.pyx":239 * if self.active_part: * self.active_part.finish() * self.active_part = None # <<<<<<<<<<<<<< @@ -13784,7 +13975,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_9unset_active_ __Pyx_DECREF(__pyx_v_self->active_part); __pyx_v_self->active_part = Py_None; - /* "streaming_form_data/_parser.pyx":226 + /* "streaming_form_data/_parser.pyx":236 * await self.active_part.start() * * def unset_active_part(self): # <<<<<<<<<<<<<< @@ -13808,7 +13999,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_9unset_active_ } static PyObject *__pyx_gb_19streaming_form_data_7_parser_7_Parser_13generator4(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "streaming_form_data/_parser.pyx":231 +/* "streaming_form_data/_parser.pyx":241 * self.active_part = None * * async def async_unset_active_part(self): # <<<<<<<<<<<<<< @@ -13869,7 +14060,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_11async_unset_ if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_19streaming_form_data_7_parser___pyx_scope_struct_4_async_unset_active_part *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 231, __pyx_L1_error) + __PYX_ERR(0, 241, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } @@ -13877,7 +14068,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_11async_unset_ __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); { - __pyx_CoroutineObject *gen = __Pyx_Coroutine_New((__pyx_coroutine_body_t) __pyx_gb_19streaming_form_data_7_parser_7_Parser_13generator4, __pyx_codeobj__9, (PyObject *) __pyx_cur_scope, __pyx_n_s_async_unset_active_part, __pyx_n_s_Parser_async_unset_active_part, __pyx_n_s_streaming_form_data__parser); if (unlikely(!gen)) __PYX_ERR(0, 231, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Coroutine_New((__pyx_coroutine_body_t) __pyx_gb_19streaming_form_data_7_parser_7_Parser_13generator4, __pyx_codeobj__9, (PyObject *) __pyx_cur_scope, __pyx_n_s_async_unset_active_part, __pyx_n_s_Parser_async_unset_active_part, __pyx_n_s_streaming_form_data__parser); if (unlikely(!gen)) __PYX_ERR(0, 241, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -13915,26 +14106,26 @@ static PyObject *__pyx_gb_19streaming_form_data_7_parser_7_Parser_13generator4(_ return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 231, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 241, __pyx_L1_error) - /* "streaming_form_data/_parser.pyx":232 + /* "streaming_form_data/_parser.pyx":242 * * async def async_unset_active_part(self): * if self.active_part: # <<<<<<<<<<<<<< * await self.active_part.finish() * self.active_part = None */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_self->active_part); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 232, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_self->active_part); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 242, __pyx_L1_error) if (__pyx_t_1) { - /* "streaming_form_data/_parser.pyx":233 + /* "streaming_form_data/_parser.pyx":243 * async def async_unset_active_part(self): * if self.active_part: * await self.active_part.finish() # <<<<<<<<<<<<<< * self.active_part = None * */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self->active_part, __pyx_n_s_finish); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 233, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self->active_part, __pyx_n_s_finish); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; @@ -13954,7 +14145,7 @@ static PyObject *__pyx_gb_19streaming_form_data_7_parser_7_Parser_13generator4(_ PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 233, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } @@ -13969,16 +14160,16 @@ static PyObject *__pyx_gb_19streaming_form_data_7_parser_7_Parser_13generator4(_ __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L5_resume_from_await:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 233, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 243, __pyx_L1_error) } else { PyObject* exc_type = __Pyx_PyErr_CurrentExceptionType(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || (exc_type != PyExc_GeneratorExit && __Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))) PyErr_Clear(); - else __PYX_ERR(0, 233, __pyx_L1_error) + else __PYX_ERR(0, 243, __pyx_L1_error) } } - /* "streaming_form_data/_parser.pyx":232 + /* "streaming_form_data/_parser.pyx":242 * * async def async_unset_active_part(self): * if self.active_part: # <<<<<<<<<<<<<< @@ -13987,7 +14178,7 @@ static PyObject *__pyx_gb_19streaming_form_data_7_parser_7_Parser_13generator4(_ */ } - /* "streaming_form_data/_parser.pyx":234 + /* "streaming_form_data/_parser.pyx":244 * if self.active_part: * await self.active_part.finish() * self.active_part = None # <<<<<<<<<<<<<< @@ -14001,7 +14192,7 @@ static PyObject *__pyx_gb_19streaming_form_data_7_parser_7_Parser_13generator4(_ __pyx_cur_scope->__pyx_v_self->active_part = Py_None; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - /* "streaming_form_data/_parser.pyx":231 + /* "streaming_form_data/_parser.pyx":241 * self.active_part = None * * async def async_unset_active_part(self): # <<<<<<<<<<<<<< @@ -14029,7 +14220,7 @@ static PyObject *__pyx_gb_19streaming_form_data_7_parser_7_Parser_13generator4(_ return __pyx_r; } -/* "streaming_form_data/_parser.pyx":236 +/* "streaming_form_data/_parser.pyx":246 * self.active_part = None * * def on_body(self, bytes value): # <<<<<<<<<<<<<< @@ -14090,12 +14281,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 236, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 246, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "on_body") < 0)) __PYX_ERR(0, 236, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "on_body") < 0)) __PYX_ERR(0, 246, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; @@ -14106,7 +14297,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("on_body", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 236, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("on_body", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 246, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -14120,7 +14311,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_value), (&PyBytes_Type), 1, "value", 1))) __PYX_ERR(0, 236, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_value), (&PyBytes_Type), 1, "value", 1))) __PYX_ERR(0, 246, __pyx_L1_error) __pyx_r = __pyx_pf_19streaming_form_data_7_parser_7_Parser_14on_body(((struct __pyx_obj_19streaming_form_data_7_parser__Parser *)__pyx_v_self), __pyx_v_value); /* function exit code */ @@ -14153,14 +14344,14 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_14on_body(stru int __pyx_clineno = 0; __Pyx_RefNannySetupContext("on_body", 1); - /* "streaming_form_data/_parser.pyx":237 + /* "streaming_form_data/_parser.pyx":247 * * def on_body(self, bytes value): * if self.active_part and len(value) > 0: # <<<<<<<<<<<<<< * self.active_part.data_received(value) * */ - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_self->active_part); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 237, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_self->active_part); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 247, __pyx_L1_error) if (__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; @@ -14168,22 +14359,22 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_14on_body(stru } if (unlikely(__pyx_v_value == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 237, __pyx_L1_error) + __PYX_ERR(0, 247, __pyx_L1_error) } - __pyx_t_3 = __Pyx_PyBytes_GET_SIZE(__pyx_v_value); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 237, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBytes_GET_SIZE(__pyx_v_value); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 247, __pyx_L1_error) __pyx_t_2 = (__pyx_t_3 > 0); __pyx_t_1 = __pyx_t_2; __pyx_L4_bool_binop_done:; if (__pyx_t_1) { - /* "streaming_form_data/_parser.pyx":238 + /* "streaming_form_data/_parser.pyx":248 * def on_body(self, bytes value): * if self.active_part and len(value) > 0: * self.active_part.data_received(value) # <<<<<<<<<<<<<< * * async def async_on_body(self, bytes value): */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->active_part, __pyx_n_s_data_received); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 238, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->active_part, __pyx_n_s_data_received); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 248, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; __pyx_t_7 = 0; @@ -14203,13 +14394,13 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_14on_body(stru PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_value}; __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 238, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 248, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "streaming_form_data/_parser.pyx":237 + /* "streaming_form_data/_parser.pyx":247 * * def on_body(self, bytes value): * if self.active_part and len(value) > 0: # <<<<<<<<<<<<<< @@ -14218,7 +14409,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_14on_body(stru */ } - /* "streaming_form_data/_parser.pyx":236 + /* "streaming_form_data/_parser.pyx":246 * self.active_part = None * * def on_body(self, bytes value): # <<<<<<<<<<<<<< @@ -14242,7 +14433,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_14on_body(stru } static PyObject *__pyx_gb_19streaming_form_data_7_parser_7_Parser_18generator5(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "streaming_form_data/_parser.pyx":240 +/* "streaming_form_data/_parser.pyx":250 * self.active_part.data_received(value) * * async def async_on_body(self, bytes value): # <<<<<<<<<<<<<< @@ -14303,12 +14494,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 240, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 250, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "async_on_body") < 0)) __PYX_ERR(0, 240, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "async_on_body") < 0)) __PYX_ERR(0, 250, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; @@ -14319,7 +14510,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("async_on_body", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 240, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("async_on_body", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 250, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -14333,7 +14524,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_value), (&PyBytes_Type), 1, "value", 1))) __PYX_ERR(0, 240, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_value), (&PyBytes_Type), 1, "value", 1))) __PYX_ERR(0, 250, __pyx_L1_error) __pyx_r = __pyx_pf_19streaming_form_data_7_parser_7_Parser_16async_on_body(((struct __pyx_obj_19streaming_form_data_7_parser__Parser *)__pyx_v_self), __pyx_v_value); /* function exit code */ @@ -14363,7 +14554,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_16async_on_bod if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_19streaming_form_data_7_parser___pyx_scope_struct_5_async_on_body *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 240, __pyx_L1_error) + __PYX_ERR(0, 250, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } @@ -14374,7 +14565,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_16async_on_bod __Pyx_INCREF(__pyx_cur_scope->__pyx_v_value); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_value); { - __pyx_CoroutineObject *gen = __Pyx_Coroutine_New((__pyx_coroutine_body_t) __pyx_gb_19streaming_form_data_7_parser_7_Parser_18generator5, __pyx_codeobj__10, (PyObject *) __pyx_cur_scope, __pyx_n_s_async_on_body, __pyx_n_s_Parser_async_on_body, __pyx_n_s_streaming_form_data__parser); if (unlikely(!gen)) __PYX_ERR(0, 240, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Coroutine_New((__pyx_coroutine_body_t) __pyx_gb_19streaming_form_data_7_parser_7_Parser_18generator5, __pyx_codeobj__10, (PyObject *) __pyx_cur_scope, __pyx_n_s_async_on_body, __pyx_n_s_Parser_async_on_body, __pyx_n_s_streaming_form_data__parser); if (unlikely(!gen)) __PYX_ERR(0, 250, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -14414,16 +14605,16 @@ static PyObject *__pyx_gb_19streaming_form_data_7_parser_7_Parser_18generator5(_ return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 240, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 250, __pyx_L1_error) - /* "streaming_form_data/_parser.pyx":241 + /* "streaming_form_data/_parser.pyx":251 * * async def async_on_body(self, bytes value): * if self.active_part and len(value) > 0: # <<<<<<<<<<<<<< * await self.active_part.data_received(value) * */ - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_self->active_part); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 241, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_self->active_part); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 251, __pyx_L1_error) if (__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; @@ -14431,22 +14622,22 @@ static PyObject *__pyx_gb_19streaming_form_data_7_parser_7_Parser_18generator5(_ } if (unlikely(__pyx_cur_scope->__pyx_v_value == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 241, __pyx_L1_error) + __PYX_ERR(0, 251, __pyx_L1_error) } - __pyx_t_3 = __Pyx_PyBytes_GET_SIZE(__pyx_cur_scope->__pyx_v_value); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 241, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBytes_GET_SIZE(__pyx_cur_scope->__pyx_v_value); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 251, __pyx_L1_error) __pyx_t_2 = (__pyx_t_3 > 0); __pyx_t_1 = __pyx_t_2; __pyx_L5_bool_binop_done:; if (__pyx_t_1) { - /* "streaming_form_data/_parser.pyx":242 + /* "streaming_form_data/_parser.pyx":252 * async def async_on_body(self, bytes value): * if self.active_part and len(value) > 0: * await self.active_part.data_received(value) # <<<<<<<<<<<<<< * * cdef _part_for(self, str name): */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self->active_part, __pyx_n_s_data_received); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 242, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self->active_part, __pyx_n_s_data_received); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 252, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; __pyx_t_7 = 0; @@ -14466,7 +14657,7 @@ static PyObject *__pyx_gb_19streaming_form_data_7_parser_7_Parser_18generator5(_ PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_cur_scope->__pyx_v_value}; __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 242, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 252, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } @@ -14481,16 +14672,16 @@ static PyObject *__pyx_gb_19streaming_form_data_7_parser_7_Parser_18generator5(_ __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L7_resume_from_await:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 242, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 252, __pyx_L1_error) } else { PyObject* exc_type = __Pyx_PyErr_CurrentExceptionType(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || (exc_type != PyExc_GeneratorExit && __Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))) PyErr_Clear(); - else __PYX_ERR(0, 242, __pyx_L1_error) + else __PYX_ERR(0, 252, __pyx_L1_error) } } - /* "streaming_form_data/_parser.pyx":241 + /* "streaming_form_data/_parser.pyx":251 * * async def async_on_body(self, bytes value): * if self.active_part and len(value) > 0: # <<<<<<<<<<<<<< @@ -14500,7 +14691,7 @@ static PyObject *__pyx_gb_19streaming_form_data_7_parser_7_Parser_18generator5(_ } CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - /* "streaming_form_data/_parser.pyx":240 + /* "streaming_form_data/_parser.pyx":250 * self.active_part.data_received(value) * * async def async_on_body(self, bytes value): # <<<<<<<<<<<<<< @@ -14528,7 +14719,7 @@ static PyObject *__pyx_gb_19streaming_form_data_7_parser_7_Parser_18generator5(_ return __pyx_r; } -/* "streaming_form_data/_parser.pyx":244 +/* "streaming_form_data/_parser.pyx":254 * await self.active_part.data_received(value) * * cdef _part_for(self, str name): # <<<<<<<<<<<<<< @@ -14550,7 +14741,7 @@ static PyObject *__pyx_f_19streaming_form_data_7_parser_7_Parser__part_for(struc int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_part_for", 1); - /* "streaming_form_data/_parser.pyx":245 + /* "streaming_form_data/_parser.pyx":255 * * cdef _part_for(self, str name): * for part in self.expected_parts: # <<<<<<<<<<<<<< @@ -14562,9 +14753,9 @@ static PyObject *__pyx_f_19streaming_form_data_7_parser_7_Parser__part_for(struc __pyx_t_2 = 0; __pyx_t_3 = NULL; } else { - __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_self->expected_parts); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 245, __pyx_L1_error) + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_self->expected_parts); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 255, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 245, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 255, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { @@ -14572,28 +14763,28 @@ static PyObject *__pyx_f_19streaming_form_data_7_parser_7_Parser__part_for(struc { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 245, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 255, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 245, __pyx_L1_error) + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 255, __pyx_L1_error) #else - __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 245, __pyx_L1_error) + __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 255, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 245, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 255, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 245, __pyx_L1_error) + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 255, __pyx_L1_error) #else - __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 245, __pyx_L1_error) + __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 255, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } @@ -14603,7 +14794,7 @@ static PyObject *__pyx_f_19streaming_form_data_7_parser_7_Parser__part_for(struc PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 245, __pyx_L1_error) + else __PYX_ERR(0, 255, __pyx_L1_error) } break; } @@ -14612,20 +14803,20 @@ static PyObject *__pyx_f_19streaming_form_data_7_parser_7_Parser__part_for(struc __Pyx_XDECREF_SET(__pyx_v_part, __pyx_t_4); __pyx_t_4 = 0; - /* "streaming_form_data/_parser.pyx":246 + /* "streaming_form_data/_parser.pyx":256 * cdef _part_for(self, str name): * for part in self.expected_parts: * if part.name == name: # <<<<<<<<<<<<<< * return part * */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_part, __pyx_n_s_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 246, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_part, __pyx_n_s_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 256, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_4, __pyx_v_name, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 246, __pyx_L1_error) + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_4, __pyx_v_name, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 256, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_5) { - /* "streaming_form_data/_parser.pyx":247 + /* "streaming_form_data/_parser.pyx":257 * for part in self.expected_parts: * if part.name == name: * return part # <<<<<<<<<<<<<< @@ -14638,7 +14829,7 @@ static PyObject *__pyx_f_19streaming_form_data_7_parser_7_Parser__part_for(struc __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "streaming_form_data/_parser.pyx":246 + /* "streaming_form_data/_parser.pyx":256 * cdef _part_for(self, str name): * for part in self.expected_parts: * if part.name == name: # <<<<<<<<<<<<<< @@ -14647,7 +14838,7 @@ static PyObject *__pyx_f_19streaming_form_data_7_parser_7_Parser__part_for(struc */ } - /* "streaming_form_data/_parser.pyx":245 + /* "streaming_form_data/_parser.pyx":255 * * cdef _part_for(self, str name): * for part in self.expected_parts: # <<<<<<<<<<<<<< @@ -14657,7 +14848,7 @@ static PyObject *__pyx_f_19streaming_form_data_7_parser_7_Parser__part_for(struc } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "streaming_form_data/_parser.pyx":244 + /* "streaming_form_data/_parser.pyx":254 * await self.active_part.data_received(value) * * cdef _part_for(self, str name): # <<<<<<<<<<<<<< @@ -14680,7 +14871,7 @@ static PyObject *__pyx_f_19streaming_form_data_7_parser_7_Parser__part_for(struc return __pyx_r; } -/* "streaming_form_data/_parser.pyx":249 +/* "streaming_form_data/_parser.pyx":259 * return part * * def data_received(self, bytes data): # <<<<<<<<<<<<<< @@ -14741,12 +14932,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 249, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 259, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "data_received") < 0)) __PYX_ERR(0, 249, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "data_received") < 0)) __PYX_ERR(0, 259, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; @@ -14757,7 +14948,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("data_received", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 249, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("data_received", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 259, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -14771,7 +14962,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data), (&PyBytes_Type), 1, "data", 1))) __PYX_ERR(0, 249, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data), (&PyBytes_Type), 1, "data", 1))) __PYX_ERR(0, 259, __pyx_L1_error) __pyx_r = __pyx_pf_19streaming_form_data_7_parser_7_Parser_19data_received(((struct __pyx_obj_19streaming_form_data_7_parser__Parser *)__pyx_v_self), __pyx_v_data); /* function exit code */ @@ -14808,7 +14999,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_19data_receive int __pyx_clineno = 0; __Pyx_RefNannySetupContext("data_received", 1); - /* "streaming_form_data/_parser.pyx":250 + /* "streaming_form_data/_parser.pyx":260 * * def data_received(self, bytes data): * if not data: # <<<<<<<<<<<<<< @@ -14819,7 +15010,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_19data_receive __pyx_t_2 = (!__pyx_t_1); if (__pyx_t_2) { - /* "streaming_form_data/_parser.pyx":251 + /* "streaming_form_data/_parser.pyx":261 * def data_received(self, bytes data): * if not data: * return ErrorCode.E_OK # <<<<<<<<<<<<<< @@ -14827,13 +15018,13 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_19data_receive * cdef bytes chunk */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __Pyx_Enum_77593a__19streaming_form_data_7_parser_enum__dunderpyx_t_19streaming_form_data_7_parser_ErrorCode__etc_to_py(__pyx_e_19streaming_form_data_7_parser_E_OK); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 251, __pyx_L1_error) + __pyx_t_3 = __Pyx_Enum_77593a__19streaming_form_data_7_parser_enum__dunderpyx_t_19streaming_form_data_7_parser_ErrorCode__etc_to_py(__pyx_e_19streaming_form_data_7_parser_E_OK); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 261, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "streaming_form_data/_parser.pyx":250 + /* "streaming_form_data/_parser.pyx":260 * * def data_received(self, bytes data): * if not data: # <<<<<<<<<<<<<< @@ -14842,14 +15033,14 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_19data_receive */ } - /* "streaming_form_data/_parser.pyx":256 + /* "streaming_form_data/_parser.pyx":266 * cdef size_t index * * chunk, index = self.include_leftover_buffer(data) # <<<<<<<<<<<<<< * * return self._parse(chunk, index) */ - __pyx_t_3 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser__Parser *)__pyx_v_self->__pyx_vtab)->include_leftover_buffer(__pyx_v_self, __pyx_v_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 256, __pyx_L1_error) + __pyx_t_3 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser__Parser *)__pyx_v_self->__pyx_vtab)->include_leftover_buffer(__pyx_v_self, __pyx_v_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 266, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) { PyObject* sequence = __pyx_t_3; @@ -14857,7 +15048,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_19data_receive if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 256, __pyx_L1_error) + __PYX_ERR(0, 266, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -14870,15 +15061,15 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_19data_receive __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); #else - __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 256, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 266, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 256, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 266, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { Py_ssize_t index = -1; - __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 256, __pyx_L1_error) + __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 266, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); @@ -14886,7 +15077,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_19data_receive __Pyx_GOTREF(__pyx_t_4); index = 1; __pyx_t_5 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_5)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(0, 256, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(0, 266, __pyx_L1_error) __pyx_t_7 = NULL; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L5_unpacking_done; @@ -14894,17 +15085,17 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_19data_receive __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 256, __pyx_L1_error) + __PYX_ERR(0, 266, __pyx_L1_error) __pyx_L5_unpacking_done:; } - if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_4))) __PYX_ERR(0, 256, __pyx_L1_error) - __pyx_t_8 = __Pyx_PyInt_As_size_t(__pyx_t_5); if (unlikely((__pyx_t_8 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 256, __pyx_L1_error) + if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_4))) __PYX_ERR(0, 266, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyInt_As_size_t(__pyx_t_5); if (unlikely((__pyx_t_8 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 266, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_chunk = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; __pyx_v_index = __pyx_t_8; - /* "streaming_form_data/_parser.pyx":258 + /* "streaming_form_data/_parser.pyx":268 * chunk, index = self.include_leftover_buffer(data) * * return self._parse(chunk, index) # <<<<<<<<<<<<<< @@ -14912,9 +15103,9 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_19data_receive * async def async_data_received(self, bytes data): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_parse); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 258, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_parse); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 268, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyInt_FromSize_t(__pyx_v_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 258, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_FromSize_t(__pyx_v_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 268, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = NULL; __pyx_t_9 = 0; @@ -14935,7 +15126,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_19data_receive __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_9, 2+__pyx_t_9); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 258, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 268, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } @@ -14943,7 +15134,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_19data_receive __pyx_t_3 = 0; goto __pyx_L0; - /* "streaming_form_data/_parser.pyx":249 + /* "streaming_form_data/_parser.pyx":259 * return part * * def data_received(self, bytes data): # <<<<<<<<<<<<<< @@ -14967,7 +15158,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_19data_receive } static PyObject *__pyx_gb_19streaming_form_data_7_parser_7_Parser_23generator6(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "streaming_form_data/_parser.pyx":260 +/* "streaming_form_data/_parser.pyx":270 * return self._parse(chunk, index) * * async def async_data_received(self, bytes data): # <<<<<<<<<<<<<< @@ -15028,12 +15219,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 260, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 270, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "async_data_received") < 0)) __PYX_ERR(0, 260, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "async_data_received") < 0)) __PYX_ERR(0, 270, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; @@ -15044,7 +15235,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("async_data_received", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 260, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("async_data_received", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 270, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -15058,7 +15249,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data), (&PyBytes_Type), 1, "data", 1))) __PYX_ERR(0, 260, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data), (&PyBytes_Type), 1, "data", 1))) __PYX_ERR(0, 270, __pyx_L1_error) __pyx_r = __pyx_pf_19streaming_form_data_7_parser_7_Parser_21async_data_received(((struct __pyx_obj_19streaming_form_data_7_parser__Parser *)__pyx_v_self), __pyx_v_data); /* function exit code */ @@ -15088,7 +15279,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_21async_data_r if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_19streaming_form_data_7_parser___pyx_scope_struct_6_async_data_received *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 260, __pyx_L1_error) + __PYX_ERR(0, 270, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } @@ -15099,7 +15290,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_21async_data_r __Pyx_INCREF(__pyx_cur_scope->__pyx_v_data); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_data); { - __pyx_CoroutineObject *gen = __Pyx_Coroutine_New((__pyx_coroutine_body_t) __pyx_gb_19streaming_form_data_7_parser_7_Parser_23generator6, __pyx_codeobj__11, (PyObject *) __pyx_cur_scope, __pyx_n_s_async_data_received, __pyx_n_s_Parser_async_data_received, __pyx_n_s_streaming_form_data__parser); if (unlikely(!gen)) __PYX_ERR(0, 260, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Coroutine_New((__pyx_coroutine_body_t) __pyx_gb_19streaming_form_data_7_parser_7_Parser_23generator6, __pyx_codeobj__11, (PyObject *) __pyx_cur_scope, __pyx_n_s_async_data_received, __pyx_n_s_Parser_async_data_received, __pyx_n_s_streaming_form_data__parser); if (unlikely(!gen)) __PYX_ERR(0, 270, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -15141,9 +15332,9 @@ static PyObject *__pyx_gb_19streaming_form_data_7_parser_7_Parser_23generator6(_ return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 260, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 270, __pyx_L1_error) - /* "streaming_form_data/_parser.pyx":261 + /* "streaming_form_data/_parser.pyx":271 * * async def async_data_received(self, bytes data): * if not data: # <<<<<<<<<<<<<< @@ -15154,7 +15345,7 @@ static PyObject *__pyx_gb_19streaming_form_data_7_parser_7_Parser_23generator6(_ __pyx_t_2 = (!__pyx_t_1); if (__pyx_t_2) { - /* "streaming_form_data/_parser.pyx":262 + /* "streaming_form_data/_parser.pyx":272 * async def async_data_received(self, bytes data): * if not data: * return ErrorCode.E_OK # <<<<<<<<<<<<<< @@ -15162,13 +15353,13 @@ static PyObject *__pyx_gb_19streaming_form_data_7_parser_7_Parser_23generator6(_ * cdef bytes chunk */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __Pyx_Enum_77593a__19streaming_form_data_7_parser_enum__dunderpyx_t_19streaming_form_data_7_parser_ErrorCode__etc_to_py(__pyx_e_19streaming_form_data_7_parser_E_OK); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 262, __pyx_L1_error) + __pyx_t_3 = __Pyx_Enum_77593a__19streaming_form_data_7_parser_enum__dunderpyx_t_19streaming_form_data_7_parser_ErrorCode__etc_to_py(__pyx_e_19streaming_form_data_7_parser_E_OK); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 272, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = NULL; __Pyx_ReturnWithStopIteration(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; - /* "streaming_form_data/_parser.pyx":261 + /* "streaming_form_data/_parser.pyx":271 * * async def async_data_received(self, bytes data): * if not data: # <<<<<<<<<<<<<< @@ -15177,14 +15368,14 @@ static PyObject *__pyx_gb_19streaming_form_data_7_parser_7_Parser_23generator6(_ */ } - /* "streaming_form_data/_parser.pyx":267 + /* "streaming_form_data/_parser.pyx":277 * cdef size_t index * * chunk, index = self.include_leftover_buffer(data) # <<<<<<<<<<<<<< * * return await self._parse(chunk, index) */ - __pyx_t_3 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser__Parser *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->include_leftover_buffer(__pyx_cur_scope->__pyx_v_self, __pyx_cur_scope->__pyx_v_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 267, __pyx_L1_error) + __pyx_t_3 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser__Parser *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->include_leftover_buffer(__pyx_cur_scope->__pyx_v_self, __pyx_cur_scope->__pyx_v_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) { PyObject* sequence = __pyx_t_3; @@ -15192,7 +15383,7 @@ static PyObject *__pyx_gb_19streaming_form_data_7_parser_7_Parser_23generator6(_ if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 267, __pyx_L1_error) + __PYX_ERR(0, 277, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -15205,15 +15396,15 @@ static PyObject *__pyx_gb_19streaming_form_data_7_parser_7_Parser_23generator6(_ __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); #else - __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 267, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 267, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { Py_ssize_t index = -1; - __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 267, __pyx_L1_error) + __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); @@ -15221,7 +15412,7 @@ static PyObject *__pyx_gb_19streaming_form_data_7_parser_7_Parser_23generator6(_ __Pyx_GOTREF(__pyx_t_4); index = 1; __pyx_t_5 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_5)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(0, 267, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(0, 277, __pyx_L1_error) __pyx_t_7 = NULL; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L6_unpacking_done; @@ -15229,18 +15420,18 @@ static PyObject *__pyx_gb_19streaming_form_data_7_parser_7_Parser_23generator6(_ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 267, __pyx_L1_error) + __PYX_ERR(0, 277, __pyx_L1_error) __pyx_L6_unpacking_done:; } - if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_4))) __PYX_ERR(0, 267, __pyx_L1_error) - __pyx_t_8 = __Pyx_PyInt_As_size_t(__pyx_t_5); if (unlikely((__pyx_t_8 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 267, __pyx_L1_error) + if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_4))) __PYX_ERR(0, 277, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyInt_As_size_t(__pyx_t_5); if (unlikely((__pyx_t_8 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GIVEREF(__pyx_t_4); __pyx_cur_scope->__pyx_v_chunk = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; __pyx_cur_scope->__pyx_v_index = __pyx_t_8; - /* "streaming_form_data/_parser.pyx":269 + /* "streaming_form_data/_parser.pyx":279 * chunk, index = self.include_leftover_buffer(data) * * return await self._parse(chunk, index) # <<<<<<<<<<<<<< @@ -15248,9 +15439,9 @@ static PyObject *__pyx_gb_19streaming_form_data_7_parser_7_Parser_23generator6(_ * cdef include_leftover_buffer(self, bytes data): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_parse); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 269, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_parse); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 279, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyInt_FromSize_t(__pyx_cur_scope->__pyx_v_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 269, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_FromSize_t(__pyx_cur_scope->__pyx_v_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 279, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = NULL; __pyx_t_9 = 0; @@ -15271,7 +15462,7 @@ static PyObject *__pyx_gb_19streaming_form_data_7_parser_7_Parser_23generator6(_ __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_9, 2+__pyx_t_9); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 269, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 279, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } @@ -15286,11 +15477,11 @@ static PyObject *__pyx_gb_19streaming_form_data_7_parser_7_Parser_23generator6(_ __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L7_resume_from_await:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 269, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 279, __pyx_L1_error) __pyx_t_3 = __pyx_sent_value; __Pyx_INCREF(__pyx_t_3); } else { __pyx_t_3 = NULL; - if (__Pyx_PyGen_FetchStopIterationValue(&__pyx_t_3) < 0) __PYX_ERR(0, 269, __pyx_L1_error) + if (__Pyx_PyGen_FetchStopIterationValue(&__pyx_t_3) < 0) __PYX_ERR(0, 279, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __pyx_r = NULL; __Pyx_ReturnWithStopIteration(__pyx_t_3); @@ -15298,7 +15489,7 @@ static PyObject *__pyx_gb_19streaming_form_data_7_parser_7_Parser_23generator6(_ goto __pyx_L0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - /* "streaming_form_data/_parser.pyx":260 + /* "streaming_form_data/_parser.pyx":270 * return self._parse(chunk, index) * * async def async_data_received(self, bytes data): # <<<<<<<<<<<<<< @@ -15325,7 +15516,7 @@ static PyObject *__pyx_gb_19streaming_form_data_7_parser_7_Parser_23generator6(_ return __pyx_r; } -/* "streaming_form_data/_parser.pyx":271 +/* "streaming_form_data/_parser.pyx":281 * return await self._parse(chunk, index) * * cdef include_leftover_buffer(self, bytes data): # <<<<<<<<<<<<<< @@ -15347,7 +15538,7 @@ static PyObject *__pyx_f_19streaming_form_data_7_parser_7_Parser_include_leftove int __pyx_clineno = 0; __Pyx_RefNannySetupContext("include_leftover_buffer", 1); - /* "streaming_form_data/_parser.pyx":280 + /* "streaming_form_data/_parser.pyx":290 * cdef size_t index * * if self._leftover_buffer: # <<<<<<<<<<<<<< @@ -15357,19 +15548,19 @@ static PyObject *__pyx_f_19streaming_form_data_7_parser_7_Parser_include_leftove __pyx_t_1 = (__pyx_v_self->_leftover_buffer != Py_None)&&(PyBytes_GET_SIZE(__pyx_v_self->_leftover_buffer) != 0); if (__pyx_t_1) { - /* "streaming_form_data/_parser.pyx":281 + /* "streaming_form_data/_parser.pyx":291 * * if self._leftover_buffer: * chunk = self._leftover_buffer + data # <<<<<<<<<<<<<< * index = len(self._leftover_buffer) * self._leftover_buffer = None */ - __pyx_t_2 = PyNumber_Add(__pyx_v_self->_leftover_buffer, __pyx_v_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 281, __pyx_L1_error) + __pyx_t_2 = PyNumber_Add(__pyx_v_self->_leftover_buffer, __pyx_v_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 291, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_chunk = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "streaming_form_data/_parser.pyx":282 + /* "streaming_form_data/_parser.pyx":292 * if self._leftover_buffer: * chunk = self._leftover_buffer + data * index = len(self._leftover_buffer) # <<<<<<<<<<<<<< @@ -15380,13 +15571,13 @@ static PyObject *__pyx_f_19streaming_form_data_7_parser_7_Parser_include_leftove __Pyx_INCREF(__pyx_t_2); if (unlikely(__pyx_t_2 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 282, __pyx_L1_error) + __PYX_ERR(0, 292, __pyx_L1_error) } - __pyx_t_3 = __Pyx_PyBytes_GET_SIZE(__pyx_t_2); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 282, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBytes_GET_SIZE(__pyx_t_2); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 292, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_index = __pyx_t_3; - /* "streaming_form_data/_parser.pyx":283 + /* "streaming_form_data/_parser.pyx":293 * chunk = self._leftover_buffer + data * index = len(self._leftover_buffer) * self._leftover_buffer = None # <<<<<<<<<<<<<< @@ -15399,7 +15590,7 @@ static PyObject *__pyx_f_19streaming_form_data_7_parser_7_Parser_include_leftove __Pyx_DECREF(__pyx_v_self->_leftover_buffer); __pyx_v_self->_leftover_buffer = ((PyObject*)Py_None); - /* "streaming_form_data/_parser.pyx":280 + /* "streaming_form_data/_parser.pyx":290 * cdef size_t index * * if self._leftover_buffer: # <<<<<<<<<<<<<< @@ -15409,7 +15600,7 @@ static PyObject *__pyx_f_19streaming_form_data_7_parser_7_Parser_include_leftove goto __pyx_L3; } - /* "streaming_form_data/_parser.pyx":285 + /* "streaming_form_data/_parser.pyx":295 * self._leftover_buffer = None * else: * chunk = data # <<<<<<<<<<<<<< @@ -15420,7 +15611,7 @@ static PyObject *__pyx_f_19streaming_form_data_7_parser_7_Parser_include_leftove __Pyx_INCREF(__pyx_v_data); __pyx_v_chunk = __pyx_v_data; - /* "streaming_form_data/_parser.pyx":286 + /* "streaming_form_data/_parser.pyx":296 * else: * chunk = data * index = 0 # <<<<<<<<<<<<<< @@ -15431,29 +15622,29 @@ static PyObject *__pyx_f_19streaming_form_data_7_parser_7_Parser_include_leftove } __pyx_L3:; - /* "streaming_form_data/_parser.pyx":288 + /* "streaming_form_data/_parser.pyx":298 * index = 0 * * return (chunk, index) # <<<<<<<<<<<<<< * - * def _parse(self, bytes chunk, size_t index): + * cdef handle_ps_start(self, const Byte* chunk_ptr, size_t* idx, size_t* buffer_start): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_v_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 288, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_v_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 298, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 288, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 298, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_chunk); __Pyx_GIVEREF(__pyx_v_chunk); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_chunk)) __PYX_ERR(0, 288, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_chunk)) __PYX_ERR(0, 298, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2)) __PYX_ERR(0, 288, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2)) __PYX_ERR(0, 298, __pyx_L1_error); __pyx_t_2 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; - /* "streaming_form_data/_parser.pyx":271 + /* "streaming_form_data/_parser.pyx":281 * return await self._parse(chunk, index) * * cdef include_leftover_buffer(self, bytes data): # <<<<<<<<<<<<<< @@ -15474,9 +15665,139 @@ static PyObject *__pyx_f_19streaming_form_data_7_parser_7_Parser_include_leftove return __pyx_r; } -/* "streaming_form_data/_parser.pyx":290 +/* "streaming_form_data/_parser.pyx":300 + * return (chunk, index) + * + * cdef handle_ps_start(self, const Byte* chunk_ptr, size_t* idx, size_t* buffer_start): # <<<<<<<<<<<<<< + * cdef Byte byte = chunk_ptr[idx[0]] + * + */ + +static PyObject *__pyx_f_19streaming_form_data_7_parser_7_Parser_handle_ps_start(struct __pyx_obj_19streaming_form_data_7_parser__Parser *__pyx_v_self, __pyx_t_19streaming_form_data_7_parser_Byte const *__pyx_v_chunk_ptr, size_t *__pyx_v_idx, size_t *__pyx_v_buffer_start) { + __pyx_t_19streaming_form_data_7_parser_Byte __pyx_v_byte; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("handle_ps_start", 1); + + /* "streaming_form_data/_parser.pyx":301 + * + * cdef handle_ps_start(self, const Byte* chunk_ptr, size_t* idx, size_t* buffer_start): + * cdef Byte byte = chunk_ptr[idx[0]] # <<<<<<<<<<<<<< + * + * if byte == c_hyphen: + */ + __pyx_v_byte = (__pyx_v_chunk_ptr[(__pyx_v_idx[0])]); + + /* "streaming_form_data/_parser.pyx":303 + * cdef Byte byte = chunk_ptr[idx[0]] + * + * if byte == c_hyphen: # <<<<<<<<<<<<<< + * buffer_start[0] = idx[0] + * self.state = ParserState.PS_STARTING_BOUNDARY + */ + __pyx_t_1 = (__pyx_v_byte == __pyx_v_19streaming_form_data_7_parser_c_hyphen); + if (__pyx_t_1) { + + /* "streaming_form_data/_parser.pyx":304 + * + * if byte == c_hyphen: + * buffer_start[0] = idx[0] # <<<<<<<<<<<<<< + * self.state = ParserState.PS_STARTING_BOUNDARY + * elif byte == c_cr: + */ + (__pyx_v_buffer_start[0]) = (__pyx_v_idx[0]); + + /* "streaming_form_data/_parser.pyx":305 + * if byte == c_hyphen: + * buffer_start[0] = idx[0] + * self.state = ParserState.PS_STARTING_BOUNDARY # <<<<<<<<<<<<<< + * elif byte == c_cr: + * self.state = ParserState.PS_START_CR + */ + __pyx_v_self->state = __pyx_e_19streaming_form_data_7_parser_PS_STARTING_BOUNDARY; + + /* "streaming_form_data/_parser.pyx":303 + * cdef Byte byte = chunk_ptr[idx[0]] + * + * if byte == c_hyphen: # <<<<<<<<<<<<<< + * buffer_start[0] = idx[0] + * self.state = ParserState.PS_STARTING_BOUNDARY + */ + goto __pyx_L3; + } + + /* "streaming_form_data/_parser.pyx":306 + * buffer_start[0] = idx[0] + * self.state = ParserState.PS_STARTING_BOUNDARY + * elif byte == c_cr: # <<<<<<<<<<<<<< + * self.state = ParserState.PS_START_CR + * else: + */ + __pyx_t_1 = (__pyx_v_byte == __pyx_v_19streaming_form_data_7_parser_c_cr); + if (__pyx_t_1) { + + /* "streaming_form_data/_parser.pyx":307 + * self.state = ParserState.PS_STARTING_BOUNDARY + * elif byte == c_cr: + * self.state = ParserState.PS_START_CR # <<<<<<<<<<<<<< + * else: + * self.mark_error() + */ + __pyx_v_self->state = __pyx_e_19streaming_form_data_7_parser_PS_START_CR; + + /* "streaming_form_data/_parser.pyx":306 + * buffer_start[0] = idx[0] + * self.state = ParserState.PS_STARTING_BOUNDARY + * elif byte == c_cr: # <<<<<<<<<<<<<< + * self.state = ParserState.PS_START_CR + * else: + */ + goto __pyx_L3; + } + + /* "streaming_form_data/_parser.pyx":309 + * self.state = ParserState.PS_START_CR + * else: + * self.mark_error() # <<<<<<<<<<<<<< + * + * def _parse(self, bytes chunk, size_t index): + */ + /*else*/ { + __pyx_t_2 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser__Parser *)__pyx_v_self->__pyx_vtab)->mark_error(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 309, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + __pyx_L3:; + + /* "streaming_form_data/_parser.pyx":300 * return (chunk, index) * + * cdef handle_ps_start(self, const Byte* chunk_ptr, size_t* idx, size_t* buffer_start): # <<<<<<<<<<<<<< + * cdef Byte byte = chunk_ptr[idx[0]] + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("streaming_form_data._parser._Parser.handle_ps_start", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "streaming_form_data/_parser.pyx":311 + * self.mark_error() + * * def _parse(self, bytes chunk, size_t index): # <<<<<<<<<<<<<< * cdef size_t idx, buffer_start, chunk_len * cdef size_t match_start, skip_count, matched_length @@ -15538,7 +15859,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 290, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 311, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -15546,14 +15867,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 290, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 311, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("_parse", 1, 2, 2, 1); __PYX_ERR(0, 290, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_parse", 1, 2, 2, 1); __PYX_ERR(0, 311, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_parse") < 0)) __PYX_ERR(0, 290, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_parse") < 0)) __PYX_ERR(0, 311, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; @@ -15562,11 +15883,11 @@ PyObject *__pyx_args, PyObject *__pyx_kwds values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); } __pyx_v_chunk = ((PyObject*)values[0]); - __pyx_v_index = __Pyx_PyInt_As_size_t(values[1]); if (unlikely((__pyx_v_index == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 290, __pyx_L3_error) + __pyx_v_index = __Pyx_PyInt_As_size_t(values[1]); if (unlikely((__pyx_v_index == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 311, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_parse", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 290, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_parse", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 311, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -15580,7 +15901,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_chunk), (&PyBytes_Type), 1, "chunk", 1))) __PYX_ERR(0, 290, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_chunk), (&PyBytes_Type), 1, "chunk", 1))) __PYX_ERR(0, 311, __pyx_L1_error) __pyx_r = __pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(((struct __pyx_obj_19streaming_form_data_7_parser__Parser *)__pyx_v_self), __pyx_v_chunk, __pyx_v_index); /* function exit code */ @@ -15634,7 +15955,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_parse", 1); - /* "streaming_form_data/_parser.pyx":296 + /* "streaming_form_data/_parser.pyx":317 * cdef const Byte *chunk_ptr * * chunk_ptr = chunk # <<<<<<<<<<<<<< @@ -15643,12 +15964,12 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc */ if (unlikely(__pyx_v_chunk == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 296, __pyx_L1_error) + __PYX_ERR(0, 317, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyBytes_AsUString(__pyx_v_chunk); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 296, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBytes_AsUString(__pyx_v_chunk); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 317, __pyx_L1_error) __pyx_v_chunk_ptr = __pyx_t_1; - /* "streaming_form_data/_parser.pyx":297 + /* "streaming_form_data/_parser.pyx":318 * * chunk_ptr = chunk * chunk_len = len(chunk) # <<<<<<<<<<<<<< @@ -15657,12 +15978,12 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc */ if (unlikely(__pyx_v_chunk == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 297, __pyx_L1_error) + __PYX_ERR(0, 318, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_GET_SIZE(__pyx_v_chunk); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 297, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_GET_SIZE(__pyx_v_chunk); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 318, __pyx_L1_error) __pyx_v_chunk_len = __pyx_t_2; - /* "streaming_form_data/_parser.pyx":298 + /* "streaming_form_data/_parser.pyx":319 * chunk_ptr = chunk * chunk_len = len(chunk) * buffer_start = 0 # <<<<<<<<<<<<<< @@ -15671,7 +15992,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc */ __pyx_v_buffer_start = 0; - /* "streaming_form_data/_parser.pyx":300 + /* "streaming_form_data/_parser.pyx":321 * buffer_start = 0 * * idx = index # <<<<<<<<<<<<<< @@ -15680,7 +16001,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc */ __pyx_v_idx = __pyx_v_index; - /* "streaming_form_data/_parser.pyx":301 + /* "streaming_form_data/_parser.pyx":322 * * idx = index * while idx < chunk_len: # <<<<<<<<<<<<<< @@ -15691,7 +16012,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc __pyx_t_3 = (__pyx_v_idx < __pyx_v_chunk_len); if (!__pyx_t_3) break; - /* "streaming_form_data/_parser.pyx":302 + /* "streaming_form_data/_parser.pyx":323 * idx = index * while idx < chunk_len: * byte = chunk_ptr[idx] # <<<<<<<<<<<<<< @@ -15700,122 +16021,74 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc */ __pyx_v_byte = (__pyx_v_chunk_ptr[__pyx_v_idx]); - /* "streaming_form_data/_parser.pyx":304 + /* "streaming_form_data/_parser.pyx":325 * byte = chunk_ptr[idx] * * if self.state == ParserState.PS_START: # <<<<<<<<<<<<<< - * if byte == c_hyphen: - * buffer_start = idx + * self.handle_ps_start(chunk_ptr, &idx, &buffer_start) + * */ switch (__pyx_v_self->state) { case __pyx_e_19streaming_form_data_7_parser_PS_START: - /* "streaming_form_data/_parser.pyx":305 + /* "streaming_form_data/_parser.pyx":326 * * if self.state == ParserState.PS_START: - * if byte == c_hyphen: # <<<<<<<<<<<<<< - * buffer_start = idx - * self.state = ParserState.PS_STARTING_BOUNDARY - */ - __pyx_t_3 = (__pyx_v_byte == __pyx_v_19streaming_form_data_7_parser_c_hyphen); - if (__pyx_t_3) { - - /* "streaming_form_data/_parser.pyx":306 - * if self.state == ParserState.PS_START: - * if byte == c_hyphen: - * buffer_start = idx # <<<<<<<<<<<<<< - * self.state = ParserState.PS_STARTING_BOUNDARY - * elif byte == c_cr: - */ - __pyx_v_buffer_start = __pyx_v_idx; - - /* "streaming_form_data/_parser.pyx":307 - * if byte == c_hyphen: - * buffer_start = idx - * self.state = ParserState.PS_STARTING_BOUNDARY # <<<<<<<<<<<<<< - * elif byte == c_cr: - * self.state = ParserState.PS_START_CR - */ - __pyx_v_self->state = __pyx_e_19streaming_form_data_7_parser_PS_STARTING_BOUNDARY; - - /* "streaming_form_data/_parser.pyx":305 + * self.handle_ps_start(chunk_ptr, &idx, &buffer_start) # <<<<<<<<<<<<<< * - * if self.state == ParserState.PS_START: - * if byte == c_hyphen: # <<<<<<<<<<<<<< - * buffer_start = idx - * self.state = ParserState.PS_STARTING_BOUNDARY + * if self.has_error(): */ - goto __pyx_L5; - } - - /* "streaming_form_data/_parser.pyx":308 - * buffer_start = idx - * self.state = ParserState.PS_STARTING_BOUNDARY - * elif byte == c_cr: # <<<<<<<<<<<<<< - * self.state = ParserState.PS_START_CR - * else: - */ - __pyx_t_3 = (__pyx_v_byte == __pyx_v_19streaming_form_data_7_parser_c_cr); - if (__pyx_t_3) { - - /* "streaming_form_data/_parser.pyx":309 - * self.state = ParserState.PS_STARTING_BOUNDARY - * elif byte == c_cr: - * self.state = ParserState.PS_START_CR # <<<<<<<<<<<<<< - * else: - * self.mark_error() - */ - __pyx_v_self->state = __pyx_e_19streaming_form_data_7_parser_PS_START_CR; - - /* "streaming_form_data/_parser.pyx":308 - * buffer_start = idx - * self.state = ParserState.PS_STARTING_BOUNDARY - * elif byte == c_cr: # <<<<<<<<<<<<<< - * self.state = ParserState.PS_START_CR - * else: - */ - goto __pyx_L5; - } + __pyx_t_4 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser__Parser *)__pyx_v_self->__pyx_vtab)->handle_ps_start(__pyx_v_self, __pyx_v_chunk_ptr, (&__pyx_v_idx), (&__pyx_v_buffer_start)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 326, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "streaming_form_data/_parser.pyx":311 - * self.state = ParserState.PS_START_CR - * else: - * self.mark_error() # <<<<<<<<<<<<<< + /* "streaming_form_data/_parser.pyx":328 + * self.handle_ps_start(chunk_ptr, &idx, &buffer_start) + * + * if self.has_error(): # <<<<<<<<<<<<<< * return ErrorCode.E_DELIMITING * */ - /*else*/ { - __pyx_t_4 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser__Parser *)__pyx_v_self->__pyx_vtab)->mark_error(__pyx_v_self); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 311, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser__Parser *)__pyx_v_self->__pyx_vtab)->has_error(__pyx_v_self); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 328, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 328, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__pyx_t_3) { - /* "streaming_form_data/_parser.pyx":312 - * else: - * self.mark_error() + /* "streaming_form_data/_parser.pyx":329 + * + * if self.has_error(): * return ErrorCode.E_DELIMITING # <<<<<<<<<<<<<< * * elif self.state == ParserState.PS_START_CR: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __Pyx_Enum_77593a__19streaming_form_data_7_parser_enum__dunderpyx_t_19streaming_form_data_7_parser_ErrorCode__etc_to_py(__pyx_e_19streaming_form_data_7_parser_E_DELIMITING); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 312, __pyx_L1_error) + __pyx_t_4 = __Pyx_Enum_77593a__19streaming_form_data_7_parser_enum__dunderpyx_t_19streaming_form_data_7_parser_ErrorCode__etc_to_py(__pyx_e_19streaming_form_data_7_parser_E_DELIMITING); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 329, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; + + /* "streaming_form_data/_parser.pyx":328 + * self.handle_ps_start(chunk_ptr, &idx, &buffer_start) + * + * if self.has_error(): # <<<<<<<<<<<<<< + * return ErrorCode.E_DELIMITING + * + */ } - __pyx_L5:; - /* "streaming_form_data/_parser.pyx":304 + /* "streaming_form_data/_parser.pyx":325 * byte = chunk_ptr[idx] * * if self.state == ParserState.PS_START: # <<<<<<<<<<<<<< - * if byte == c_hyphen: - * buffer_start = idx + * self.handle_ps_start(chunk_ptr, &idx, &buffer_start) + * */ break; case __pyx_e_19streaming_form_data_7_parser_PS_START_CR: - /* "streaming_form_data/_parser.pyx":315 + /* "streaming_form_data/_parser.pyx":332 * * elif self.state == ParserState.PS_START_CR: * if byte == c_lf: # <<<<<<<<<<<<<< @@ -15825,7 +16098,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc __pyx_t_3 = (__pyx_v_byte == __pyx_v_19streaming_form_data_7_parser_c_lf); if (__pyx_t_3) { - /* "streaming_form_data/_parser.pyx":316 + /* "streaming_form_data/_parser.pyx":333 * elif self.state == ParserState.PS_START_CR: * if byte == c_lf: * self.state = ParserState.PS_START # <<<<<<<<<<<<<< @@ -15834,7 +16107,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc */ __pyx_v_self->state = __pyx_e_19streaming_form_data_7_parser_PS_START; - /* "streaming_form_data/_parser.pyx":315 + /* "streaming_form_data/_parser.pyx":332 * * elif self.state == ParserState.PS_START_CR: * if byte == c_lf: # <<<<<<<<<<<<<< @@ -15844,7 +16117,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc goto __pyx_L6; } - /* "streaming_form_data/_parser.pyx":318 + /* "streaming_form_data/_parser.pyx":335 * self.state = ParserState.PS_START * else: * self.mark_error() # <<<<<<<<<<<<<< @@ -15852,11 +16125,11 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc * */ /*else*/ { - __pyx_t_4 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser__Parser *)__pyx_v_self->__pyx_vtab)->mark_error(__pyx_v_self); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 318, __pyx_L1_error) + __pyx_t_4 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser__Parser *)__pyx_v_self->__pyx_vtab)->mark_error(__pyx_v_self); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 335, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "streaming_form_data/_parser.pyx":319 + /* "streaming_form_data/_parser.pyx":336 * else: * self.mark_error() * return ErrorCode.E_DELIMITING # <<<<<<<<<<<<<< @@ -15864,7 +16137,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc * elif self.state == ParserState.PS_STARTING_BOUNDARY: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __Pyx_Enum_77593a__19streaming_form_data_7_parser_enum__dunderpyx_t_19streaming_form_data_7_parser_ErrorCode__etc_to_py(__pyx_e_19streaming_form_data_7_parser_E_DELIMITING); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 319, __pyx_L1_error) + __pyx_t_4 = __Pyx_Enum_77593a__19streaming_form_data_7_parser_enum__dunderpyx_t_19streaming_form_data_7_parser_ErrorCode__etc_to_py(__pyx_e_19streaming_form_data_7_parser_E_DELIMITING); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 336, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; @@ -15872,7 +16145,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc } __pyx_L6:; - /* "streaming_form_data/_parser.pyx":314 + /* "streaming_form_data/_parser.pyx":331 * return ErrorCode.E_DELIMITING * * elif self.state == ParserState.PS_START_CR: # <<<<<<<<<<<<<< @@ -15882,7 +16155,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc break; case __pyx_e_19streaming_form_data_7_parser_PS_STARTING_BOUNDARY: - /* "streaming_form_data/_parser.pyx":322 + /* "streaming_form_data/_parser.pyx":339 * * elif self.state == ParserState.PS_STARTING_BOUNDARY: * if byte != c_hyphen: # <<<<<<<<<<<<<< @@ -15892,18 +16165,18 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc __pyx_t_3 = (__pyx_v_byte != __pyx_v_19streaming_form_data_7_parser_c_hyphen); if (__pyx_t_3) { - /* "streaming_form_data/_parser.pyx":323 + /* "streaming_form_data/_parser.pyx":340 * elif self.state == ParserState.PS_STARTING_BOUNDARY: * if byte != c_hyphen: * self.mark_error() # <<<<<<<<<<<<<< * return ErrorCode.E_DELIMITING * */ - __pyx_t_4 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser__Parser *)__pyx_v_self->__pyx_vtab)->mark_error(__pyx_v_self); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 323, __pyx_L1_error) + __pyx_t_4 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser__Parser *)__pyx_v_self->__pyx_vtab)->mark_error(__pyx_v_self); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 340, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "streaming_form_data/_parser.pyx":324 + /* "streaming_form_data/_parser.pyx":341 * if byte != c_hyphen: * self.mark_error() * return ErrorCode.E_DELIMITING # <<<<<<<<<<<<<< @@ -15911,13 +16184,13 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc * self.state = ParserState.PS_READING_BOUNDARY */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __Pyx_Enum_77593a__19streaming_form_data_7_parser_enum__dunderpyx_t_19streaming_form_data_7_parser_ErrorCode__etc_to_py(__pyx_e_19streaming_form_data_7_parser_E_DELIMITING); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 324, __pyx_L1_error) + __pyx_t_4 = __Pyx_Enum_77593a__19streaming_form_data_7_parser_enum__dunderpyx_t_19streaming_form_data_7_parser_ErrorCode__etc_to_py(__pyx_e_19streaming_form_data_7_parser_E_DELIMITING); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 341, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; - /* "streaming_form_data/_parser.pyx":322 + /* "streaming_form_data/_parser.pyx":339 * * elif self.state == ParserState.PS_STARTING_BOUNDARY: * if byte != c_hyphen: # <<<<<<<<<<<<<< @@ -15926,7 +16199,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc */ } - /* "streaming_form_data/_parser.pyx":326 + /* "streaming_form_data/_parser.pyx":343 * return ErrorCode.E_DELIMITING * * self.state = ParserState.PS_READING_BOUNDARY # <<<<<<<<<<<<<< @@ -15935,7 +16208,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc */ __pyx_v_self->state = __pyx_e_19streaming_form_data_7_parser_PS_READING_BOUNDARY; - /* "streaming_form_data/_parser.pyx":321 + /* "streaming_form_data/_parser.pyx":338 * return ErrorCode.E_DELIMITING * * elif self.state == ParserState.PS_STARTING_BOUNDARY: # <<<<<<<<<<<<<< @@ -15945,7 +16218,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc break; case __pyx_e_19streaming_form_data_7_parser_PS_READING_BOUNDARY: - /* "streaming_form_data/_parser.pyx":328 + /* "streaming_form_data/_parser.pyx":345 * self.state = ParserState.PS_READING_BOUNDARY * elif self.state == ParserState.PS_READING_BOUNDARY: * if byte == c_cr: # <<<<<<<<<<<<<< @@ -15955,7 +16228,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc __pyx_t_3 = (__pyx_v_byte == __pyx_v_19streaming_form_data_7_parser_c_cr); if (__pyx_t_3) { - /* "streaming_form_data/_parser.pyx":329 + /* "streaming_form_data/_parser.pyx":346 * elif self.state == ParserState.PS_READING_BOUNDARY: * if byte == c_cr: * self.state = ParserState.PS_ENDING_BOUNDARY # <<<<<<<<<<<<<< @@ -15964,7 +16237,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc */ __pyx_v_self->state = __pyx_e_19streaming_form_data_7_parser_PS_ENDING_BOUNDARY; - /* "streaming_form_data/_parser.pyx":328 + /* "streaming_form_data/_parser.pyx":345 * self.state = ParserState.PS_READING_BOUNDARY * elif self.state == ParserState.PS_READING_BOUNDARY: * if byte == c_cr: # <<<<<<<<<<<<<< @@ -15973,7 +16246,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc */ } - /* "streaming_form_data/_parser.pyx":327 + /* "streaming_form_data/_parser.pyx":344 * * self.state = ParserState.PS_READING_BOUNDARY * elif self.state == ParserState.PS_READING_BOUNDARY: # <<<<<<<<<<<<<< @@ -15983,7 +16256,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc break; case __pyx_e_19streaming_form_data_7_parser_PS_ENDING_BOUNDARY: - /* "streaming_form_data/_parser.pyx":332 + /* "streaming_form_data/_parser.pyx":349 * * elif self.state == ParserState.PS_ENDING_BOUNDARY: * if byte != c_lf: # <<<<<<<<<<<<<< @@ -15993,18 +16266,18 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc __pyx_t_3 = (__pyx_v_byte != __pyx_v_19streaming_form_data_7_parser_c_lf); if (__pyx_t_3) { - /* "streaming_form_data/_parser.pyx":333 + /* "streaming_form_data/_parser.pyx":350 * elif self.state == ParserState.PS_ENDING_BOUNDARY: * if byte != c_lf: * self.mark_error() # <<<<<<<<<<<<<< * return ErrorCode.E_DELIMITING * */ - __pyx_t_4 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser__Parser *)__pyx_v_self->__pyx_vtab)->mark_error(__pyx_v_self); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 333, __pyx_L1_error) + __pyx_t_4 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser__Parser *)__pyx_v_self->__pyx_vtab)->mark_error(__pyx_v_self); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 350, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "streaming_form_data/_parser.pyx":334 + /* "streaming_form_data/_parser.pyx":351 * if byte != c_lf: * self.mark_error() * return ErrorCode.E_DELIMITING # <<<<<<<<<<<<<< @@ -16012,13 +16285,13 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc * # ensure we have read correct starting delimiter */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __Pyx_Enum_77593a__19streaming_form_data_7_parser_enum__dunderpyx_t_19streaming_form_data_7_parser_ErrorCode__etc_to_py(__pyx_e_19streaming_form_data_7_parser_E_DELIMITING); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 334, __pyx_L1_error) + __pyx_t_4 = __Pyx_Enum_77593a__19streaming_form_data_7_parser_enum__dunderpyx_t_19streaming_form_data_7_parser_ErrorCode__etc_to_py(__pyx_e_19streaming_form_data_7_parser_E_DELIMITING); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 351, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; - /* "streaming_form_data/_parser.pyx":332 + /* "streaming_form_data/_parser.pyx":349 * * elif self.state == ParserState.PS_ENDING_BOUNDARY: * if byte != c_lf: # <<<<<<<<<<<<<< @@ -16027,7 +16300,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc */ } - /* "streaming_form_data/_parser.pyx":337 + /* "streaming_form_data/_parser.pyx":354 * * # ensure we have read correct starting delimiter * if b"\r\n" + chunk[buffer_start: idx + 1] != self.delimiter_finder.target: # <<<<<<<<<<<<<< @@ -16036,29 +16309,29 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc */ if (unlikely(__pyx_v_chunk == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 337, __pyx_L1_error) + __PYX_ERR(0, 354, __pyx_L1_error) } - __pyx_t_4 = PySequence_GetSlice(__pyx_v_chunk, __pyx_v_buffer_start, (__pyx_v_idx + 1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 337, __pyx_L1_error) + __pyx_t_4 = PySequence_GetSlice(__pyx_v_chunk, __pyx_v_buffer_start, (__pyx_v_idx + 1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 354, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyNumber_Add(__pyx_kp_b__12, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 337, __pyx_L1_error) + __pyx_t_5 = PyNumber_Add(__pyx_kp_b__12, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 354, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_3 = (__Pyx_PyBytes_Equals(__pyx_t_5, __pyx_v_self->delimiter_finder->target, Py_NE)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 337, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PyBytes_Equals(__pyx_t_5, __pyx_v_self->delimiter_finder->target, Py_NE)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 354, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_3) { - /* "streaming_form_data/_parser.pyx":338 + /* "streaming_form_data/_parser.pyx":355 * # ensure we have read correct starting delimiter * if b"\r\n" + chunk[buffer_start: idx + 1] != self.delimiter_finder.target: * self.mark_error() # <<<<<<<<<<<<<< * return ErrorCode.E_DELIMITING * */ - __pyx_t_5 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser__Parser *)__pyx_v_self->__pyx_vtab)->mark_error(__pyx_v_self); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 338, __pyx_L1_error) + __pyx_t_5 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser__Parser *)__pyx_v_self->__pyx_vtab)->mark_error(__pyx_v_self); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 355, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "streaming_form_data/_parser.pyx":339 + /* "streaming_form_data/_parser.pyx":356 * if b"\r\n" + chunk[buffer_start: idx + 1] != self.delimiter_finder.target: * self.mark_error() * return ErrorCode.E_DELIMITING # <<<<<<<<<<<<<< @@ -16066,13 +16339,13 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc * buffer_start = idx + 1 */ __Pyx_XDECREF(__pyx_r); - __pyx_t_5 = __Pyx_Enum_77593a__19streaming_form_data_7_parser_enum__dunderpyx_t_19streaming_form_data_7_parser_ErrorCode__etc_to_py(__pyx_e_19streaming_form_data_7_parser_E_DELIMITING); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 339, __pyx_L1_error) + __pyx_t_5 = __Pyx_Enum_77593a__19streaming_form_data_7_parser_enum__dunderpyx_t_19streaming_form_data_7_parser_ErrorCode__etc_to_py(__pyx_e_19streaming_form_data_7_parser_E_DELIMITING); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; - /* "streaming_form_data/_parser.pyx":337 + /* "streaming_form_data/_parser.pyx":354 * * # ensure we have read correct starting delimiter * if b"\r\n" + chunk[buffer_start: idx + 1] != self.delimiter_finder.target: # <<<<<<<<<<<<<< @@ -16081,7 +16354,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc */ } - /* "streaming_form_data/_parser.pyx":341 + /* "streaming_form_data/_parser.pyx":358 * return ErrorCode.E_DELIMITING * * buffer_start = idx + 1 # <<<<<<<<<<<<<< @@ -16090,7 +16363,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc */ __pyx_v_buffer_start = (__pyx_v_idx + 1); - /* "streaming_form_data/_parser.pyx":343 + /* "streaming_form_data/_parser.pyx":360 * buffer_start = idx + 1 * * self.state = ParserState.PS_READING_HEADER # <<<<<<<<<<<<<< @@ -16099,7 +16372,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc */ __pyx_v_self->state = __pyx_e_19streaming_form_data_7_parser_PS_READING_HEADER; - /* "streaming_form_data/_parser.pyx":331 + /* "streaming_form_data/_parser.pyx":348 * self.state = ParserState.PS_ENDING_BOUNDARY * * elif self.state == ParserState.PS_ENDING_BOUNDARY: # <<<<<<<<<<<<<< @@ -16109,7 +16382,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc break; case __pyx_e_19streaming_form_data_7_parser_PS_READING_HEADER: - /* "streaming_form_data/_parser.pyx":345 + /* "streaming_form_data/_parser.pyx":362 * self.state = ParserState.PS_READING_HEADER * elif self.state == ParserState.PS_READING_HEADER: * if byte == c_cr: # <<<<<<<<<<<<<< @@ -16119,7 +16392,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc __pyx_t_3 = (__pyx_v_byte == __pyx_v_19streaming_form_data_7_parser_c_cr); if (__pyx_t_3) { - /* "streaming_form_data/_parser.pyx":346 + /* "streaming_form_data/_parser.pyx":363 * elif self.state == ParserState.PS_READING_HEADER: * if byte == c_cr: * self.state = ParserState.PS_ENDING_HEADER # <<<<<<<<<<<<<< @@ -16128,7 +16401,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc */ __pyx_v_self->state = __pyx_e_19streaming_form_data_7_parser_PS_ENDING_HEADER; - /* "streaming_form_data/_parser.pyx":345 + /* "streaming_form_data/_parser.pyx":362 * self.state = ParserState.PS_READING_HEADER * elif self.state == ParserState.PS_READING_HEADER: * if byte == c_cr: # <<<<<<<<<<<<<< @@ -16137,7 +16410,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc */ } - /* "streaming_form_data/_parser.pyx":344 + /* "streaming_form_data/_parser.pyx":361 * * self.state = ParserState.PS_READING_HEADER * elif self.state == ParserState.PS_READING_HEADER: # <<<<<<<<<<<<<< @@ -16147,7 +16420,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc break; case __pyx_e_19streaming_form_data_7_parser_PS_ENDING_HEADER: - /* "streaming_form_data/_parser.pyx":349 + /* "streaming_form_data/_parser.pyx":366 * * elif self.state == ParserState.PS_ENDING_HEADER: * if byte != c_lf: # <<<<<<<<<<<<<< @@ -16157,18 +16430,18 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc __pyx_t_3 = (__pyx_v_byte != __pyx_v_19streaming_form_data_7_parser_c_lf); if (__pyx_t_3) { - /* "streaming_form_data/_parser.pyx":350 + /* "streaming_form_data/_parser.pyx":367 * elif self.state == ParserState.PS_ENDING_HEADER: * if byte != c_lf: * self.mark_error() # <<<<<<<<<<<<<< * return ErrorCode.E_PART_HEADERS * */ - __pyx_t_5 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser__Parser *)__pyx_v_self->__pyx_vtab)->mark_error(__pyx_v_self); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 350, __pyx_L1_error) + __pyx_t_5 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser__Parser *)__pyx_v_self->__pyx_vtab)->mark_error(__pyx_v_self); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 367, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "streaming_form_data/_parser.pyx":351 + /* "streaming_form_data/_parser.pyx":368 * if byte != c_lf: * self.mark_error() * return ErrorCode.E_PART_HEADERS # <<<<<<<<<<<<<< @@ -16176,13 +16449,13 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc * message = Parser(policy=HTTP).parsestr( */ __Pyx_XDECREF(__pyx_r); - __pyx_t_5 = __Pyx_Enum_77593a__19streaming_form_data_7_parser_enum__dunderpyx_t_19streaming_form_data_7_parser_ErrorCode__etc_to_py(__pyx_e_19streaming_form_data_7_parser_E_PART_HEADERS); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 351, __pyx_L1_error) + __pyx_t_5 = __Pyx_Enum_77593a__19streaming_form_data_7_parser_enum__dunderpyx_t_19streaming_form_data_7_parser_ErrorCode__etc_to_py(__pyx_e_19streaming_form_data_7_parser_E_PART_HEADERS); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 368, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; - /* "streaming_form_data/_parser.pyx":349 + /* "streaming_form_data/_parser.pyx":366 * * elif self.state == ParserState.PS_ENDING_HEADER: * if byte != c_lf: # <<<<<<<<<<<<<< @@ -16191,30 +16464,30 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc */ } - /* "streaming_form_data/_parser.pyx":353 + /* "streaming_form_data/_parser.pyx":370 * return ErrorCode.E_PART_HEADERS * * message = Parser(policy=HTTP).parsestr( # <<<<<<<<<<<<<< * chunk[buffer_start: idx + 1].decode("utf-8") * ) */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Parser); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 353, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Parser); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 370, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 353, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 370, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_HTTP); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 353, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_HTTP); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 370, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_policy, __pyx_t_7) < 0) __PYX_ERR(0, 353, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_policy, __pyx_t_7) < 0) __PYX_ERR(0, 370, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 353, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 370, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_parsestr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 353, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_parsestr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 370, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "streaming_form_data/_parser.pyx":354 + /* "streaming_form_data/_parser.pyx":371 * * message = Parser(policy=HTTP).parsestr( * chunk[buffer_start: idx + 1].decode("utf-8") # <<<<<<<<<<<<<< @@ -16223,9 +16496,9 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc */ if (unlikely(__pyx_v_chunk == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 354, __pyx_L1_error) + __PYX_ERR(0, 371, __pyx_L1_error) } - __pyx_t_7 = __Pyx_decode_bytes(__pyx_v_chunk, __pyx_v_buffer_start, (__pyx_v_idx + 1), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 354, __pyx_L1_error) + __pyx_t_7 = __Pyx_decode_bytes(__pyx_v_chunk, __pyx_v_buffer_start, (__pyx_v_idx + 1), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_4 = NULL; __pyx_t_8 = 0; @@ -16246,31 +16519,31 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 353, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 370, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_XDECREF_SET(__pyx_v_message, __pyx_t_5); __pyx_t_5 = 0; - /* "streaming_form_data/_parser.pyx":357 + /* "streaming_form_data/_parser.pyx":374 * ) * * if "content-disposition" in message: # <<<<<<<<<<<<<< * if not message.get_content_disposition() == "form-data": * self.mark_error() */ - __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_kp_u_content_disposition, __pyx_v_message, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 357, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_kp_u_content_disposition, __pyx_v_message, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 374, __pyx_L1_error) if (__pyx_t_3) { - /* "streaming_form_data/_parser.pyx":358 + /* "streaming_form_data/_parser.pyx":375 * * if "content-disposition" in message: * if not message.get_content_disposition() == "form-data": # <<<<<<<<<<<<<< * self.mark_error() * return ErrorCode.E_PART_HEADERS */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_message, __pyx_n_s_get_content_disposition); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 358, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_message, __pyx_n_s_get_content_disposition); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 375, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; __pyx_t_8 = 0; @@ -16290,27 +16563,27 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL}; __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 0+__pyx_t_8); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 358, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 375, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } - __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_5, __pyx_kp_u_form_data, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 358, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_5, __pyx_kp_u_form_data, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 375, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_9 = (!__pyx_t_3); if (__pyx_t_9) { - /* "streaming_form_data/_parser.pyx":359 + /* "streaming_form_data/_parser.pyx":376 * if "content-disposition" in message: * if not message.get_content_disposition() == "form-data": * self.mark_error() # <<<<<<<<<<<<<< * return ErrorCode.E_PART_HEADERS * */ - __pyx_t_5 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser__Parser *)__pyx_v_self->__pyx_vtab)->mark_error(__pyx_v_self); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 359, __pyx_L1_error) + __pyx_t_5 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser__Parser *)__pyx_v_self->__pyx_vtab)->mark_error(__pyx_v_self); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 376, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "streaming_form_data/_parser.pyx":360 + /* "streaming_form_data/_parser.pyx":377 * if not message.get_content_disposition() == "form-data": * self.mark_error() * return ErrorCode.E_PART_HEADERS # <<<<<<<<<<<<<< @@ -16318,13 +16591,13 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc * params = message["content-disposition"].params */ __Pyx_XDECREF(__pyx_r); - __pyx_t_5 = __Pyx_Enum_77593a__19streaming_form_data_7_parser_enum__dunderpyx_t_19streaming_form_data_7_parser_ErrorCode__etc_to_py(__pyx_e_19streaming_form_data_7_parser_E_PART_HEADERS); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 360, __pyx_L1_error) + __pyx_t_5 = __Pyx_Enum_77593a__19streaming_form_data_7_parser_enum__dunderpyx_t_19streaming_form_data_7_parser_ErrorCode__etc_to_py(__pyx_e_19streaming_form_data_7_parser_E_PART_HEADERS); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 377, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; - /* "streaming_form_data/_parser.pyx":358 + /* "streaming_form_data/_parser.pyx":375 * * if "content-disposition" in message: * if not message.get_content_disposition() == "form-data": # <<<<<<<<<<<<<< @@ -16333,29 +16606,29 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc */ } - /* "streaming_form_data/_parser.pyx":362 + /* "streaming_form_data/_parser.pyx":379 * return ErrorCode.E_PART_HEADERS * * params = message["content-disposition"].params # <<<<<<<<<<<<<< * name = params.get("name") * */ - __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_v_message, __pyx_kp_u_content_disposition); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 362, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_v_message, __pyx_kp_u_content_disposition); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 379, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_params); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 362, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_params); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 379, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF_SET(__pyx_v_params, __pyx_t_6); __pyx_t_6 = 0; - /* "streaming_form_data/_parser.pyx":363 + /* "streaming_form_data/_parser.pyx":380 * * params = message["content-disposition"].params * name = params.get("name") # <<<<<<<<<<<<<< * * if name: */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_params, __pyx_n_s_get); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 363, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_params, __pyx_n_s_get); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 380, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = NULL; __pyx_t_8 = 0; @@ -16375,37 +16648,37 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_n_u_name}; __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 363, __pyx_L1_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 380, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_6); __pyx_t_6 = 0; - /* "streaming_form_data/_parser.pyx":365 + /* "streaming_form_data/_parser.pyx":382 * name = params.get("name") * * if name: # <<<<<<<<<<<<<< * part = self._part_for(name) * if part is None: */ - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_name); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 365, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_name); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 382, __pyx_L1_error) if (__pyx_t_9) { - /* "streaming_form_data/_parser.pyx":366 + /* "streaming_form_data/_parser.pyx":383 * * if name: * part = self._part_for(name) # <<<<<<<<<<<<<< * if part is None: * part = self.default_part */ - if (!(likely(PyUnicode_CheckExact(__pyx_v_name))||((__pyx_v_name) == Py_None) || __Pyx_RaiseUnexpectedTypeError("unicode", __pyx_v_name))) __PYX_ERR(0, 366, __pyx_L1_error) - __pyx_t_6 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser__Parser *)__pyx_v_self->__pyx_vtab)->_part_for(__pyx_v_self, ((PyObject*)__pyx_v_name)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 366, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_v_name))||((__pyx_v_name) == Py_None) || __Pyx_RaiseUnexpectedTypeError("unicode", __pyx_v_name))) __PYX_ERR(0, 383, __pyx_L1_error) + __pyx_t_6 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser__Parser *)__pyx_v_self->__pyx_vtab)->_part_for(__pyx_v_self, ((PyObject*)__pyx_v_name)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 383, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_part, __pyx_t_6); __pyx_t_6 = 0; - /* "streaming_form_data/_parser.pyx":367 + /* "streaming_form_data/_parser.pyx":384 * if name: * part = self._part_for(name) * if part is None: # <<<<<<<<<<<<<< @@ -16415,7 +16688,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc __pyx_t_9 = (__pyx_v_part == Py_None); if (__pyx_t_9) { - /* "streaming_form_data/_parser.pyx":368 + /* "streaming_form_data/_parser.pyx":385 * part = self._part_for(name) * if part is None: * part = self.default_part # <<<<<<<<<<<<<< @@ -16427,7 +16700,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc __Pyx_DECREF_SET(__pyx_v_part, __pyx_t_6); __pyx_t_6 = 0; - /* "streaming_form_data/_parser.pyx":369 + /* "streaming_form_data/_parser.pyx":386 * if part is None: * part = self.default_part * if self.strict: # <<<<<<<<<<<<<< @@ -16436,14 +16709,14 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc */ if (__pyx_v_self->strict) { - /* "streaming_form_data/_parser.pyx":370 + /* "streaming_form_data/_parser.pyx":387 * part = self.default_part * if self.strict: * self.unexpected_part_name = name # <<<<<<<<<<<<<< * self.mark_error() * return ErrorCode.E_UNEXPECTED_PART */ - if (!(likely(PyUnicode_CheckExact(__pyx_v_name))||((__pyx_v_name) == Py_None) || __Pyx_RaiseUnexpectedTypeError("unicode", __pyx_v_name))) __PYX_ERR(0, 370, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_v_name))||((__pyx_v_name) == Py_None) || __Pyx_RaiseUnexpectedTypeError("unicode", __pyx_v_name))) __PYX_ERR(0, 387, __pyx_L1_error) __pyx_t_6 = __pyx_v_name; __Pyx_INCREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); @@ -16452,18 +16725,18 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc __pyx_v_self->unexpected_part_name = ((PyObject*)__pyx_t_6); __pyx_t_6 = 0; - /* "streaming_form_data/_parser.pyx":371 + /* "streaming_form_data/_parser.pyx":388 * if self.strict: * self.unexpected_part_name = name * self.mark_error() # <<<<<<<<<<<<<< * return ErrorCode.E_UNEXPECTED_PART * */ - __pyx_t_6 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser__Parser *)__pyx_v_self->__pyx_vtab)->mark_error(__pyx_v_self); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 371, __pyx_L1_error) + __pyx_t_6 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser__Parser *)__pyx_v_self->__pyx_vtab)->mark_error(__pyx_v_self); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 388, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "streaming_form_data/_parser.pyx":372 + /* "streaming_form_data/_parser.pyx":389 * self.unexpected_part_name = name * self.mark_error() * return ErrorCode.E_UNEXPECTED_PART # <<<<<<<<<<<<<< @@ -16471,13 +16744,13 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc * self.set_active_part(part, params.get("filename")) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_6 = __Pyx_Enum_77593a__19streaming_form_data_7_parser_enum__dunderpyx_t_19streaming_form_data_7_parser_ErrorCode__etc_to_py(__pyx_e_19streaming_form_data_7_parser_E_UNEXPECTED_PART); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 372, __pyx_L1_error) + __pyx_t_6 = __Pyx_Enum_77593a__19streaming_form_data_7_parser_enum__dunderpyx_t_19streaming_form_data_7_parser_ErrorCode__etc_to_py(__pyx_e_19streaming_form_data_7_parser_E_UNEXPECTED_PART); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 389, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; - /* "streaming_form_data/_parser.pyx":369 + /* "streaming_form_data/_parser.pyx":386 * if part is None: * part = self.default_part * if self.strict: # <<<<<<<<<<<<<< @@ -16486,7 +16759,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc */ } - /* "streaming_form_data/_parser.pyx":367 + /* "streaming_form_data/_parser.pyx":384 * if name: * part = self._part_for(name) * if part is None: # <<<<<<<<<<<<<< @@ -16495,16 +16768,16 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc */ } - /* "streaming_form_data/_parser.pyx":374 + /* "streaming_form_data/_parser.pyx":391 * return ErrorCode.E_UNEXPECTED_PART * * self.set_active_part(part, params.get("filename")) # <<<<<<<<<<<<<< * elif "content-type" in message: * if self.active_part: */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_active_part); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 374, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_active_part); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 391, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_params, __pyx_n_s_get); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 374, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_params, __pyx_n_s_get); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 391, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_10 = NULL; __pyx_t_8 = 0; @@ -16524,7 +16797,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_n_u_filename}; __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 374, __pyx_L1_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 391, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } @@ -16547,13 +16820,13 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_8, 2+__pyx_t_8); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 374, __pyx_L1_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 391, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "streaming_form_data/_parser.pyx":365 + /* "streaming_form_data/_parser.pyx":382 * name = params.get("name") * * if name: # <<<<<<<<<<<<<< @@ -16562,7 +16835,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc */ } - /* "streaming_form_data/_parser.pyx":357 + /* "streaming_form_data/_parser.pyx":374 * ) * * if "content-disposition" in message: # <<<<<<<<<<<<<< @@ -16572,44 +16845,44 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc goto __pyx_L13; } - /* "streaming_form_data/_parser.pyx":375 + /* "streaming_form_data/_parser.pyx":392 * * self.set_active_part(part, params.get("filename")) * elif "content-type" in message: # <<<<<<<<<<<<<< * if self.active_part: * self.active_part.set_multipart_content_type( */ - __pyx_t_9 = (__Pyx_PySequence_ContainsTF(__pyx_kp_u_content_type, __pyx_v_message, Py_EQ)); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 375, __pyx_L1_error) + __pyx_t_9 = (__Pyx_PySequence_ContainsTF(__pyx_kp_u_content_type, __pyx_v_message, Py_EQ)); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 392, __pyx_L1_error) if (__pyx_t_9) { - /* "streaming_form_data/_parser.pyx":376 + /* "streaming_form_data/_parser.pyx":393 * self.set_active_part(part, params.get("filename")) * elif "content-type" in message: * if self.active_part: # <<<<<<<<<<<<<< * self.active_part.set_multipart_content_type( * message.get_content_type() */ - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_self->active_part); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 376, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_self->active_part); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 393, __pyx_L1_error) if (__pyx_t_9) { - /* "streaming_form_data/_parser.pyx":377 + /* "streaming_form_data/_parser.pyx":394 * elif "content-type" in message: * if self.active_part: * self.active_part.set_multipart_content_type( # <<<<<<<<<<<<<< * message.get_content_type() * ) */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->active_part, __pyx_n_s_set_multipart_content_type); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 377, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->active_part, __pyx_n_s_set_multipart_content_type); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 394, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - /* "streaming_form_data/_parser.pyx":378 + /* "streaming_form_data/_parser.pyx":395 * if self.active_part: * self.active_part.set_multipart_content_type( * message.get_content_type() # <<<<<<<<<<<<<< * ) * */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_message, __pyx_n_s_get_content_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 378, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_message, __pyx_n_s_get_content_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 395, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_10 = NULL; __pyx_t_8 = 0; @@ -16629,7 +16902,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc PyObject *__pyx_callargs[2] = {__pyx_t_10, NULL}; __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_8, 0+__pyx_t_8); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 378, __pyx_L1_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 395, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } @@ -16652,13 +16925,13 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 377, __pyx_L1_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 394, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "streaming_form_data/_parser.pyx":376 + /* "streaming_form_data/_parser.pyx":393 * self.set_active_part(part, params.get("filename")) * elif "content-type" in message: * if self.active_part: # <<<<<<<<<<<<<< @@ -16667,7 +16940,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc */ } - /* "streaming_form_data/_parser.pyx":375 + /* "streaming_form_data/_parser.pyx":392 * * self.set_active_part(part, params.get("filename")) * elif "content-type" in message: # <<<<<<<<<<<<<< @@ -16677,7 +16950,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc } __pyx_L13:; - /* "streaming_form_data/_parser.pyx":381 + /* "streaming_form_data/_parser.pyx":398 * ) * * buffer_start = idx + 1 # <<<<<<<<<<<<<< @@ -16686,7 +16959,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc */ __pyx_v_buffer_start = (__pyx_v_idx + 1); - /* "streaming_form_data/_parser.pyx":383 + /* "streaming_form_data/_parser.pyx":400 * buffer_start = idx + 1 * * self.state = ParserState.PS_ENDED_HEADER # <<<<<<<<<<<<<< @@ -16695,7 +16968,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc */ __pyx_v_self->state = __pyx_e_19streaming_form_data_7_parser_PS_ENDED_HEADER; - /* "streaming_form_data/_parser.pyx":348 + /* "streaming_form_data/_parser.pyx":365 * self.state = ParserState.PS_ENDING_HEADER * * elif self.state == ParserState.PS_ENDING_HEADER: # <<<<<<<<<<<<<< @@ -16705,7 +16978,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc break; case __pyx_e_19streaming_form_data_7_parser_PS_ENDED_HEADER: - /* "streaming_form_data/_parser.pyx":385 + /* "streaming_form_data/_parser.pyx":402 * self.state = ParserState.PS_ENDED_HEADER * elif self.state == ParserState.PS_ENDED_HEADER: * if byte == c_cr: # <<<<<<<<<<<<<< @@ -16715,7 +16988,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc __pyx_t_9 = (__pyx_v_byte == __pyx_v_19streaming_form_data_7_parser_c_cr); if (__pyx_t_9) { - /* "streaming_form_data/_parser.pyx":386 + /* "streaming_form_data/_parser.pyx":403 * elif self.state == ParserState.PS_ENDED_HEADER: * if byte == c_cr: * self.state = ParserState.PS_ENDING_ALL_HEADERS # <<<<<<<<<<<<<< @@ -16724,7 +16997,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc */ __pyx_v_self->state = __pyx_e_19streaming_form_data_7_parser_PS_ENDING_ALL_HEADERS; - /* "streaming_form_data/_parser.pyx":385 + /* "streaming_form_data/_parser.pyx":402 * self.state = ParserState.PS_ENDED_HEADER * elif self.state == ParserState.PS_ENDED_HEADER: * if byte == c_cr: # <<<<<<<<<<<<<< @@ -16734,7 +17007,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc goto __pyx_L19; } - /* "streaming_form_data/_parser.pyx":388 + /* "streaming_form_data/_parser.pyx":405 * self.state = ParserState.PS_ENDING_ALL_HEADERS * else: * self.state = ParserState.PS_READING_HEADER # <<<<<<<<<<<<<< @@ -16746,7 +17019,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc } __pyx_L19:; - /* "streaming_form_data/_parser.pyx":384 + /* "streaming_form_data/_parser.pyx":401 * * self.state = ParserState.PS_ENDED_HEADER * elif self.state == ParserState.PS_ENDED_HEADER: # <<<<<<<<<<<<<< @@ -16756,7 +17029,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc break; case __pyx_e_19streaming_form_data_7_parser_PS_ENDING_ALL_HEADERS: - /* "streaming_form_data/_parser.pyx":391 + /* "streaming_form_data/_parser.pyx":408 * * elif self.state == ParserState.PS_ENDING_ALL_HEADERS: * if byte != c_lf: # <<<<<<<<<<<<<< @@ -16766,18 +17039,18 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc __pyx_t_9 = (__pyx_v_byte != __pyx_v_19streaming_form_data_7_parser_c_lf); if (__pyx_t_9) { - /* "streaming_form_data/_parser.pyx":392 + /* "streaming_form_data/_parser.pyx":409 * elif self.state == ParserState.PS_ENDING_ALL_HEADERS: * if byte != c_lf: * self.mark_error() # <<<<<<<<<<<<<< * return ErrorCode.E_PART_HEADERS * */ - __pyx_t_6 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser__Parser *)__pyx_v_self->__pyx_vtab)->mark_error(__pyx_v_self); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 392, __pyx_L1_error) + __pyx_t_6 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser__Parser *)__pyx_v_self->__pyx_vtab)->mark_error(__pyx_v_self); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 409, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "streaming_form_data/_parser.pyx":393 + /* "streaming_form_data/_parser.pyx":410 * if byte != c_lf: * self.mark_error() * return ErrorCode.E_PART_HEADERS # <<<<<<<<<<<<<< @@ -16785,13 +17058,13 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc * buffer_start = idx + 1 */ __Pyx_XDECREF(__pyx_r); - __pyx_t_6 = __Pyx_Enum_77593a__19streaming_form_data_7_parser_enum__dunderpyx_t_19streaming_form_data_7_parser_ErrorCode__etc_to_py(__pyx_e_19streaming_form_data_7_parser_E_PART_HEADERS); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 393, __pyx_L1_error) + __pyx_t_6 = __Pyx_Enum_77593a__19streaming_form_data_7_parser_enum__dunderpyx_t_19streaming_form_data_7_parser_ErrorCode__etc_to_py(__pyx_e_19streaming_form_data_7_parser_E_PART_HEADERS); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 410, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; - /* "streaming_form_data/_parser.pyx":391 + /* "streaming_form_data/_parser.pyx":408 * * elif self.state == ParserState.PS_ENDING_ALL_HEADERS: * if byte != c_lf: # <<<<<<<<<<<<<< @@ -16800,7 +17073,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc */ } - /* "streaming_form_data/_parser.pyx":395 + /* "streaming_form_data/_parser.pyx":412 * return ErrorCode.E_PART_HEADERS * * buffer_start = idx + 1 # <<<<<<<<<<<<<< @@ -16809,7 +17082,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc */ __pyx_v_buffer_start = (__pyx_v_idx + 1); - /* "streaming_form_data/_parser.pyx":397 + /* "streaming_form_data/_parser.pyx":414 * buffer_start = idx + 1 * * self.state = ParserState.PS_READING_BODY # <<<<<<<<<<<<<< @@ -16818,7 +17091,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc */ __pyx_v_self->state = __pyx_e_19streaming_form_data_7_parser_PS_READING_BODY; - /* "streaming_form_data/_parser.pyx":390 + /* "streaming_form_data/_parser.pyx":407 * self.state = ParserState.PS_READING_HEADER * * elif self.state == ParserState.PS_ENDING_ALL_HEADERS: # <<<<<<<<<<<<<< @@ -16828,39 +17101,39 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc break; case __pyx_e_19streaming_form_data_7_parser_PS_READING_BODY: - /* "streaming_form_data/_parser.pyx":399 + /* "streaming_form_data/_parser.pyx":416 * self.state = ParserState.PS_READING_BODY * elif self.state == ParserState.PS_READING_BODY: * self.delimiter_finder.feed(byte) # <<<<<<<<<<<<<< * self.ender_finder.feed(byte) * */ - __pyx_t_6 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser_Finder *)__pyx_v_self->delimiter_finder->__pyx_vtab)->feed(__pyx_v_self->delimiter_finder, __pyx_v_byte, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 399, __pyx_L1_error) + __pyx_t_6 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser_Finder *)__pyx_v_self->delimiter_finder->__pyx_vtab)->feed(__pyx_v_self->delimiter_finder, __pyx_v_byte, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 416, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "streaming_form_data/_parser.pyx":400 + /* "streaming_form_data/_parser.pyx":417 * elif self.state == ParserState.PS_READING_BODY: * self.delimiter_finder.feed(byte) * self.ender_finder.feed(byte) # <<<<<<<<<<<<<< * * if self.delimiter_finder.found(): */ - __pyx_t_6 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser_Finder *)__pyx_v_self->ender_finder->__pyx_vtab)->feed(__pyx_v_self->ender_finder, __pyx_v_byte, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 400, __pyx_L1_error) + __pyx_t_6 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser_Finder *)__pyx_v_self->ender_finder->__pyx_vtab)->feed(__pyx_v_self->ender_finder, __pyx_v_byte, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 417, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "streaming_form_data/_parser.pyx":402 + /* "streaming_form_data/_parser.pyx":419 * self.ender_finder.feed(byte) * * if self.delimiter_finder.found(): # <<<<<<<<<<<<<< * self.state = ParserState.PS_READING_HEADER * */ - __pyx_t_9 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser_Finder *)__pyx_v_self->delimiter_finder->__pyx_vtab)->found(__pyx_v_self->delimiter_finder, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 402, __pyx_L1_error) + __pyx_t_9 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser_Finder *)__pyx_v_self->delimiter_finder->__pyx_vtab)->found(__pyx_v_self->delimiter_finder, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 419, __pyx_L1_error) if (__pyx_t_9) { - /* "streaming_form_data/_parser.pyx":403 + /* "streaming_form_data/_parser.pyx":420 * * if self.delimiter_finder.found(): * self.state = ParserState.PS_READING_HEADER # <<<<<<<<<<<<<< @@ -16869,7 +17142,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc */ __pyx_v_self->state = __pyx_e_19streaming_form_data_7_parser_PS_READING_HEADER; - /* "streaming_form_data/_parser.pyx":405 + /* "streaming_form_data/_parser.pyx":422 * self.state = ParserState.PS_READING_HEADER * * if idx + 1 < self.delimiter_length: # <<<<<<<<<<<<<< @@ -16879,18 +17152,18 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc __pyx_t_9 = ((__pyx_v_idx + 1) < __pyx_v_self->delimiter_length); if (__pyx_t_9) { - /* "streaming_form_data/_parser.pyx":406 + /* "streaming_form_data/_parser.pyx":423 * * if idx + 1 < self.delimiter_length: * self.mark_error() # <<<<<<<<<<<<<< * return ErrorCode.E_INTERNAL * */ - __pyx_t_6 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser__Parser *)__pyx_v_self->__pyx_vtab)->mark_error(__pyx_v_self); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 406, __pyx_L1_error) + __pyx_t_6 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser__Parser *)__pyx_v_self->__pyx_vtab)->mark_error(__pyx_v_self); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 423, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "streaming_form_data/_parser.pyx":407 + /* "streaming_form_data/_parser.pyx":424 * if idx + 1 < self.delimiter_length: * self.mark_error() * return ErrorCode.E_INTERNAL # <<<<<<<<<<<<<< @@ -16898,13 +17171,13 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc * match_start = idx + 1 - self.delimiter_length */ __Pyx_XDECREF(__pyx_r); - __pyx_t_6 = __Pyx_Enum_77593a__19streaming_form_data_7_parser_enum__dunderpyx_t_19streaming_form_data_7_parser_ErrorCode__etc_to_py(__pyx_e_19streaming_form_data_7_parser_E_INTERNAL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 407, __pyx_L1_error) + __pyx_t_6 = __Pyx_Enum_77593a__19streaming_form_data_7_parser_enum__dunderpyx_t_19streaming_form_data_7_parser_ErrorCode__etc_to_py(__pyx_e_19streaming_form_data_7_parser_E_INTERNAL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 424, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; - /* "streaming_form_data/_parser.pyx":405 + /* "streaming_form_data/_parser.pyx":422 * self.state = ParserState.PS_READING_HEADER * * if idx + 1 < self.delimiter_length: # <<<<<<<<<<<<<< @@ -16913,7 +17186,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc */ } - /* "streaming_form_data/_parser.pyx":409 + /* "streaming_form_data/_parser.pyx":426 * return ErrorCode.E_INTERNAL * * match_start = idx + 1 - self.delimiter_length # <<<<<<<<<<<<<< @@ -16922,7 +17195,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc */ __pyx_v_match_start = ((__pyx_v_idx + 1) - __pyx_v_self->delimiter_length); - /* "streaming_form_data/_parser.pyx":411 + /* "streaming_form_data/_parser.pyx":428 * match_start = idx + 1 - self.delimiter_length * * if match_start >= buffer_start: # <<<<<<<<<<<<<< @@ -16932,7 +17205,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc __pyx_t_9 = (__pyx_v_match_start >= __pyx_v_buffer_start); if (__pyx_t_9) { - /* "streaming_form_data/_parser.pyx":412 + /* "streaming_form_data/_parser.pyx":429 * * if match_start >= buffer_start: * try: # <<<<<<<<<<<<<< @@ -16948,20 +17221,20 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc __Pyx_XGOTREF(__pyx_t_13); /*try:*/ { - /* "streaming_form_data/_parser.pyx":413 + /* "streaming_form_data/_parser.pyx":430 * if match_start >= buffer_start: * try: * self.on_body(chunk[buffer_start: match_start]) # <<<<<<<<<<<<<< * except Exception: * self.mark_error() */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_on_body); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 413, __pyx_L24_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_on_body); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 430, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_5); if (unlikely(__pyx_v_chunk == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 413, __pyx_L24_error) + __PYX_ERR(0, 430, __pyx_L24_error) } - __pyx_t_7 = PySequence_GetSlice(__pyx_v_chunk, __pyx_v_buffer_start, __pyx_v_match_start); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 413, __pyx_L24_error) + __pyx_t_7 = PySequence_GetSlice(__pyx_v_chunk, __pyx_v_buffer_start, __pyx_v_match_start); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 430, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_4 = NULL; __pyx_t_8 = 0; @@ -16982,13 +17255,13 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 413, __pyx_L24_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 430, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "streaming_form_data/_parser.pyx":412 + /* "streaming_form_data/_parser.pyx":429 * * if match_start >= buffer_start: * try: # <<<<<<<<<<<<<< @@ -17007,7 +17280,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "streaming_form_data/_parser.pyx":414 + /* "streaming_form_data/_parser.pyx":431 * try: * self.on_body(chunk[buffer_start: match_start]) * except Exception: # <<<<<<<<<<<<<< @@ -17017,23 +17290,23 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); if (__pyx_t_8) { __Pyx_AddTraceback("streaming_form_data._parser._Parser._parse", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_7) < 0) __PYX_ERR(0, 414, __pyx_L26_except_error) + if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_7) < 0) __PYX_ERR(0, 431, __pyx_L26_except_error) __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_7); - /* "streaming_form_data/_parser.pyx":415 + /* "streaming_form_data/_parser.pyx":432 * self.on_body(chunk[buffer_start: match_start]) * except Exception: * self.mark_error() # <<<<<<<<<<<<<< * raise * */ - __pyx_t_4 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser__Parser *)__pyx_v_self->__pyx_vtab)->mark_error(__pyx_v_self); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 415, __pyx_L26_except_error) + __pyx_t_4 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser__Parser *)__pyx_v_self->__pyx_vtab)->mark_error(__pyx_v_self); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 432, __pyx_L26_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "streaming_form_data/_parser.pyx":416 + /* "streaming_form_data/_parser.pyx":433 * except Exception: * self.mark_error() * raise # <<<<<<<<<<<<<< @@ -17045,11 +17318,11 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ErrRestoreWithState(__pyx_t_6, __pyx_t_5, __pyx_t_7); __pyx_t_6 = 0; __pyx_t_5 = 0; __pyx_t_7 = 0; - __PYX_ERR(0, 416, __pyx_L26_except_error) + __PYX_ERR(0, 433, __pyx_L26_except_error) } goto __pyx_L26_except_error; - /* "streaming_form_data/_parser.pyx":412 + /* "streaming_form_data/_parser.pyx":429 * * if match_start >= buffer_start: * try: # <<<<<<<<<<<<<< @@ -17065,7 +17338,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc __pyx_L31_try_end:; } - /* "streaming_form_data/_parser.pyx":418 + /* "streaming_form_data/_parser.pyx":435 * raise * * buffer_start = idx + 1 # <<<<<<<<<<<<<< @@ -17074,7 +17347,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc */ __pyx_v_buffer_start = (__pyx_v_idx + 1); - /* "streaming_form_data/_parser.pyx":411 + /* "streaming_form_data/_parser.pyx":428 * match_start = idx + 1 - self.delimiter_length * * if match_start >= buffer_start: # <<<<<<<<<<<<<< @@ -17084,7 +17357,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc goto __pyx_L23; } - /* "streaming_form_data/_parser.pyx":420 + /* "streaming_form_data/_parser.pyx":437 * buffer_start = idx + 1 * else: * self.mark_error() # <<<<<<<<<<<<<< @@ -17092,11 +17365,11 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc * */ /*else*/ { - __pyx_t_7 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser__Parser *)__pyx_v_self->__pyx_vtab)->mark_error(__pyx_v_self); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 420, __pyx_L1_error) + __pyx_t_7 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser__Parser *)__pyx_v_self->__pyx_vtab)->mark_error(__pyx_v_self); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 437, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "streaming_form_data/_parser.pyx":421 + /* "streaming_form_data/_parser.pyx":438 * else: * self.mark_error() * return ErrorCode.E_INTERNAL # <<<<<<<<<<<<<< @@ -17104,7 +17377,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc * self.unset_active_part() */ __Pyx_XDECREF(__pyx_r); - __pyx_t_7 = __Pyx_Enum_77593a__19streaming_form_data_7_parser_enum__dunderpyx_t_19streaming_form_data_7_parser_ErrorCode__etc_to_py(__pyx_e_19streaming_form_data_7_parser_E_INTERNAL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 421, __pyx_L1_error) + __pyx_t_7 = __Pyx_Enum_77593a__19streaming_form_data_7_parser_enum__dunderpyx_t_19streaming_form_data_7_parser_ErrorCode__etc_to_py(__pyx_e_19streaming_form_data_7_parser_E_INTERNAL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 438, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_r = __pyx_t_7; __pyx_t_7 = 0; @@ -17112,14 +17385,14 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc } __pyx_L23:; - /* "streaming_form_data/_parser.pyx":423 + /* "streaming_form_data/_parser.pyx":440 * return ErrorCode.E_INTERNAL * * self.unset_active_part() # <<<<<<<<<<<<<< * self.delimiter_finder.reset() * */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_unset_active_part); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 423, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_unset_active_part); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 440, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; __pyx_t_8 = 0; @@ -17139,24 +17412,24 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL}; __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_8, 0+__pyx_t_8); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 423, __pyx_L1_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 440, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "streaming_form_data/_parser.pyx":424 + /* "streaming_form_data/_parser.pyx":441 * * self.unset_active_part() * self.delimiter_finder.reset() # <<<<<<<<<<<<<< * * elif self.ender_finder.found(): */ - __pyx_t_7 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser_Finder *)__pyx_v_self->delimiter_finder->__pyx_vtab)->reset(__pyx_v_self->delimiter_finder); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 424, __pyx_L1_error) + __pyx_t_7 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser_Finder *)__pyx_v_self->delimiter_finder->__pyx_vtab)->reset(__pyx_v_self->delimiter_finder); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 441, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "streaming_form_data/_parser.pyx":402 + /* "streaming_form_data/_parser.pyx":419 * self.ender_finder.feed(byte) * * if self.delimiter_finder.found(): # <<<<<<<<<<<<<< @@ -17166,17 +17439,17 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc goto __pyx_L21; } - /* "streaming_form_data/_parser.pyx":426 + /* "streaming_form_data/_parser.pyx":443 * self.delimiter_finder.reset() * * elif self.ender_finder.found(): # <<<<<<<<<<<<<< * self.state = ParserState.PS_END * */ - __pyx_t_9 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser_Finder *)__pyx_v_self->ender_finder->__pyx_vtab)->found(__pyx_v_self->ender_finder, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 426, __pyx_L1_error) + __pyx_t_9 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser_Finder *)__pyx_v_self->ender_finder->__pyx_vtab)->found(__pyx_v_self->ender_finder, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 443, __pyx_L1_error) if (__pyx_t_9) { - /* "streaming_form_data/_parser.pyx":427 + /* "streaming_form_data/_parser.pyx":444 * * elif self.ender_finder.found(): * self.state = ParserState.PS_END # <<<<<<<<<<<<<< @@ -17185,7 +17458,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc */ __pyx_v_self->state = __pyx_e_19streaming_form_data_7_parser_PS_END; - /* "streaming_form_data/_parser.pyx":429 + /* "streaming_form_data/_parser.pyx":446 * self.state = ParserState.PS_END * * if idx + 1 < self.ender_length: # <<<<<<<<<<<<<< @@ -17195,18 +17468,18 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc __pyx_t_9 = ((__pyx_v_idx + 1) < __pyx_v_self->ender_length); if (__pyx_t_9) { - /* "streaming_form_data/_parser.pyx":430 + /* "streaming_form_data/_parser.pyx":447 * * if idx + 1 < self.ender_length: * self.mark_error() # <<<<<<<<<<<<<< * return ErrorCode.E_INTERNAL * match_start = idx + 1 - self.ender_length */ - __pyx_t_7 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser__Parser *)__pyx_v_self->__pyx_vtab)->mark_error(__pyx_v_self); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 430, __pyx_L1_error) + __pyx_t_7 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser__Parser *)__pyx_v_self->__pyx_vtab)->mark_error(__pyx_v_self); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 447, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "streaming_form_data/_parser.pyx":431 + /* "streaming_form_data/_parser.pyx":448 * if idx + 1 < self.ender_length: * self.mark_error() * return ErrorCode.E_INTERNAL # <<<<<<<<<<<<<< @@ -17214,13 +17487,13 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_7 = __Pyx_Enum_77593a__19streaming_form_data_7_parser_enum__dunderpyx_t_19streaming_form_data_7_parser_ErrorCode__etc_to_py(__pyx_e_19streaming_form_data_7_parser_E_INTERNAL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 431, __pyx_L1_error) + __pyx_t_7 = __Pyx_Enum_77593a__19streaming_form_data_7_parser_enum__dunderpyx_t_19streaming_form_data_7_parser_ErrorCode__etc_to_py(__pyx_e_19streaming_form_data_7_parser_E_INTERNAL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 448, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_r = __pyx_t_7; __pyx_t_7 = 0; goto __pyx_L0; - /* "streaming_form_data/_parser.pyx":429 + /* "streaming_form_data/_parser.pyx":446 * self.state = ParserState.PS_END * * if idx + 1 < self.ender_length: # <<<<<<<<<<<<<< @@ -17229,7 +17502,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc */ } - /* "streaming_form_data/_parser.pyx":432 + /* "streaming_form_data/_parser.pyx":449 * self.mark_error() * return ErrorCode.E_INTERNAL * match_start = idx + 1 - self.ender_length # <<<<<<<<<<<<<< @@ -17238,7 +17511,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc */ __pyx_v_match_start = ((__pyx_v_idx + 1) - __pyx_v_self->ender_length); - /* "streaming_form_data/_parser.pyx":434 + /* "streaming_form_data/_parser.pyx":451 * match_start = idx + 1 - self.ender_length * * if match_start >= buffer_start: # <<<<<<<<<<<<<< @@ -17248,7 +17521,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc __pyx_t_9 = (__pyx_v_match_start >= __pyx_v_buffer_start); if (__pyx_t_9) { - /* "streaming_form_data/_parser.pyx":435 + /* "streaming_form_data/_parser.pyx":452 * * if match_start >= buffer_start: * try: # <<<<<<<<<<<<<< @@ -17264,20 +17537,20 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc __Pyx_XGOTREF(__pyx_t_11); /*try:*/ { - /* "streaming_form_data/_parser.pyx":436 + /* "streaming_form_data/_parser.pyx":453 * if match_start >= buffer_start: * try: * self.on_body(chunk[buffer_start: match_start]) # <<<<<<<<<<<<<< * except Exception: * self.mark_error() */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_on_body); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 436, __pyx_L36_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_on_body); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 453, __pyx_L36_error) __Pyx_GOTREF(__pyx_t_5); if (unlikely(__pyx_v_chunk == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 436, __pyx_L36_error) + __PYX_ERR(0, 453, __pyx_L36_error) } - __pyx_t_6 = PySequence_GetSlice(__pyx_v_chunk, __pyx_v_buffer_start, __pyx_v_match_start); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 436, __pyx_L36_error) + __pyx_t_6 = PySequence_GetSlice(__pyx_v_chunk, __pyx_v_buffer_start, __pyx_v_match_start); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 453, __pyx_L36_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = NULL; __pyx_t_8 = 0; @@ -17298,13 +17571,13 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 436, __pyx_L36_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 453, __pyx_L36_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "streaming_form_data/_parser.pyx":435 + /* "streaming_form_data/_parser.pyx":452 * * if match_start >= buffer_start: * try: # <<<<<<<<<<<<<< @@ -17323,7 +17596,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "streaming_form_data/_parser.pyx":437 + /* "streaming_form_data/_parser.pyx":454 * try: * self.on_body(chunk[buffer_start: match_start]) * except Exception: # <<<<<<<<<<<<<< @@ -17333,23 +17606,23 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); if (__pyx_t_8) { __Pyx_AddTraceback("streaming_form_data._parser._Parser._parse", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_5, &__pyx_t_6) < 0) __PYX_ERR(0, 437, __pyx_L38_except_error) + if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_5, &__pyx_t_6) < 0) __PYX_ERR(0, 454, __pyx_L38_except_error) __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); - /* "streaming_form_data/_parser.pyx":438 + /* "streaming_form_data/_parser.pyx":455 * self.on_body(chunk[buffer_start: match_start]) * except Exception: * self.mark_error() # <<<<<<<<<<<<<< * raise * else: */ - __pyx_t_4 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser__Parser *)__pyx_v_self->__pyx_vtab)->mark_error(__pyx_v_self); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 438, __pyx_L38_except_error) + __pyx_t_4 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser__Parser *)__pyx_v_self->__pyx_vtab)->mark_error(__pyx_v_self); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 455, __pyx_L38_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "streaming_form_data/_parser.pyx":439 + /* "streaming_form_data/_parser.pyx":456 * except Exception: * self.mark_error() * raise # <<<<<<<<<<<<<< @@ -17361,11 +17634,11 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ErrRestoreWithState(__pyx_t_7, __pyx_t_5, __pyx_t_6); __pyx_t_7 = 0; __pyx_t_5 = 0; __pyx_t_6 = 0; - __PYX_ERR(0, 439, __pyx_L38_except_error) + __PYX_ERR(0, 456, __pyx_L38_except_error) } goto __pyx_L38_except_error; - /* "streaming_form_data/_parser.pyx":435 + /* "streaming_form_data/_parser.pyx":452 * * if match_start >= buffer_start: * try: # <<<<<<<<<<<<<< @@ -17381,7 +17654,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc __pyx_L43_try_end:; } - /* "streaming_form_data/_parser.pyx":434 + /* "streaming_form_data/_parser.pyx":451 * match_start = idx + 1 - self.ender_length * * if match_start >= buffer_start: # <<<<<<<<<<<<<< @@ -17391,7 +17664,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc goto __pyx_L35; } - /* "streaming_form_data/_parser.pyx":441 + /* "streaming_form_data/_parser.pyx":458 * raise * else: * self.mark_error() # <<<<<<<<<<<<<< @@ -17399,11 +17672,11 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc * */ /*else*/ { - __pyx_t_6 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser__Parser *)__pyx_v_self->__pyx_vtab)->mark_error(__pyx_v_self); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 441, __pyx_L1_error) + __pyx_t_6 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser__Parser *)__pyx_v_self->__pyx_vtab)->mark_error(__pyx_v_self); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 458, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "streaming_form_data/_parser.pyx":442 + /* "streaming_form_data/_parser.pyx":459 * else: * self.mark_error() * return ErrorCode.E_INTERNAL # <<<<<<<<<<<<<< @@ -17411,7 +17684,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc * buffer_start = idx + 1 */ __Pyx_XDECREF(__pyx_r); - __pyx_t_6 = __Pyx_Enum_77593a__19streaming_form_data_7_parser_enum__dunderpyx_t_19streaming_form_data_7_parser_ErrorCode__etc_to_py(__pyx_e_19streaming_form_data_7_parser_E_INTERNAL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 442, __pyx_L1_error) + __pyx_t_6 = __Pyx_Enum_77593a__19streaming_form_data_7_parser_enum__dunderpyx_t_19streaming_form_data_7_parser_ErrorCode__etc_to_py(__pyx_e_19streaming_form_data_7_parser_E_INTERNAL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 459, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_r = __pyx_t_6; __pyx_t_6 = 0; @@ -17419,7 +17692,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc } __pyx_L35:; - /* "streaming_form_data/_parser.pyx":444 + /* "streaming_form_data/_parser.pyx":461 * return ErrorCode.E_INTERNAL * * buffer_start = idx + 1 # <<<<<<<<<<<<<< @@ -17428,14 +17701,14 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc */ __pyx_v_buffer_start = (__pyx_v_idx + 1); - /* "streaming_form_data/_parser.pyx":446 + /* "streaming_form_data/_parser.pyx":463 * buffer_start = idx + 1 * * self.unset_active_part() # <<<<<<<<<<<<<< * self.ender_finder.reset() * */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_unset_active_part); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 446, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_unset_active_part); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 463, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = NULL; __pyx_t_8 = 0; @@ -17455,24 +17728,24 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL}; __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_8, 0+__pyx_t_8); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 446, __pyx_L1_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 463, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "streaming_form_data/_parser.pyx":447 + /* "streaming_form_data/_parser.pyx":464 * * self.unset_active_part() * self.ender_finder.reset() # <<<<<<<<<<<<<< * * else: */ - __pyx_t_6 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser_Finder *)__pyx_v_self->ender_finder->__pyx_vtab)->reset(__pyx_v_self->ender_finder); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 447, __pyx_L1_error) + __pyx_t_6 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser_Finder *)__pyx_v_self->ender_finder->__pyx_vtab)->reset(__pyx_v_self->ender_finder); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 464, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "streaming_form_data/_parser.pyx":426 + /* "streaming_form_data/_parser.pyx":443 * self.delimiter_finder.reset() * * elif self.ender_finder.found(): # <<<<<<<<<<<<<< @@ -17482,7 +17755,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc goto __pyx_L21; } - /* "streaming_form_data/_parser.pyx":455 + /* "streaming_form_data/_parser.pyx":472 * # middle of a potential delimiter. * * if self.delimiter_finder.inactive(): # <<<<<<<<<<<<<< @@ -17490,20 +17763,20 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc * chunk_ptr, idx + 1, chunk_len - 1 */ /*else*/ { - __pyx_t_9 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser_Finder *)__pyx_v_self->delimiter_finder->__pyx_vtab)->inactive(__pyx_v_self->delimiter_finder, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 455, __pyx_L1_error) + __pyx_t_9 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser_Finder *)__pyx_v_self->delimiter_finder->__pyx_vtab)->inactive(__pyx_v_self->delimiter_finder, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 472, __pyx_L1_error) if (__pyx_t_9) { - /* "streaming_form_data/_parser.pyx":456 + /* "streaming_form_data/_parser.pyx":473 * * if self.delimiter_finder.inactive(): * skip_count = self.rewind_fast_forward( # <<<<<<<<<<<<<< * chunk_ptr, idx + 1, chunk_len - 1 * ) */ - __pyx_t_14 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser__Parser *)__pyx_v_self->__pyx_vtab)->rewind_fast_forward(__pyx_v_self, __pyx_v_chunk_ptr, (__pyx_v_idx + 1), (__pyx_v_chunk_len - 1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 456, __pyx_L1_error) + __pyx_t_14 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser__Parser *)__pyx_v_self->__pyx_vtab)->rewind_fast_forward(__pyx_v_self, __pyx_v_chunk_ptr, (__pyx_v_idx + 1), (__pyx_v_chunk_len - 1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 473, __pyx_L1_error) __pyx_v_skip_count = __pyx_t_14; - /* "streaming_form_data/_parser.pyx":459 + /* "streaming_form_data/_parser.pyx":476 * chunk_ptr, idx + 1, chunk_len - 1 * ) * idx += skip_count # <<<<<<<<<<<<<< @@ -17512,7 +17785,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc */ __pyx_v_idx = (__pyx_v_idx + __pyx_v_skip_count); - /* "streaming_form_data/_parser.pyx":455 + /* "streaming_form_data/_parser.pyx":472 * # middle of a potential delimiter. * * if self.delimiter_finder.inactive(): # <<<<<<<<<<<<<< @@ -17523,7 +17796,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc } __pyx_L21:; - /* "streaming_form_data/_parser.pyx":398 + /* "streaming_form_data/_parser.pyx":415 * * self.state = ParserState.PS_READING_BODY * elif self.state == ParserState.PS_READING_BODY: # <<<<<<<<<<<<<< @@ -17533,7 +17806,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc break; case __pyx_e_19streaming_form_data_7_parser_PS_END: - /* "streaming_form_data/_parser.pyx":462 + /* "streaming_form_data/_parser.pyx":479 * * elif self.state == ParserState.PS_END: * return ErrorCode.E_OK # <<<<<<<<<<<<<< @@ -17541,13 +17814,13 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc * self.mark_error() */ __Pyx_XDECREF(__pyx_r); - __pyx_t_6 = __Pyx_Enum_77593a__19streaming_form_data_7_parser_enum__dunderpyx_t_19streaming_form_data_7_parser_ErrorCode__etc_to_py(__pyx_e_19streaming_form_data_7_parser_E_OK); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 462, __pyx_L1_error) + __pyx_t_6 = __Pyx_Enum_77593a__19streaming_form_data_7_parser_enum__dunderpyx_t_19streaming_form_data_7_parser_ErrorCode__etc_to_py(__pyx_e_19streaming_form_data_7_parser_E_OK); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 479, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; - /* "streaming_form_data/_parser.pyx":461 + /* "streaming_form_data/_parser.pyx":478 * idx += skip_count * * elif self.state == ParserState.PS_END: # <<<<<<<<<<<<<< @@ -17557,18 +17830,18 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc break; default: - /* "streaming_form_data/_parser.pyx":464 + /* "streaming_form_data/_parser.pyx":481 * return ErrorCode.E_OK * else: * self.mark_error() # <<<<<<<<<<<<<< * return ErrorCode.E_INTERNAL * */ - __pyx_t_6 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser__Parser *)__pyx_v_self->__pyx_vtab)->mark_error(__pyx_v_self); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 464, __pyx_L1_error) + __pyx_t_6 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser__Parser *)__pyx_v_self->__pyx_vtab)->mark_error(__pyx_v_self); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 481, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "streaming_form_data/_parser.pyx":465 + /* "streaming_form_data/_parser.pyx":482 * else: * self.mark_error() * return ErrorCode.E_INTERNAL # <<<<<<<<<<<<<< @@ -17576,7 +17849,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc * idx += 1 */ __Pyx_XDECREF(__pyx_r); - __pyx_t_6 = __Pyx_Enum_77593a__19streaming_form_data_7_parser_enum__dunderpyx_t_19streaming_form_data_7_parser_ErrorCode__etc_to_py(__pyx_e_19streaming_form_data_7_parser_E_INTERNAL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 465, __pyx_L1_error) + __pyx_t_6 = __Pyx_Enum_77593a__19streaming_form_data_7_parser_enum__dunderpyx_t_19streaming_form_data_7_parser_ErrorCode__etc_to_py(__pyx_e_19streaming_form_data_7_parser_E_INTERNAL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 482, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_r = __pyx_t_6; __pyx_t_6 = 0; @@ -17584,7 +17857,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc break; } - /* "streaming_form_data/_parser.pyx":467 + /* "streaming_form_data/_parser.pyx":484 * return ErrorCode.E_INTERNAL * * idx += 1 # <<<<<<<<<<<<<< @@ -17594,7 +17867,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc __pyx_v_idx = (__pyx_v_idx + 1); } - /* "streaming_form_data/_parser.pyx":469 + /* "streaming_form_data/_parser.pyx":486 * idx += 1 * * if idx != chunk_len: # <<<<<<<<<<<<<< @@ -17604,18 +17877,18 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc __pyx_t_9 = (__pyx_v_idx != __pyx_v_chunk_len); if (__pyx_t_9) { - /* "streaming_form_data/_parser.pyx":470 + /* "streaming_form_data/_parser.pyx":487 * * if idx != chunk_len: * self.mark_error() # <<<<<<<<<<<<<< * return ErrorCode.E_INTERNAL * */ - __pyx_t_6 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser__Parser *)__pyx_v_self->__pyx_vtab)->mark_error(__pyx_v_self); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 470, __pyx_L1_error) + __pyx_t_6 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser__Parser *)__pyx_v_self->__pyx_vtab)->mark_error(__pyx_v_self); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 487, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "streaming_form_data/_parser.pyx":471 + /* "streaming_form_data/_parser.pyx":488 * if idx != chunk_len: * self.mark_error() * return ErrorCode.E_INTERNAL # <<<<<<<<<<<<<< @@ -17623,13 +17896,13 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc * if buffer_start > chunk_len: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_6 = __Pyx_Enum_77593a__19streaming_form_data_7_parser_enum__dunderpyx_t_19streaming_form_data_7_parser_ErrorCode__etc_to_py(__pyx_e_19streaming_form_data_7_parser_E_INTERNAL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 471, __pyx_L1_error) + __pyx_t_6 = __Pyx_Enum_77593a__19streaming_form_data_7_parser_enum__dunderpyx_t_19streaming_form_data_7_parser_ErrorCode__etc_to_py(__pyx_e_19streaming_form_data_7_parser_E_INTERNAL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 488, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; - /* "streaming_form_data/_parser.pyx":469 + /* "streaming_form_data/_parser.pyx":486 * idx += 1 * * if idx != chunk_len: # <<<<<<<<<<<<<< @@ -17638,7 +17911,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc */ } - /* "streaming_form_data/_parser.pyx":473 + /* "streaming_form_data/_parser.pyx":490 * return ErrorCode.E_INTERNAL * * if buffer_start > chunk_len: # <<<<<<<<<<<<<< @@ -17648,18 +17921,18 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc __pyx_t_9 = (__pyx_v_buffer_start > __pyx_v_chunk_len); if (__pyx_t_9) { - /* "streaming_form_data/_parser.pyx":474 + /* "streaming_form_data/_parser.pyx":491 * * if buffer_start > chunk_len: * self.mark_error() # <<<<<<<<<<<<<< * return ErrorCode.E_INTERNAL * */ - __pyx_t_6 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser__Parser *)__pyx_v_self->__pyx_vtab)->mark_error(__pyx_v_self); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 474, __pyx_L1_error) + __pyx_t_6 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser__Parser *)__pyx_v_self->__pyx_vtab)->mark_error(__pyx_v_self); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 491, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "streaming_form_data/_parser.pyx":475 + /* "streaming_form_data/_parser.pyx":492 * if buffer_start > chunk_len: * self.mark_error() * return ErrorCode.E_INTERNAL # <<<<<<<<<<<<<< @@ -17667,13 +17940,13 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc * if self.state == ParserState.PS_READING_BODY: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_6 = __Pyx_Enum_77593a__19streaming_form_data_7_parser_enum__dunderpyx_t_19streaming_form_data_7_parser_ErrorCode__etc_to_py(__pyx_e_19streaming_form_data_7_parser_E_INTERNAL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 475, __pyx_L1_error) + __pyx_t_6 = __Pyx_Enum_77593a__19streaming_form_data_7_parser_enum__dunderpyx_t_19streaming_form_data_7_parser_ErrorCode__etc_to_py(__pyx_e_19streaming_form_data_7_parser_E_INTERNAL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 492, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; - /* "streaming_form_data/_parser.pyx":473 + /* "streaming_form_data/_parser.pyx":490 * return ErrorCode.E_INTERNAL * * if buffer_start > chunk_len: # <<<<<<<<<<<<<< @@ -17682,7 +17955,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc */ } - /* "streaming_form_data/_parser.pyx":477 + /* "streaming_form_data/_parser.pyx":494 * return ErrorCode.E_INTERNAL * * if self.state == ParserState.PS_READING_BODY: # <<<<<<<<<<<<<< @@ -17692,25 +17965,25 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc __pyx_t_9 = (__pyx_v_self->state == __pyx_e_19streaming_form_data_7_parser_PS_READING_BODY); if (__pyx_t_9) { - /* "streaming_form_data/_parser.pyx":480 + /* "streaming_form_data/_parser.pyx":497 * matched_length = max( * self.delimiter_finder.matched_length(), * self.ender_finder.matched_length() # <<<<<<<<<<<<<< * ) * match_start = idx - matched_length */ - __pyx_t_14 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser_Finder *)__pyx_v_self->ender_finder->__pyx_vtab)->matched_length(__pyx_v_self->ender_finder); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 480, __pyx_L1_error) + __pyx_t_14 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser_Finder *)__pyx_v_self->ender_finder->__pyx_vtab)->matched_length(__pyx_v_self->ender_finder); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 497, __pyx_L1_error) - /* "streaming_form_data/_parser.pyx":479 + /* "streaming_form_data/_parser.pyx":496 * if self.state == ParserState.PS_READING_BODY: * matched_length = max( * self.delimiter_finder.matched_length(), # <<<<<<<<<<<<<< * self.ender_finder.matched_length() * ) */ - __pyx_t_15 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser_Finder *)__pyx_v_self->delimiter_finder->__pyx_vtab)->matched_length(__pyx_v_self->delimiter_finder); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 479, __pyx_L1_error) + __pyx_t_15 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser_Finder *)__pyx_v_self->delimiter_finder->__pyx_vtab)->matched_length(__pyx_v_self->delimiter_finder); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 496, __pyx_L1_error) - /* "streaming_form_data/_parser.pyx":480 + /* "streaming_form_data/_parser.pyx":497 * matched_length = max( * self.delimiter_finder.matched_length(), * self.ender_finder.matched_length() # <<<<<<<<<<<<<< @@ -17725,7 +17998,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc } __pyx_v_matched_length = __pyx_t_16; - /* "streaming_form_data/_parser.pyx":482 + /* "streaming_form_data/_parser.pyx":499 * self.ender_finder.matched_length() * ) * match_start = idx - matched_length # <<<<<<<<<<<<<< @@ -17734,7 +18007,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc */ __pyx_v_match_start = (__pyx_v_idx - __pyx_v_matched_length); - /* "streaming_form_data/_parser.pyx":484 + /* "streaming_form_data/_parser.pyx":501 * match_start = idx - matched_length * * if match_start >= buffer_start + c_min_file_body_chunk_size: # <<<<<<<<<<<<<< @@ -17744,7 +18017,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc __pyx_t_9 = (__pyx_v_match_start >= (__pyx_v_buffer_start + __pyx_v_19streaming_form_data_7_parser_c_min_file_body_chunk_size)); if (__pyx_t_9) { - /* "streaming_form_data/_parser.pyx":485 + /* "streaming_form_data/_parser.pyx":502 * * if match_start >= buffer_start + c_min_file_body_chunk_size: * try: # <<<<<<<<<<<<<< @@ -17760,20 +18033,20 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc __Pyx_XGOTREF(__pyx_t_13); /*try:*/ { - /* "streaming_form_data/_parser.pyx":486 + /* "streaming_form_data/_parser.pyx":503 * if match_start >= buffer_start + c_min_file_body_chunk_size: * try: * self.on_body(chunk[buffer_start: match_start]) # <<<<<<<<<<<<<< * except Exception: * self.mark_error() */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_on_body); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 486, __pyx_L51_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_on_body); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 503, __pyx_L51_error) __Pyx_GOTREF(__pyx_t_5); if (unlikely(__pyx_v_chunk == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 486, __pyx_L51_error) + __PYX_ERR(0, 503, __pyx_L51_error) } - __pyx_t_7 = PySequence_GetSlice(__pyx_v_chunk, __pyx_v_buffer_start, __pyx_v_match_start); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 486, __pyx_L51_error) + __pyx_t_7 = PySequence_GetSlice(__pyx_v_chunk, __pyx_v_buffer_start, __pyx_v_match_start); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 503, __pyx_L51_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_4 = NULL; __pyx_t_8 = 0; @@ -17794,13 +18067,13 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 486, __pyx_L51_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 503, __pyx_L51_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "streaming_form_data/_parser.pyx":485 + /* "streaming_form_data/_parser.pyx":502 * * if match_start >= buffer_start + c_min_file_body_chunk_size: * try: # <<<<<<<<<<<<<< @@ -17819,7 +18092,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "streaming_form_data/_parser.pyx":487 + /* "streaming_form_data/_parser.pyx":504 * try: * self.on_body(chunk[buffer_start: match_start]) * except Exception: # <<<<<<<<<<<<<< @@ -17829,23 +18102,23 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); if (__pyx_t_8) { __Pyx_AddTraceback("streaming_form_data._parser._Parser._parse", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_7) < 0) __PYX_ERR(0, 487, __pyx_L53_except_error) + if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_7) < 0) __PYX_ERR(0, 504, __pyx_L53_except_error) __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_7); - /* "streaming_form_data/_parser.pyx":488 + /* "streaming_form_data/_parser.pyx":505 * self.on_body(chunk[buffer_start: match_start]) * except Exception: * self.mark_error() # <<<<<<<<<<<<<< * raise * */ - __pyx_t_4 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser__Parser *)__pyx_v_self->__pyx_vtab)->mark_error(__pyx_v_self); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 488, __pyx_L53_except_error) + __pyx_t_4 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser__Parser *)__pyx_v_self->__pyx_vtab)->mark_error(__pyx_v_self); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 505, __pyx_L53_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "streaming_form_data/_parser.pyx":489 + /* "streaming_form_data/_parser.pyx":506 * except Exception: * self.mark_error() * raise # <<<<<<<<<<<<<< @@ -17857,11 +18130,11 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ErrRestoreWithState(__pyx_t_6, __pyx_t_5, __pyx_t_7); __pyx_t_6 = 0; __pyx_t_5 = 0; __pyx_t_7 = 0; - __PYX_ERR(0, 489, __pyx_L53_except_error) + __PYX_ERR(0, 506, __pyx_L53_except_error) } goto __pyx_L53_except_error; - /* "streaming_form_data/_parser.pyx":485 + /* "streaming_form_data/_parser.pyx":502 * * if match_start >= buffer_start + c_min_file_body_chunk_size: * try: # <<<<<<<<<<<<<< @@ -17877,7 +18150,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc __pyx_L56_try_end:; } - /* "streaming_form_data/_parser.pyx":491 + /* "streaming_form_data/_parser.pyx":508 * raise * * buffer_start = match_start # <<<<<<<<<<<<<< @@ -17886,7 +18159,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc */ __pyx_v_buffer_start = __pyx_v_match_start; - /* "streaming_form_data/_parser.pyx":484 + /* "streaming_form_data/_parser.pyx":501 * match_start = idx - matched_length * * if match_start >= buffer_start + c_min_file_body_chunk_size: # <<<<<<<<<<<<<< @@ -17895,7 +18168,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc */ } - /* "streaming_form_data/_parser.pyx":477 + /* "streaming_form_data/_parser.pyx":494 * return ErrorCode.E_INTERNAL * * if self.state == ParserState.PS_READING_BODY: # <<<<<<<<<<<<<< @@ -17904,7 +18177,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc */ } - /* "streaming_form_data/_parser.pyx":493 + /* "streaming_form_data/_parser.pyx":510 * buffer_start = match_start * * if idx - buffer_start > 0: # <<<<<<<<<<<<<< @@ -17914,7 +18187,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc __pyx_t_9 = ((__pyx_v_idx - __pyx_v_buffer_start) > 0); if (__pyx_t_9) { - /* "streaming_form_data/_parser.pyx":494 + /* "streaming_form_data/_parser.pyx":511 * * if idx - buffer_start > 0: * self._leftover_buffer = chunk[buffer_start: idx] # <<<<<<<<<<<<<< @@ -17923,9 +18196,9 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc */ if (unlikely(__pyx_v_chunk == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 494, __pyx_L1_error) + __PYX_ERR(0, 511, __pyx_L1_error) } - __pyx_t_7 = PySequence_GetSlice(__pyx_v_chunk, __pyx_v_buffer_start, __pyx_v_idx); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 494, __pyx_L1_error) + __pyx_t_7 = PySequence_GetSlice(__pyx_v_chunk, __pyx_v_buffer_start, __pyx_v_idx); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 511, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __Pyx_GOTREF(__pyx_v_self->_leftover_buffer); @@ -17933,7 +18206,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc __pyx_v_self->_leftover_buffer = ((PyObject*)__pyx_t_7); __pyx_t_7 = 0; - /* "streaming_form_data/_parser.pyx":493 + /* "streaming_form_data/_parser.pyx":510 * buffer_start = match_start * * if idx - buffer_start > 0: # <<<<<<<<<<<<<< @@ -17942,7 +18215,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc */ } - /* "streaming_form_data/_parser.pyx":496 + /* "streaming_form_data/_parser.pyx":513 * self._leftover_buffer = chunk[buffer_start: idx] * * return ErrorCode.E_OK # <<<<<<<<<<<<<< @@ -17950,14 +18223,14 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc * cdef size_t rewind_fast_forward( */ __Pyx_XDECREF(__pyx_r); - __pyx_t_7 = __Pyx_Enum_77593a__19streaming_form_data_7_parser_enum__dunderpyx_t_19streaming_form_data_7_parser_ErrorCode__etc_to_py(__pyx_e_19streaming_form_data_7_parser_E_OK); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 496, __pyx_L1_error) + __pyx_t_7 = __Pyx_Enum_77593a__19streaming_form_data_7_parser_enum__dunderpyx_t_19streaming_form_data_7_parser_ErrorCode__etc_to_py(__pyx_e_19streaming_form_data_7_parser_E_OK); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 513, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_r = __pyx_t_7; __pyx_t_7 = 0; goto __pyx_L0; - /* "streaming_form_data/_parser.pyx":290 - * return (chunk, index) + /* "streaming_form_data/_parser.pyx":311 + * self.mark_error() * * def _parse(self, bytes chunk, size_t index): # <<<<<<<<<<<<<< * cdef size_t idx, buffer_start, chunk_len @@ -17983,7 +18256,7 @@ static PyObject *__pyx_pf_19streaming_form_data_7_parser_7_Parser_24_parse(struc return __pyx_r; } -/* "streaming_form_data/_parser.pyx":498 +/* "streaming_form_data/_parser.pyx":515 * return ErrorCode.E_OK * * cdef size_t rewind_fast_forward( # <<<<<<<<<<<<<< @@ -18005,7 +18278,7 @@ static size_t __pyx_f_19streaming_form_data_7_parser_7_Parser_rewind_fast_forwar int __pyx_clineno = 0; __Pyx_RefNannySetupContext("rewind_fast_forward", 1); - /* "streaming_form_data/_parser.pyx":511 + /* "streaming_form_data/_parser.pyx":528 * * # we need at least 4 characters in buffer * if pos_first + 3 > pos_last: # <<<<<<<<<<<<<< @@ -18015,7 +18288,7 @@ static size_t __pyx_f_19streaming_form_data_7_parser_7_Parser_rewind_fast_forwar __pyx_t_1 = ((__pyx_v_pos_first + 3) > __pyx_v_pos_last); if (__pyx_t_1) { - /* "streaming_form_data/_parser.pyx":512 + /* "streaming_form_data/_parser.pyx":529 * # we need at least 4 characters in buffer * if pos_first + 3 > pos_last: * return 0 # <<<<<<<<<<<<<< @@ -18025,7 +18298,7 @@ static size_t __pyx_f_19streaming_form_data_7_parser_7_Parser_rewind_fast_forwar __pyx_r = 0; goto __pyx_L0; - /* "streaming_form_data/_parser.pyx":511 + /* "streaming_form_data/_parser.pyx":528 * * # we need at least 4 characters in buffer * if pos_first + 3 > pos_last: # <<<<<<<<<<<<<< @@ -18034,7 +18307,7 @@ static size_t __pyx_f_19streaming_form_data_7_parser_7_Parser_rewind_fast_forwar */ } - /* "streaming_form_data/_parser.pyx":516 + /* "streaming_form_data/_parser.pyx":533 * # calculate pointer to the first character of the buffer and the * # pointer to a character after the end of the buffer * ptr = chunk_ptr + pos_first + 3 # <<<<<<<<<<<<<< @@ -18043,7 +18316,7 @@ static size_t __pyx_f_19streaming_form_data_7_parser_7_Parser_rewind_fast_forwar */ __pyx_v_ptr = ((__pyx_v_chunk_ptr + __pyx_v_pos_first) + 3); - /* "streaming_form_data/_parser.pyx":517 + /* "streaming_form_data/_parser.pyx":534 * # pointer to a character after the end of the buffer * ptr = chunk_ptr + pos_first + 3 * ptr_end = chunk_ptr + pos_last + 1 # <<<<<<<<<<<<<< @@ -18052,7 +18325,7 @@ static size_t __pyx_f_19streaming_form_data_7_parser_7_Parser_rewind_fast_forwar */ __pyx_v_ptr_end = ((__pyx_v_chunk_ptr + __pyx_v_pos_last) + 1); - /* "streaming_form_data/_parser.pyx":518 + /* "streaming_form_data/_parser.pyx":535 * ptr = chunk_ptr + pos_first + 3 * ptr_end = chunk_ptr + pos_last + 1 * skipped = 0 # <<<<<<<<<<<<<< @@ -18061,7 +18334,7 @@ static size_t __pyx_f_19streaming_form_data_7_parser_7_Parser_rewind_fast_forwar */ __pyx_v_skipped = 0; - /* "streaming_form_data/_parser.pyx":525 + /* "streaming_form_data/_parser.pyx":542 * # is found. * * while True: # <<<<<<<<<<<<<< @@ -18070,7 +18343,7 @@ static size_t __pyx_f_19streaming_form_data_7_parser_7_Parser_rewind_fast_forwar */ while (1) { - /* "streaming_form_data/_parser.pyx":526 + /* "streaming_form_data/_parser.pyx":543 * * while True: * if ptr >= ptr_end: # <<<<<<<<<<<<<< @@ -18080,7 +18353,7 @@ static size_t __pyx_f_19streaming_form_data_7_parser_7_Parser_rewind_fast_forwar __pyx_t_1 = (__pyx_v_ptr >= __pyx_v_ptr_end); if (__pyx_t_1) { - /* "streaming_form_data/_parser.pyx":529 + /* "streaming_form_data/_parser.pyx":546 * # normalize pointer value because we could jump few characters * # past the buffer end * ptr = ptr_end - 1 # <<<<<<<<<<<<<< @@ -18089,7 +18362,7 @@ static size_t __pyx_f_19streaming_form_data_7_parser_7_Parser_rewind_fast_forwar */ __pyx_v_ptr = (__pyx_v_ptr_end - 1); - /* "streaming_form_data/_parser.pyx":534 + /* "streaming_form_data/_parser.pyx":551 * # keep up to 3 characters in the buffer until next chunk * # guess we will skip all characters in the buffer * skipped = pos_last - pos_first + 1 # <<<<<<<<<<<<<< @@ -18098,7 +18371,7 @@ static size_t __pyx_f_19streaming_form_data_7_parser_7_Parser_rewind_fast_forwar */ __pyx_v_skipped = ((__pyx_v_pos_last - __pyx_v_pos_first) + 1); - /* "streaming_form_data/_parser.pyx":536 + /* "streaming_form_data/_parser.pyx":553 * skipped = pos_last - pos_first + 1 * * if ptr[0] == c_cr: # <<<<<<<<<<<<<< @@ -18108,7 +18381,7 @@ static size_t __pyx_f_19streaming_form_data_7_parser_7_Parser_rewind_fast_forwar __pyx_t_1 = ((__pyx_v_ptr[0]) == __pyx_v_19streaming_form_data_7_parser_c_cr); if (__pyx_t_1) { - /* "streaming_form_data/_parser.pyx":537 + /* "streaming_form_data/_parser.pyx":554 * * if ptr[0] == c_cr: * skipped = skipped - 1 # <<<<<<<<<<<<<< @@ -18117,7 +18390,7 @@ static size_t __pyx_f_19streaming_form_data_7_parser_7_Parser_rewind_fast_forwar */ __pyx_v_skipped = (__pyx_v_skipped - 1); - /* "streaming_form_data/_parser.pyx":536 + /* "streaming_form_data/_parser.pyx":553 * skipped = pos_last - pos_first + 1 * * if ptr[0] == c_cr: # <<<<<<<<<<<<<< @@ -18127,7 +18400,7 @@ static size_t __pyx_f_19streaming_form_data_7_parser_7_Parser_rewind_fast_forwar goto __pyx_L7; } - /* "streaming_form_data/_parser.pyx":538 + /* "streaming_form_data/_parser.pyx":555 * if ptr[0] == c_cr: * skipped = skipped - 1 * elif ptr[0] == c_lf and ptr[-1] == c_cr: # <<<<<<<<<<<<<< @@ -18145,7 +18418,7 @@ static size_t __pyx_f_19streaming_form_data_7_parser_7_Parser_rewind_fast_forwar __pyx_L8_bool_binop_done:; if (__pyx_t_1) { - /* "streaming_form_data/_parser.pyx":539 + /* "streaming_form_data/_parser.pyx":556 * skipped = skipped - 1 * elif ptr[0] == c_lf and ptr[-1] == c_cr: * skipped = skipped - 2 # <<<<<<<<<<<<<< @@ -18154,7 +18427,7 @@ static size_t __pyx_f_19streaming_form_data_7_parser_7_Parser_rewind_fast_forwar */ __pyx_v_skipped = (__pyx_v_skipped - 2); - /* "streaming_form_data/_parser.pyx":538 + /* "streaming_form_data/_parser.pyx":555 * if ptr[0] == c_cr: * skipped = skipped - 1 * elif ptr[0] == c_lf and ptr[-1] == c_cr: # <<<<<<<<<<<<<< @@ -18164,7 +18437,7 @@ static size_t __pyx_f_19streaming_form_data_7_parser_7_Parser_rewind_fast_forwar goto __pyx_L7; } - /* "streaming_form_data/_parser.pyx":541 + /* "streaming_form_data/_parser.pyx":558 * skipped = skipped - 2 * elif ( * ptr[0] == c_hyphen # <<<<<<<<<<<<<< @@ -18178,7 +18451,7 @@ static size_t __pyx_f_19streaming_form_data_7_parser_7_Parser_rewind_fast_forwar goto __pyx_L10_bool_binop_done; } - /* "streaming_form_data/_parser.pyx":542 + /* "streaming_form_data/_parser.pyx":559 * elif ( * ptr[0] == c_hyphen * and ptr[-1] == c_lf # <<<<<<<<<<<<<< @@ -18192,7 +18465,7 @@ static size_t __pyx_f_19streaming_form_data_7_parser_7_Parser_rewind_fast_forwar goto __pyx_L10_bool_binop_done; } - /* "streaming_form_data/_parser.pyx":543 + /* "streaming_form_data/_parser.pyx":560 * ptr[0] == c_hyphen * and ptr[-1] == c_lf * and ptr[-2] == c_cr # <<<<<<<<<<<<<< @@ -18203,7 +18476,7 @@ static size_t __pyx_f_19streaming_form_data_7_parser_7_Parser_rewind_fast_forwar __pyx_t_1 = __pyx_t_2; __pyx_L10_bool_binop_done:; - /* "streaming_form_data/_parser.pyx":540 + /* "streaming_form_data/_parser.pyx":557 * elif ptr[0] == c_lf and ptr[-1] == c_cr: * skipped = skipped - 2 * elif ( # <<<<<<<<<<<<<< @@ -18212,7 +18485,7 @@ static size_t __pyx_f_19streaming_form_data_7_parser_7_Parser_rewind_fast_forwar */ if (__pyx_t_1) { - /* "streaming_form_data/_parser.pyx":545 + /* "streaming_form_data/_parser.pyx":562 * and ptr[-2] == c_cr * ): * skipped = skipped - 3 # <<<<<<<<<<<<<< @@ -18221,7 +18494,7 @@ static size_t __pyx_f_19streaming_form_data_7_parser_7_Parser_rewind_fast_forwar */ __pyx_v_skipped = (__pyx_v_skipped - 3); - /* "streaming_form_data/_parser.pyx":540 + /* "streaming_form_data/_parser.pyx":557 * elif ptr[0] == c_lf and ptr[-1] == c_cr: * skipped = skipped - 2 * elif ( # <<<<<<<<<<<<<< @@ -18231,7 +18504,7 @@ static size_t __pyx_f_19streaming_form_data_7_parser_7_Parser_rewind_fast_forwar } __pyx_L7:; - /* "streaming_form_data/_parser.pyx":546 + /* "streaming_form_data/_parser.pyx":563 * ): * skipped = skipped - 3 * break # <<<<<<<<<<<<<< @@ -18240,7 +18513,7 @@ static size_t __pyx_f_19streaming_form_data_7_parser_7_Parser_rewind_fast_forwar */ goto __pyx_L5_break; - /* "streaming_form_data/_parser.pyx":526 + /* "streaming_form_data/_parser.pyx":543 * * while True: * if ptr >= ptr_end: # <<<<<<<<<<<<<< @@ -18249,7 +18522,7 @@ static size_t __pyx_f_19streaming_form_data_7_parser_7_Parser_rewind_fast_forwar */ } - /* "streaming_form_data/_parser.pyx":548 + /* "streaming_form_data/_parser.pyx":565 * break * * if ptr[0] != c_hyphen: # <<<<<<<<<<<<<< @@ -18259,7 +18532,7 @@ static size_t __pyx_f_19streaming_form_data_7_parser_7_Parser_rewind_fast_forwar __pyx_t_1 = ((__pyx_v_ptr[0]) != __pyx_v_19streaming_form_data_7_parser_c_hyphen); if (__pyx_t_1) { - /* "streaming_form_data/_parser.pyx":549 + /* "streaming_form_data/_parser.pyx":566 * * if ptr[0] != c_hyphen: * ptr += 2 # <<<<<<<<<<<<<< @@ -18268,7 +18541,7 @@ static size_t __pyx_f_19streaming_form_data_7_parser_7_Parser_rewind_fast_forwar */ __pyx_v_ptr = (__pyx_v_ptr + 2); - /* "streaming_form_data/_parser.pyx":548 + /* "streaming_form_data/_parser.pyx":565 * break * * if ptr[0] != c_hyphen: # <<<<<<<<<<<<<< @@ -18278,7 +18551,7 @@ static size_t __pyx_f_19streaming_form_data_7_parser_7_Parser_rewind_fast_forwar goto __pyx_L13; } - /* "streaming_form_data/_parser.pyx":551 + /* "streaming_form_data/_parser.pyx":568 * ptr += 2 * else: * if ptr[-1] != c_hyphen: # <<<<<<<<<<<<<< @@ -18289,7 +18562,7 @@ static size_t __pyx_f_19streaming_form_data_7_parser_7_Parser_rewind_fast_forwar __pyx_t_1 = ((__pyx_v_ptr[-1L]) != __pyx_v_19streaming_form_data_7_parser_c_hyphen); if (__pyx_t_1) { - /* "streaming_form_data/_parser.pyx":552 + /* "streaming_form_data/_parser.pyx":569 * else: * if ptr[-1] != c_hyphen: * ptr += 1 # <<<<<<<<<<<<<< @@ -18298,7 +18571,7 @@ static size_t __pyx_f_19streaming_form_data_7_parser_7_Parser_rewind_fast_forwar */ __pyx_v_ptr = (__pyx_v_ptr + 1); - /* "streaming_form_data/_parser.pyx":551 + /* "streaming_form_data/_parser.pyx":568 * ptr += 2 * else: * if ptr[-1] != c_hyphen: # <<<<<<<<<<<<<< @@ -18308,7 +18581,7 @@ static size_t __pyx_f_19streaming_form_data_7_parser_7_Parser_rewind_fast_forwar goto __pyx_L14; } - /* "streaming_form_data/_parser.pyx":554 + /* "streaming_form_data/_parser.pyx":571 * ptr += 1 * else: * if ptr[-2] == c_lf and ptr[-3] == c_cr: # <<<<<<<<<<<<<< @@ -18327,117 +18600,117 @@ static size_t __pyx_f_19streaming_form_data_7_parser_7_Parser_rewind_fast_forwar __pyx_L16_bool_binop_done:; if (__pyx_t_1) { - /* "streaming_form_data/_parser.pyx":555 + /* "streaming_form_data/_parser.pyx":572 * else: * if ptr[-2] == c_lf and ptr[-3] == c_cr: * self.delimiter_finder.reset() # <<<<<<<<<<<<<< * self.delimiter_finder.feed(c_cr) * self.delimiter_finder.feed(c_lf) */ - __pyx_t_3 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser_Finder *)__pyx_v_self->delimiter_finder->__pyx_vtab)->reset(__pyx_v_self->delimiter_finder); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 555, __pyx_L1_error) + __pyx_t_3 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser_Finder *)__pyx_v_self->delimiter_finder->__pyx_vtab)->reset(__pyx_v_self->delimiter_finder); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 572, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "streaming_form_data/_parser.pyx":556 + /* "streaming_form_data/_parser.pyx":573 * if ptr[-2] == c_lf and ptr[-3] == c_cr: * self.delimiter_finder.reset() * self.delimiter_finder.feed(c_cr) # <<<<<<<<<<<<<< * self.delimiter_finder.feed(c_lf) * self.delimiter_finder.feed(c_hyphen) */ - __pyx_t_3 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser_Finder *)__pyx_v_self->delimiter_finder->__pyx_vtab)->feed(__pyx_v_self->delimiter_finder, __pyx_v_19streaming_form_data_7_parser_c_cr, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 556, __pyx_L1_error) + __pyx_t_3 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser_Finder *)__pyx_v_self->delimiter_finder->__pyx_vtab)->feed(__pyx_v_self->delimiter_finder, __pyx_v_19streaming_form_data_7_parser_c_cr, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 573, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "streaming_form_data/_parser.pyx":557 + /* "streaming_form_data/_parser.pyx":574 * self.delimiter_finder.reset() * self.delimiter_finder.feed(c_cr) * self.delimiter_finder.feed(c_lf) # <<<<<<<<<<<<<< * self.delimiter_finder.feed(c_hyphen) * self.delimiter_finder.feed(c_hyphen) */ - __pyx_t_3 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser_Finder *)__pyx_v_self->delimiter_finder->__pyx_vtab)->feed(__pyx_v_self->delimiter_finder, __pyx_v_19streaming_form_data_7_parser_c_lf, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 557, __pyx_L1_error) + __pyx_t_3 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser_Finder *)__pyx_v_self->delimiter_finder->__pyx_vtab)->feed(__pyx_v_self->delimiter_finder, __pyx_v_19streaming_form_data_7_parser_c_lf, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 574, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "streaming_form_data/_parser.pyx":558 + /* "streaming_form_data/_parser.pyx":575 * self.delimiter_finder.feed(c_cr) * self.delimiter_finder.feed(c_lf) * self.delimiter_finder.feed(c_hyphen) # <<<<<<<<<<<<<< * self.delimiter_finder.feed(c_hyphen) * */ - __pyx_t_3 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser_Finder *)__pyx_v_self->delimiter_finder->__pyx_vtab)->feed(__pyx_v_self->delimiter_finder, __pyx_v_19streaming_form_data_7_parser_c_hyphen, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 558, __pyx_L1_error) + __pyx_t_3 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser_Finder *)__pyx_v_self->delimiter_finder->__pyx_vtab)->feed(__pyx_v_self->delimiter_finder, __pyx_v_19streaming_form_data_7_parser_c_hyphen, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 575, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "streaming_form_data/_parser.pyx":559 + /* "streaming_form_data/_parser.pyx":576 * self.delimiter_finder.feed(c_lf) * self.delimiter_finder.feed(c_hyphen) * self.delimiter_finder.feed(c_hyphen) # <<<<<<<<<<<<<< * * self.ender_finder.reset() */ - __pyx_t_3 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser_Finder *)__pyx_v_self->delimiter_finder->__pyx_vtab)->feed(__pyx_v_self->delimiter_finder, __pyx_v_19streaming_form_data_7_parser_c_hyphen, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 559, __pyx_L1_error) + __pyx_t_3 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser_Finder *)__pyx_v_self->delimiter_finder->__pyx_vtab)->feed(__pyx_v_self->delimiter_finder, __pyx_v_19streaming_form_data_7_parser_c_hyphen, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 576, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "streaming_form_data/_parser.pyx":561 + /* "streaming_form_data/_parser.pyx":578 * self.delimiter_finder.feed(c_hyphen) * * self.ender_finder.reset() # <<<<<<<<<<<<<< * self.ender_finder.feed(c_cr) * self.ender_finder.feed(c_lf) */ - __pyx_t_3 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser_Finder *)__pyx_v_self->ender_finder->__pyx_vtab)->reset(__pyx_v_self->ender_finder); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 561, __pyx_L1_error) + __pyx_t_3 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser_Finder *)__pyx_v_self->ender_finder->__pyx_vtab)->reset(__pyx_v_self->ender_finder); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 578, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "streaming_form_data/_parser.pyx":562 + /* "streaming_form_data/_parser.pyx":579 * * self.ender_finder.reset() * self.ender_finder.feed(c_cr) # <<<<<<<<<<<<<< * self.ender_finder.feed(c_lf) * self.ender_finder.feed(c_hyphen) */ - __pyx_t_3 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser_Finder *)__pyx_v_self->ender_finder->__pyx_vtab)->feed(__pyx_v_self->ender_finder, __pyx_v_19streaming_form_data_7_parser_c_cr, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 562, __pyx_L1_error) + __pyx_t_3 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser_Finder *)__pyx_v_self->ender_finder->__pyx_vtab)->feed(__pyx_v_self->ender_finder, __pyx_v_19streaming_form_data_7_parser_c_cr, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 579, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "streaming_form_data/_parser.pyx":563 + /* "streaming_form_data/_parser.pyx":580 * self.ender_finder.reset() * self.ender_finder.feed(c_cr) * self.ender_finder.feed(c_lf) # <<<<<<<<<<<<<< * self.ender_finder.feed(c_hyphen) * self.ender_finder.feed(c_hyphen) */ - __pyx_t_3 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser_Finder *)__pyx_v_self->ender_finder->__pyx_vtab)->feed(__pyx_v_self->ender_finder, __pyx_v_19streaming_form_data_7_parser_c_lf, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 563, __pyx_L1_error) + __pyx_t_3 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser_Finder *)__pyx_v_self->ender_finder->__pyx_vtab)->feed(__pyx_v_self->ender_finder, __pyx_v_19streaming_form_data_7_parser_c_lf, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 580, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "streaming_form_data/_parser.pyx":564 + /* "streaming_form_data/_parser.pyx":581 * self.ender_finder.feed(c_cr) * self.ender_finder.feed(c_lf) * self.ender_finder.feed(c_hyphen) # <<<<<<<<<<<<<< * self.ender_finder.feed(c_hyphen) * */ - __pyx_t_3 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser_Finder *)__pyx_v_self->ender_finder->__pyx_vtab)->feed(__pyx_v_self->ender_finder, __pyx_v_19streaming_form_data_7_parser_c_hyphen, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 564, __pyx_L1_error) + __pyx_t_3 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser_Finder *)__pyx_v_self->ender_finder->__pyx_vtab)->feed(__pyx_v_self->ender_finder, __pyx_v_19streaming_form_data_7_parser_c_hyphen, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 581, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "streaming_form_data/_parser.pyx":565 + /* "streaming_form_data/_parser.pyx":582 * self.ender_finder.feed(c_lf) * self.ender_finder.feed(c_hyphen) * self.ender_finder.feed(c_hyphen) # <<<<<<<<<<<<<< * * skipped = (ptr - chunk_ptr) - pos_first + 1 */ - __pyx_t_3 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser_Finder *)__pyx_v_self->ender_finder->__pyx_vtab)->feed(__pyx_v_self->ender_finder, __pyx_v_19streaming_form_data_7_parser_c_hyphen, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 565, __pyx_L1_error) + __pyx_t_3 = ((struct __pyx_vtabstruct_19streaming_form_data_7_parser_Finder *)__pyx_v_self->ender_finder->__pyx_vtab)->feed(__pyx_v_self->ender_finder, __pyx_v_19streaming_form_data_7_parser_c_hyphen, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 582, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "streaming_form_data/_parser.pyx":567 + /* "streaming_form_data/_parser.pyx":584 * self.ender_finder.feed(c_hyphen) * * skipped = (ptr - chunk_ptr) - pos_first + 1 # <<<<<<<<<<<<<< @@ -18446,7 +18719,7 @@ static size_t __pyx_f_19streaming_form_data_7_parser_7_Parser_rewind_fast_forwar */ __pyx_v_skipped = (((__pyx_v_ptr - __pyx_v_chunk_ptr) - __pyx_v_pos_first) + 1); - /* "streaming_form_data/_parser.pyx":569 + /* "streaming_form_data/_parser.pyx":586 * skipped = (ptr - chunk_ptr) - pos_first + 1 * * break # <<<<<<<<<<<<<< @@ -18455,7 +18728,7 @@ static size_t __pyx_f_19streaming_form_data_7_parser_7_Parser_rewind_fast_forwar */ goto __pyx_L5_break; - /* "streaming_form_data/_parser.pyx":554 + /* "streaming_form_data/_parser.pyx":571 * ptr += 1 * else: * if ptr[-2] == c_lf and ptr[-3] == c_cr: # <<<<<<<<<<<<<< @@ -18464,7 +18737,7 @@ static size_t __pyx_f_19streaming_form_data_7_parser_7_Parser_rewind_fast_forwar */ } - /* "streaming_form_data/_parser.pyx":570 + /* "streaming_form_data/_parser.pyx":587 * * break * ptr += 4 # <<<<<<<<<<<<<< @@ -18479,7 +18752,7 @@ static size_t __pyx_f_19streaming_form_data_7_parser_7_Parser_rewind_fast_forwar } __pyx_L5_break:; - /* "streaming_form_data/_parser.pyx":572 + /* "streaming_form_data/_parser.pyx":589 * ptr += 4 * * return skipped # <<<<<<<<<<<<<< @@ -18489,7 +18762,7 @@ static size_t __pyx_f_19streaming_form_data_7_parser_7_Parser_rewind_fast_forwar __pyx_r = __pyx_v_skipped; goto __pyx_L0; - /* "streaming_form_data/_parser.pyx":498 + /* "streaming_form_data/_parser.pyx":515 * return ErrorCode.E_OK * * cdef size_t rewind_fast_forward( # <<<<<<<<<<<<<< @@ -18507,7 +18780,7 @@ static size_t __pyx_f_19streaming_form_data_7_parser_7_Parser_rewind_fast_forwar return __pyx_r; } -/* "streaming_form_data/_parser.pyx":574 +/* "streaming_form_data/_parser.pyx":591 * return skipped * * cdef mark_error(self): # <<<<<<<<<<<<<< @@ -18530,7 +18803,7 @@ static PyObject *__pyx_f_19streaming_form_data_7_parser_7_Parser_mark_error(stru int __pyx_clineno = 0; __Pyx_RefNannySetupContext("mark_error", 1); - /* "streaming_form_data/_parser.pyx":575 + /* "streaming_form_data/_parser.pyx":592 * * cdef mark_error(self): * self.state = ParserState.PS_ERROR # <<<<<<<<<<<<<< @@ -18539,37 +18812,59 @@ static PyObject *__pyx_f_19streaming_form_data_7_parser_7_Parser_mark_error(stru */ __pyx_v_self->state = __pyx_e_19streaming_form_data_7_parser_PS_ERROR; - /* "streaming_form_data/_parser.pyx":577 + /* "streaming_form_data/_parser.pyx":594 * self.state = ParserState.PS_ERROR * * if self.active_part: # <<<<<<<<<<<<<< - * if isinstance(self.active_part, Part): + * if self.active_part.is_sync(): * self.active_part.finish() */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->active_part); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 577, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->active_part); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 594, __pyx_L1_error) if (__pyx_t_1) { - /* "streaming_form_data/_parser.pyx":578 + /* "streaming_form_data/_parser.pyx":595 * * if self.active_part: - * if isinstance(self.active_part, Part): # <<<<<<<<<<<<<< + * if self.active_part.is_sync(): # <<<<<<<<<<<<<< * self.active_part.finish() * else: */ - __pyx_t_2 = __pyx_v_self->active_part; - __Pyx_INCREF(__pyx_t_2); - __pyx_t_1 = __Pyx_TypeCheck(__pyx_t_2, __pyx_ptype_19streaming_form_data_7_parser_Part); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->active_part, __pyx_n_s_is_sync); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 595, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 595, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 595, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_1) { - /* "streaming_form_data/_parser.pyx":579 + /* "streaming_form_data/_parser.pyx":596 * if self.active_part: - * if isinstance(self.active_part, Part): + * if self.active_part.is_sync(): * self.active_part.finish() # <<<<<<<<<<<<<< * else: * asyncio.get_event_loop().call_soon_threadsafe(self.active_part.finish()) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->active_part, __pyx_n_s_finish); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 579, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->active_part, __pyx_n_s_finish); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 596, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; @@ -18589,31 +18884,33 @@ static PyObject *__pyx_f_19streaming_form_data_7_parser_7_Parser_mark_error(stru PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 579, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 596, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "streaming_form_data/_parser.pyx":578 + /* "streaming_form_data/_parser.pyx":595 * * if self.active_part: - * if isinstance(self.active_part, Part): # <<<<<<<<<<<<<< + * if self.active_part.is_sync(): # <<<<<<<<<<<<<< * self.active_part.finish() * else: */ goto __pyx_L4; } - /* "streaming_form_data/_parser.pyx":581 + /* "streaming_form_data/_parser.pyx":598 * self.active_part.finish() * else: * asyncio.get_event_loop().call_soon_threadsafe(self.active_part.finish()) # <<<<<<<<<<<<<< + * + * cdef has_error(self): */ /*else*/ { - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 581, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 598, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_get_event_loop); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 581, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_get_event_loop); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 598, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -18634,14 +18931,14 @@ static PyObject *__pyx_f_19streaming_form_data_7_parser_7_Parser_mark_error(stru PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 581, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 598, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_call_soon_threadsafe); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 581, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_call_soon_threadsafe); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 598, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->active_part, __pyx_n_s_finish); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 581, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->active_part, __pyx_n_s_finish); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 598, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = NULL; __pyx_t_5 = 0; @@ -18661,7 +18958,7 @@ static PyObject *__pyx_f_19streaming_form_data_7_parser_7_Parser_mark_error(stru PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL}; __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 581, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 598, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } @@ -18684,7 +18981,7 @@ static PyObject *__pyx_f_19streaming_form_data_7_parser_7_Parser_mark_error(stru __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 581, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 598, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -18692,16 +18989,16 @@ static PyObject *__pyx_f_19streaming_form_data_7_parser_7_Parser_mark_error(stru } __pyx_L4:; - /* "streaming_form_data/_parser.pyx":577 + /* "streaming_form_data/_parser.pyx":594 * self.state = ParserState.PS_ERROR * * if self.active_part: # <<<<<<<<<<<<<< - * if isinstance(self.active_part, Part): + * if self.active_part.is_sync(): * self.active_part.finish() */ } - /* "streaming_form_data/_parser.pyx":574 + /* "streaming_form_data/_parser.pyx":591 * return skipped * * cdef mark_error(self): # <<<<<<<<<<<<<< @@ -18726,7 +19023,53 @@ static PyObject *__pyx_f_19streaming_form_data_7_parser_7_Parser_mark_error(stru return __pyx_r; } -/* "streaming_form_data/_parser.pyx":186 +/* "streaming_form_data/_parser.pyx":600 + * asyncio.get_event_loop().call_soon_threadsafe(self.active_part.finish()) + * + * cdef has_error(self): # <<<<<<<<<<<<<< + * return self.state == ParserState.PS_ERROR + */ + +static PyObject *__pyx_f_19streaming_form_data_7_parser_7_Parser_has_error(struct __pyx_obj_19streaming_form_data_7_parser__Parser *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("has_error", 1); + + /* "streaming_form_data/_parser.pyx":601 + * + * cdef has_error(self): + * return self.state == ParserState.PS_ERROR # <<<<<<<<<<<<<< + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_self->state == __pyx_e_19streaming_form_data_7_parser_PS_ERROR)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 601, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "streaming_form_data/_parser.pyx":600 + * asyncio.get_event_loop().call_soon_threadsafe(self.active_part.finish()) + * + * cdef has_error(self): # <<<<<<<<<<<<<< + * return self.state == ParserState.PS_ERROR + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("streaming_form_data._parser._Parser.has_error", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "streaming_form_data/_parser.pyx":196 * * cdef bint strict * cdef public str unexpected_part_name # <<<<<<<<<<<<<< @@ -18788,7 +19131,7 @@ static int __pyx_pf_19streaming_form_data_7_parser_7_Parser_20unexpected_part_na const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 1); - if (!(likely(PyUnicode_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None) || __Pyx_RaiseUnexpectedTypeError("unicode", __pyx_v_value))) __PYX_ERR(0, 186, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None) || __Pyx_RaiseUnexpectedTypeError("unicode", __pyx_v_value))) __PYX_ERR(0, 196, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -21878,6 +22221,7 @@ static PyTypeObject __pyx_type_19streaming_form_data_7_parser_Finder = { #endif }; #endif +static struct __pyx_vtabstruct_19streaming_form_data_7_parser__Part __pyx_vtable_19streaming_form_data_7_parser__Part; static PyObject *__pyx_tp_new_19streaming_form_data_7_parser__Part(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_19streaming_form_data_7_parser__Part *p; @@ -21894,6 +22238,7 @@ static PyObject *__pyx_tp_new_19streaming_form_data_7_parser__Part(PyTypeObject if (unlikely(!o)) return 0; #endif p = ((struct __pyx_obj_19streaming_form_data_7_parser__Part *)o); + p->__pyx_vtab = __pyx_vtabptr_19streaming_form_data_7_parser__Part; p->name = ((PyObject*)Py_None); Py_INCREF(Py_None); p->targets = ((PyObject*)Py_None); Py_INCREF(Py_None); return o; @@ -21968,7 +22313,7 @@ static struct PyGetSetDef __pyx_getsets_19streaming_form_data_7_parser__Part[] = #if CYTHON_USE_TYPE_SPECS static PyType_Slot __pyx_type_19streaming_form_data_7_parser__Part_slots[] = { {Py_tp_dealloc, (void *)__pyx_tp_dealloc_19streaming_form_data_7_parser__Part}, - {Py_tp_doc, (void *)PyDoc_STR("One part of a multipart/form-data request\n ")}, + {Py_tp_doc, (void *)PyDoc_STR("\n A single part of a multipart/form-data request\n ")}, {Py_tp_traverse, (void *)__pyx_tp_traverse_19streaming_form_data_7_parser__Part}, {Py_tp_clear, (void *)__pyx_tp_clear_19streaming_form_data_7_parser__Part}, {Py_tp_methods, (void *)__pyx_methods_19streaming_form_data_7_parser__Part}, @@ -22017,7 +22362,7 @@ static PyTypeObject __pyx_type_19streaming_form_data_7_parser__Part = { 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ - PyDoc_STR("One part of a multipart/form-data request\n "), /*tp_doc*/ + PyDoc_STR("\n A single part of a multipart/form-data request\n "), /*tp_doc*/ __pyx_tp_traverse_19streaming_form_data_7_parser__Part, /*tp_traverse*/ __pyx_tp_clear_19streaming_form_data_7_parser__Part, /*tp_clear*/ 0, /*tp_richcompare*/ @@ -22067,6 +22412,16 @@ static PyTypeObject __pyx_type_19streaming_form_data_7_parser__Part = { #endif }; #endif +static struct __pyx_vtabstruct_19streaming_form_data_7_parser_Part __pyx_vtable_19streaming_form_data_7_parser_Part; + +static PyObject *__pyx_tp_new_19streaming_form_data_7_parser_Part(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_19streaming_form_data_7_parser_Part *p; + PyObject *o = __pyx_tp_new_19streaming_form_data_7_parser__Part(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_19streaming_form_data_7_parser_Part *)o); + p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_19streaming_form_data_7_parser__Part*)__pyx_vtabptr_19streaming_form_data_7_parser_Part; + return o; +} static PyMethodDef __pyx_methods_19streaming_form_data_7_parser_Part[] = { {"start", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19streaming_form_data_7_parser_4Part_1start, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, @@ -22081,7 +22436,7 @@ static PyType_Slot __pyx_type_19streaming_form_data_7_parser_Part_slots[] = { {Py_tp_traverse, (void *)__pyx_tp_traverse_19streaming_form_data_7_parser__Part}, {Py_tp_clear, (void *)__pyx_tp_clear_19streaming_form_data_7_parser__Part}, {Py_tp_methods, (void *)__pyx_methods_19streaming_form_data_7_parser_Part}, - {Py_tp_new, (void *)__pyx_tp_new_19streaming_form_data_7_parser__Part}, + {Py_tp_new, (void *)__pyx_tp_new_19streaming_form_data_7_parser_Part}, {0, 0}, }; static PyType_Spec __pyx_type_19streaming_form_data_7_parser_Part_spec = { @@ -22147,7 +22502,7 @@ static PyTypeObject __pyx_type_19streaming_form_data_7_parser_Part = { 0, /*tp_init*/ #endif 0, /*tp_alloc*/ - __pyx_tp_new_19streaming_form_data_7_parser__Part, /*tp_new*/ + __pyx_tp_new_19streaming_form_data_7_parser_Part, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -22178,6 +22533,16 @@ static PyTypeObject __pyx_type_19streaming_form_data_7_parser_Part = { #endif }; #endif +static struct __pyx_vtabstruct_19streaming_form_data_7_parser_AsyncPart __pyx_vtable_19streaming_form_data_7_parser_AsyncPart; + +static PyObject *__pyx_tp_new_19streaming_form_data_7_parser_AsyncPart(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_19streaming_form_data_7_parser_AsyncPart *p; + PyObject *o = __pyx_tp_new_19streaming_form_data_7_parser__Part(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_19streaming_form_data_7_parser_AsyncPart *)o); + p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_19streaming_form_data_7_parser__Part*)__pyx_vtabptr_19streaming_form_data_7_parser_AsyncPart; + return o; +} static PyMethodDef __pyx_methods_19streaming_form_data_7_parser_AsyncPart[] = { {"start", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19streaming_form_data_7_parser_9AsyncPart_1start, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, @@ -22192,7 +22557,7 @@ static PyType_Slot __pyx_type_19streaming_form_data_7_parser_AsyncPart_slots[] = {Py_tp_traverse, (void *)__pyx_tp_traverse_19streaming_form_data_7_parser__Part}, {Py_tp_clear, (void *)__pyx_tp_clear_19streaming_form_data_7_parser__Part}, {Py_tp_methods, (void *)__pyx_methods_19streaming_form_data_7_parser_AsyncPart}, - {Py_tp_new, (void *)__pyx_tp_new_19streaming_form_data_7_parser__Part}, + {Py_tp_new, (void *)__pyx_tp_new_19streaming_form_data_7_parser_AsyncPart}, {0, 0}, }; static PyType_Spec __pyx_type_19streaming_form_data_7_parser_AsyncPart_spec = { @@ -22258,7 +22623,7 @@ static PyTypeObject __pyx_type_19streaming_form_data_7_parser_AsyncPart = { 0, /*tp_init*/ #endif 0, /*tp_alloc*/ - __pyx_tp_new_19streaming_form_data_7_parser__Part, /*tp_new*/ + __pyx_tp_new_19streaming_form_data_7_parser_AsyncPart, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -23859,6 +24224,7 @@ static int __Pyx_CreateStringTabAndInitStrings(void) { {&__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_4, __pyx_k_Incompatible_checksums_0x_x_vs_0_4, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0_4), 0, 0, 1, 0}, {&__pyx_n_s_IntEnum, __pyx_k_IntEnum, sizeof(__pyx_k_IntEnum), 0, 0, 1, 1}, {&__pyx_n_s_IntFlag, __pyx_k_IntFlag, sizeof(__pyx_k_IntFlag), 0, 0, 1, 1}, + {&__pyx_n_s_NotImplementedError, __pyx_k_NotImplementedError, sizeof(__pyx_k_NotImplementedError), 0, 0, 1, 1}, {&__pyx_n_s_NullTarget, __pyx_k_NullTarget, sizeof(__pyx_k_NullTarget), 0, 0, 1, 1}, {&__pyx_n_s_OrderedDict, __pyx_k_OrderedDict, sizeof(__pyx_k_OrderedDict), 0, 0, 1, 1}, {&__pyx_n_s_Parser, __pyx_k_Parser, sizeof(__pyx_k_Parser), 0, 0, 1, 1}, @@ -23966,6 +24332,7 @@ static int __Pyx_CreateStringTabAndInitStrings(void) { {&__pyx_n_s_inspect, __pyx_k_inspect, sizeof(__pyx_k_inspect), 0, 0, 1, 1}, {&__pyx_n_s_is_async_target, __pyx_k_is_async_target, sizeof(__pyx_k_is_async_target), 0, 0, 1, 1}, {&__pyx_n_s_is_coroutine, __pyx_k_is_coroutine, sizeof(__pyx_k_is_coroutine), 0, 0, 1, 1}, + {&__pyx_n_s_is_sync, __pyx_k_is_sync, sizeof(__pyx_k_is_sync), 0, 0, 1, 1}, {&__pyx_kp_u_isenabled, __pyx_k_isenabled, sizeof(__pyx_k_isenabled), 0, 1, 0, 0}, {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, {&__pyx_n_s_match_start, __pyx_k_match_start, sizeof(__pyx_k_match_start), 0, 0, 1, 1}, @@ -24049,6 +24416,7 @@ static int __Pyx_CreateStringTabAndInitStrings(void) { /* #### Code section: cached_builtins ### */ static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 74, __pyx_L1_error) + __pyx_builtin_NotImplementedError = __Pyx_GetBuiltinName(__pyx_n_s_NotImplementedError); if (!__pyx_builtin_NotImplementedError) __PYX_ERR(0, 147, __pyx_L1_error) return 0; __pyx_L1_error:; return -1; @@ -24246,38 +24614,38 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { */ __pyx_codeobj__38 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__18, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__38)) __PYX_ERR(1, 16, __pyx_L1_error) - /* "streaming_form_data/_parser.pyx":134 + /* "streaming_form_data/_parser.pyx":135 * self.targets = [target] * * def add_target(self, object target): # <<<<<<<<<<<<<< * self.targets.append(target) * */ - __pyx_tuple__39 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_target); if (unlikely(!__pyx_tuple__39)) __PYX_ERR(0, 134, __pyx_L1_error) + __pyx_tuple__39 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_target); if (unlikely(!__pyx_tuple__39)) __PYX_ERR(0, 135, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__39); __Pyx_GIVEREF(__pyx_tuple__39); - __pyx_codeobj__40 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_streaming_form_data__parser_pyx, __pyx_n_s_add_target, 134, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__40)) __PYX_ERR(0, 134, __pyx_L1_error) + __pyx_codeobj__40 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_streaming_form_data__parser_pyx, __pyx_n_s_add_target, 135, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__40)) __PYX_ERR(0, 135, __pyx_L1_error) - /* "streaming_form_data/_parser.pyx":137 + /* "streaming_form_data/_parser.pyx":138 * self.targets.append(target) * * def set_multipart_filename(self, str value): # <<<<<<<<<<<<<< * for target in self.targets: * target.multipart_filename = value */ - __pyx_tuple__41 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_target); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(0, 137, __pyx_L1_error) + __pyx_tuple__41 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_target); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(0, 138, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__41); __Pyx_GIVEREF(__pyx_tuple__41); - __pyx_codeobj__42 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_streaming_form_data__parser_pyx, __pyx_n_s_set_multipart_filename, 137, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__42)) __PYX_ERR(0, 137, __pyx_L1_error) + __pyx_codeobj__42 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_streaming_form_data__parser_pyx, __pyx_n_s_set_multipart_filename, 138, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__42)) __PYX_ERR(0, 138, __pyx_L1_error) - /* "streaming_form_data/_parser.pyx":141 + /* "streaming_form_data/_parser.pyx":142 * target.multipart_filename = value * * def set_multipart_content_type(self, str value): # <<<<<<<<<<<<<< * for target in self.targets: * target.multipart_content_type = value */ - __pyx_codeobj__43 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_streaming_form_data__parser_pyx, __pyx_n_s_set_multipart_content_type, 141, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__43)) __PYX_ERR(0, 141, __pyx_L1_error) + __pyx_codeobj__43 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_streaming_form_data__parser_pyx, __pyx_n_s_set_multipart_content_type, 142, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__43)) __PYX_ERR(0, 142, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< @@ -24294,35 +24662,35 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { */ __pyx_codeobj__45 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__18, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__45)) __PYX_ERR(1, 16, __pyx_L1_error) - /* "streaming_form_data/_parser.pyx":147 + /* "streaming_form_data/_parser.pyx":151 * * cdef class Part(_Part): * def start(self): # <<<<<<<<<<<<<< * for target in self.targets: * target.start() */ - __pyx_codeobj__46 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_streaming_form_data__parser_pyx, __pyx_n_s_start, 147, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__46)) __PYX_ERR(0, 147, __pyx_L1_error) + __pyx_codeobj__46 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_streaming_form_data__parser_pyx, __pyx_n_s_start, 151, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__46)) __PYX_ERR(0, 151, __pyx_L1_error) - /* "streaming_form_data/_parser.pyx":151 + /* "streaming_form_data/_parser.pyx":155 * target.start() * * def data_received(self, bytes chunk): # <<<<<<<<<<<<<< * for target in self.targets: * target.data_received(chunk) */ - __pyx_tuple__47 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_chunk, __pyx_n_s_target); if (unlikely(!__pyx_tuple__47)) __PYX_ERR(0, 151, __pyx_L1_error) + __pyx_tuple__47 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_chunk, __pyx_n_s_target); if (unlikely(!__pyx_tuple__47)) __PYX_ERR(0, 155, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__47); __Pyx_GIVEREF(__pyx_tuple__47); - __pyx_codeobj__48 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__47, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_streaming_form_data__parser_pyx, __pyx_n_s_data_received, 151, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__48)) __PYX_ERR(0, 151, __pyx_L1_error) + __pyx_codeobj__48 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__47, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_streaming_form_data__parser_pyx, __pyx_n_s_data_received, 155, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__48)) __PYX_ERR(0, 155, __pyx_L1_error) - /* "streaming_form_data/_parser.pyx":155 + /* "streaming_form_data/_parser.pyx":159 * target.data_received(chunk) * * def finish(self): # <<<<<<<<<<<<<< * for target in self.targets: * target.finish() */ - __pyx_codeobj__49 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_streaming_form_data__parser_pyx, __pyx_n_s_finish, 155, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__49)) __PYX_ERR(0, 155, __pyx_L1_error) + __pyx_codeobj__49 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_streaming_form_data__parser_pyx, __pyx_n_s_finish, 159, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__49)) __PYX_ERR(0, 159, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< @@ -24339,32 +24707,32 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { */ __pyx_codeobj__51 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__18, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__51)) __PYX_ERR(1, 16, __pyx_L1_error) - /* "streaming_form_data/_parser.pyx":161 + /* "streaming_form_data/_parser.pyx":168 * * cdef class AsyncPart(_Part): * async def start(self): # <<<<<<<<<<<<<< * for target in self.targets: * await target.start() */ - __pyx_codeobj__5 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_COROUTINE, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_streaming_form_data__parser_pyx, __pyx_n_s_start, 161, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__5)) __PYX_ERR(0, 161, __pyx_L1_error) + __pyx_codeobj__5 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_COROUTINE, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_streaming_form_data__parser_pyx, __pyx_n_s_start, 168, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__5)) __PYX_ERR(0, 168, __pyx_L1_error) - /* "streaming_form_data/_parser.pyx":165 + /* "streaming_form_data/_parser.pyx":172 * await target.start() * * async def data_received(self, bytes chunk): # <<<<<<<<<<<<<< * for target in self.targets: * await target.data_received(chunk) */ - __pyx_codeobj__6 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_COROUTINE, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__47, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_streaming_form_data__parser_pyx, __pyx_n_s_data_received, 165, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__6)) __PYX_ERR(0, 165, __pyx_L1_error) + __pyx_codeobj__6 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_COROUTINE, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__47, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_streaming_form_data__parser_pyx, __pyx_n_s_data_received, 172, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__6)) __PYX_ERR(0, 172, __pyx_L1_error) - /* "streaming_form_data/_parser.pyx":169 + /* "streaming_form_data/_parser.pyx":176 * await target.data_received(chunk) * * async def finish(self): # <<<<<<<<<<<<<< * for target in self.targets: * await target.finish() */ - __pyx_codeobj__7 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_COROUTINE, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_streaming_form_data__parser_pyx, __pyx_n_s_finish, 169, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__7)) __PYX_ERR(0, 169, __pyx_L1_error) + __pyx_codeobj__7 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_COROUTINE, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_streaming_form_data__parser_pyx, __pyx_n_s_finish, 176, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__7)) __PYX_ERR(0, 176, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< @@ -24381,110 +24749,110 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { */ __pyx_codeobj__53 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__18, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__53)) __PYX_ERR(1, 16, __pyx_L1_error) - /* "streaming_form_data/_parser.pyx":207 + /* "streaming_form_data/_parser.pyx":217 * self.unexpected_part_name = "" * * def register(self, str name, object target): # <<<<<<<<<<<<<< * part = self._part_for(name) * */ - __pyx_tuple__54 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_name, __pyx_n_s_target, __pyx_n_s_part, __pyx_n_s_part_cls); if (unlikely(!__pyx_tuple__54)) __PYX_ERR(0, 207, __pyx_L1_error) + __pyx_tuple__54 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_name, __pyx_n_s_target, __pyx_n_s_part, __pyx_n_s_part_cls); if (unlikely(!__pyx_tuple__54)) __PYX_ERR(0, 217, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__54); __Pyx_GIVEREF(__pyx_tuple__54); - __pyx_codeobj__55 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_streaming_form_data__parser_pyx, __pyx_n_s_register, 207, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__55)) __PYX_ERR(0, 207, __pyx_L1_error) + __pyx_codeobj__55 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_streaming_form_data__parser_pyx, __pyx_n_s_register, 217, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__55)) __PYX_ERR(0, 217, __pyx_L1_error) - /* "streaming_form_data/_parser.pyx":216 + /* "streaming_form_data/_parser.pyx":226 * self.expected_parts.append(part_cls(name, target)) * * def set_active_part(self, part, str filename): # <<<<<<<<<<<<<< * self.active_part = part * self.active_part.set_multipart_filename(filename) */ - __pyx_tuple__56 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_part, __pyx_n_s_filename); if (unlikely(!__pyx_tuple__56)) __PYX_ERR(0, 216, __pyx_L1_error) + __pyx_tuple__56 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_part, __pyx_n_s_filename); if (unlikely(!__pyx_tuple__56)) __PYX_ERR(0, 226, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__56); __Pyx_GIVEREF(__pyx_tuple__56); - __pyx_codeobj__57 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__56, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_streaming_form_data__parser_pyx, __pyx_n_s_set_active_part, 216, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__57)) __PYX_ERR(0, 216, __pyx_L1_error) + __pyx_codeobj__57 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__56, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_streaming_form_data__parser_pyx, __pyx_n_s_set_active_part, 226, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__57)) __PYX_ERR(0, 226, __pyx_L1_error) - /* "streaming_form_data/_parser.pyx":221 + /* "streaming_form_data/_parser.pyx":231 * self.active_part.start() * * async def async_set_active_part(self, part, str filename): # <<<<<<<<<<<<<< * self.active_part = part * self.active_part.set_multipart_filename(filename) */ - __pyx_codeobj__8 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_COROUTINE, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__56, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_streaming_form_data__parser_pyx, __pyx_n_s_async_set_active_part, 221, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__8)) __PYX_ERR(0, 221, __pyx_L1_error) + __pyx_codeobj__8 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_COROUTINE, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__56, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_streaming_form_data__parser_pyx, __pyx_n_s_async_set_active_part, 231, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__8)) __PYX_ERR(0, 231, __pyx_L1_error) - /* "streaming_form_data/_parser.pyx":226 + /* "streaming_form_data/_parser.pyx":236 * await self.active_part.start() * * def unset_active_part(self): # <<<<<<<<<<<<<< * if self.active_part: * self.active_part.finish() */ - __pyx_codeobj__58 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__23, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_streaming_form_data__parser_pyx, __pyx_n_s_unset_active_part, 226, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__58)) __PYX_ERR(0, 226, __pyx_L1_error) + __pyx_codeobj__58 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__23, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_streaming_form_data__parser_pyx, __pyx_n_s_unset_active_part, 236, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__58)) __PYX_ERR(0, 236, __pyx_L1_error) - /* "streaming_form_data/_parser.pyx":231 + /* "streaming_form_data/_parser.pyx":241 * self.active_part = None * * async def async_unset_active_part(self): # <<<<<<<<<<<<<< * if self.active_part: * await self.active_part.finish() */ - __pyx_codeobj__9 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_COROUTINE, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__23, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_streaming_form_data__parser_pyx, __pyx_n_s_async_unset_active_part, 231, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__9)) __PYX_ERR(0, 231, __pyx_L1_error) + __pyx_codeobj__9 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_COROUTINE, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__23, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_streaming_form_data__parser_pyx, __pyx_n_s_async_unset_active_part, 241, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__9)) __PYX_ERR(0, 241, __pyx_L1_error) - /* "streaming_form_data/_parser.pyx":236 + /* "streaming_form_data/_parser.pyx":246 * self.active_part = None * * def on_body(self, bytes value): # <<<<<<<<<<<<<< * if self.active_part and len(value) > 0: * self.active_part.data_received(value) */ - __pyx_tuple__59 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_value); if (unlikely(!__pyx_tuple__59)) __PYX_ERR(0, 236, __pyx_L1_error) + __pyx_tuple__59 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_value); if (unlikely(!__pyx_tuple__59)) __PYX_ERR(0, 246, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__59); __Pyx_GIVEREF(__pyx_tuple__59); - __pyx_codeobj__60 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__59, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_streaming_form_data__parser_pyx, __pyx_n_s_on_body, 236, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__60)) __PYX_ERR(0, 236, __pyx_L1_error) + __pyx_codeobj__60 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__59, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_streaming_form_data__parser_pyx, __pyx_n_s_on_body, 246, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__60)) __PYX_ERR(0, 246, __pyx_L1_error) - /* "streaming_form_data/_parser.pyx":240 + /* "streaming_form_data/_parser.pyx":250 * self.active_part.data_received(value) * * async def async_on_body(self, bytes value): # <<<<<<<<<<<<<< * if self.active_part and len(value) > 0: * await self.active_part.data_received(value) */ - __pyx_codeobj__10 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_COROUTINE, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__59, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_streaming_form_data__parser_pyx, __pyx_n_s_async_on_body, 240, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__10)) __PYX_ERR(0, 240, __pyx_L1_error) + __pyx_codeobj__10 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_COROUTINE, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__59, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_streaming_form_data__parser_pyx, __pyx_n_s_async_on_body, 250, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__10)) __PYX_ERR(0, 250, __pyx_L1_error) - /* "streaming_form_data/_parser.pyx":249 + /* "streaming_form_data/_parser.pyx":259 * return part * * def data_received(self, bytes data): # <<<<<<<<<<<<<< * if not data: * return ErrorCode.E_OK */ - __pyx_tuple__61 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_data, __pyx_n_s_chunk, __pyx_n_s_index); if (unlikely(!__pyx_tuple__61)) __PYX_ERR(0, 249, __pyx_L1_error) + __pyx_tuple__61 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_data, __pyx_n_s_chunk, __pyx_n_s_index); if (unlikely(!__pyx_tuple__61)) __PYX_ERR(0, 259, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__61); __Pyx_GIVEREF(__pyx_tuple__61); - __pyx_codeobj__62 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__61, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_streaming_form_data__parser_pyx, __pyx_n_s_data_received, 249, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__62)) __PYX_ERR(0, 249, __pyx_L1_error) + __pyx_codeobj__62 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__61, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_streaming_form_data__parser_pyx, __pyx_n_s_data_received, 259, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__62)) __PYX_ERR(0, 259, __pyx_L1_error) - /* "streaming_form_data/_parser.pyx":260 + /* "streaming_form_data/_parser.pyx":270 * return self._parse(chunk, index) * * async def async_data_received(self, bytes data): # <<<<<<<<<<<<<< * if not data: * return ErrorCode.E_OK */ - __pyx_codeobj__11 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_COROUTINE, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__61, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_streaming_form_data__parser_pyx, __pyx_n_s_async_data_received, 260, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__11)) __PYX_ERR(0, 260, __pyx_L1_error) + __pyx_codeobj__11 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_COROUTINE, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__61, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_streaming_form_data__parser_pyx, __pyx_n_s_async_data_received, 270, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__11)) __PYX_ERR(0, 270, __pyx_L1_error) - /* "streaming_form_data/_parser.pyx":290 - * return (chunk, index) + /* "streaming_form_data/_parser.pyx":311 + * self.mark_error() * * def _parse(self, bytes chunk, size_t index): # <<<<<<<<<<<<<< * cdef size_t idx, buffer_start, chunk_len * cdef size_t match_start, skip_count, matched_length */ - __pyx_tuple__63 = PyTuple_Pack(15, __pyx_n_s_self, __pyx_n_s_chunk, __pyx_n_s_index, __pyx_n_s_idx, __pyx_n_s_buffer_start, __pyx_n_s_chunk_len, __pyx_n_s_match_start, __pyx_n_s_skip_count, __pyx_n_s_matched_length, __pyx_n_s_byte, __pyx_n_s_chunk_ptr, __pyx_n_s_message, __pyx_n_s_params, __pyx_n_s_name, __pyx_n_s_part); if (unlikely(!__pyx_tuple__63)) __PYX_ERR(0, 290, __pyx_L1_error) + __pyx_tuple__63 = PyTuple_Pack(15, __pyx_n_s_self, __pyx_n_s_chunk, __pyx_n_s_index, __pyx_n_s_idx, __pyx_n_s_buffer_start, __pyx_n_s_chunk_len, __pyx_n_s_match_start, __pyx_n_s_skip_count, __pyx_n_s_matched_length, __pyx_n_s_byte, __pyx_n_s_chunk_ptr, __pyx_n_s_message, __pyx_n_s_params, __pyx_n_s_name, __pyx_n_s_part); if (unlikely(!__pyx_tuple__63)) __PYX_ERR(0, 311, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__63); __Pyx_GIVEREF(__pyx_tuple__63); - __pyx_codeobj__64 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 15, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__63, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_streaming_form_data__parser_pyx, __pyx_n_s_parse, 290, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__64)) __PYX_ERR(0, 290, __pyx_L1_error) + __pyx_codeobj__64 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 15, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__63, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_streaming_form_data__parser_pyx, __pyx_n_s_parse, 311, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__64)) __PYX_ERR(0, 311, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< @@ -24624,6 +24992,8 @@ static int __Pyx_modinit_type_init_code(void) { #if !CYTHON_COMPILING_IN_LIMITED_API if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_19streaming_form_data_7_parser_Finder) < 0) __PYX_ERR(0, 66, __pyx_L1_error) #endif + __pyx_vtabptr_19streaming_form_data_7_parser__Part = &__pyx_vtable_19streaming_form_data_7_parser__Part; + __pyx_vtable_19streaming_form_data_7_parser__Part.is_sync = (PyObject *(*)(struct __pyx_obj_19streaming_form_data_7_parser__Part *))__pyx_f_19streaming_form_data_7_parser_5_Part_is_sync; #if CYTHON_USE_TYPE_SPECS __pyx_ptype_19streaming_form_data_7_parser__Part = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_19streaming_form_data_7_parser__Part_spec, NULL); if (unlikely(!__pyx_ptype_19streaming_form_data_7_parser__Part)) __PYX_ERR(0, 123, __pyx_L1_error) if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_19streaming_form_data_7_parser__Part_spec, __pyx_ptype_19streaming_form_data_7_parser__Part) < 0) __PYX_ERR(0, 123, __pyx_L1_error) @@ -24643,17 +25013,24 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_ptype_19streaming_form_data_7_parser__Part->tp_getattro = __Pyx_PyObject_GenericGetAttr; } #endif + if (__Pyx_SetVtable(__pyx_ptype_19streaming_form_data_7_parser__Part, __pyx_vtabptr_19streaming_form_data_7_parser__Part) < 0) __PYX_ERR(0, 123, __pyx_L1_error) + #if !CYTHON_COMPILING_IN_LIMITED_API + if (__Pyx_MergeVtables(__pyx_ptype_19streaming_form_data_7_parser__Part) < 0) __PYX_ERR(0, 123, __pyx_L1_error) + #endif if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Part, (PyObject *) __pyx_ptype_19streaming_form_data_7_parser__Part) < 0) __PYX_ERR(0, 123, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_19streaming_form_data_7_parser__Part) < 0) __PYX_ERR(0, 123, __pyx_L1_error) #endif + __pyx_vtabptr_19streaming_form_data_7_parser_Part = &__pyx_vtable_19streaming_form_data_7_parser_Part; + __pyx_vtable_19streaming_form_data_7_parser_Part.__pyx_base = *__pyx_vtabptr_19streaming_form_data_7_parser__Part; + __pyx_vtable_19streaming_form_data_7_parser_Part.__pyx_base.is_sync = (PyObject *(*)(struct __pyx_obj_19streaming_form_data_7_parser__Part *))__pyx_f_19streaming_form_data_7_parser_4Part_is_sync; #if CYTHON_USE_TYPE_SPECS - __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_19streaming_form_data_7_parser__Part); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 146, __pyx_L1_error) + __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_19streaming_form_data_7_parser__Part); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 150, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_ptype_19streaming_form_data_7_parser_Part = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_19streaming_form_data_7_parser_Part_spec, __pyx_t_1); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_ptype_19streaming_form_data_7_parser_Part)) __PYX_ERR(0, 146, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_19streaming_form_data_7_parser_Part_spec, __pyx_ptype_19streaming_form_data_7_parser_Part) < 0) __PYX_ERR(0, 146, __pyx_L1_error) + if (unlikely(!__pyx_ptype_19streaming_form_data_7_parser_Part)) __PYX_ERR(0, 150, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_19streaming_form_data_7_parser_Part_spec, __pyx_ptype_19streaming_form_data_7_parser_Part) < 0) __PYX_ERR(0, 150, __pyx_L1_error) #else __pyx_ptype_19streaming_form_data_7_parser_Part = &__pyx_type_19streaming_form_data_7_parser_Part; #endif @@ -24661,7 +25038,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_ptype_19streaming_form_data_7_parser_Part->tp_base = __pyx_ptype_19streaming_form_data_7_parser__Part; #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_ptype_19streaming_form_data_7_parser_Part) < 0) __PYX_ERR(0, 146, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_ptype_19streaming_form_data_7_parser_Part) < 0) __PYX_ERR(0, 150, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_19streaming_form_data_7_parser_Part->tp_print = 0; @@ -24671,17 +25048,24 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_ptype_19streaming_form_data_7_parser_Part->tp_getattro = __Pyx_PyObject_GenericGetAttr; } #endif - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Part_2, (PyObject *) __pyx_ptype_19streaming_form_data_7_parser_Part) < 0) __PYX_ERR(0, 146, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_ptype_19streaming_form_data_7_parser_Part, __pyx_vtabptr_19streaming_form_data_7_parser_Part) < 0) __PYX_ERR(0, 150, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API - if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_19streaming_form_data_7_parser_Part) < 0) __PYX_ERR(0, 146, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_ptype_19streaming_form_data_7_parser_Part) < 0) __PYX_ERR(0, 150, __pyx_L1_error) #endif + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Part_2, (PyObject *) __pyx_ptype_19streaming_form_data_7_parser_Part) < 0) __PYX_ERR(0, 150, __pyx_L1_error) + #if !CYTHON_COMPILING_IN_LIMITED_API + if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_19streaming_form_data_7_parser_Part) < 0) __PYX_ERR(0, 150, __pyx_L1_error) + #endif + __pyx_vtabptr_19streaming_form_data_7_parser_AsyncPart = &__pyx_vtable_19streaming_form_data_7_parser_AsyncPart; + __pyx_vtable_19streaming_form_data_7_parser_AsyncPart.__pyx_base = *__pyx_vtabptr_19streaming_form_data_7_parser__Part; + __pyx_vtable_19streaming_form_data_7_parser_AsyncPart.__pyx_base.is_sync = (PyObject *(*)(struct __pyx_obj_19streaming_form_data_7_parser__Part *))__pyx_f_19streaming_form_data_7_parser_9AsyncPart_is_sync; #if CYTHON_USE_TYPE_SPECS - __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_19streaming_form_data_7_parser__Part); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 160, __pyx_L1_error) + __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_19streaming_form_data_7_parser__Part); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 167, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_ptype_19streaming_form_data_7_parser_AsyncPart = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_19streaming_form_data_7_parser_AsyncPart_spec, __pyx_t_1); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_ptype_19streaming_form_data_7_parser_AsyncPart)) __PYX_ERR(0, 160, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_19streaming_form_data_7_parser_AsyncPart_spec, __pyx_ptype_19streaming_form_data_7_parser_AsyncPart) < 0) __PYX_ERR(0, 160, __pyx_L1_error) + if (unlikely(!__pyx_ptype_19streaming_form_data_7_parser_AsyncPart)) __PYX_ERR(0, 167, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_19streaming_form_data_7_parser_AsyncPart_spec, __pyx_ptype_19streaming_form_data_7_parser_AsyncPart) < 0) __PYX_ERR(0, 167, __pyx_L1_error) #else __pyx_ptype_19streaming_form_data_7_parser_AsyncPart = &__pyx_type_19streaming_form_data_7_parser_AsyncPart; #endif @@ -24689,7 +25073,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_ptype_19streaming_form_data_7_parser_AsyncPart->tp_base = __pyx_ptype_19streaming_form_data_7_parser__Part; #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_ptype_19streaming_form_data_7_parser_AsyncPart) < 0) __PYX_ERR(0, 160, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_ptype_19streaming_form_data_7_parser_AsyncPart) < 0) __PYX_ERR(0, 167, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_19streaming_form_data_7_parser_AsyncPart->tp_print = 0; @@ -24699,25 +25083,31 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_ptype_19streaming_form_data_7_parser_AsyncPart->tp_getattro = __Pyx_PyObject_GenericGetAttr; } #endif - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_AsyncPart, (PyObject *) __pyx_ptype_19streaming_form_data_7_parser_AsyncPart) < 0) __PYX_ERR(0, 160, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_ptype_19streaming_form_data_7_parser_AsyncPart, __pyx_vtabptr_19streaming_form_data_7_parser_AsyncPart) < 0) __PYX_ERR(0, 167, __pyx_L1_error) + #if !CYTHON_COMPILING_IN_LIMITED_API + if (__Pyx_MergeVtables(__pyx_ptype_19streaming_form_data_7_parser_AsyncPart) < 0) __PYX_ERR(0, 167, __pyx_L1_error) + #endif + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_AsyncPart, (PyObject *) __pyx_ptype_19streaming_form_data_7_parser_AsyncPart) < 0) __PYX_ERR(0, 167, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API - if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_19streaming_form_data_7_parser_AsyncPart) < 0) __PYX_ERR(0, 160, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_19streaming_form_data_7_parser_AsyncPart) < 0) __PYX_ERR(0, 167, __pyx_L1_error) #endif __pyx_vtabptr_19streaming_form_data_7_parser__Parser = &__pyx_vtable_19streaming_form_data_7_parser__Parser; __pyx_vtable_19streaming_form_data_7_parser__Parser._part_for = (PyObject *(*)(struct __pyx_obj_19streaming_form_data_7_parser__Parser *, PyObject *))__pyx_f_19streaming_form_data_7_parser_7_Parser__part_for; __pyx_vtable_19streaming_form_data_7_parser__Parser.include_leftover_buffer = (PyObject *(*)(struct __pyx_obj_19streaming_form_data_7_parser__Parser *, PyObject *))__pyx_f_19streaming_form_data_7_parser_7_Parser_include_leftover_buffer; + __pyx_vtable_19streaming_form_data_7_parser__Parser.handle_ps_start = (PyObject *(*)(struct __pyx_obj_19streaming_form_data_7_parser__Parser *, __pyx_t_19streaming_form_data_7_parser_Byte const *, size_t *, size_t *))__pyx_f_19streaming_form_data_7_parser_7_Parser_handle_ps_start; __pyx_vtable_19streaming_form_data_7_parser__Parser.rewind_fast_forward = (size_t (*)(struct __pyx_obj_19streaming_form_data_7_parser__Parser *, __pyx_t_19streaming_form_data_7_parser_Byte const *, size_t, size_t))__pyx_f_19streaming_form_data_7_parser_7_Parser_rewind_fast_forward; __pyx_vtable_19streaming_form_data_7_parser__Parser.mark_error = (PyObject *(*)(struct __pyx_obj_19streaming_form_data_7_parser__Parser *))__pyx_f_19streaming_form_data_7_parser_7_Parser_mark_error; + __pyx_vtable_19streaming_form_data_7_parser__Parser.has_error = (PyObject *(*)(struct __pyx_obj_19streaming_form_data_7_parser__Parser *))__pyx_f_19streaming_form_data_7_parser_7_Parser_has_error; #if CYTHON_USE_TYPE_SPECS - __pyx_ptype_19streaming_form_data_7_parser__Parser = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_19streaming_form_data_7_parser__Parser_spec, NULL); if (unlikely(!__pyx_ptype_19streaming_form_data_7_parser__Parser)) __PYX_ERR(0, 174, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_19streaming_form_data_7_parser__Parser_spec, __pyx_ptype_19streaming_form_data_7_parser__Parser) < 0) __PYX_ERR(0, 174, __pyx_L1_error) + __pyx_ptype_19streaming_form_data_7_parser__Parser = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_19streaming_form_data_7_parser__Parser_spec, NULL); if (unlikely(!__pyx_ptype_19streaming_form_data_7_parser__Parser)) __PYX_ERR(0, 184, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_19streaming_form_data_7_parser__Parser_spec, __pyx_ptype_19streaming_form_data_7_parser__Parser) < 0) __PYX_ERR(0, 184, __pyx_L1_error) #else __pyx_ptype_19streaming_form_data_7_parser__Parser = &__pyx_type_19streaming_form_data_7_parser__Parser; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_ptype_19streaming_form_data_7_parser__Parser) < 0) __PYX_ERR(0, 174, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_ptype_19streaming_form_data_7_parser__Parser) < 0) __PYX_ERR(0, 184, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_19streaming_form_data_7_parser__Parser->tp_print = 0; @@ -24727,24 +25117,24 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_ptype_19streaming_form_data_7_parser__Parser->tp_getattro = __Pyx_PyObject_GenericGetAttr; } #endif - if (__Pyx_SetVtable(__pyx_ptype_19streaming_form_data_7_parser__Parser, __pyx_vtabptr_19streaming_form_data_7_parser__Parser) < 0) __PYX_ERR(0, 174, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_ptype_19streaming_form_data_7_parser__Parser, __pyx_vtabptr_19streaming_form_data_7_parser__Parser) < 0) __PYX_ERR(0, 184, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API - if (__Pyx_MergeVtables(__pyx_ptype_19streaming_form_data_7_parser__Parser) < 0) __PYX_ERR(0, 174, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_ptype_19streaming_form_data_7_parser__Parser) < 0) __PYX_ERR(0, 184, __pyx_L1_error) #endif - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Parser_2, (PyObject *) __pyx_ptype_19streaming_form_data_7_parser__Parser) < 0) __PYX_ERR(0, 174, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Parser_2, (PyObject *) __pyx_ptype_19streaming_form_data_7_parser__Parser) < 0) __PYX_ERR(0, 184, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API - if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_19streaming_form_data_7_parser__Parser) < 0) __PYX_ERR(0, 174, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_19streaming_form_data_7_parser__Parser) < 0) __PYX_ERR(0, 184, __pyx_L1_error) #endif #if CYTHON_USE_TYPE_SPECS - __pyx_ptype_19streaming_form_data_7_parser___pyx_scope_struct__start = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_19streaming_form_data_7_parser___pyx_scope_struct__start_spec, NULL); if (unlikely(!__pyx_ptype_19streaming_form_data_7_parser___pyx_scope_struct__start)) __PYX_ERR(0, 161, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_19streaming_form_data_7_parser___pyx_scope_struct__start_spec, __pyx_ptype_19streaming_form_data_7_parser___pyx_scope_struct__start) < 0) __PYX_ERR(0, 161, __pyx_L1_error) + __pyx_ptype_19streaming_form_data_7_parser___pyx_scope_struct__start = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_19streaming_form_data_7_parser___pyx_scope_struct__start_spec, NULL); if (unlikely(!__pyx_ptype_19streaming_form_data_7_parser___pyx_scope_struct__start)) __PYX_ERR(0, 168, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_19streaming_form_data_7_parser___pyx_scope_struct__start_spec, __pyx_ptype_19streaming_form_data_7_parser___pyx_scope_struct__start) < 0) __PYX_ERR(0, 168, __pyx_L1_error) #else __pyx_ptype_19streaming_form_data_7_parser___pyx_scope_struct__start = &__pyx_type_19streaming_form_data_7_parser___pyx_scope_struct__start; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_ptype_19streaming_form_data_7_parser___pyx_scope_struct__start) < 0) __PYX_ERR(0, 161, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_ptype_19streaming_form_data_7_parser___pyx_scope_struct__start) < 0) __PYX_ERR(0, 168, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_19streaming_form_data_7_parser___pyx_scope_struct__start->tp_print = 0; @@ -24755,15 +25145,15 @@ static int __Pyx_modinit_type_init_code(void) { } #endif #if CYTHON_USE_TYPE_SPECS - __pyx_ptype_19streaming_form_data_7_parser___pyx_scope_struct_1_data_received = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_19streaming_form_data_7_parser___pyx_scope_struct_1_data_received_spec, NULL); if (unlikely(!__pyx_ptype_19streaming_form_data_7_parser___pyx_scope_struct_1_data_received)) __PYX_ERR(0, 165, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_19streaming_form_data_7_parser___pyx_scope_struct_1_data_received_spec, __pyx_ptype_19streaming_form_data_7_parser___pyx_scope_struct_1_data_received) < 0) __PYX_ERR(0, 165, __pyx_L1_error) + __pyx_ptype_19streaming_form_data_7_parser___pyx_scope_struct_1_data_received = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_19streaming_form_data_7_parser___pyx_scope_struct_1_data_received_spec, NULL); if (unlikely(!__pyx_ptype_19streaming_form_data_7_parser___pyx_scope_struct_1_data_received)) __PYX_ERR(0, 172, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_19streaming_form_data_7_parser___pyx_scope_struct_1_data_received_spec, __pyx_ptype_19streaming_form_data_7_parser___pyx_scope_struct_1_data_received) < 0) __PYX_ERR(0, 172, __pyx_L1_error) #else __pyx_ptype_19streaming_form_data_7_parser___pyx_scope_struct_1_data_received = &__pyx_type_19streaming_form_data_7_parser___pyx_scope_struct_1_data_received; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_ptype_19streaming_form_data_7_parser___pyx_scope_struct_1_data_received) < 0) __PYX_ERR(0, 165, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_ptype_19streaming_form_data_7_parser___pyx_scope_struct_1_data_received) < 0) __PYX_ERR(0, 172, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_19streaming_form_data_7_parser___pyx_scope_struct_1_data_received->tp_print = 0; @@ -24774,15 +25164,15 @@ static int __Pyx_modinit_type_init_code(void) { } #endif #if CYTHON_USE_TYPE_SPECS - __pyx_ptype_19streaming_form_data_7_parser___pyx_scope_struct_2_finish = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_19streaming_form_data_7_parser___pyx_scope_struct_2_finish_spec, NULL); if (unlikely(!__pyx_ptype_19streaming_form_data_7_parser___pyx_scope_struct_2_finish)) __PYX_ERR(0, 169, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_19streaming_form_data_7_parser___pyx_scope_struct_2_finish_spec, __pyx_ptype_19streaming_form_data_7_parser___pyx_scope_struct_2_finish) < 0) __PYX_ERR(0, 169, __pyx_L1_error) + __pyx_ptype_19streaming_form_data_7_parser___pyx_scope_struct_2_finish = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_19streaming_form_data_7_parser___pyx_scope_struct_2_finish_spec, NULL); if (unlikely(!__pyx_ptype_19streaming_form_data_7_parser___pyx_scope_struct_2_finish)) __PYX_ERR(0, 176, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_19streaming_form_data_7_parser___pyx_scope_struct_2_finish_spec, __pyx_ptype_19streaming_form_data_7_parser___pyx_scope_struct_2_finish) < 0) __PYX_ERR(0, 176, __pyx_L1_error) #else __pyx_ptype_19streaming_form_data_7_parser___pyx_scope_struct_2_finish = &__pyx_type_19streaming_form_data_7_parser___pyx_scope_struct_2_finish; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_ptype_19streaming_form_data_7_parser___pyx_scope_struct_2_finish) < 0) __PYX_ERR(0, 169, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_ptype_19streaming_form_data_7_parser___pyx_scope_struct_2_finish) < 0) __PYX_ERR(0, 176, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_19streaming_form_data_7_parser___pyx_scope_struct_2_finish->tp_print = 0; @@ -24793,15 +25183,15 @@ static int __Pyx_modinit_type_init_code(void) { } #endif #if CYTHON_USE_TYPE_SPECS - __pyx_ptype_19streaming_form_data_7_parser___pyx_scope_struct_3_async_set_active_part = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_19streaming_form_data_7_parser___pyx_scope_struct_3_async_set_active_part_spec, NULL); if (unlikely(!__pyx_ptype_19streaming_form_data_7_parser___pyx_scope_struct_3_async_set_active_part)) __PYX_ERR(0, 221, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_19streaming_form_data_7_parser___pyx_scope_struct_3_async_set_active_part_spec, __pyx_ptype_19streaming_form_data_7_parser___pyx_scope_struct_3_async_set_active_part) < 0) __PYX_ERR(0, 221, __pyx_L1_error) + __pyx_ptype_19streaming_form_data_7_parser___pyx_scope_struct_3_async_set_active_part = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_19streaming_form_data_7_parser___pyx_scope_struct_3_async_set_active_part_spec, NULL); if (unlikely(!__pyx_ptype_19streaming_form_data_7_parser___pyx_scope_struct_3_async_set_active_part)) __PYX_ERR(0, 231, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_19streaming_form_data_7_parser___pyx_scope_struct_3_async_set_active_part_spec, __pyx_ptype_19streaming_form_data_7_parser___pyx_scope_struct_3_async_set_active_part) < 0) __PYX_ERR(0, 231, __pyx_L1_error) #else __pyx_ptype_19streaming_form_data_7_parser___pyx_scope_struct_3_async_set_active_part = &__pyx_type_19streaming_form_data_7_parser___pyx_scope_struct_3_async_set_active_part; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_ptype_19streaming_form_data_7_parser___pyx_scope_struct_3_async_set_active_part) < 0) __PYX_ERR(0, 221, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_ptype_19streaming_form_data_7_parser___pyx_scope_struct_3_async_set_active_part) < 0) __PYX_ERR(0, 231, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_19streaming_form_data_7_parser___pyx_scope_struct_3_async_set_active_part->tp_print = 0; @@ -24812,15 +25202,15 @@ static int __Pyx_modinit_type_init_code(void) { } #endif #if CYTHON_USE_TYPE_SPECS - __pyx_ptype_19streaming_form_data_7_parser___pyx_scope_struct_4_async_unset_active_part = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_19streaming_form_data_7_parser___pyx_scope_struct_4_async_unset_active_part_spec, NULL); if (unlikely(!__pyx_ptype_19streaming_form_data_7_parser___pyx_scope_struct_4_async_unset_active_part)) __PYX_ERR(0, 231, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_19streaming_form_data_7_parser___pyx_scope_struct_4_async_unset_active_part_spec, __pyx_ptype_19streaming_form_data_7_parser___pyx_scope_struct_4_async_unset_active_part) < 0) __PYX_ERR(0, 231, __pyx_L1_error) + __pyx_ptype_19streaming_form_data_7_parser___pyx_scope_struct_4_async_unset_active_part = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_19streaming_form_data_7_parser___pyx_scope_struct_4_async_unset_active_part_spec, NULL); if (unlikely(!__pyx_ptype_19streaming_form_data_7_parser___pyx_scope_struct_4_async_unset_active_part)) __PYX_ERR(0, 241, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_19streaming_form_data_7_parser___pyx_scope_struct_4_async_unset_active_part_spec, __pyx_ptype_19streaming_form_data_7_parser___pyx_scope_struct_4_async_unset_active_part) < 0) __PYX_ERR(0, 241, __pyx_L1_error) #else __pyx_ptype_19streaming_form_data_7_parser___pyx_scope_struct_4_async_unset_active_part = &__pyx_type_19streaming_form_data_7_parser___pyx_scope_struct_4_async_unset_active_part; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_ptype_19streaming_form_data_7_parser___pyx_scope_struct_4_async_unset_active_part) < 0) __PYX_ERR(0, 231, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_ptype_19streaming_form_data_7_parser___pyx_scope_struct_4_async_unset_active_part) < 0) __PYX_ERR(0, 241, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_19streaming_form_data_7_parser___pyx_scope_struct_4_async_unset_active_part->tp_print = 0; @@ -24831,15 +25221,15 @@ static int __Pyx_modinit_type_init_code(void) { } #endif #if CYTHON_USE_TYPE_SPECS - __pyx_ptype_19streaming_form_data_7_parser___pyx_scope_struct_5_async_on_body = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_19streaming_form_data_7_parser___pyx_scope_struct_5_async_on_body_spec, NULL); if (unlikely(!__pyx_ptype_19streaming_form_data_7_parser___pyx_scope_struct_5_async_on_body)) __PYX_ERR(0, 240, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_19streaming_form_data_7_parser___pyx_scope_struct_5_async_on_body_spec, __pyx_ptype_19streaming_form_data_7_parser___pyx_scope_struct_5_async_on_body) < 0) __PYX_ERR(0, 240, __pyx_L1_error) + __pyx_ptype_19streaming_form_data_7_parser___pyx_scope_struct_5_async_on_body = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_19streaming_form_data_7_parser___pyx_scope_struct_5_async_on_body_spec, NULL); if (unlikely(!__pyx_ptype_19streaming_form_data_7_parser___pyx_scope_struct_5_async_on_body)) __PYX_ERR(0, 250, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_19streaming_form_data_7_parser___pyx_scope_struct_5_async_on_body_spec, __pyx_ptype_19streaming_form_data_7_parser___pyx_scope_struct_5_async_on_body) < 0) __PYX_ERR(0, 250, __pyx_L1_error) #else __pyx_ptype_19streaming_form_data_7_parser___pyx_scope_struct_5_async_on_body = &__pyx_type_19streaming_form_data_7_parser___pyx_scope_struct_5_async_on_body; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_ptype_19streaming_form_data_7_parser___pyx_scope_struct_5_async_on_body) < 0) __PYX_ERR(0, 240, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_ptype_19streaming_form_data_7_parser___pyx_scope_struct_5_async_on_body) < 0) __PYX_ERR(0, 250, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_19streaming_form_data_7_parser___pyx_scope_struct_5_async_on_body->tp_print = 0; @@ -24850,15 +25240,15 @@ static int __Pyx_modinit_type_init_code(void) { } #endif #if CYTHON_USE_TYPE_SPECS - __pyx_ptype_19streaming_form_data_7_parser___pyx_scope_struct_6_async_data_received = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_19streaming_form_data_7_parser___pyx_scope_struct_6_async_data_received_spec, NULL); if (unlikely(!__pyx_ptype_19streaming_form_data_7_parser___pyx_scope_struct_6_async_data_received)) __PYX_ERR(0, 260, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_19streaming_form_data_7_parser___pyx_scope_struct_6_async_data_received_spec, __pyx_ptype_19streaming_form_data_7_parser___pyx_scope_struct_6_async_data_received) < 0) __PYX_ERR(0, 260, __pyx_L1_error) + __pyx_ptype_19streaming_form_data_7_parser___pyx_scope_struct_6_async_data_received = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_19streaming_form_data_7_parser___pyx_scope_struct_6_async_data_received_spec, NULL); if (unlikely(!__pyx_ptype_19streaming_form_data_7_parser___pyx_scope_struct_6_async_data_received)) __PYX_ERR(0, 270, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_19streaming_form_data_7_parser___pyx_scope_struct_6_async_data_received_spec, __pyx_ptype_19streaming_form_data_7_parser___pyx_scope_struct_6_async_data_received) < 0) __PYX_ERR(0, 270, __pyx_L1_error) #else __pyx_ptype_19streaming_form_data_7_parser___pyx_scope_struct_6_async_data_received = &__pyx_type_19streaming_form_data_7_parser___pyx_scope_struct_6_async_data_received; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_ptype_19streaming_form_data_7_parser___pyx_scope_struct_6_async_data_received) < 0) __PYX_ERR(0, 260, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_ptype_19streaming_form_data_7_parser___pyx_scope_struct_6_async_data_received) < 0) __PYX_ERR(0, 270, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_19streaming_form_data_7_parser___pyx_scope_struct_6_async_data_received->tp_print = 0; @@ -26256,42 +26646,42 @@ if (!__Pyx_RefNanny) { __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_19streaming_form_data_7_parser_Finder); - /* "streaming_form_data/_parser.pyx":134 + /* "streaming_form_data/_parser.pyx":135 * self.targets = [target] * * def add_target(self, object target): # <<<<<<<<<<<<<< * self.targets.append(target) * */ - __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_19streaming_form_data_7_parser_5_Part_3add_target, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Part_add_target, NULL, __pyx_n_s_streaming_form_data__parser, __pyx_d, ((PyObject *)__pyx_codeobj__40)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 134, __pyx_L1_error) + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_19streaming_form_data_7_parser_5_Part_3add_target, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Part_add_target, NULL, __pyx_n_s_streaming_form_data__parser, __pyx_d, ((PyObject *)__pyx_codeobj__40)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 135, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19streaming_form_data_7_parser__Part, __pyx_n_s_add_target, __pyx_t_6) < 0) __PYX_ERR(0, 134, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19streaming_form_data_7_parser__Part, __pyx_n_s_add_target, __pyx_t_6) < 0) __PYX_ERR(0, 135, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_19streaming_form_data_7_parser__Part); - /* "streaming_form_data/_parser.pyx":137 + /* "streaming_form_data/_parser.pyx":138 * self.targets.append(target) * * def set_multipart_filename(self, str value): # <<<<<<<<<<<<<< * for target in self.targets: * target.multipart_filename = value */ - __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_19streaming_form_data_7_parser_5_Part_5set_multipart_filename, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Part_set_multipart_filename, NULL, __pyx_n_s_streaming_form_data__parser, __pyx_d, ((PyObject *)__pyx_codeobj__42)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 137, __pyx_L1_error) + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_19streaming_form_data_7_parser_5_Part_5set_multipart_filename, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Part_set_multipart_filename, NULL, __pyx_n_s_streaming_form_data__parser, __pyx_d, ((PyObject *)__pyx_codeobj__42)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 138, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19streaming_form_data_7_parser__Part, __pyx_n_s_set_multipart_filename, __pyx_t_6) < 0) __PYX_ERR(0, 137, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19streaming_form_data_7_parser__Part, __pyx_n_s_set_multipart_filename, __pyx_t_6) < 0) __PYX_ERR(0, 138, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_19streaming_form_data_7_parser__Part); - /* "streaming_form_data/_parser.pyx":141 + /* "streaming_form_data/_parser.pyx":142 * target.multipart_filename = value * * def set_multipart_content_type(self, str value): # <<<<<<<<<<<<<< * for target in self.targets: * target.multipart_content_type = value */ - __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_19streaming_form_data_7_parser_5_Part_7set_multipart_content_type, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Part_set_multipart_content_type, NULL, __pyx_n_s_streaming_form_data__parser, __pyx_d, ((PyObject *)__pyx_codeobj__43)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 141, __pyx_L1_error) + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_19streaming_form_data_7_parser_5_Part_7set_multipart_content_type, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Part_set_multipart_content_type, NULL, __pyx_n_s_streaming_form_data__parser, __pyx_d, ((PyObject *)__pyx_codeobj__43)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 142, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19streaming_form_data_7_parser__Part, __pyx_n_s_set_multipart_content_type, __pyx_t_6) < 0) __PYX_ERR(0, 141, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19streaming_form_data_7_parser__Part, __pyx_n_s_set_multipart_content_type, __pyx_t_6) < 0) __PYX_ERR(0, 142, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_19streaming_form_data_7_parser__Part); @@ -26318,42 +26708,42 @@ if (!__Pyx_RefNanny) { __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_19streaming_form_data_7_parser__Part); - /* "streaming_form_data/_parser.pyx":147 + /* "streaming_form_data/_parser.pyx":151 * * cdef class Part(_Part): * def start(self): # <<<<<<<<<<<<<< * for target in self.targets: * target.start() */ - __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_19streaming_form_data_7_parser_4Part_1start, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Part_start, NULL, __pyx_n_s_streaming_form_data__parser, __pyx_d, ((PyObject *)__pyx_codeobj__46)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 147, __pyx_L1_error) + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_19streaming_form_data_7_parser_4Part_1start, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Part_start, NULL, __pyx_n_s_streaming_form_data__parser, __pyx_d, ((PyObject *)__pyx_codeobj__46)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 151, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19streaming_form_data_7_parser_Part, __pyx_n_s_start, __pyx_t_6) < 0) __PYX_ERR(0, 147, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19streaming_form_data_7_parser_Part, __pyx_n_s_start, __pyx_t_6) < 0) __PYX_ERR(0, 151, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_19streaming_form_data_7_parser_Part); - /* "streaming_form_data/_parser.pyx":151 + /* "streaming_form_data/_parser.pyx":155 * target.start() * * def data_received(self, bytes chunk): # <<<<<<<<<<<<<< * for target in self.targets: * target.data_received(chunk) */ - __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_19streaming_form_data_7_parser_4Part_3data_received, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Part_data_received, NULL, __pyx_n_s_streaming_form_data__parser, __pyx_d, ((PyObject *)__pyx_codeobj__48)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 151, __pyx_L1_error) + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_19streaming_form_data_7_parser_4Part_3data_received, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Part_data_received, NULL, __pyx_n_s_streaming_form_data__parser, __pyx_d, ((PyObject *)__pyx_codeobj__48)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 155, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19streaming_form_data_7_parser_Part, __pyx_n_s_data_received, __pyx_t_6) < 0) __PYX_ERR(0, 151, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19streaming_form_data_7_parser_Part, __pyx_n_s_data_received, __pyx_t_6) < 0) __PYX_ERR(0, 155, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_19streaming_form_data_7_parser_Part); - /* "streaming_form_data/_parser.pyx":155 + /* "streaming_form_data/_parser.pyx":159 * target.data_received(chunk) * * def finish(self): # <<<<<<<<<<<<<< * for target in self.targets: * target.finish() */ - __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_19streaming_form_data_7_parser_4Part_5finish, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Part_finish, NULL, __pyx_n_s_streaming_form_data__parser, __pyx_d, ((PyObject *)__pyx_codeobj__49)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 155, __pyx_L1_error) + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_19streaming_form_data_7_parser_4Part_5finish, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Part_finish, NULL, __pyx_n_s_streaming_form_data__parser, __pyx_d, ((PyObject *)__pyx_codeobj__49)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 159, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19streaming_form_data_7_parser_Part, __pyx_n_s_finish, __pyx_t_6) < 0) __PYX_ERR(0, 155, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19streaming_form_data_7_parser_Part, __pyx_n_s_finish, __pyx_t_6) < 0) __PYX_ERR(0, 159, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_19streaming_form_data_7_parser_Part); @@ -26380,42 +26770,42 @@ if (!__Pyx_RefNanny) { __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_19streaming_form_data_7_parser_Part); - /* "streaming_form_data/_parser.pyx":161 + /* "streaming_form_data/_parser.pyx":168 * * cdef class AsyncPart(_Part): * async def start(self): # <<<<<<<<<<<<<< * for target in self.targets: * await target.start() */ - __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_19streaming_form_data_7_parser_9AsyncPart_1start, __Pyx_CYFUNCTION_CCLASS | __Pyx_CYFUNCTION_COROUTINE, __pyx_n_s_AsyncPart_start, NULL, __pyx_n_s_streaming_form_data__parser, __pyx_d, ((PyObject *)__pyx_codeobj__5)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 161, __pyx_L1_error) + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_19streaming_form_data_7_parser_9AsyncPart_1start, __Pyx_CYFUNCTION_CCLASS | __Pyx_CYFUNCTION_COROUTINE, __pyx_n_s_AsyncPart_start, NULL, __pyx_n_s_streaming_form_data__parser, __pyx_d, ((PyObject *)__pyx_codeobj__5)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 168, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19streaming_form_data_7_parser_AsyncPart, __pyx_n_s_start, __pyx_t_6) < 0) __PYX_ERR(0, 161, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19streaming_form_data_7_parser_AsyncPart, __pyx_n_s_start, __pyx_t_6) < 0) __PYX_ERR(0, 168, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_19streaming_form_data_7_parser_AsyncPart); - /* "streaming_form_data/_parser.pyx":165 + /* "streaming_form_data/_parser.pyx":172 * await target.start() * * async def data_received(self, bytes chunk): # <<<<<<<<<<<<<< * for target in self.targets: * await target.data_received(chunk) */ - __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_19streaming_form_data_7_parser_9AsyncPart_4data_received, __Pyx_CYFUNCTION_CCLASS | __Pyx_CYFUNCTION_COROUTINE, __pyx_n_s_AsyncPart_data_received, NULL, __pyx_n_s_streaming_form_data__parser, __pyx_d, ((PyObject *)__pyx_codeobj__6)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 165, __pyx_L1_error) + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_19streaming_form_data_7_parser_9AsyncPart_4data_received, __Pyx_CYFUNCTION_CCLASS | __Pyx_CYFUNCTION_COROUTINE, __pyx_n_s_AsyncPart_data_received, NULL, __pyx_n_s_streaming_form_data__parser, __pyx_d, ((PyObject *)__pyx_codeobj__6)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19streaming_form_data_7_parser_AsyncPart, __pyx_n_s_data_received, __pyx_t_6) < 0) __PYX_ERR(0, 165, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19streaming_form_data_7_parser_AsyncPart, __pyx_n_s_data_received, __pyx_t_6) < 0) __PYX_ERR(0, 172, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_19streaming_form_data_7_parser_AsyncPart); - /* "streaming_form_data/_parser.pyx":169 + /* "streaming_form_data/_parser.pyx":176 * await target.data_received(chunk) * * async def finish(self): # <<<<<<<<<<<<<< * for target in self.targets: * await target.finish() */ - __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_19streaming_form_data_7_parser_9AsyncPart_7finish, __Pyx_CYFUNCTION_CCLASS | __Pyx_CYFUNCTION_COROUTINE, __pyx_n_s_AsyncPart_finish, NULL, __pyx_n_s_streaming_form_data__parser, __pyx_d, ((PyObject *)__pyx_codeobj__7)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 169, __pyx_L1_error) + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_19streaming_form_data_7_parser_9AsyncPart_7finish, __Pyx_CYFUNCTION_CCLASS | __Pyx_CYFUNCTION_COROUTINE, __pyx_n_s_AsyncPart_finish, NULL, __pyx_n_s_streaming_form_data__parser, __pyx_d, ((PyObject *)__pyx_codeobj__7)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19streaming_form_data_7_parser_AsyncPart, __pyx_n_s_finish, __pyx_t_6) < 0) __PYX_ERR(0, 169, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19streaming_form_data_7_parser_AsyncPart, __pyx_n_s_finish, __pyx_t_6) < 0) __PYX_ERR(0, 176, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_19streaming_form_data_7_parser_AsyncPart); @@ -26442,133 +26832,133 @@ if (!__Pyx_RefNanny) { __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_19streaming_form_data_7_parser_AsyncPart); - /* "streaming_form_data/_parser.pyx":207 + /* "streaming_form_data/_parser.pyx":217 * self.unexpected_part_name = "" * * def register(self, str name, object target): # <<<<<<<<<<<<<< * part = self._part_for(name) * */ - __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_19streaming_form_data_7_parser_7_Parser_3register, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Parser_register, NULL, __pyx_n_s_streaming_form_data__parser, __pyx_d, ((PyObject *)__pyx_codeobj__55)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 207, __pyx_L1_error) + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_19streaming_form_data_7_parser_7_Parser_3register, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Parser_register, NULL, __pyx_n_s_streaming_form_data__parser, __pyx_d, ((PyObject *)__pyx_codeobj__55)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 217, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19streaming_form_data_7_parser__Parser, __pyx_n_s_register, __pyx_t_6) < 0) __PYX_ERR(0, 207, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19streaming_form_data_7_parser__Parser, __pyx_n_s_register, __pyx_t_6) < 0) __PYX_ERR(0, 217, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_19streaming_form_data_7_parser__Parser); - /* "streaming_form_data/_parser.pyx":216 + /* "streaming_form_data/_parser.pyx":226 * self.expected_parts.append(part_cls(name, target)) * * def set_active_part(self, part, str filename): # <<<<<<<<<<<<<< * self.active_part = part * self.active_part.set_multipart_filename(filename) */ - __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_19streaming_form_data_7_parser_7_Parser_5set_active_part, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Parser_set_active_part, NULL, __pyx_n_s_streaming_form_data__parser, __pyx_d, ((PyObject *)__pyx_codeobj__57)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 216, __pyx_L1_error) + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_19streaming_form_data_7_parser_7_Parser_5set_active_part, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Parser_set_active_part, NULL, __pyx_n_s_streaming_form_data__parser, __pyx_d, ((PyObject *)__pyx_codeobj__57)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 226, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19streaming_form_data_7_parser__Parser, __pyx_n_s_set_active_part, __pyx_t_6) < 0) __PYX_ERR(0, 216, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19streaming_form_data_7_parser__Parser, __pyx_n_s_set_active_part, __pyx_t_6) < 0) __PYX_ERR(0, 226, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_19streaming_form_data_7_parser__Parser); - /* "streaming_form_data/_parser.pyx":221 + /* "streaming_form_data/_parser.pyx":231 * self.active_part.start() * * async def async_set_active_part(self, part, str filename): # <<<<<<<<<<<<<< * self.active_part = part * self.active_part.set_multipart_filename(filename) */ - __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_19streaming_form_data_7_parser_7_Parser_7async_set_active_part, __Pyx_CYFUNCTION_CCLASS | __Pyx_CYFUNCTION_COROUTINE, __pyx_n_s_Parser_async_set_active_part, NULL, __pyx_n_s_streaming_form_data__parser, __pyx_d, ((PyObject *)__pyx_codeobj__8)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 221, __pyx_L1_error) + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_19streaming_form_data_7_parser_7_Parser_7async_set_active_part, __Pyx_CYFUNCTION_CCLASS | __Pyx_CYFUNCTION_COROUTINE, __pyx_n_s_Parser_async_set_active_part, NULL, __pyx_n_s_streaming_form_data__parser, __pyx_d, ((PyObject *)__pyx_codeobj__8)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 231, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19streaming_form_data_7_parser__Parser, __pyx_n_s_async_set_active_part, __pyx_t_6) < 0) __PYX_ERR(0, 221, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19streaming_form_data_7_parser__Parser, __pyx_n_s_async_set_active_part, __pyx_t_6) < 0) __PYX_ERR(0, 231, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_19streaming_form_data_7_parser__Parser); - /* "streaming_form_data/_parser.pyx":226 + /* "streaming_form_data/_parser.pyx":236 * await self.active_part.start() * * def unset_active_part(self): # <<<<<<<<<<<<<< * if self.active_part: * self.active_part.finish() */ - __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_19streaming_form_data_7_parser_7_Parser_10unset_active_part, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Parser_unset_active_part, NULL, __pyx_n_s_streaming_form_data__parser, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 226, __pyx_L1_error) + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_19streaming_form_data_7_parser_7_Parser_10unset_active_part, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Parser_unset_active_part, NULL, __pyx_n_s_streaming_form_data__parser, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 236, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19streaming_form_data_7_parser__Parser, __pyx_n_s_unset_active_part, __pyx_t_6) < 0) __PYX_ERR(0, 226, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19streaming_form_data_7_parser__Parser, __pyx_n_s_unset_active_part, __pyx_t_6) < 0) __PYX_ERR(0, 236, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_19streaming_form_data_7_parser__Parser); - /* "streaming_form_data/_parser.pyx":231 + /* "streaming_form_data/_parser.pyx":241 * self.active_part = None * * async def async_unset_active_part(self): # <<<<<<<<<<<<<< * if self.active_part: * await self.active_part.finish() */ - __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_19streaming_form_data_7_parser_7_Parser_12async_unset_active_part, __Pyx_CYFUNCTION_CCLASS | __Pyx_CYFUNCTION_COROUTINE, __pyx_n_s_Parser_async_unset_active_part, NULL, __pyx_n_s_streaming_form_data__parser, __pyx_d, ((PyObject *)__pyx_codeobj__9)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 231, __pyx_L1_error) + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_19streaming_form_data_7_parser_7_Parser_12async_unset_active_part, __Pyx_CYFUNCTION_CCLASS | __Pyx_CYFUNCTION_COROUTINE, __pyx_n_s_Parser_async_unset_active_part, NULL, __pyx_n_s_streaming_form_data__parser, __pyx_d, ((PyObject *)__pyx_codeobj__9)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 241, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19streaming_form_data_7_parser__Parser, __pyx_n_s_async_unset_active_part, __pyx_t_6) < 0) __PYX_ERR(0, 231, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19streaming_form_data_7_parser__Parser, __pyx_n_s_async_unset_active_part, __pyx_t_6) < 0) __PYX_ERR(0, 241, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_19streaming_form_data_7_parser__Parser); - /* "streaming_form_data/_parser.pyx":236 + /* "streaming_form_data/_parser.pyx":246 * self.active_part = None * * def on_body(self, bytes value): # <<<<<<<<<<<<<< * if self.active_part and len(value) > 0: * self.active_part.data_received(value) */ - __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_19streaming_form_data_7_parser_7_Parser_15on_body, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Parser_on_body, NULL, __pyx_n_s_streaming_form_data__parser, __pyx_d, ((PyObject *)__pyx_codeobj__60)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 236, __pyx_L1_error) + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_19streaming_form_data_7_parser_7_Parser_15on_body, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Parser_on_body, NULL, __pyx_n_s_streaming_form_data__parser, __pyx_d, ((PyObject *)__pyx_codeobj__60)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 246, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19streaming_form_data_7_parser__Parser, __pyx_n_s_on_body, __pyx_t_6) < 0) __PYX_ERR(0, 236, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19streaming_form_data_7_parser__Parser, __pyx_n_s_on_body, __pyx_t_6) < 0) __PYX_ERR(0, 246, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_19streaming_form_data_7_parser__Parser); - /* "streaming_form_data/_parser.pyx":240 + /* "streaming_form_data/_parser.pyx":250 * self.active_part.data_received(value) * * async def async_on_body(self, bytes value): # <<<<<<<<<<<<<< * if self.active_part and len(value) > 0: * await self.active_part.data_received(value) */ - __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_19streaming_form_data_7_parser_7_Parser_17async_on_body, __Pyx_CYFUNCTION_CCLASS | __Pyx_CYFUNCTION_COROUTINE, __pyx_n_s_Parser_async_on_body, NULL, __pyx_n_s_streaming_form_data__parser, __pyx_d, ((PyObject *)__pyx_codeobj__10)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 240, __pyx_L1_error) + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_19streaming_form_data_7_parser_7_Parser_17async_on_body, __Pyx_CYFUNCTION_CCLASS | __Pyx_CYFUNCTION_COROUTINE, __pyx_n_s_Parser_async_on_body, NULL, __pyx_n_s_streaming_form_data__parser, __pyx_d, ((PyObject *)__pyx_codeobj__10)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 250, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19streaming_form_data_7_parser__Parser, __pyx_n_s_async_on_body, __pyx_t_6) < 0) __PYX_ERR(0, 240, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19streaming_form_data_7_parser__Parser, __pyx_n_s_async_on_body, __pyx_t_6) < 0) __PYX_ERR(0, 250, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_19streaming_form_data_7_parser__Parser); - /* "streaming_form_data/_parser.pyx":249 + /* "streaming_form_data/_parser.pyx":259 * return part * * def data_received(self, bytes data): # <<<<<<<<<<<<<< * if not data: * return ErrorCode.E_OK */ - __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_19streaming_form_data_7_parser_7_Parser_20data_received, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Parser_data_received, NULL, __pyx_n_s_streaming_form_data__parser, __pyx_d, ((PyObject *)__pyx_codeobj__62)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 249, __pyx_L1_error) + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_19streaming_form_data_7_parser_7_Parser_20data_received, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Parser_data_received, NULL, __pyx_n_s_streaming_form_data__parser, __pyx_d, ((PyObject *)__pyx_codeobj__62)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 259, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19streaming_form_data_7_parser__Parser, __pyx_n_s_data_received, __pyx_t_6) < 0) __PYX_ERR(0, 249, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19streaming_form_data_7_parser__Parser, __pyx_n_s_data_received, __pyx_t_6) < 0) __PYX_ERR(0, 259, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_19streaming_form_data_7_parser__Parser); - /* "streaming_form_data/_parser.pyx":260 + /* "streaming_form_data/_parser.pyx":270 * return self._parse(chunk, index) * * async def async_data_received(self, bytes data): # <<<<<<<<<<<<<< * if not data: * return ErrorCode.E_OK */ - __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_19streaming_form_data_7_parser_7_Parser_22async_data_received, __Pyx_CYFUNCTION_CCLASS | __Pyx_CYFUNCTION_COROUTINE, __pyx_n_s_Parser_async_data_received, NULL, __pyx_n_s_streaming_form_data__parser, __pyx_d, ((PyObject *)__pyx_codeobj__11)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 260, __pyx_L1_error) + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_19streaming_form_data_7_parser_7_Parser_22async_data_received, __Pyx_CYFUNCTION_CCLASS | __Pyx_CYFUNCTION_COROUTINE, __pyx_n_s_Parser_async_data_received, NULL, __pyx_n_s_streaming_form_data__parser, __pyx_d, ((PyObject *)__pyx_codeobj__11)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 270, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19streaming_form_data_7_parser__Parser, __pyx_n_s_async_data_received, __pyx_t_6) < 0) __PYX_ERR(0, 260, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19streaming_form_data_7_parser__Parser, __pyx_n_s_async_data_received, __pyx_t_6) < 0) __PYX_ERR(0, 270, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_19streaming_form_data_7_parser__Parser); - /* "streaming_form_data/_parser.pyx":290 - * return (chunk, index) + /* "streaming_form_data/_parser.pyx":311 + * self.mark_error() * * def _parse(self, bytes chunk, size_t index): # <<<<<<<<<<<<<< * cdef size_t idx, buffer_start, chunk_len * cdef size_t match_start, skip_count, matched_length */ - __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_19streaming_form_data_7_parser_7_Parser_25_parse, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Parser__parse, NULL, __pyx_n_s_streaming_form_data__parser, __pyx_d, ((PyObject *)__pyx_codeobj__64)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 290, __pyx_L1_error) + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_19streaming_form_data_7_parser_7_Parser_25_parse, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Parser__parse, NULL, __pyx_n_s_streaming_form_data__parser, __pyx_d, ((PyObject *)__pyx_codeobj__64)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 311, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19streaming_form_data_7_parser__Parser, __pyx_n_s_parse, __pyx_t_6) < 0) __PYX_ERR(0, 290, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19streaming_form_data_7_parser__Parser, __pyx_n_s_parse, __pyx_t_6) < 0) __PYX_ERR(0, 311, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; PyType_Modified(__pyx_ptype_19streaming_form_data_7_parser__Parser); @@ -28236,6 +28626,12 @@ static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *nam return 0; } +/* PyObjectCallNoArg */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { + PyObject *arg[2] = {NULL, NULL}; + return __Pyx_PyObject_FastCall(func, arg + 1, 0 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); +} + /* FixUpExtensionType */ #if CYTHON_USE_TYPE_SPECS static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type) { @@ -28686,12 +29082,6 @@ static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name #endif } -/* PyObjectCallNoArg */ -static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { - PyObject *arg[2] = {NULL, NULL}; - return __Pyx_PyObject_FastCall(func, arg + 1, 0 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); -} - /* CoroutineBase */ #include #if PY_VERSION_HEX >= 0x030b00a6 diff --git a/streaming_form_data/_parser.pyx b/streaming_form_data/_parser.pyx index b050c50f..a3d80231 100644 --- a/streaming_form_data/_parser.pyx +++ b/streaming_form_data/_parser.pyx @@ -121,7 +121,8 @@ cdef class Finder: cdef class _Part: - """One part of a multipart/form-data request + """ + A single part of a multipart/form-data request """ cdef public str name @@ -142,6 +143,9 @@ cdef class _Part: for target in self.targets: target.multipart_content_type = value + cdef is_sync(self): + raise NotImplementedError() + cdef class Part(_Part): def start(self): @@ -156,6 +160,9 @@ cdef class Part(_Part): for target in self.targets: target.finish() + cdef is_sync(self): + return True + cdef class AsyncPart(_Part): async def start(self): @@ -170,6 +177,9 @@ cdef class AsyncPart(_Part): for target in self.targets: await target.finish() + cdef is_sync(self): + return False + cdef class _Parser: cdef ParserState state @@ -287,6 +297,17 @@ cdef class _Parser: return (chunk, index) + cdef handle_ps_start(self, const Byte* chunk_ptr, size_t* idx, size_t* buffer_start): + cdef Byte byte = chunk_ptr[idx[0]] + + if byte == c_hyphen: + buffer_start[0] = idx[0] + self.state = ParserState.PS_STARTING_BOUNDARY + elif byte == c_cr: + self.state = ParserState.PS_START_CR + else: + self.mark_error() + def _parse(self, bytes chunk, size_t index): cdef size_t idx, buffer_start, chunk_len cdef size_t match_start, skip_count, matched_length @@ -302,13 +323,9 @@ cdef class _Parser: byte = chunk_ptr[idx] if self.state == ParserState.PS_START: - if byte == c_hyphen: - buffer_start = idx - self.state = ParserState.PS_STARTING_BOUNDARY - elif byte == c_cr: - self.state = ParserState.PS_START_CR - else: - self.mark_error() + self.handle_ps_start(chunk_ptr, &idx, &buffer_start) + + if self.has_error(): return ErrorCode.E_DELIMITING elif self.state == ParserState.PS_START_CR: @@ -575,7 +592,10 @@ cdef class _Parser: self.state = ParserState.PS_ERROR if self.active_part: - if isinstance(self.active_part, Part): + if self.active_part.is_sync(): self.active_part.finish() else: asyncio.get_event_loop().call_soon_threadsafe(self.active_part.finish()) + + cdef has_error(self): + return self.state == ParserState.PS_ERROR