diff --git a/src/dependency_injector/providers/factories.c b/src/dependency_injector/providers/factories.c index 6afcdb3b..d41cd276 100644 --- a/src/dependency_injector/providers/factories.c +++ b/src/dependency_injector/providers/factories.c @@ -950,7 +950,7 @@ static struct __pyx_vtabstruct_19dependency_injector_9providers_9factories_Facto static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers_9factories_7Factory___provide(struct __pyx_obj_19dependency_injector_9providers_9factories_Factory *, PyObject *, PyObject *); -/* "dependency_injector/providers/factories.pyx":252 +/* "dependency_injector/providers/factories.pyx":253 * * * cdef class DelegatedFactory(Factory): # <<<<<<<<<<<<<< @@ -1403,7 +1403,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_2 static PyObject *__pyx_tp_new_19dependency_injector_9providers_9factories_Factory(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_19dependency_injector_9providers_9factories_DelegatedFactory(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -/* "dependency_injector/providers/factories.pyx":72 +/* "dependency_injector/providers/factories.pyx":73 * provided_type = None * * def __init__(self, provides, *args, **kwargs): # <<<<<<<<<<<<<< @@ -1456,7 +1456,7 @@ static int __pyx_pw_19dependency_injector_9providers_9factories_7Factory_1__init } if (unlikely(kw_args > 0)) { const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "__init__") < 0)) __PYX_ERR(0, 72, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "__init__") < 0)) __PYX_ERR(0, 73, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) < 1) { goto __pyx_L5_argtuple_error; @@ -1467,7 +1467,7 @@ static int __pyx_pw_19dependency_injector_9providers_9factories_7Factory_1__init } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 72, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 73, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0; __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; @@ -1501,19 +1501,19 @@ static int __pyx_pf_19dependency_injector_9providers_9factories_7Factory___init_ PyObject *__pyx_t_12 = NULL; __Pyx_RefNannySetupContext("__init__", 0); - /* "dependency_injector/providers/factories.pyx":84 + /* "dependency_injector/providers/factories.pyx":85 * :type kwargs: dict[str, object] * """ * if (self.__class__.provided_type and # <<<<<<<<<<<<<< * not issubclass(provides, self.__class__.provided_type)): * raise Error('{0} can provide only {1} instances'.format( */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 84, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 85, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_provided_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 84, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_provided_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 85, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 84, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 85, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_4) { } else { @@ -1521,25 +1521,25 @@ static int __pyx_pf_19dependency_injector_9providers_9factories_7Factory___init_ goto __pyx_L4_bool_binop_done; } - /* "dependency_injector/providers/factories.pyx":85 + /* "dependency_injector/providers/factories.pyx":86 * """ * if (self.__class__.provided_type and * not issubclass(provides, self.__class__.provided_type)): # <<<<<<<<<<<<<< * raise Error('{0} can provide only {1} instances'.format( * self.__class__, self.__class__.provided_type)) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 85, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 86, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_provided_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 85, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_provided_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 86, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_4 = PyObject_IsSubclass(__pyx_v_provides, __pyx_t_2); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(0, 85, __pyx_L1_error) + __pyx_t_4 = PyObject_IsSubclass(__pyx_v_provides, __pyx_t_2); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(0, 86, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = ((!(__pyx_t_4 != 0)) != 0); __pyx_t_1 = __pyx_t_5; __pyx_L4_bool_binop_done:; - /* "dependency_injector/providers/factories.pyx":84 + /* "dependency_injector/providers/factories.pyx":85 * :type kwargs: dict[str, object] * """ * if (self.__class__.provided_type and # <<<<<<<<<<<<<< @@ -1548,30 +1548,30 @@ static int __pyx_pf_19dependency_injector_9providers_9factories_7Factory___init_ */ if (__pyx_t_1) { - /* "dependency_injector/providers/factories.pyx":86 + /* "dependency_injector/providers/factories.pyx":87 * if (self.__class__.provided_type and * not issubclass(provides, self.__class__.provided_type)): * raise Error('{0} can provide only {1} instances'.format( # <<<<<<<<<<<<<< * self.__class__, self.__class__.provided_type)) * */ - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_Error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 86, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_Error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 87, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_can_provide_only_1_instances, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 86, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_can_provide_only_1_instances, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 87, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - /* "dependency_injector/providers/factories.pyx":87 + /* "dependency_injector/providers/factories.pyx":88 * not issubclass(provides, self.__class__.provided_type)): * raise Error('{0} can provide only {1} instances'.format( * self.__class__, self.__class__.provided_type)) # <<<<<<<<<<<<<< * * self.__instantiator = Callable(provides, *args, **kwargs) */ - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 87, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 88, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 87, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 88, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_provided_type); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 87, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_provided_type); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 88, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = NULL; @@ -1589,7 +1589,7 @@ static int __pyx_pf_19dependency_injector_9providers_9factories_7Factory___init_ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_8, __pyx_t_10}; - __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 86, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 87, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -1599,7 +1599,7 @@ static int __pyx_pf_19dependency_injector_9providers_9factories_7Factory___init_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_8, __pyx_t_10}; - __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 86, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 87, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -1607,7 +1607,7 @@ static int __pyx_pf_19dependency_injector_9providers_9factories_7Factory___init_ } else #endif { - __pyx_t_12 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 86, __pyx_L1_error) + __pyx_t_12 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 87, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); if (__pyx_t_9) { __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_9); __pyx_t_9 = NULL; @@ -1618,7 +1618,7 @@ static int __pyx_pf_19dependency_injector_9providers_9factories_7Factory___init_ PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_11, __pyx_t_10); __pyx_t_8 = 0; __pyx_t_10 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_12, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 86, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_12, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 87, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } @@ -1634,14 +1634,14 @@ static int __pyx_pf_19dependency_injector_9providers_9factories_7Factory___init_ } } if (!__pyx_t_7) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 86, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 87, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 86, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 87, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -1650,20 +1650,20 @@ static int __pyx_pf_19dependency_injector_9providers_9factories_7Factory___init_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 86, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 87, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif { - __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 86, __pyx_L1_error) + __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 87, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_7); __pyx_t_7 = NULL; __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_t_6); __pyx_t_6 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 86, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 87, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } @@ -1671,9 +1671,9 @@ static int __pyx_pf_19dependency_injector_9providers_9factories_7Factory___init_ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 86, __pyx_L1_error) + __PYX_ERR(0, 87, __pyx_L1_error) - /* "dependency_injector/providers/factories.pyx":84 + /* "dependency_injector/providers/factories.pyx":85 * :type kwargs: dict[str, object] * """ * if (self.__class__.provided_type and # <<<<<<<<<<<<<< @@ -1682,22 +1682,22 @@ static int __pyx_pf_19dependency_injector_9providers_9factories_7Factory___init_ */ } - /* "dependency_injector/providers/factories.pyx":89 + /* "dependency_injector/providers/factories.pyx":90 * self.__class__, self.__class__.provided_type)) * * self.__instantiator = Callable(provides, *args, **kwargs) # <<<<<<<<<<<<<< * * self.__attributes = tuple() */ - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 89, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_provides); __Pyx_GIVEREF(__pyx_v_provides); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_provides); - __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_v_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 89, __pyx_L1_error) + __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_v_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_19dependency_injector_9providers_9callables_Callable), __pyx_t_3, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 89, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_19dependency_injector_9providers_9callables_Callable), __pyx_t_3, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GIVEREF(__pyx_t_2); @@ -1706,14 +1706,14 @@ static int __pyx_pf_19dependency_injector_9providers_9factories_7Factory___init_ __pyx_v_self->__pyx___instantiator = ((struct __pyx_obj_19dependency_injector_9providers_9callables_Callable *)__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers/factories.pyx":91 + /* "dependency_injector/providers/factories.pyx":92 * self.__instantiator = Callable(provides, *args, **kwargs) * * self.__attributes = tuple() # <<<<<<<<<<<<<< * self.__attributes_len = 0 * */ - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&PyTuple_Type)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 91, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&PyTuple_Type)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 92, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->__pyx___attributes); @@ -1721,7 +1721,7 @@ static int __pyx_pf_19dependency_injector_9providers_9factories_7Factory___init_ __pyx_v_self->__pyx___attributes = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers/factories.pyx":92 + /* "dependency_injector/providers/factories.pyx":93 * * self.__attributes = tuple() * self.__attributes_len = 0 # <<<<<<<<<<<<<< @@ -1730,14 +1730,14 @@ static int __pyx_pf_19dependency_injector_9providers_9factories_7Factory___init_ */ __pyx_v_self->__pyx___attributes_len = 0; - /* "dependency_injector/providers/factories.pyx":94 + /* "dependency_injector/providers/factories.pyx":95 * self.__attributes_len = 0 * * super(Factory, self).__init__() # <<<<<<<<<<<<<< * * def __deepcopy__(self, memo): */ - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 94, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 95, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_9factories_Factory)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_9factories_Factory)); @@ -1745,10 +1745,10 @@ static int __pyx_pf_19dependency_injector_9providers_9factories_7Factory___init_ __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_self)); - __pyx_t_12 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 94, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 95, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 94, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 95, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = NULL; @@ -1762,16 +1762,16 @@ static int __pyx_pf_19dependency_injector_9providers_9factories_7Factory___init_ } } if (__pyx_t_12) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 94, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 95, __pyx_L1_error) __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } else { - __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 94, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 95, __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; - /* "dependency_injector/providers/factories.pyx":72 + /* "dependency_injector/providers/factories.pyx":73 * provided_type = None * * def __init__(self, provides, *args, **kwargs): # <<<<<<<<<<<<<< @@ -1798,7 +1798,7 @@ static int __pyx_pf_19dependency_injector_9providers_9factories_7Factory___init_ return __pyx_r; } -/* "dependency_injector/providers/factories.pyx":96 +/* "dependency_injector/providers/factories.pyx":97 * super(Factory, self).__init__() * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< @@ -1838,21 +1838,21 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_2 PyObject *__pyx_t_11 = NULL; __Pyx_RefNannySetupContext("__deepcopy__", 0); - /* "dependency_injector/providers/factories.pyx":98 + /* "dependency_injector/providers/factories.pyx":99 * def __deepcopy__(self, memo): * """Create and return full copy of provider.""" * copied = memo.get(id(self)) # <<<<<<<<<<<<<< * if copied is not None: * return copied */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_memo, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 98, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_memo, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 99, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 98, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 99, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self)); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_id, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 98, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_id, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 99, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -1866,14 +1866,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_2 } } if (!__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 98, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 99, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_4}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 98, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 99, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -1882,20 +1882,20 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_2 #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_4}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 98, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 99, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { - __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 98, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 99, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_4); __pyx_t_4 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 98, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 99, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } @@ -1904,7 +1904,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_2 __pyx_v_copied = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/providers/factories.pyx":99 + /* "dependency_injector/providers/factories.pyx":100 * """Create and return full copy of provider.""" * copied = memo.get(id(self)) * if copied is not None: # <<<<<<<<<<<<<< @@ -1915,7 +1915,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_2 __pyx_t_7 = (__pyx_t_6 != 0); if (__pyx_t_7) { - /* "dependency_injector/providers/factories.pyx":100 + /* "dependency_injector/providers/factories.pyx":101 * copied = memo.get(id(self)) * if copied is not None: * return copied # <<<<<<<<<<<<<< @@ -1927,7 +1927,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_2 __pyx_r = __pyx_v_copied; goto __pyx_L0; - /* "dependency_injector/providers/factories.pyx":99 + /* "dependency_injector/providers/factories.pyx":100 * """Create and return full copy of provider.""" * copied = memo.get(id(self)) * if copied is not None: # <<<<<<<<<<<<<< @@ -1936,91 +1936,91 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_2 */ } - /* "dependency_injector/providers/factories.pyx":102 + /* "dependency_injector/providers/factories.pyx":103 * return copied * * copied = self.__class__(self.cls, # <<<<<<<<<<<<<< * *deepcopy(self.args, memo), * **deepcopy(self.kwargs, memo)) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 102, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_cls); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 102, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_cls); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 102, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers/factories.pyx":103 + /* "dependency_injector/providers/factories.pyx":104 * * copied = self.__class__(self.cls, * *deepcopy(self.args, memo), # <<<<<<<<<<<<<< * **deepcopy(self.kwargs, memo)) * copied.set_attributes(**deepcopy(self.attributes, memo)) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 103, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 104, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(0, 103, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(0, 104, __pyx_L1_error) __pyx_t_8.__pyx_n = 1; __pyx_t_8.memo = ((PyObject*)__pyx_v_memo); - __pyx_t_4 = __pyx_f_19dependency_injector_9providers_5utils_deepcopy(__pyx_t_2, 0, &__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 103, __pyx_L1_error) + __pyx_t_4 = __pyx_f_19dependency_injector_9providers_5utils_deepcopy(__pyx_t_2, 0, &__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 104, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers/factories.pyx":102 + /* "dependency_injector/providers/factories.pyx":103 * return copied * * copied = self.__class__(self.cls, # <<<<<<<<<<<<<< * *deepcopy(self.args, memo), * **deepcopy(self.kwargs, memo)) */ - __pyx_t_2 = PySequence_Tuple(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 102, __pyx_L1_error) + __pyx_t_2 = PySequence_Tuple(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyNumber_Add(__pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 102, __pyx_L1_error) + __pyx_t_4 = PyNumber_Add(__pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers/factories.pyx":104 + /* "dependency_injector/providers/factories.pyx":105 * copied = self.__class__(self.cls, * *deepcopy(self.args, memo), * **deepcopy(self.kwargs, memo)) # <<<<<<<<<<<<<< * copied.set_attributes(**deepcopy(self.attributes, memo)) * */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_kwargs); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 104, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_kwargs); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 105, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(0, 104, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(0, 105, __pyx_L1_error) __pyx_t_8.__pyx_n = 1; __pyx_t_8.memo = ((PyObject*)__pyx_v_memo); - __pyx_t_3 = __pyx_f_19dependency_injector_9providers_5utils_deepcopy(__pyx_t_5, 0, &__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 104, __pyx_L1_error) + __pyx_t_3 = __pyx_f_19dependency_injector_9providers_5utils_deepcopy(__pyx_t_5, 0, &__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 105, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(__pyx_t_3 == Py_None)) { PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); - __PYX_ERR(0, 104, __pyx_L1_error) + __PYX_ERR(0, 105, __pyx_L1_error) } if (likely(PyDict_CheckExact(__pyx_t_3))) { - __pyx_t_2 = PyDict_Copy(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 104, __pyx_L1_error) + __pyx_t_2 = PyDict_Copy(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 105, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { - __pyx_t_2 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 102, __pyx_L1_error) + __pyx_t_2 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - /* "dependency_injector/providers/factories.pyx":102 + /* "dependency_injector/providers/factories.pyx":103 * return copied * * copied = self.__class__(self.cls, # <<<<<<<<<<<<<< * *deepcopy(self.args, memo), * **deepcopy(self.kwargs, memo)) */ - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 102, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -2028,58 +2028,58 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_2 __Pyx_DECREF_SET(__pyx_v_copied, __pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/providers/factories.pyx":105 + /* "dependency_injector/providers/factories.pyx":106 * *deepcopy(self.args, memo), * **deepcopy(self.kwargs, memo)) * copied.set_attributes(**deepcopy(self.attributes, memo)) # <<<<<<<<<<<<<< * * for overriding_provider in self.overridden: */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_copied, __pyx_n_s_set_attributes); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 105, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_copied, __pyx_n_s_set_attributes); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_attributes); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 105, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_attributes); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(0, 105, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(0, 106, __pyx_L1_error) __pyx_t_8.__pyx_n = 1; __pyx_t_8.memo = ((PyObject*)__pyx_v_memo); - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_5utils_deepcopy(__pyx_t_4, 0, &__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 105, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_5utils_deepcopy(__pyx_t_4, 0, &__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(__pyx_t_1 == Py_None)) { PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); - __PYX_ERR(0, 105, __pyx_L1_error) + __PYX_ERR(0, 106, __pyx_L1_error) } if (likely(PyDict_CheckExact(__pyx_t_1))) { - __pyx_t_2 = PyDict_Copy(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 105, __pyx_L1_error) + __pyx_t_2 = PyDict_Copy(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { - __pyx_t_2 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 105, __pyx_L1_error) + __pyx_t_2 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 105, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers/factories.pyx":107 + /* "dependency_injector/providers/factories.pyx":108 * copied.set_attributes(**deepcopy(self.attributes, memo)) * * for overriding_provider in self.overridden: # <<<<<<<<<<<<<< * copied.override(deepcopy(overriding_provider, memo)) * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_overridden); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 107, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_overridden); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 108, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_9 = 0; __pyx_t_10 = NULL; } else { - __pyx_t_9 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 107, __pyx_L1_error) + __pyx_t_9 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 108, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_10 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 107, __pyx_L1_error) + __pyx_t_10 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 108, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -2087,17 +2087,17 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_2 if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 107, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 108, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 107, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 108, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 107, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 108, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 107, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 108, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -2107,7 +2107,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_2 PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 107, __pyx_L1_error) + else __PYX_ERR(0, 108, __pyx_L1_error) } break; } @@ -2116,19 +2116,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_2 __Pyx_XDECREF_SET(__pyx_v_overriding_provider, __pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers/factories.pyx":108 + /* "dependency_injector/providers/factories.pyx":109 * * for overriding_provider in self.overridden: * copied.override(deepcopy(overriding_provider, memo)) # <<<<<<<<<<<<<< * * return copied */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_copied, __pyx_n_s_override); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 108, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_copied, __pyx_n_s_override); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(0, 108, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_v_memo))||((__pyx_v_memo) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_memo)->tp_name), 0))) __PYX_ERR(0, 109, __pyx_L1_error) __pyx_t_8.__pyx_n = 1; __pyx_t_8.memo = ((PyObject*)__pyx_v_memo); - __pyx_t_4 = __pyx_f_19dependency_injector_9providers_5utils_deepcopy(__pyx_v_overriding_provider, 0, &__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 108, __pyx_L1_error) + __pyx_t_4 = __pyx_f_19dependency_injector_9providers_5utils_deepcopy(__pyx_v_overriding_provider, 0, &__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -2141,14 +2141,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_2 } } if (!__pyx_t_5) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 108, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 109, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 108, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 109, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -2157,20 +2157,20 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_2 #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 108, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 109, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { - __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 108, __pyx_L1_error) + __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_5); __pyx_t_5 = NULL; __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_t_4); __pyx_t_4 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 108, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } @@ -2178,7 +2178,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_2 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers/factories.pyx":107 + /* "dependency_injector/providers/factories.pyx":108 * copied.set_attributes(**deepcopy(self.attributes, memo)) * * for overriding_provider in self.overridden: # <<<<<<<<<<<<<< @@ -2188,7 +2188,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_2 } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers/factories.pyx":110 + /* "dependency_injector/providers/factories.pyx":111 * copied.override(deepcopy(overriding_provider, memo)) * * return copied # <<<<<<<<<<<<<< @@ -2200,7 +2200,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_2 __pyx_r = __pyx_v_copied; goto __pyx_L0; - /* "dependency_injector/providers/factories.pyx":96 + /* "dependency_injector/providers/factories.pyx":97 * super(Factory, self).__init__() * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< @@ -2226,7 +2226,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_2 return __pyx_r; } -/* "dependency_injector/providers/factories.pyx":112 +/* "dependency_injector/providers/factories.pyx":113 * return copied * * def __str__(self): # <<<<<<<<<<<<<< @@ -2258,7 +2258,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_4 PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__str__", 0); - /* "dependency_injector/providers/factories.pyx":117 + /* "dependency_injector/providers/factories.pyx":118 * :rtype: str * """ * return represent_provider(provider=self, # <<<<<<<<<<<<<< @@ -2267,31 +2267,31 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_4 */ __Pyx_XDECREF(__pyx_r); - /* "dependency_injector/providers/factories.pyx":118 + /* "dependency_injector/providers/factories.pyx":119 * """ * return represent_provider(provider=self, * provides=self.__instantiator.provides) # <<<<<<<<<<<<<< * * @property */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_provides); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 118, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_provides); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - /* "dependency_injector/providers/factories.pyx":117 + /* "dependency_injector/providers/factories.pyx":118 * :rtype: str * """ * return represent_provider(provider=self, # <<<<<<<<<<<<<< * provides=self.__instantiator.provides) * */ - __pyx_t_2 = __pyx_f_19dependency_injector_9providers_5utils_represent_provider(((PyObject *)__pyx_v_self), __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 117, __pyx_L1_error) + __pyx_t_2 = __pyx_f_19dependency_injector_9providers_5utils_represent_provider(((PyObject *)__pyx_v_self), __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 118, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "dependency_injector/providers/factories.pyx":112 + /* "dependency_injector/providers/factories.pyx":113 * return copied * * def __str__(self): # <<<<<<<<<<<<<< @@ -2311,7 +2311,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_4 return __pyx_r; } -/* "dependency_injector/providers/factories.pyx":121 +/* "dependency_injector/providers/factories.pyx":122 * * @property * def cls(self): # <<<<<<<<<<<<<< @@ -2338,7 +2338,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_3 PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - /* "dependency_injector/providers/factories.pyx":123 + /* "dependency_injector/providers/factories.pyx":124 * def cls(self): * """Return provided type.""" * return self.__instantiator.provides # <<<<<<<<<<<<<< @@ -2346,13 +2346,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_3 * @property */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_provides); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 123, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_provides); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers/factories.pyx":121 + /* "dependency_injector/providers/factories.pyx":122 * * @property * def cls(self): # <<<<<<<<<<<<<< @@ -2371,7 +2371,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_3 return __pyx_r; } -/* "dependency_injector/providers/factories.pyx":126 +/* "dependency_injector/providers/factories.pyx":127 * * @property * def args(self): # <<<<<<<<<<<<<< @@ -2398,7 +2398,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_4 PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - /* "dependency_injector/providers/factories.pyx":128 + /* "dependency_injector/providers/factories.pyx":129 * def args(self): * """Return positional argument injections.""" * return self.__instantiator.args # <<<<<<<<<<<<<< @@ -2406,13 +2406,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_4 * def add_args(self, *args): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 128, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers/factories.pyx":126 + /* "dependency_injector/providers/factories.pyx":127 * * @property * def args(self): # <<<<<<<<<<<<<< @@ -2431,7 +2431,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_4 return __pyx_r; } -/* "dependency_injector/providers/factories.pyx":130 +/* "dependency_injector/providers/factories.pyx":131 * return self.__instantiator.args * * def add_args(self, *args): # <<<<<<<<<<<<<< @@ -2465,21 +2465,21 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_6 PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("add_args", 0); - /* "dependency_injector/providers/factories.pyx":138 + /* "dependency_injector/providers/factories.pyx":139 * :return: Reference ``self`` * """ * self.__instantiator.add_args(*args) # <<<<<<<<<<<<<< * return self * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_add_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 138, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_add_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 138, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers/factories.pyx":139 + /* "dependency_injector/providers/factories.pyx":140 * """ * self.__instantiator.add_args(*args) * return self # <<<<<<<<<<<<<< @@ -2491,7 +2491,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_6 __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers/factories.pyx":130 + /* "dependency_injector/providers/factories.pyx":131 * return self.__instantiator.args * * def add_args(self, *args): # <<<<<<<<<<<<<< @@ -2511,7 +2511,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_6 return __pyx_r; } -/* "dependency_injector/providers/factories.pyx":141 +/* "dependency_injector/providers/factories.pyx":142 * return self * * def set_args(self, *args): # <<<<<<<<<<<<<< @@ -2545,21 +2545,21 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_8 PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("set_args", 0); - /* "dependency_injector/providers/factories.pyx":151 + /* "dependency_injector/providers/factories.pyx":152 * :return: Reference ``self`` * """ * self.__instantiator.set_args(*args) # <<<<<<<<<<<<<< * return self * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_set_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 151, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_set_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 152, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 151, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 152, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers/factories.pyx":152 + /* "dependency_injector/providers/factories.pyx":153 * """ * self.__instantiator.set_args(*args) * return self # <<<<<<<<<<<<<< @@ -2571,7 +2571,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_8 __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers/factories.pyx":141 + /* "dependency_injector/providers/factories.pyx":142 * return self * * def set_args(self, *args): # <<<<<<<<<<<<<< @@ -2591,7 +2591,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_8 return __pyx_r; } -/* "dependency_injector/providers/factories.pyx":154 +/* "dependency_injector/providers/factories.pyx":155 * return self * * def clear_args(self): # <<<<<<<<<<<<<< @@ -2621,14 +2621,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_1 PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("clear_args", 0); - /* "dependency_injector/providers/factories.pyx":159 + /* "dependency_injector/providers/factories.pyx":160 * :return: Reference ``self`` * """ * self.__instantiator.clear_args() # <<<<<<<<<<<<<< * return self * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_clear_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 159, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_clear_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 160, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -2641,16 +2641,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_1 } } if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 159, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 160, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 159, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 160, __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; - /* "dependency_injector/providers/factories.pyx":160 + /* "dependency_injector/providers/factories.pyx":161 * """ * self.__instantiator.clear_args() * return self # <<<<<<<<<<<<<< @@ -2662,7 +2662,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_1 __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers/factories.pyx":154 + /* "dependency_injector/providers/factories.pyx":155 * return self * * def clear_args(self): # <<<<<<<<<<<<<< @@ -2683,7 +2683,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_1 return __pyx_r; } -/* "dependency_injector/providers/factories.pyx":163 +/* "dependency_injector/providers/factories.pyx":164 * * @property * def kwargs(self): # <<<<<<<<<<<<<< @@ -2710,7 +2710,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_6 PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - /* "dependency_injector/providers/factories.pyx":165 + /* "dependency_injector/providers/factories.pyx":166 * def kwargs(self): * """Return keyword argument injections.""" * return self.__instantiator.kwargs # <<<<<<<<<<<<<< @@ -2718,13 +2718,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_6 * def add_kwargs(self, **kwargs): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 165, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 166, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers/factories.pyx":163 + /* "dependency_injector/providers/factories.pyx":164 * * @property * def kwargs(self): # <<<<<<<<<<<<<< @@ -2743,7 +2743,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_6 return __pyx_r; } -/* "dependency_injector/providers/factories.pyx":167 +/* "dependency_injector/providers/factories.pyx":168 * return self.__instantiator.kwargs * * def add_kwargs(self, **kwargs): # <<<<<<<<<<<<<< @@ -2783,21 +2783,21 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_1 PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("add_kwargs", 0); - /* "dependency_injector/providers/factories.pyx":175 + /* "dependency_injector/providers/factories.pyx":176 * :return: Reference ``self`` * """ * self.__instantiator.add_kwargs(**kwargs) # <<<<<<<<<<<<<< * return self * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_add_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 175, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_add_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 175, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers/factories.pyx":176 + /* "dependency_injector/providers/factories.pyx":177 * """ * self.__instantiator.add_kwargs(**kwargs) * return self # <<<<<<<<<<<<<< @@ -2809,7 +2809,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_1 __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers/factories.pyx":167 + /* "dependency_injector/providers/factories.pyx":168 * return self.__instantiator.kwargs * * def add_kwargs(self, **kwargs): # <<<<<<<<<<<<<< @@ -2829,7 +2829,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_1 return __pyx_r; } -/* "dependency_injector/providers/factories.pyx":178 +/* "dependency_injector/providers/factories.pyx":179 * return self * * def set_kwargs(self, **kwargs): # <<<<<<<<<<<<<< @@ -2869,21 +2869,21 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_1 PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("set_kwargs", 0); - /* "dependency_injector/providers/factories.pyx":188 + /* "dependency_injector/providers/factories.pyx":189 * :return: Reference ``self`` * """ * self.__instantiator.set_kwargs(**kwargs) # <<<<<<<<<<<<<< * return self * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_set_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 188, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_set_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 188, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers/factories.pyx":189 + /* "dependency_injector/providers/factories.pyx":190 * """ * self.__instantiator.set_kwargs(**kwargs) * return self # <<<<<<<<<<<<<< @@ -2895,7 +2895,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_1 __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers/factories.pyx":178 + /* "dependency_injector/providers/factories.pyx":179 * return self * * def set_kwargs(self, **kwargs): # <<<<<<<<<<<<<< @@ -2915,7 +2915,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_1 return __pyx_r; } -/* "dependency_injector/providers/factories.pyx":191 +/* "dependency_injector/providers/factories.pyx":192 * return self * * def clear_kwargs(self): # <<<<<<<<<<<<<< @@ -2945,14 +2945,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_1 PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("clear_kwargs", 0); - /* "dependency_injector/providers/factories.pyx":196 + /* "dependency_injector/providers/factories.pyx":197 * :return: Reference ``self`` * """ * self.__instantiator.clear_kwargs() # <<<<<<<<<<<<<< * return self * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_clear_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 196, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_clear_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 197, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -2965,16 +2965,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_1 } } if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 196, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 197, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 196, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 197, __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; - /* "dependency_injector/providers/factories.pyx":197 + /* "dependency_injector/providers/factories.pyx":198 * """ * self.__instantiator.clear_kwargs() * return self # <<<<<<<<<<<<<< @@ -2986,7 +2986,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_1 __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers/factories.pyx":191 + /* "dependency_injector/providers/factories.pyx":192 * return self * * def clear_kwargs(self): # <<<<<<<<<<<<<< @@ -3007,7 +3007,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_1 return __pyx_r; } -/* "dependency_injector/providers/factories.pyx":200 +/* "dependency_injector/providers/factories.pyx":201 * * @property * def attributes(self): # <<<<<<<<<<<<<< @@ -3039,19 +3039,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_1 int __pyx_t_3; __Pyx_RefNannySetupContext("__get__", 0); - /* "dependency_injector/providers/factories.pyx":206 + /* "dependency_injector/providers/factories.pyx":207 * cdef dict attributes * * attributes = dict() # <<<<<<<<<<<<<< * for index in range(self.__attributes_len): * attribute = self.__attributes[index] */ - __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 206, __pyx_L1_error) + __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 207, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_attributes = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers/factories.pyx":207 + /* "dependency_injector/providers/factories.pyx":208 * * attributes = dict() * for index in range(self.__attributes_len): # <<<<<<<<<<<<<< @@ -3062,7 +3062,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_1 for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { __pyx_v_index = __pyx_t_3; - /* "dependency_injector/providers/factories.pyx":208 + /* "dependency_injector/providers/factories.pyx":209 * attributes = dict() * for index in range(self.__attributes_len): * attribute = self.__attributes[index] # <<<<<<<<<<<<<< @@ -3071,15 +3071,15 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_1 */ if (unlikely(__pyx_v_self->__pyx___attributes == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 208, __pyx_L1_error) + __PYX_ERR(0, 209, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_self->__pyx___attributes, __pyx_v_index, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 208, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_self->__pyx___attributes, __pyx_v_index, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 209, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_10injections_NamedInjection))))) __PYX_ERR(0, 208, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_10injections_NamedInjection))))) __PYX_ERR(0, 209, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_attribute, ((struct __pyx_obj_19dependency_injector_9providers_10injections_NamedInjection *)__pyx_t_1)); __pyx_t_1 = 0; - /* "dependency_injector/providers/factories.pyx":209 + /* "dependency_injector/providers/factories.pyx":210 * for index in range(self.__attributes_len): * attribute = self.__attributes[index] * attributes[attribute.__name] = attribute.__value # <<<<<<<<<<<<<< @@ -3088,11 +3088,11 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_1 */ __pyx_t_1 = __pyx_v_attribute->__pyx___value; __Pyx_INCREF(__pyx_t_1); - if (unlikely(PyDict_SetItem(__pyx_v_attributes, __pyx_v_attribute->__pyx___name, __pyx_t_1) < 0)) __PYX_ERR(0, 209, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_attributes, __pyx_v_attribute->__pyx___name, __pyx_t_1) < 0)) __PYX_ERR(0, 210, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - /* "dependency_injector/providers/factories.pyx":210 + /* "dependency_injector/providers/factories.pyx":211 * attribute = self.__attributes[index] * attributes[attribute.__name] = attribute.__value * return attributes # <<<<<<<<<<<<<< @@ -3104,7 +3104,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_1 __pyx_r = __pyx_v_attributes; goto __pyx_L0; - /* "dependency_injector/providers/factories.pyx":200 + /* "dependency_injector/providers/factories.pyx":201 * * @property * def attributes(self): # <<<<<<<<<<<<<< @@ -3125,7 +3125,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_1 return __pyx_r; } -/* "dependency_injector/providers/factories.pyx":212 +/* "dependency_injector/providers/factories.pyx":213 * return attributes * * def add_attributes(self, **kwargs): # <<<<<<<<<<<<<< @@ -3162,16 +3162,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_1 Py_ssize_t __pyx_t_3; __Pyx_RefNannySetupContext("add_attributes", 0); - /* "dependency_injector/providers/factories.pyx":220 + /* "dependency_injector/providers/factories.pyx":221 * :return: Reference ``self`` * """ * self.__attributes += parse_named_injections(kwargs) # <<<<<<<<<<<<<< * self.__attributes_len = len(self.__attributes) * return self */ - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_10injections_parse_named_injections(__pyx_v_kwargs, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 220, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_10injections_parse_named_injections(__pyx_v_kwargs, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 221, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_self->__pyx___attributes, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 220, __pyx_L1_error) + __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_self->__pyx___attributes, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 221, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GIVEREF(__pyx_t_2); @@ -3180,7 +3180,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_1 __pyx_v_self->__pyx___attributes = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers/factories.pyx":221 + /* "dependency_injector/providers/factories.pyx":222 * """ * self.__attributes += parse_named_injections(kwargs) * self.__attributes_len = len(self.__attributes) # <<<<<<<<<<<<<< @@ -3191,13 +3191,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_1 __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, 221, __pyx_L1_error) + __PYX_ERR(0, 222, __pyx_L1_error) } - __pyx_t_3 = PyTuple_GET_SIZE(__pyx_t_2); if (unlikely(__pyx_t_3 == -1)) __PYX_ERR(0, 221, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_SIZE(__pyx_t_2); if (unlikely(__pyx_t_3 == -1)) __PYX_ERR(0, 222, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_self->__pyx___attributes_len = __pyx_t_3; - /* "dependency_injector/providers/factories.pyx":222 + /* "dependency_injector/providers/factories.pyx":223 * self.__attributes += parse_named_injections(kwargs) * self.__attributes_len = len(self.__attributes) * return self # <<<<<<<<<<<<<< @@ -3209,7 +3209,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_1 __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers/factories.pyx":212 + /* "dependency_injector/providers/factories.pyx":213 * return attributes * * def add_attributes(self, **kwargs): # <<<<<<<<<<<<<< @@ -3229,7 +3229,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_1 return __pyx_r; } -/* "dependency_injector/providers/factories.pyx":224 +/* "dependency_injector/providers/factories.pyx":225 * return self * * def set_attributes(self, **kwargs): # <<<<<<<<<<<<<< @@ -3265,14 +3265,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_2 Py_ssize_t __pyx_t_2; __Pyx_RefNannySetupContext("set_attributes", 0); - /* "dependency_injector/providers/factories.pyx":234 + /* "dependency_injector/providers/factories.pyx":235 * :return: Reference ``self`` * """ * self.__attributes = parse_named_injections(kwargs) # <<<<<<<<<<<<<< * self.__attributes_len = len(self.__attributes) * return self */ - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_10injections_parse_named_injections(__pyx_v_kwargs, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 234, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_10injections_parse_named_injections(__pyx_v_kwargs, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 235, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->__pyx___attributes); @@ -3280,7 +3280,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_2 __pyx_v_self->__pyx___attributes = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers/factories.pyx":235 + /* "dependency_injector/providers/factories.pyx":236 * """ * self.__attributes = parse_named_injections(kwargs) * self.__attributes_len = len(self.__attributes) # <<<<<<<<<<<<<< @@ -3291,13 +3291,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_2 __Pyx_INCREF(__pyx_t_1); if (unlikely(__pyx_t_1 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 235, __pyx_L1_error) + __PYX_ERR(0, 236, __pyx_L1_error) } - __pyx_t_2 = PyTuple_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 235, __pyx_L1_error) + __pyx_t_2 = PyTuple_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 236, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->__pyx___attributes_len = __pyx_t_2; - /* "dependency_injector/providers/factories.pyx":236 + /* "dependency_injector/providers/factories.pyx":237 * self.__attributes = parse_named_injections(kwargs) * self.__attributes_len = len(self.__attributes) * return self # <<<<<<<<<<<<<< @@ -3309,7 +3309,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_2 __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers/factories.pyx":224 + /* "dependency_injector/providers/factories.pyx":225 * return self * * def set_attributes(self, **kwargs): # <<<<<<<<<<<<<< @@ -3328,7 +3328,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_2 return __pyx_r; } -/* "dependency_injector/providers/factories.pyx":238 +/* "dependency_injector/providers/factories.pyx":239 * return self * * def clear_attributes(self): # <<<<<<<<<<<<<< @@ -3357,14 +3357,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_2 Py_ssize_t __pyx_t_2; __Pyx_RefNannySetupContext("clear_attributes", 0); - /* "dependency_injector/providers/factories.pyx":243 + /* "dependency_injector/providers/factories.pyx":244 * :return: Reference ``self`` * """ * self.__attributes = tuple() # <<<<<<<<<<<<<< * self.__attributes_len = len(self.__attributes) * return self */ - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyTuple_Type)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 243, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyTuple_Type)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 244, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->__pyx___attributes); @@ -3372,7 +3372,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_2 __pyx_v_self->__pyx___attributes = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers/factories.pyx":244 + /* "dependency_injector/providers/factories.pyx":245 * """ * self.__attributes = tuple() * self.__attributes_len = len(self.__attributes) # <<<<<<<<<<<<<< @@ -3383,13 +3383,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_2 __Pyx_INCREF(__pyx_t_1); if (unlikely(__pyx_t_1 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 244, __pyx_L1_error) + __PYX_ERR(0, 245, __pyx_L1_error) } - __pyx_t_2 = PyTuple_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 244, __pyx_L1_error) + __pyx_t_2 = PyTuple_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 245, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->__pyx___attributes_len = __pyx_t_2; - /* "dependency_injector/providers/factories.pyx":245 + /* "dependency_injector/providers/factories.pyx":246 * self.__attributes = tuple() * self.__attributes_len = len(self.__attributes) * return self # <<<<<<<<<<<<<< @@ -3401,7 +3401,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_2 __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers/factories.pyx":238 + /* "dependency_injector/providers/factories.pyx":239 * return self * * def clear_attributes(self): # <<<<<<<<<<<<<< @@ -3420,7 +3420,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_2 return __pyx_r; } -/* "dependency_injector/providers/factories.pyx":247 +/* "dependency_injector/providers/factories.pyx":248 * return self * * cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<< @@ -3443,7 +3443,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_9factories_7Factory__p if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provide); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 247, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provide); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 248, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_19dependency_injector_9providers_9factories_7Factory_25_provide)) { __Pyx_XDECREF(__pyx_r); @@ -3463,7 +3463,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_9factories_7Factory__p #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_v_kwargs}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 247, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 248, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -3471,13 +3471,13 @@ static PyObject *__pyx_f_19dependency_injector_9providers_9factories_7Factory__p #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_v_kwargs}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 247, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 248, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { - __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 247, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 248, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; @@ -3488,7 +3488,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_9factories_7Factory__p __Pyx_INCREF(__pyx_v_kwargs); __Pyx_GIVEREF(__pyx_v_kwargs); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_kwargs); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 247, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 248, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -3501,7 +3501,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_9factories_7Factory__p __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - /* "dependency_injector/providers/factories.pyx":249 + /* "dependency_injector/providers/factories.pyx":250 * cpdef object _provide(self, tuple args, dict kwargs): * """Return new instance.""" * return self.__provide(args, kwargs) # <<<<<<<<<<<<<< @@ -3509,13 +3509,13 @@ static PyObject *__pyx_f_19dependency_injector_9providers_9factories_7Factory__p * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_9factories_7Factory___provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 249, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_9factories_7Factory___provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 250, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers/factories.pyx":247 + /* "dependency_injector/providers/factories.pyx":248 * return self * * cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<< @@ -3567,11 +3567,11 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_9factories_7Factory_2 case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_kwargs)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, 1); __PYX_ERR(0, 247, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, 1); __PYX_ERR(0, 248, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_provide") < 0)) __PYX_ERR(0, 247, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_provide") < 0)) __PYX_ERR(0, 248, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -3584,14 +3584,14 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_9factories_7Factory_2 } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 247, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 248, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.factories.Factory._provide", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(0, 247, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(0, 247, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(0, 248, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(0, 248, __pyx_L1_error) __pyx_r = __pyx_pf_19dependency_injector_9providers_9factories_7Factory_24_provide(((struct __pyx_obj_19dependency_injector_9providers_9factories_Factory *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs); /* function exit code */ @@ -3609,7 +3609,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_2 PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("_provide", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_9factories_7Factory__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 247, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_9factories_7Factory__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 248, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -4662,7 +4662,7 @@ static PyTypeObject __pyx_type_19dependency_injector_9providers_9factories_Facto 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*/ - "Factory provider creates new instance on every call.\n\n :py:class:`Factory` supports positional & keyword argument injections,\n as well as attribute injections.\n\n Positional and keyword argument injections could be defined like this:\n\n .. code-block:: python\n\n factory = Factory(SomeClass,\n 'positional_arg1', 'positional_arg2',\n keyword_argument1=3, keyword_argument=4)\n\n # or\n\n factory = Factory(SomeClass) \\\n .add_args('positional_arg1', 'positional_arg2') \\\n .add_kwargs(keyword_argument1=3, keyword_argument=4)\n\n # or\n\n factory = Factory(SomeClass)\n factory.add_args('positional_arg1', 'positional_arg2')\n factory.add_kwargs(keyword_argument1=3, keyword_argument=4)\n\n\n Attribute injections are defined by using :py:meth:`Factory.attributes`:\n\n .. code-block:: python\n\n factory = Factory(SomeClass) \\\n .add_attributes(attribute1=1, attribute2=2)\n\n Retrieving of provided instance can be performed via calling\n :py:class:`Factory` object:\n\n .. code-block:: python\n\n factory = Factory(SomeClass)\n some_object = factory()\n\n .. py:attribute:: provided_type\n\n If provided type is defined, provider checks that providing class is\n its subclass.\n\n :type: type | None\n ", /*tp_doc*/ + "Factory provider creates new instance on every call.\n\n :py:class:`Factory` supports positional & keyword argument injections,\n as well as attribute injections.\n\n Positional and keyword argument injections could be defined like this:\n\n .. code-block:: python\n\n factory = Factory(SomeClass,\n 'positional_arg1', 'positional_arg2',\n keyword_argument1=3, keyword_argument=4)\n\n # or\n\n factory = Factory(SomeClass) \\\n .add_args('positional_arg1', 'positional_arg2') \\\n .add_kwargs(keyword_argument1=3, keyword_argument=4)\n\n # or\n\n factory = Factory(SomeClass)\n factory.add_args('positional_arg1', 'positional_arg2')\n factory.add_kwargs(keyword_argument1=3, keyword_argument=4)\n\n\n Attribute injections are defined by using\n :py:meth:`Factory.add_attributes`:\n\n .. code-block:: python\n\n factory = Factory(SomeClass) \\\n .add_attributes(attribute1=1, attribute2=2)\n\n Retrieving of provided instance can be performed via calling\n :py:class:`Factory` object:\n\n .. code-block:: python\n\n factory = Factory(SomeClass)\n some_object = factory()\n\n .. py:attribute:: provided_type\n\n If provided type is defined, provider checks that providing class is\n its subclass.\n\n :type: type | None\n ", /*tp_doc*/ __pyx_tp_traverse_19dependency_injector_9providers_9factories_Factory, /*tp_traverse*/ __pyx_tp_clear_19dependency_injector_9providers_9factories_Factory, /*tp_clear*/ 0, /*tp_richcompare*/ @@ -4827,9 +4827,9 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {0, 0, 0, 0, 0, 0, 0} }; static int __Pyx_InitCachedBuiltins(void) { - __pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_n_s_super); if (!__pyx_builtin_super) __PYX_ERR(0, 94, __pyx_L1_error) - __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(0, 98, __pyx_L1_error) - __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 207, __pyx_L1_error) + __pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_n_s_super); if (!__pyx_builtin_super) __PYX_ERR(0, 95, __pyx_L1_error) + __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(0, 99, __pyx_L1_error) + __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 208, __pyx_L1_error) return 0; __pyx_L1_error:; return -1; @@ -4972,10 +4972,10 @@ PyMODINIT_FUNC PyInit_factories(void) __pyx_vtabptr_19dependency_injector_9providers_9factories_DelegatedFactory = &__pyx_vtable_19dependency_injector_9providers_9factories_DelegatedFactory; __pyx_vtable_19dependency_injector_9providers_9factories_DelegatedFactory.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_9factories_Factory; __pyx_type_19dependency_injector_9providers_9factories_DelegatedFactory.tp_base = __pyx_ptype_19dependency_injector_9providers_9factories_Factory; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_9factories_DelegatedFactory) < 0) __PYX_ERR(0, 252, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_9factories_DelegatedFactory) < 0) __PYX_ERR(0, 253, __pyx_L1_error) __pyx_type_19dependency_injector_9providers_9factories_DelegatedFactory.tp_print = 0; - if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_9factories_DelegatedFactory.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_9factories_DelegatedFactory) < 0) __PYX_ERR(0, 252, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "DelegatedFactory", (PyObject *)&__pyx_type_19dependency_injector_9providers_9factories_DelegatedFactory) < 0) __PYX_ERR(0, 252, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_9factories_DelegatedFactory.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_9factories_DelegatedFactory) < 0) __PYX_ERR(0, 253, __pyx_L1_error) + if (PyObject_SetAttrString(__pyx_m, "DelegatedFactory", (PyObject *)&__pyx_type_19dependency_injector_9providers_9factories_DelegatedFactory) < 0) __PYX_ERR(0, 253, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_9factories_DelegatedFactory = &__pyx_type_19dependency_injector_9providers_9factories_DelegatedFactory; /*--- Type import code ---*/ __pyx_ptype_19dependency_injector_9providers_4base_Object = __Pyx_ImportType("dependency_injector.providers.base", "Object", sizeof(struct __pyx_obj_19dependency_injector_9providers_4base_Object), 1); if (unlikely(!__pyx_ptype_19dependency_injector_9providers_4base_Object)) __PYX_ERR(4, 15, __pyx_L1_error) @@ -5032,22 +5032,22 @@ PyMODINIT_FUNC PyInit_factories(void) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "dependency_injector/providers/factories.pyx":70 + /* "dependency_injector/providers/factories.pyx":71 * """ * * provided_type = None # <<<<<<<<<<<<<< * * def __init__(self, provides, *args, **kwargs): */ - if (PyDict_SetItem((PyObject *)__pyx_ptype_19dependency_injector_9providers_9factories_Factory->tp_dict, __pyx_n_s_provided_type, Py_None) < 0) __PYX_ERR(0, 70, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_19dependency_injector_9providers_9factories_Factory->tp_dict, __pyx_n_s_provided_type, Py_None) < 0) __PYX_ERR(0, 71, __pyx_L1_error) PyType_Modified(__pyx_ptype_19dependency_injector_9providers_9factories_Factory); - /* "dependency_injector/providers/factories.pyx":270 + /* "dependency_injector/providers/factories.pyx":271 * """ * * __IS_DELEGATED__ = True # <<<<<<<<<<<<<< */ - if (PyDict_SetItem((PyObject *)__pyx_ptype_19dependency_injector_9providers_9factories_DelegatedFactory->tp_dict, __pyx_n_s_IS_DELEGATED, Py_True) < 0) __PYX_ERR(0, 270, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_19dependency_injector_9providers_9factories_DelegatedFactory->tp_dict, __pyx_n_s_IS_DELEGATED, Py_True) < 0) __PYX_ERR(0, 271, __pyx_L1_error) PyType_Modified(__pyx_ptype_19dependency_injector_9providers_9factories_DelegatedFactory); /* "dependency_injector/providers/factories.pyx":1 diff --git a/src/dependency_injector/providers/factories.pyx b/src/dependency_injector/providers/factories.pyx index d5c3f4c3..8941346f 100644 --- a/src/dependency_injector/providers/factories.pyx +++ b/src/dependency_injector/providers/factories.pyx @@ -44,7 +44,8 @@ cdef class Factory(Provider): factory.add_kwargs(keyword_argument1=3, keyword_argument=4) - Attribute injections are defined by using :py:meth:`Factory.attributes`: + Attribute injections are defined by using + :py:meth:`Factory.add_attributes`: .. code-block:: python