From 6adf9e45280fd98322b3f911d602fc627a52710b Mon Sep 17 00:00:00 2001 From: Roman Mogilatov Date: Wed, 23 Nov 2016 22:25:41 +0200 Subject: [PATCH] Refactor provider internals: C functions naming scheme and code layout --- src/dependency_injector/__init__.py | 2 +- src/dependency_injector/providers/base.c | 6 +- src/dependency_injector/providers/callables.c | 456 ++++++++-------- .../providers/callables.pxd | 2 +- .../providers/callables.pyx | 3 +- src/dependency_injector/providers/factories.c | 513 +++++++++--------- .../providers/factories.pxd | 7 +- .../providers/factories.pyx | 3 +- .../providers/injections.c | 6 +- .../providers/injections.pxd | 2 + .../providers/singletons.c | 85 ++- .../providers/singletons.pyx | 8 +- src/dependency_injector/providers/utils.c | 6 +- src/dependency_injector/providers/utils.pxd | 8 + 14 files changed, 556 insertions(+), 551 deletions(-) diff --git a/src/dependency_injector/__init__.py b/src/dependency_injector/__init__.py index 0dd1969b..72f0dead 100644 --- a/src/dependency_injector/__init__.py +++ b/src/dependency_injector/__init__.py @@ -1,6 +1,6 @@ """Dependency injector top-level package.""" -VERSION = '3.1.4' +VERSION = '3.1.5' """Version number that follows semantic versioning. :type: str diff --git a/src/dependency_injector/providers/base.c b/src/dependency_injector/providers/base.c index 15cae790..fa6f3ad5 100644 --- a/src/dependency_injector/providers/base.c +++ b/src/dependency_injector/providers/base.c @@ -626,9 +626,9 @@ struct __pyx_obj_19dependency_injector_9providers_4base_ExternalDependency; struct __pyx_obj_19dependency_injector_9providers_4base_OverridingContext; struct __pyx_opt_args_19dependency_injector_9providers_5utils_deepcopy; -/* "utils.pxd":13 - * cpdef bint is_delegated(object instance) - * cpdef str represent_provider(object provider, object provides) +/* "utils.pxd":21 + * + * * cpdef object deepcopy(object instance, dict memo=*) # <<<<<<<<<<<<<< */ struct __pyx_opt_args_19dependency_injector_9providers_5utils_deepcopy { diff --git a/src/dependency_injector/providers/callables.c b/src/dependency_injector/providers/callables.c index 409318b8..5be914f3 100644 --- a/src/dependency_injector/providers/callables.c +++ b/src/dependency_injector/providers/callables.c @@ -634,9 +634,9 @@ struct __pyx_obj_19dependency_injector_9providers_9callables_Callable; struct __pyx_obj_19dependency_injector_9providers_9callables_DelegatedCallable; struct __pyx_opt_args_19dependency_injector_9providers_5utils_deepcopy; -/* "utils.pxd":13 - * cpdef bint is_delegated(object instance) - * cpdef str represent_provider(object provider, object provides) +/* "utils.pxd":21 + * + * * cpdef object deepcopy(object instance, dict memo=*) # <<<<<<<<<<<<<< */ struct __pyx_opt_args_19dependency_injector_9providers_5utils_deepcopy { @@ -839,7 +839,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_4base_ExternalDependenc static struct __pyx_vtabstruct_19dependency_injector_9providers_4base_ExternalDependency *__pyx_vtabptr_19dependency_injector_9providers_4base_ExternalDependency; -/* "dependency_injector/providers/callables.pyx":22 +/* "dependency_injector/providers/callables.pyx":21 * * * cdef class Callable(Provider): # <<<<<<<<<<<<<< @@ -853,7 +853,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_9callables_Callable { static struct __pyx_vtabstruct_19dependency_injector_9providers_9callables_Callable *__pyx_vtabptr_19dependency_injector_9providers_9callables_Callable; -/* "dependency_injector/providers/callables.pyx":203 +/* "dependency_injector/providers/callables.pyx":202 * * * cdef class DelegatedCallable(Callable): # <<<<<<<<<<<<<< @@ -1234,7 +1234,7 @@ static PyObject *(*__pyx_f_19dependency_injector_9providers_5utils_deepcopy)(PyO /* Module declarations from 'dependency_injector.providers.callables' */ static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_9callables_Callable = 0; static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_9callables_DelegatedCallable = 0; -static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers_9callables___call(struct __pyx_obj_19dependency_injector_9providers_9callables_Callable *, PyObject *, PyObject *); /*proto*/ +static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers_9callables___callable_call(struct __pyx_obj_19dependency_injector_9providers_9callables_Callable *, PyObject *, PyObject *); /*proto*/ #define __Pyx_MODULE_NAME "dependency_injector.providers.callables" int __pyx_module_is_main_dependency_injector__providers__callables = 0; @@ -1313,7 +1313,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9callables_8Callable_ static PyObject *__pyx_tp_new_19dependency_injector_9providers_9callables_Callable(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_19dependency_injector_9providers_9callables_DelegatedCallable(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -/* "dependency_injector/providers/callables.pyx":46 +/* "dependency_injector/providers/callables.pyx":45 * """ * * def __init__(self, provides, *args, **kwargs): # <<<<<<<<<<<<<< @@ -1366,7 +1366,7 @@ static int __pyx_pw_19dependency_injector_9providers_9callables_8Callable_1__ini } 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, 46, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "__init__") < 0)) __PYX_ERR(0, 45, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) < 1) { goto __pyx_L5_argtuple_error; @@ -1377,7 +1377,7 @@ static int __pyx_pw_19dependency_injector_9providers_9callables_8Callable_1__ini } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 46, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 45, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0; __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; @@ -1409,63 +1409,63 @@ static int __pyx_pf_19dependency_injector_9providers_9callables_8Callable___init int __pyx_t_10; __Pyx_RefNannySetupContext("__init__", 0); - /* "dependency_injector/providers/callables.pyx":58 + /* "dependency_injector/providers/callables.pyx":57 * :type kwargs: dict[str, object] * """ * if not callable(provides): # <<<<<<<<<<<<<< * raise Error('Provider {0} expected to get callable, ' * 'got {0}'.format('.'.join((self.__class__.__module__, */ - __pyx_t_1 = __Pyx_PyCallable_Check(__pyx_v_provides); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(0, 58, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCallable_Check(__pyx_v_provides); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(0, 57, __pyx_L1_error) __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); if (__pyx_t_2) { - /* "dependency_injector/providers/callables.pyx":59 + /* "dependency_injector/providers/callables.pyx":58 * """ * if not callable(provides): * raise Error('Provider {0} expected to get callable, ' # <<<<<<<<<<<<<< * 'got {0}'.format('.'.join((self.__class__.__module__, * self.__class__.__name__)), */ - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 59, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 58, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - /* "dependency_injector/providers/callables.pyx":60 + /* "dependency_injector/providers/callables.pyx":59 * if not callable(provides): * raise Error('Provider {0} expected to get callable, ' * 'got {0}'.format('.'.join((self.__class__.__module__, # <<<<<<<<<<<<<< * self.__class__.__name__)), * provides)) */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Provider_0_expected_to_get_calla, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 60, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Provider_0_expected_to_get_calla, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 59, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 60, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 59, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_module); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 60, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_module); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 59, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "dependency_injector/providers/callables.pyx":61 + /* "dependency_injector/providers/callables.pyx":60 * raise Error('Provider {0} expected to get callable, ' * 'got {0}'.format('.'.join((self.__class__.__module__, * self.__class__.__name__)), # <<<<<<<<<<<<<< * provides)) * self.__provides = provides */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 61, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 60, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_name); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 61, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_name); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 60, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "dependency_injector/providers/callables.pyx":60 + /* "dependency_injector/providers/callables.pyx":59 * if not callable(provides): * raise Error('Provider {0} expected to get callable, ' * 'got {0}'.format('.'.join((self.__class__.__module__, # <<<<<<<<<<<<<< * self.__class__.__name__)), * provides)) */ - __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 60, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 59, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8); @@ -1473,11 +1473,11 @@ static int __pyx_pf_19dependency_injector_9providers_9callables_8Callable___init PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_9); __pyx_t_8 = 0; __pyx_t_9 = 0; - __pyx_t_9 = __Pyx_PyString_Join(__pyx_kp_s_, __pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 60, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyString_Join(__pyx_kp_s_, __pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 59, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "dependency_injector/providers/callables.pyx":62 + /* "dependency_injector/providers/callables.pyx":61 * 'got {0}'.format('.'.join((self.__class__.__module__, * self.__class__.__name__)), * provides)) # <<<<<<<<<<<<<< @@ -1499,7 +1499,7 @@ static int __pyx_pf_19dependency_injector_9providers_9callables_8Callable___init #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_9, __pyx_v_provides}; - __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 60, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 59, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; @@ -1508,14 +1508,14 @@ static int __pyx_pf_19dependency_injector_9providers_9callables_8Callable___init #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_9, __pyx_v_provides}; - __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 60, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 59, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } else #endif { - __pyx_t_8 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 60, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 59, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL; @@ -1526,7 +1526,7 @@ static int __pyx_pf_19dependency_injector_9providers_9callables_8Callable___init __Pyx_GIVEREF(__pyx_v_provides); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_10, __pyx_v_provides); __pyx_t_9 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 60, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 59, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } @@ -1542,14 +1542,14 @@ static int __pyx_pf_19dependency_injector_9providers_9callables_8Callable___init } } if (!__pyx_t_6) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 59, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 58, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_3); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 59, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 58, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -1558,20 +1558,20 @@ static int __pyx_pf_19dependency_injector_9providers_9callables_8Callable___init #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 59, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 58, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif { - __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 59, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 58, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_5); __pyx_t_5 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 59, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 58, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } @@ -1579,9 +1579,9 @@ static int __pyx_pf_19dependency_injector_9providers_9callables_8Callable___init __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 59, __pyx_L1_error) + __PYX_ERR(0, 58, __pyx_L1_error) - /* "dependency_injector/providers/callables.pyx":58 + /* "dependency_injector/providers/callables.pyx":57 * :type kwargs: dict[str, object] * """ * if not callable(provides): # <<<<<<<<<<<<<< @@ -1590,7 +1590,7 @@ static int __pyx_pf_19dependency_injector_9providers_9callables_8Callable___init */ } - /* "dependency_injector/providers/callables.pyx":63 + /* "dependency_injector/providers/callables.pyx":62 * self.__class__.__name__)), * provides)) * self.__provides = provides # <<<<<<<<<<<<<< @@ -1603,14 +1603,14 @@ static int __pyx_pf_19dependency_injector_9providers_9callables_8Callable___init __Pyx_DECREF(__pyx_v_self->__pyx___provides); __pyx_v_self->__pyx___provides = __pyx_v_provides; - /* "dependency_injector/providers/callables.pyx":65 + /* "dependency_injector/providers/callables.pyx":64 * self.__provides = provides * * self.__args = tuple() # <<<<<<<<<<<<<< * self.__args_len = 0 * self.set_args(*args) */ - __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyTuple_Type)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 65, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyTuple_Type)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 64, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->__pyx___args); @@ -1618,7 +1618,7 @@ static int __pyx_pf_19dependency_injector_9providers_9callables_8Callable___init __pyx_v_self->__pyx___args = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/providers/callables.pyx":66 + /* "dependency_injector/providers/callables.pyx":65 * * self.__args = tuple() * self.__args_len = 0 # <<<<<<<<<<<<<< @@ -1627,28 +1627,28 @@ static int __pyx_pf_19dependency_injector_9providers_9callables_8Callable___init */ __pyx_v_self->__pyx___args_len = 0; - /* "dependency_injector/providers/callables.pyx":67 + /* "dependency_injector/providers/callables.pyx":66 * self.__args = tuple() * self.__args_len = 0 * self.set_args(*args) # <<<<<<<<<<<<<< * * self.__kwargs = tuple() */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 67, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 66, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_v_args, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 67, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_v_args, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 66, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "dependency_injector/providers/callables.pyx":69 + /* "dependency_injector/providers/callables.pyx":68 * self.set_args(*args) * * self.__kwargs = tuple() # <<<<<<<<<<<<<< * self.__kwargs_len = 0 * self.set_kwargs(**kwargs) */ - __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&PyTuple_Type)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 69, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&PyTuple_Type)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 68, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __Pyx_GOTREF(__pyx_v_self->__pyx___kwargs); @@ -1656,7 +1656,7 @@ static int __pyx_pf_19dependency_injector_9providers_9callables_8Callable___init __pyx_v_self->__pyx___kwargs = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; - /* "dependency_injector/providers/callables.pyx":70 + /* "dependency_injector/providers/callables.pyx":69 * * self.__kwargs = tuple() * self.__kwargs_len = 0 # <<<<<<<<<<<<<< @@ -1665,28 +1665,28 @@ static int __pyx_pf_19dependency_injector_9providers_9callables_8Callable___init */ __pyx_v_self->__pyx___kwargs_len = 0; - /* "dependency_injector/providers/callables.pyx":71 + /* "dependency_injector/providers/callables.pyx":70 * self.__kwargs = tuple() * self.__kwargs_len = 0 * self.set_kwargs(**kwargs) # <<<<<<<<<<<<<< * * super(Callable, self).__init__() */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_kwargs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 71, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_kwargs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 70, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 71, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 70, __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; - /* "dependency_injector/providers/callables.pyx":73 + /* "dependency_injector/providers/callables.pyx":72 * self.set_kwargs(**kwargs) * * super(Callable, self).__init__() # <<<<<<<<<<<<<< * * def __deepcopy__(self, memo): */ - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 72, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_9callables_Callable)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_9callables_Callable)); @@ -1694,10 +1694,10 @@ static int __pyx_pf_19dependency_injector_9providers_9callables_8Callable___init __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_self)); - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_4, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_4, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 72, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_init); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_init); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 72, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = NULL; @@ -1711,16 +1711,16 @@ static int __pyx_pf_19dependency_injector_9providers_9callables_8Callable___init } } if (__pyx_t_8) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 72, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } else { - __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 72, __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; - /* "dependency_injector/providers/callables.pyx":46 + /* "dependency_injector/providers/callables.pyx":45 * """ * * def __init__(self, provides, *args, **kwargs): # <<<<<<<<<<<<<< @@ -1746,7 +1746,7 @@ static int __pyx_pf_19dependency_injector_9providers_9callables_8Callable___init return __pyx_r; } -/* "dependency_injector/providers/callables.pyx":75 +/* "dependency_injector/providers/callables.pyx":74 * super(Callable, self).__init__() * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< @@ -1786,21 +1786,21 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9callables_8Callable_ PyObject *__pyx_t_11 = NULL; __Pyx_RefNannySetupContext("__deepcopy__", 0); - /* "dependency_injector/providers/callables.pyx":77 + /* "dependency_injector/providers/callables.pyx":76 * 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, 77, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_memo, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 76, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 77, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 76, __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, 77, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_id, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 76, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -1814,14 +1814,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9callables_8Callable_ } } if (!__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 77, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 76, __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, 77, __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, 76, __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; @@ -1830,20 +1830,20 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9callables_8Callable_ #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, 77, __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, 76, __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, 77, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 76, __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, 77, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 76, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } @@ -1852,7 +1852,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9callables_8Callable_ __pyx_v_copied = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/providers/callables.pyx":78 + /* "dependency_injector/providers/callables.pyx":77 * """Create and return full copy of provider.""" * copied = memo.get(id(self)) * if copied is not None: # <<<<<<<<<<<<<< @@ -1863,7 +1863,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9callables_8Callable_ __pyx_t_7 = (__pyx_t_6 != 0); if (__pyx_t_7) { - /* "dependency_injector/providers/callables.pyx":79 + /* "dependency_injector/providers/callables.pyx":78 * copied = memo.get(id(self)) * if copied is not None: * return copied # <<<<<<<<<<<<<< @@ -1875,7 +1875,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9callables_8Callable_ __pyx_r = __pyx_v_copied; goto __pyx_L0; - /* "dependency_injector/providers/callables.pyx":78 + /* "dependency_injector/providers/callables.pyx":77 * """Create and return full copy of provider.""" * copied = memo.get(id(self)) * if copied is not None: # <<<<<<<<<<<<<< @@ -1884,91 +1884,91 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9callables_8Callable_ */ } - /* "dependency_injector/providers/callables.pyx":81 + /* "dependency_injector/providers/callables.pyx":80 * return copied * * copied = self.__class__(self.provides, # <<<<<<<<<<<<<< * *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, 81, __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, 80, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provides); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 81, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provides); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 80, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 81, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 80, __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/callables.pyx":82 + /* "dependency_injector/providers/callables.pyx":81 * * copied = self.__class__(self.provides, * *deepcopy(self.args, memo), # <<<<<<<<<<<<<< * **deepcopy(self.kwargs, memo)) * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 82, __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, 81, __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, 82, __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, 81, __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, 82, __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, 81, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers/callables.pyx":81 + /* "dependency_injector/providers/callables.pyx":80 * return copied * * copied = self.__class__(self.provides, # <<<<<<<<<<<<<< * *deepcopy(self.args, memo), * **deepcopy(self.kwargs, memo)) */ - __pyx_t_2 = PySequence_Tuple(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 81, __pyx_L1_error) + __pyx_t_2 = PySequence_Tuple(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 80, __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, 81, __pyx_L1_error) + __pyx_t_4 = PyNumber_Add(__pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 80, __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/callables.pyx":83 + /* "dependency_injector/providers/callables.pyx":82 * copied = self.__class__(self.provides, * *deepcopy(self.args, memo), * **deepcopy(self.kwargs, memo)) # <<<<<<<<<<<<<< * * for overriding_provider in self.overridden: */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_kwargs); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 83, __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, 82, __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, 83, __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, 82, __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, 83, __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, 82, __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, 83, __pyx_L1_error) + __PYX_ERR(0, 82, __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, 83, __pyx_L1_error) + __pyx_t_2 = PyDict_Copy(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 82, __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, 81, __pyx_L1_error) + __pyx_t_2 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 80, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - /* "dependency_injector/providers/callables.pyx":81 + /* "dependency_injector/providers/callables.pyx":80 * return copied * * copied = self.__class__(self.provides, # <<<<<<<<<<<<<< * *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, 81, __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, 80, __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; @@ -1976,22 +1976,22 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9callables_8Callable_ __Pyx_DECREF_SET(__pyx_v_copied, __pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/providers/callables.pyx":85 + /* "dependency_injector/providers/callables.pyx":84 * **deepcopy(self.kwargs, memo)) * * for overriding_provider in self.overridden: # <<<<<<<<<<<<<< * copied.override(deepcopy(overriding_provider, memo)) * */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_overridden); 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_overridden); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 84, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { __pyx_t_2 = __pyx_t_3; __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_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 85, __pyx_L1_error) + __pyx_t_9 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 84, __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, 85, __pyx_L1_error) + __pyx_t_10 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 84, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { @@ -1999,17 +1999,17 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9callables_8Callable_ 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_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_3); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 85, __pyx_L1_error) + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_3); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 84, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 85, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 84, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } else { if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_3); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 85, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_3); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 84, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 85, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 84, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } @@ -2019,7 +2019,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9callables_8Callable_ 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, 85, __pyx_L1_error) + else __PYX_ERR(0, 84, __pyx_L1_error) } break; } @@ -2028,19 +2028,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9callables_8Callable_ __Pyx_XDECREF_SET(__pyx_v_overriding_provider, __pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/providers/callables.pyx":86 + /* "dependency_injector/providers/callables.pyx":85 * * for overriding_provider in self.overridden: * copied.override(deepcopy(overriding_provider, memo)) # <<<<<<<<<<<<<< * * return copied */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_copied, __pyx_n_s_override); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 86, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_copied, __pyx_n_s_override); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 85, __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, 86, __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, 85, __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_v_overriding_provider, 0, &__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 86, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_5utils_deepcopy(__pyx_v_overriding_provider, 0, &__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 85, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -2053,14 +2053,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9callables_8Callable_ } } if (!__pyx_t_5) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 86, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 85, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_3); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_1}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 86, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 85, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -2069,20 +2069,20 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9callables_8Callable_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_1}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 86, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 85, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else #endif { - __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 86, __pyx_L1_error) + __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 85, __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_1); PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_11, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 86, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_11, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 85, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } @@ -2090,7 +2090,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9callables_8Callable_ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/providers/callables.pyx":85 + /* "dependency_injector/providers/callables.pyx":84 * **deepcopy(self.kwargs, memo)) * * for overriding_provider in self.overridden: # <<<<<<<<<<<<<< @@ -2100,7 +2100,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9callables_8Callable_ } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers/callables.pyx":88 + /* "dependency_injector/providers/callables.pyx":87 * copied.override(deepcopy(overriding_provider, memo)) * * return copied # <<<<<<<<<<<<<< @@ -2112,7 +2112,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9callables_8Callable_ __pyx_r = __pyx_v_copied; goto __pyx_L0; - /* "dependency_injector/providers/callables.pyx":75 + /* "dependency_injector/providers/callables.pyx":74 * super(Callable, self).__init__() * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< @@ -2138,7 +2138,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9callables_8Callable_ return __pyx_r; } -/* "dependency_injector/providers/callables.pyx":90 +/* "dependency_injector/providers/callables.pyx":89 * return copied * * def __str__(self): # <<<<<<<<<<<<<< @@ -2170,7 +2170,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9callables_8Callable_ PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__str__", 0); - /* "dependency_injector/providers/callables.pyx":95 + /* "dependency_injector/providers/callables.pyx":94 * :rtype: str * """ * return represent_provider(provider=self, provides=self.__provides) # <<<<<<<<<<<<<< @@ -2180,14 +2180,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9callables_8Callable_ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_v_self->__pyx___provides; __Pyx_INCREF(__pyx_t_1); - __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, 95, __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, 94, __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/callables.pyx":90 + /* "dependency_injector/providers/callables.pyx":89 * return copied * * def __str__(self): # <<<<<<<<<<<<<< @@ -2207,7 +2207,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9callables_8Callable_ return __pyx_r; } -/* "dependency_injector/providers/callables.pyx":98 +/* "dependency_injector/providers/callables.pyx":97 * * @property * def provides(self): # <<<<<<<<<<<<<< @@ -2233,7 +2233,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9callables_8Callable_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); - /* "dependency_injector/providers/callables.pyx":100 + /* "dependency_injector/providers/callables.pyx":99 * def provides(self): * """Return wrapped callable.""" * return self.__provides # <<<<<<<<<<<<<< @@ -2245,7 +2245,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9callables_8Callable_ __pyx_r = __pyx_v_self->__pyx___provides; goto __pyx_L0; - /* "dependency_injector/providers/callables.pyx":98 + /* "dependency_injector/providers/callables.pyx":97 * * @property * def provides(self): # <<<<<<<<<<<<<< @@ -2260,7 +2260,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9callables_8Callable_ return __pyx_r; } -/* "dependency_injector/providers/callables.pyx":103 +/* "dependency_injector/providers/callables.pyx":102 * * @property * def args(self): # <<<<<<<<<<<<<< @@ -2293,19 +2293,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9callables_8Callable_ int __pyx_t_4; __Pyx_RefNannySetupContext("__get__", 0); - /* "dependency_injector/providers/callables.pyx":109 + /* "dependency_injector/providers/callables.pyx":108 * cdef list args * * args = list() # <<<<<<<<<<<<<< * for index in range(self.__args_len): * arg = self.__args[index] */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 109, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 108, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_args = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers/callables.pyx":110 + /* "dependency_injector/providers/callables.pyx":109 * * args = list() * for index in range(self.__args_len): # <<<<<<<<<<<<<< @@ -2316,7 +2316,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9callables_8Callable_ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { __pyx_v_index = __pyx_t_3; - /* "dependency_injector/providers/callables.pyx":111 + /* "dependency_injector/providers/callables.pyx":110 * args = list() * for index in range(self.__args_len): * arg = self.__args[index] # <<<<<<<<<<<<<< @@ -2325,15 +2325,15 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9callables_8Callable_ */ if (unlikely(__pyx_v_self->__pyx___args == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 111, __pyx_L1_error) + __PYX_ERR(0, 110, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_self->__pyx___args, __pyx_v_index, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 111, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_self->__pyx___args, __pyx_v_index, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 110, __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_PositionalInjection))))) __PYX_ERR(0, 111, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_10injections_PositionalInjection))))) __PYX_ERR(0, 110, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_arg, ((struct __pyx_obj_19dependency_injector_9providers_10injections_PositionalInjection *)__pyx_t_1)); __pyx_t_1 = 0; - /* "dependency_injector/providers/callables.pyx":112 + /* "dependency_injector/providers/callables.pyx":111 * for index in range(self.__args_len): * arg = self.__args[index] * args.append(arg.__value) # <<<<<<<<<<<<<< @@ -2342,11 +2342,11 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9callables_8Callable_ */ __pyx_t_1 = __pyx_v_arg->__pyx_base.__pyx___value; __Pyx_INCREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyList_Append(__pyx_v_args, __pyx_t_1); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyList_Append(__pyx_v_args, __pyx_t_1); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(0, 111, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - /* "dependency_injector/providers/callables.pyx":113 + /* "dependency_injector/providers/callables.pyx":112 * arg = self.__args[index] * args.append(arg.__value) * return tuple(args) # <<<<<<<<<<<<<< @@ -2354,13 +2354,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9callables_8Callable_ * def add_args(self, *args): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyList_AsTuple(__pyx_v_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 113, __pyx_L1_error) + __pyx_t_1 = PyList_AsTuple(__pyx_v_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 112, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers/callables.pyx":103 + /* "dependency_injector/providers/callables.pyx":102 * * @property * def args(self): # <<<<<<<<<<<<<< @@ -2381,7 +2381,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9callables_8Callable_ return __pyx_r; } -/* "dependency_injector/providers/callables.pyx":115 +/* "dependency_injector/providers/callables.pyx":114 * return tuple(args) * * def add_args(self, *args): # <<<<<<<<<<<<<< @@ -2416,16 +2416,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9callables_8Callable_ Py_ssize_t __pyx_t_3; __Pyx_RefNannySetupContext("add_args", 0); - /* "dependency_injector/providers/callables.pyx":123 + /* "dependency_injector/providers/callables.pyx":122 * :return: Reference ``self`` * """ * self.__args += parse_positional_injections(args) # <<<<<<<<<<<<<< * self.__args_len = len(self.__args) * return self */ - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_10injections_parse_positional_injections(__pyx_v_args, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 123, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_10injections_parse_positional_injections(__pyx_v_args, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 122, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_self->__pyx___args, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 123, __pyx_L1_error) + __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_self->__pyx___args, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 122, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GIVEREF(__pyx_t_2); @@ -2434,7 +2434,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9callables_8Callable_ __pyx_v_self->__pyx___args = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers/callables.pyx":124 + /* "dependency_injector/providers/callables.pyx":123 * """ * self.__args += parse_positional_injections(args) * self.__args_len = len(self.__args) # <<<<<<<<<<<<<< @@ -2445,13 +2445,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9callables_8Callable_ __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, 124, __pyx_L1_error) + __PYX_ERR(0, 123, __pyx_L1_error) } - __pyx_t_3 = PyTuple_GET_SIZE(__pyx_t_2); if (unlikely(__pyx_t_3 == -1)) __PYX_ERR(0, 124, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_SIZE(__pyx_t_2); if (unlikely(__pyx_t_3 == -1)) __PYX_ERR(0, 123, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_self->__pyx___args_len = __pyx_t_3; - /* "dependency_injector/providers/callables.pyx":125 + /* "dependency_injector/providers/callables.pyx":124 * self.__args += parse_positional_injections(args) * self.__args_len = len(self.__args) * return self # <<<<<<<<<<<<<< @@ -2463,7 +2463,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9callables_8Callable_ __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers/callables.pyx":115 + /* "dependency_injector/providers/callables.pyx":114 * return tuple(args) * * def add_args(self, *args): # <<<<<<<<<<<<<< @@ -2483,7 +2483,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9callables_8Callable_ return __pyx_r; } -/* "dependency_injector/providers/callables.pyx":127 +/* "dependency_injector/providers/callables.pyx":126 * return self * * def set_args(self, *args): # <<<<<<<<<<<<<< @@ -2517,14 +2517,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9callables_8Callable_ Py_ssize_t __pyx_t_2; __Pyx_RefNannySetupContext("set_args", 0); - /* "dependency_injector/providers/callables.pyx":137 + /* "dependency_injector/providers/callables.pyx":136 * :return: Reference ``self`` * """ * self.__args = parse_positional_injections(args) # <<<<<<<<<<<<<< * self.__args_len = len(self.__args) * return self */ - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_10injections_parse_positional_injections(__pyx_v_args, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 137, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_10injections_parse_positional_injections(__pyx_v_args, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 136, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->__pyx___args); @@ -2532,7 +2532,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9callables_8Callable_ __pyx_v_self->__pyx___args = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers/callables.pyx":138 + /* "dependency_injector/providers/callables.pyx":137 * """ * self.__args = parse_positional_injections(args) * self.__args_len = len(self.__args) # <<<<<<<<<<<<<< @@ -2543,13 +2543,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9callables_8Callable_ __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, 138, __pyx_L1_error) + __PYX_ERR(0, 137, __pyx_L1_error) } - __pyx_t_2 = PyTuple_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 138, __pyx_L1_error) + __pyx_t_2 = PyTuple_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 137, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->__pyx___args_len = __pyx_t_2; - /* "dependency_injector/providers/callables.pyx":139 + /* "dependency_injector/providers/callables.pyx":138 * self.__args = parse_positional_injections(args) * self.__args_len = len(self.__args) * return self # <<<<<<<<<<<<<< @@ -2561,7 +2561,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9callables_8Callable_ __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers/callables.pyx":127 + /* "dependency_injector/providers/callables.pyx":126 * return self * * def set_args(self, *args): # <<<<<<<<<<<<<< @@ -2580,7 +2580,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9callables_8Callable_ return __pyx_r; } -/* "dependency_injector/providers/callables.pyx":141 +/* "dependency_injector/providers/callables.pyx":140 * return self * * def clear_args(self): # <<<<<<<<<<<<<< @@ -2609,14 +2609,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9callables_8Callable_ Py_ssize_t __pyx_t_2; __Pyx_RefNannySetupContext("clear_args", 0); - /* "dependency_injector/providers/callables.pyx":146 + /* "dependency_injector/providers/callables.pyx":145 * :return: Reference ``self`` * """ * self.__args = tuple() # <<<<<<<<<<<<<< * self.__args_len = len(self.__args) * return self */ - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyTuple_Type)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 146, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyTuple_Type)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 145, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->__pyx___args); @@ -2624,7 +2624,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9callables_8Callable_ __pyx_v_self->__pyx___args = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers/callables.pyx":147 + /* "dependency_injector/providers/callables.pyx":146 * """ * self.__args = tuple() * self.__args_len = len(self.__args) # <<<<<<<<<<<<<< @@ -2635,13 +2635,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9callables_8Callable_ __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, 147, __pyx_L1_error) + __PYX_ERR(0, 146, __pyx_L1_error) } - __pyx_t_2 = PyTuple_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 147, __pyx_L1_error) + __pyx_t_2 = PyTuple_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 146, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->__pyx___args_len = __pyx_t_2; - /* "dependency_injector/providers/callables.pyx":148 + /* "dependency_injector/providers/callables.pyx":147 * self.__args = tuple() * self.__args_len = len(self.__args) * return self # <<<<<<<<<<<<<< @@ -2653,7 +2653,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9callables_8Callable_ __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers/callables.pyx":141 + /* "dependency_injector/providers/callables.pyx":140 * return self * * def clear_args(self): # <<<<<<<<<<<<<< @@ -2672,7 +2672,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9callables_8Callable_ return __pyx_r; } -/* "dependency_injector/providers/callables.pyx":151 +/* "dependency_injector/providers/callables.pyx":150 * * @property * def kwargs(self): # <<<<<<<<<<<<<< @@ -2704,19 +2704,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9callables_8Callable_ int __pyx_t_3; __Pyx_RefNannySetupContext("__get__", 0); - /* "dependency_injector/providers/callables.pyx":157 + /* "dependency_injector/providers/callables.pyx":156 * cdef dict kwargs * * kwargs = dict() # <<<<<<<<<<<<<< * for index in range(self.__kwargs_len): * kwarg = self.__kwargs[index] */ - __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 157, __pyx_L1_error) + __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 156, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_kwargs = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers/callables.pyx":158 + /* "dependency_injector/providers/callables.pyx":157 * * kwargs = dict() * for index in range(self.__kwargs_len): # <<<<<<<<<<<<<< @@ -2727,7 +2727,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9callables_8Callable_ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { __pyx_v_index = __pyx_t_3; - /* "dependency_injector/providers/callables.pyx":159 + /* "dependency_injector/providers/callables.pyx":158 * kwargs = dict() * for index in range(self.__kwargs_len): * kwarg = self.__kwargs[index] # <<<<<<<<<<<<<< @@ -2736,15 +2736,15 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9callables_8Callable_ */ if (unlikely(__pyx_v_self->__pyx___kwargs == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 159, __pyx_L1_error) + __PYX_ERR(0, 158, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_self->__pyx___kwargs, __pyx_v_index, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 159, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_self->__pyx___kwargs, __pyx_v_index, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 158, __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, 159, __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, 158, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_kwarg, ((struct __pyx_obj_19dependency_injector_9providers_10injections_NamedInjection *)__pyx_t_1)); __pyx_t_1 = 0; - /* "dependency_injector/providers/callables.pyx":160 + /* "dependency_injector/providers/callables.pyx":159 * for index in range(self.__kwargs_len): * kwarg = self.__kwargs[index] * kwargs[kwarg.__name] = kwarg.__value # <<<<<<<<<<<<<< @@ -2753,11 +2753,11 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9callables_8Callable_ */ __pyx_t_1 = __pyx_v_kwarg->__pyx_base.__pyx___value; __Pyx_INCREF(__pyx_t_1); - if (unlikely(PyDict_SetItem(__pyx_v_kwargs, __pyx_v_kwarg->__pyx___name, __pyx_t_1) < 0)) __PYX_ERR(0, 160, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_kwargs, __pyx_v_kwarg->__pyx___name, __pyx_t_1) < 0)) __PYX_ERR(0, 159, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - /* "dependency_injector/providers/callables.pyx":161 + /* "dependency_injector/providers/callables.pyx":160 * kwarg = self.__kwargs[index] * kwargs[kwarg.__name] = kwarg.__value * return kwargs # <<<<<<<<<<<<<< @@ -2769,7 +2769,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9callables_8Callable_ __pyx_r = __pyx_v_kwargs; goto __pyx_L0; - /* "dependency_injector/providers/callables.pyx":151 + /* "dependency_injector/providers/callables.pyx":150 * * @property * def kwargs(self): # <<<<<<<<<<<<<< @@ -2790,7 +2790,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9callables_8Callable_ return __pyx_r; } -/* "dependency_injector/providers/callables.pyx":163 +/* "dependency_injector/providers/callables.pyx":162 * return kwargs * * def add_kwargs(self, **kwargs): # <<<<<<<<<<<<<< @@ -2827,16 +2827,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9callables_8Callable_ Py_ssize_t __pyx_t_3; __Pyx_RefNannySetupContext("add_kwargs", 0); - /* "dependency_injector/providers/callables.pyx":171 + /* "dependency_injector/providers/callables.pyx":170 * :return: Reference ``self`` * """ * self.__kwargs += parse_named_injections(kwargs) # <<<<<<<<<<<<<< * self.__kwargs_len = len(self.__kwargs) * 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, 171, __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, 170, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_self->__pyx___kwargs, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 171, __pyx_L1_error) + __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_self->__pyx___kwargs, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 170, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GIVEREF(__pyx_t_2); @@ -2845,7 +2845,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9callables_8Callable_ __pyx_v_self->__pyx___kwargs = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers/callables.pyx":172 + /* "dependency_injector/providers/callables.pyx":171 * """ * self.__kwargs += parse_named_injections(kwargs) * self.__kwargs_len = len(self.__kwargs) # <<<<<<<<<<<<<< @@ -2856,13 +2856,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9callables_8Callable_ __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, 172, __pyx_L1_error) + __PYX_ERR(0, 171, __pyx_L1_error) } - __pyx_t_3 = PyTuple_GET_SIZE(__pyx_t_2); if (unlikely(__pyx_t_3 == -1)) __PYX_ERR(0, 172, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_SIZE(__pyx_t_2); if (unlikely(__pyx_t_3 == -1)) __PYX_ERR(0, 171, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_self->__pyx___kwargs_len = __pyx_t_3; - /* "dependency_injector/providers/callables.pyx":173 + /* "dependency_injector/providers/callables.pyx":172 * self.__kwargs += parse_named_injections(kwargs) * self.__kwargs_len = len(self.__kwargs) * return self # <<<<<<<<<<<<<< @@ -2874,7 +2874,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9callables_8Callable_ __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers/callables.pyx":163 + /* "dependency_injector/providers/callables.pyx":162 * return kwargs * * def add_kwargs(self, **kwargs): # <<<<<<<<<<<<<< @@ -2894,7 +2894,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9callables_8Callable_ return __pyx_r; } -/* "dependency_injector/providers/callables.pyx":175 +/* "dependency_injector/providers/callables.pyx":174 * return self * * def set_kwargs(self, **kwargs): # <<<<<<<<<<<<<< @@ -2930,14 +2930,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9callables_8Callable_ Py_ssize_t __pyx_t_2; __Pyx_RefNannySetupContext("set_kwargs", 0); - /* "dependency_injector/providers/callables.pyx":185 + /* "dependency_injector/providers/callables.pyx":184 * :return: Reference ``self`` * """ * self.__kwargs = parse_named_injections(kwargs) # <<<<<<<<<<<<<< * self.__kwargs_len = len(self.__kwargs) * 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, 185, __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, 184, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->__pyx___kwargs); @@ -2945,7 +2945,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9callables_8Callable_ __pyx_v_self->__pyx___kwargs = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers/callables.pyx":186 + /* "dependency_injector/providers/callables.pyx":185 * """ * self.__kwargs = parse_named_injections(kwargs) * self.__kwargs_len = len(self.__kwargs) # <<<<<<<<<<<<<< @@ -2956,13 +2956,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9callables_8Callable_ __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, 186, __pyx_L1_error) + __PYX_ERR(0, 185, __pyx_L1_error) } - __pyx_t_2 = PyTuple_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 186, __pyx_L1_error) + __pyx_t_2 = PyTuple_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 185, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->__pyx___kwargs_len = __pyx_t_2; - /* "dependency_injector/providers/callables.pyx":187 + /* "dependency_injector/providers/callables.pyx":186 * self.__kwargs = parse_named_injections(kwargs) * self.__kwargs_len = len(self.__kwargs) * return self # <<<<<<<<<<<<<< @@ -2974,7 +2974,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9callables_8Callable_ __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers/callables.pyx":175 + /* "dependency_injector/providers/callables.pyx":174 * return self * * def set_kwargs(self, **kwargs): # <<<<<<<<<<<<<< @@ -2993,7 +2993,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9callables_8Callable_ return __pyx_r; } -/* "dependency_injector/providers/callables.pyx":189 +/* "dependency_injector/providers/callables.pyx":188 * return self * * def clear_kwargs(self): # <<<<<<<<<<<<<< @@ -3022,14 +3022,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9callables_8Callable_ Py_ssize_t __pyx_t_2; __Pyx_RefNannySetupContext("clear_kwargs", 0); - /* "dependency_injector/providers/callables.pyx":194 + /* "dependency_injector/providers/callables.pyx":193 * :return: Reference ``self`` * """ * self.__kwargs = tuple() # <<<<<<<<<<<<<< * self.__kwargs_len = len(self.__kwargs) * return self */ - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyTuple_Type)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 194, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyTuple_Type)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 193, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->__pyx___kwargs); @@ -3037,7 +3037,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9callables_8Callable_ __pyx_v_self->__pyx___kwargs = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers/callables.pyx":195 + /* "dependency_injector/providers/callables.pyx":194 * """ * self.__kwargs = tuple() * self.__kwargs_len = len(self.__kwargs) # <<<<<<<<<<<<<< @@ -3048,13 +3048,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9callables_8Callable_ __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, 195, __pyx_L1_error) + __PYX_ERR(0, 194, __pyx_L1_error) } - __pyx_t_2 = PyTuple_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 195, __pyx_L1_error) + __pyx_t_2 = PyTuple_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 194, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->__pyx___kwargs_len = __pyx_t_2; - /* "dependency_injector/providers/callables.pyx":196 + /* "dependency_injector/providers/callables.pyx":195 * self.__kwargs = tuple() * self.__kwargs_len = len(self.__kwargs) * return self # <<<<<<<<<<<<<< @@ -3066,7 +3066,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9callables_8Callable_ __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers/callables.pyx":189 + /* "dependency_injector/providers/callables.pyx":188 * return self * * def clear_kwargs(self): # <<<<<<<<<<<<<< @@ -3085,12 +3085,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9callables_8Callable_ return __pyx_r; } -/* "dependency_injector/providers/callables.pyx":198 +/* "dependency_injector/providers/callables.pyx":197 * return self * * cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<< * """Return result of provided callable's call.""" - * return __call(self, args, kwargs) + * return __callable_call(self, args, kwargs) */ static PyObject *__pyx_pw_19dependency_injector_9providers_9callables_8Callable_19_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ @@ -3108,7 +3108,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_9callables_8Callable__ 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, 198, __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, 197, __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_9callables_8Callable_19_provide)) { __Pyx_XDECREF(__pyx_r); @@ -3128,7 +3128,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_9callables_8Callable__ #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, 198, __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, 197, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -3136,13 +3136,13 @@ static PyObject *__pyx_f_19dependency_injector_9providers_9callables_8Callable__ #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, 198, __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, 197, __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, 198, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 197, __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; @@ -3153,7 +3153,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_9callables_8Callable__ __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, 198, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 197, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -3166,26 +3166,26 @@ static PyObject *__pyx_f_19dependency_injector_9providers_9callables_8Callable__ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - /* "dependency_injector/providers/callables.pyx":200 + /* "dependency_injector/providers/callables.pyx":199 * cpdef object _provide(self, tuple args, dict kwargs): * """Return result of provided callable's call.""" - * return __call(self, args, kwargs) # <<<<<<<<<<<<<< + * return __callable_call(self, args, kwargs) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_9callables___call(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 200, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_9callables___callable_call(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers/callables.pyx":198 + /* "dependency_injector/providers/callables.pyx":197 * return self * * cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<< * """Return result of provided callable's call.""" - * return __call(self, args, kwargs) + * return __callable_call(self, args, kwargs) */ /* function exit code */ @@ -3232,11 +3232,11 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_9callables_8Callable_ 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, 198, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, 1); __PYX_ERR(0, 197, __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, 198, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_provide") < 0)) __PYX_ERR(0, 197, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -3249,14 +3249,14 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_9callables_8Callable_ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 198, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 197, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.callables.Callable._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, 198, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(0, 198, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(0, 197, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(0, 197, __pyx_L1_error) __pyx_r = __pyx_pf_19dependency_injector_9providers_9callables_8Callable_18_provide(((struct __pyx_obj_19dependency_injector_9providers_9callables_Callable *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs); /* function exit code */ @@ -3274,7 +3274,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9callables_8Callable_ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("_provide", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_9callables_8Callable__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 198, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_9callables_8Callable__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 197, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -3903,19 +3903,19 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers_10inject /* "dependency_injector/providers/callables.pxd":32 * * - * cdef inline object __call(Callable self, tuple args, dict kwargs): # <<<<<<<<<<<<<< + * cdef inline object __callable_call(Callable self, tuple args, dict kwargs): # <<<<<<<<<<<<<< * cdef tuple positional_args * cdef dict keyword_args */ -static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers_9callables___call(struct __pyx_obj_19dependency_injector_9providers_9callables_Callable *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { +static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers_9callables___callable_call(struct __pyx_obj_19dependency_injector_9providers_9callables_Callable *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { PyObject *__pyx_v_positional_args = 0; PyObject *__pyx_v_keyword_args = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; - __Pyx_RefNannySetupContext("__call", 0); + __Pyx_RefNannySetupContext("__callable_call", 0); /* "dependency_injector/providers/callables.pxd":37 * @@ -3986,7 +3986,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers_9callabl /* "dependency_injector/providers/callables.pxd":32 * * - * cdef inline object __call(Callable self, tuple args, dict kwargs): # <<<<<<<<<<<<<< + * cdef inline object __callable_call(Callable self, tuple args, dict kwargs): # <<<<<<<<<<<<<< * cdef tuple positional_args * cdef dict keyword_args */ @@ -3995,7 +3995,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers_9callabl __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); - __Pyx_AddTraceback("dependency_injector.providers.callables.__call", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("dependency_injector.providers.callables.__callable_call", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_positional_args); @@ -4283,9 +4283,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, 73, __pyx_L1_error) - __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(0, 77, __pyx_L1_error) - __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 110, __pyx_L1_error) + __pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_n_s_super); if (!__pyx_builtin_super) __PYX_ERR(0, 72, __pyx_L1_error) + __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(0, 76, __pyx_L1_error) + __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 109, __pyx_L1_error) return 0; __pyx_L1_error:; return -1; @@ -4399,11 +4399,11 @@ PyMODINIT_FUNC PyInit_callables(void) __pyx_vtable_19dependency_injector_9providers_9callables_Callable.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_4base_Provider; __pyx_vtable_19dependency_injector_9providers_9callables_Callable.__pyx_base._provide = (PyObject *(*)(struct __pyx_obj_19dependency_injector_9providers_4base_Provider *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_19dependency_injector_9providers_9callables_8Callable__provide; __pyx_type_19dependency_injector_9providers_9callables_Callable.tp_base = __pyx_ptype_19dependency_injector_9providers_4base_Provider; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_9callables_Callable) < 0) __PYX_ERR(0, 22, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_9callables_Callable) < 0) __PYX_ERR(0, 21, __pyx_L1_error) __pyx_type_19dependency_injector_9providers_9callables_Callable.tp_print = 0; #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_9callables_Callable, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 22, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_9callables_Callable, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 21, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_19dependency_injector_9providers_9callables_8Callable___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_19dependency_injector_9providers_9callables_8Callable___init__.doc = __pyx_doc_19dependency_injector_9providers_9callables_8Callable___init__; @@ -4413,7 +4413,7 @@ PyMODINIT_FUNC PyInit_callables(void) #endif #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_9callables_Callable, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(0, 22, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_9callables_Callable, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(0, 21, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_19dependency_injector_9providers_9callables_8Callable_4__str__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_19dependency_injector_9providers_9callables_8Callable_4__str__.doc = __pyx_doc_19dependency_injector_9providers_9callables_8Callable_4__str__; @@ -4421,16 +4421,16 @@ PyMODINIT_FUNC PyInit_callables(void) } } #endif - if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_9callables_Callable.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_9callables_Callable) < 0) __PYX_ERR(0, 22, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "Callable", (PyObject *)&__pyx_type_19dependency_injector_9providers_9callables_Callable) < 0) __PYX_ERR(0, 22, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_9callables_Callable.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_9callables_Callable) < 0) __PYX_ERR(0, 21, __pyx_L1_error) + if (PyObject_SetAttrString(__pyx_m, "Callable", (PyObject *)&__pyx_type_19dependency_injector_9providers_9callables_Callable) < 0) __PYX_ERR(0, 21, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_9callables_Callable = &__pyx_type_19dependency_injector_9providers_9callables_Callable; __pyx_vtabptr_19dependency_injector_9providers_9callables_DelegatedCallable = &__pyx_vtable_19dependency_injector_9providers_9callables_DelegatedCallable; __pyx_vtable_19dependency_injector_9providers_9callables_DelegatedCallable.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_9callables_Callable; __pyx_type_19dependency_injector_9providers_9callables_DelegatedCallable.tp_base = __pyx_ptype_19dependency_injector_9providers_9callables_Callable; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_9callables_DelegatedCallable) < 0) __PYX_ERR(0, 203, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_9callables_DelegatedCallable) < 0) __PYX_ERR(0, 202, __pyx_L1_error) __pyx_type_19dependency_injector_9providers_9callables_DelegatedCallable.tp_print = 0; - if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_9callables_DelegatedCallable.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_9callables_DelegatedCallable) < 0) __PYX_ERR(0, 203, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "DelegatedCallable", (PyObject *)&__pyx_type_19dependency_injector_9providers_9callables_DelegatedCallable) < 0) __PYX_ERR(0, 203, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_9callables_DelegatedCallable.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_9callables_DelegatedCallable) < 0) __PYX_ERR(0, 202, __pyx_L1_error) + if (PyObject_SetAttrString(__pyx_m, "DelegatedCallable", (PyObject *)&__pyx_type_19dependency_injector_9providers_9callables_DelegatedCallable) < 0) __PYX_ERR(0, 202, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_9callables_DelegatedCallable = &__pyx_type_19dependency_injector_9providers_9callables_DelegatedCallable; /*--- 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(3, 15, __pyx_L1_error) @@ -4482,12 +4482,12 @@ PyMODINIT_FUNC PyInit_callables(void) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "dependency_injector/providers/callables.pyx":209 + /* "dependency_injector/providers/callables.pyx":208 * """ * * __IS_DELEGATED__ = True # <<<<<<<<<<<<<< */ - if (PyDict_SetItem((PyObject *)__pyx_ptype_19dependency_injector_9providers_9callables_DelegatedCallable->tp_dict, __pyx_n_s_IS_DELEGATED, Py_True) < 0) __PYX_ERR(0, 209, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_19dependency_injector_9providers_9callables_DelegatedCallable->tp_dict, __pyx_n_s_IS_DELEGATED, Py_True) < 0) __PYX_ERR(0, 208, __pyx_L1_error) PyType_Modified(__pyx_ptype_19dependency_injector_9providers_9callables_DelegatedCallable); /* "dependency_injector/providers/callables.pyx":1 @@ -4503,7 +4503,7 @@ PyMODINIT_FUNC PyInit_callables(void) /* "dependency_injector/providers/callables.pxd":32 * * - * cdef inline object __call(Callable self, tuple args, dict kwargs): # <<<<<<<<<<<<<< + * cdef inline object __callable_call(Callable self, tuple args, dict kwargs): # <<<<<<<<<<<<<< * cdef tuple positional_args * cdef dict keyword_args */ diff --git a/src/dependency_injector/providers/callables.pxd b/src/dependency_injector/providers/callables.pxd index ee0da937..b01cdcb0 100644 --- a/src/dependency_injector/providers/callables.pxd +++ b/src/dependency_injector/providers/callables.pxd @@ -29,7 +29,7 @@ cdef class DelegatedCallable(Callable): pass -cdef inline object __call(Callable self, tuple args, dict kwargs): +cdef inline object __callable_call(Callable self, tuple args, dict kwargs): cdef tuple positional_args cdef dict keyword_args diff --git a/src/dependency_injector/providers/callables.pyx b/src/dependency_injector/providers/callables.pyx index 8258e258..44f9137f 100644 --- a/src/dependency_injector/providers/callables.pyx +++ b/src/dependency_injector/providers/callables.pyx @@ -6,7 +6,6 @@ Powered by Cython. from dependency_injector.errors import Error from .base cimport Provider -from .callables cimport __call from .injections cimport ( PositionalInjection, NamedInjection, @@ -197,7 +196,7 @@ cdef class Callable(Provider): cpdef object _provide(self, tuple args, dict kwargs): """Return result of provided callable's call.""" - return __call(self, args, kwargs) + return __callable_call(self, args, kwargs) cdef class DelegatedCallable(Callable): diff --git a/src/dependency_injector/providers/factories.c b/src/dependency_injector/providers/factories.c index 0efb2cc9..9f9e1cd0 100644 --- a/src/dependency_injector/providers/factories.c +++ b/src/dependency_injector/providers/factories.c @@ -637,9 +637,9 @@ struct __pyx_obj_19dependency_injector_9providers_9factories_Factory; struct __pyx_obj_19dependency_injector_9providers_9factories_DelegatedFactory; struct __pyx_opt_args_19dependency_injector_9providers_5utils_deepcopy; -/* "utils.pxd":13 - * cpdef bint is_delegated(object instance) - * cpdef str represent_provider(object provider, object provides) +/* "utils.pxd":21 + * + * * cpdef object deepcopy(object instance, dict memo=*) # <<<<<<<<<<<<<< */ struct __pyx_opt_args_19dependency_injector_9providers_5utils_deepcopy { @@ -897,7 +897,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_9callables_DelegatedCal static struct __pyx_vtabstruct_19dependency_injector_9providers_9callables_DelegatedCallable *__pyx_vtabptr_19dependency_injector_9providers_9callables_DelegatedCallable; -/* "dependency_injector/providers/factories.pyx":21 +/* "dependency_injector/providers/factories.pyx":20 * * * cdef class Factory(Provider): # <<<<<<<<<<<<<< @@ -911,7 +911,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_9factories_Factory { static struct __pyx_vtabstruct_19dependency_injector_9providers_9factories_Factory *__pyx_vtabptr_19dependency_injector_9providers_9factories_Factory; -/* "dependency_injector/providers/factories.pyx":254 +/* "dependency_injector/providers/factories.pyx":253 * * * cdef class DelegatedFactory(Factory): # <<<<<<<<<<<<<< @@ -1261,7 +1261,7 @@ static PyObject *(*__pyx_f_19dependency_injector_9providers_10injections_parse_n /* Module declarations from 'dependency_injector.providers.callables' */ static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_9callables_Callable = 0; static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_9callables_DelegatedCallable = 0; -static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers_9callables___call(struct __pyx_obj_19dependency_injector_9providers_9callables_Callable *, PyObject *, PyObject *); /*proto*/ +static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers_9callables___callable_call(struct __pyx_obj_19dependency_injector_9providers_9callables_Callable *, PyObject *, PyObject *); /*proto*/ /* Module declarations from 'dependency_injector.providers.utils' */ static PyObject **__pyx_vp_19dependency_injector_9providers_5utils_CLASS_TYPES = 0; @@ -1272,7 +1272,7 @@ static PyObject *(*__pyx_f_19dependency_injector_9providers_5utils_deepcopy)(PyO /* Module declarations from 'dependency_injector.providers.factories' */ static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_9factories_Factory = 0; static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_9factories_DelegatedFactory = 0; -static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers_9factories___call(struct __pyx_obj_19dependency_injector_9providers_9factories_Factory *, PyObject *, PyObject *); /*proto*/ +static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers_9factories___factory_call(struct __pyx_obj_19dependency_injector_9providers_9factories_Factory *, PyObject *, PyObject *); /*proto*/ #define __Pyx_MODULE_NAME "dependency_injector.providers.factories" int __pyx_module_is_main_dependency_injector__providers__factories = 0; @@ -1363,7 +1363,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":74 +/* "dependency_injector/providers/factories.pyx":73 * provided_type = None * * def __init__(self, provides, *args, **kwargs): # <<<<<<<<<<<<<< @@ -1416,7 +1416,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, 74, __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; @@ -1427,7 +1427,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, 74, __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; @@ -1461,19 +1461,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":86 + /* "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, 86, __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, 86, __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, 86, __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 { @@ -1481,25 +1481,25 @@ static int __pyx_pf_19dependency_injector_9providers_9factories_7Factory___init_ goto __pyx_L4_bool_binop_done; } - /* "dependency_injector/providers/factories.pyx":87 + /* "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, 87, __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, 87, __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, 87, __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":86 + /* "dependency_injector/providers/factories.pyx":85 * :type kwargs: dict[str, object] * """ * if (self.__class__.provided_type and # <<<<<<<<<<<<<< @@ -1508,30 +1508,30 @@ static int __pyx_pf_19dependency_injector_9providers_9factories_7Factory___init_ */ if (__pyx_t_1) { - /* "dependency_injector/providers/factories.pyx":88 + /* "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, 88, __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, 88, __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":89 + /* "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, 89, __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, 89, __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, 89, __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; @@ -1549,7 +1549,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, 88, __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; @@ -1559,7 +1559,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, 88, __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; @@ -1567,7 +1567,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, 88, __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; @@ -1578,7 +1578,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, 88, __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; } @@ -1594,14 +1594,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, 88, __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, 88, __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; @@ -1610,20 +1610,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, 88, __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, 88, __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, 88, __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; } @@ -1631,9 +1631,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, 88, __pyx_L1_error) + __PYX_ERR(0, 87, __pyx_L1_error) - /* "dependency_injector/providers/factories.pyx":86 + /* "dependency_injector/providers/factories.pyx":85 * :type kwargs: dict[str, object] * """ * if (self.__class__.provided_type and # <<<<<<<<<<<<<< @@ -1642,22 +1642,22 @@ static int __pyx_pf_19dependency_injector_9providers_9factories_7Factory___init_ */ } - /* "dependency_injector/providers/factories.pyx":91 + /* "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, 91, __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, 91, __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, 91, __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); @@ -1666,14 +1666,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":93 + /* "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, 93, __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); @@ -1681,7 +1681,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":94 + /* "dependency_injector/providers/factories.pyx":93 * * self.__attributes = tuple() * self.__attributes_len = 0 # <<<<<<<<<<<<<< @@ -1690,14 +1690,14 @@ static int __pyx_pf_19dependency_injector_9providers_9factories_7Factory___init_ */ __pyx_v_self->__pyx___attributes_len = 0; - /* "dependency_injector/providers/factories.pyx":96 + /* "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, 96, __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)); @@ -1705,10 +1705,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, 96, __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, 96, __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; @@ -1722,16 +1722,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, 96, __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, 96, __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":74 + /* "dependency_injector/providers/factories.pyx":73 * provided_type = None * * def __init__(self, provides, *args, **kwargs): # <<<<<<<<<<<<<< @@ -1758,7 +1758,7 @@ static int __pyx_pf_19dependency_injector_9providers_9factories_7Factory___init_ return __pyx_r; } -/* "dependency_injector/providers/factories.pyx":98 +/* "dependency_injector/providers/factories.pyx":97 * super(Factory, self).__init__() * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< @@ -1798,21 +1798,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":100 + /* "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, 100, __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, 100, __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, 100, __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; @@ -1826,14 +1826,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, 100, __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, 100, __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; @@ -1842,20 +1842,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, 100, __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, 100, __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, 100, __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; } @@ -1864,7 +1864,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":101 + /* "dependency_injector/providers/factories.pyx":100 * """Create and return full copy of provider.""" * copied = memo.get(id(self)) * if copied is not None: # <<<<<<<<<<<<<< @@ -1875,7 +1875,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":102 + /* "dependency_injector/providers/factories.pyx":101 * copied = memo.get(id(self)) * if copied is not None: * return copied # <<<<<<<<<<<<<< @@ -1887,7 +1887,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_2 __pyx_r = __pyx_v_copied; goto __pyx_L0; - /* "dependency_injector/providers/factories.pyx":101 + /* "dependency_injector/providers/factories.pyx":100 * """Create and return full copy of provider.""" * copied = memo.get(id(self)) * if copied is not None: # <<<<<<<<<<<<<< @@ -1896,91 +1896,91 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_2 */ } - /* "dependency_injector/providers/factories.pyx":104 + /* "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, 104, __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, 104, __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, 104, __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":105 + /* "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, 105, __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, 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, 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, 105, __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":104 + /* "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, 104, __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, 104, __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":106 + /* "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, 106, __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, 106, __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, 106, __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, 106, __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, 106, __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, 104, __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":104 + /* "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, 104, __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; @@ -1988,58 +1988,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":107 + /* "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, 107, __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, 107, __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, 107, __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, 107, __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, 107, __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, 107, __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, 107, __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, 107, __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":109 + /* "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, 109, __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, 109, __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, 109, __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 (;;) { @@ -2047,17 +2047,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, 109, __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, 109, __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, 109, __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, 109, __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 } @@ -2067,7 +2067,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, 109, __pyx_L1_error) + else __PYX_ERR(0, 108, __pyx_L1_error) } break; } @@ -2076,19 +2076,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":110 + /* "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, 110, __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, 110, __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, 110, __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))) { @@ -2101,14 +2101,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, 110, __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, 110, __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; @@ -2117,20 +2117,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, 110, __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, 110, __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, 110, __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; } @@ -2138,7 +2138,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":109 + /* "dependency_injector/providers/factories.pyx":108 * copied.set_attributes(**deepcopy(self.attributes, memo)) * * for overriding_provider in self.overridden: # <<<<<<<<<<<<<< @@ -2148,7 +2148,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":112 + /* "dependency_injector/providers/factories.pyx":111 * copied.override(deepcopy(overriding_provider, memo)) * * return copied # <<<<<<<<<<<<<< @@ -2160,7 +2160,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_2 __pyx_r = __pyx_v_copied; goto __pyx_L0; - /* "dependency_injector/providers/factories.pyx":98 + /* "dependency_injector/providers/factories.pyx":97 * super(Factory, self).__init__() * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< @@ -2186,7 +2186,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_2 return __pyx_r; } -/* "dependency_injector/providers/factories.pyx":114 +/* "dependency_injector/providers/factories.pyx":113 * return copied * * def __str__(self): # <<<<<<<<<<<<<< @@ -2218,7 +2218,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":119 + /* "dependency_injector/providers/factories.pyx":118 * :rtype: str * """ * return represent_provider(provider=self, # <<<<<<<<<<<<<< @@ -2227,31 +2227,31 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_4 */ __Pyx_XDECREF(__pyx_r); - /* "dependency_injector/providers/factories.pyx":120 + /* "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, 120, __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":119 + /* "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, 119, __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":114 + /* "dependency_injector/providers/factories.pyx":113 * return copied * * def __str__(self): # <<<<<<<<<<<<<< @@ -2271,7 +2271,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_4 return __pyx_r; } -/* "dependency_injector/providers/factories.pyx":123 +/* "dependency_injector/providers/factories.pyx":122 * * @property * def cls(self): # <<<<<<<<<<<<<< @@ -2298,7 +2298,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":125 + /* "dependency_injector/providers/factories.pyx":124 * def cls(self): * """Return provided type.""" * return self.__instantiator.provides # <<<<<<<<<<<<<< @@ -2306,13 +2306,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, 125, __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":123 + /* "dependency_injector/providers/factories.pyx":122 * * @property * def cls(self): # <<<<<<<<<<<<<< @@ -2331,7 +2331,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_3 return __pyx_r; } -/* "dependency_injector/providers/factories.pyx":128 +/* "dependency_injector/providers/factories.pyx":127 * * @property * def args(self): # <<<<<<<<<<<<<< @@ -2358,7 +2358,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":130 + /* "dependency_injector/providers/factories.pyx":129 * def args(self): * """Return positional argument injections.""" * return self.__instantiator.args # <<<<<<<<<<<<<< @@ -2366,13 +2366,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, 130, __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":128 + /* "dependency_injector/providers/factories.pyx":127 * * @property * def args(self): # <<<<<<<<<<<<<< @@ -2391,7 +2391,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_4 return __pyx_r; } -/* "dependency_injector/providers/factories.pyx":132 +/* "dependency_injector/providers/factories.pyx":131 * return self.__instantiator.args * * def add_args(self, *args): # <<<<<<<<<<<<<< @@ -2425,21 +2425,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":140 + /* "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, 140, __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, 140, __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":141 + /* "dependency_injector/providers/factories.pyx":140 * """ * self.__instantiator.add_args(*args) * return self # <<<<<<<<<<<<<< @@ -2451,7 +2451,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":132 + /* "dependency_injector/providers/factories.pyx":131 * return self.__instantiator.args * * def add_args(self, *args): # <<<<<<<<<<<<<< @@ -2471,7 +2471,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_6 return __pyx_r; } -/* "dependency_injector/providers/factories.pyx":143 +/* "dependency_injector/providers/factories.pyx":142 * return self * * def set_args(self, *args): # <<<<<<<<<<<<<< @@ -2505,21 +2505,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":153 + /* "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, 153, __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, 153, __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":154 + /* "dependency_injector/providers/factories.pyx":153 * """ * self.__instantiator.set_args(*args) * return self # <<<<<<<<<<<<<< @@ -2531,7 +2531,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":143 + /* "dependency_injector/providers/factories.pyx":142 * return self * * def set_args(self, *args): # <<<<<<<<<<<<<< @@ -2551,7 +2551,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_8 return __pyx_r; } -/* "dependency_injector/providers/factories.pyx":156 +/* "dependency_injector/providers/factories.pyx":155 * return self * * def clear_args(self): # <<<<<<<<<<<<<< @@ -2581,14 +2581,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":161 + /* "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, 161, __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))) { @@ -2601,16 +2601,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, 161, __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, 161, __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":162 + /* "dependency_injector/providers/factories.pyx":161 * """ * self.__instantiator.clear_args() * return self # <<<<<<<<<<<<<< @@ -2622,7 +2622,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":156 + /* "dependency_injector/providers/factories.pyx":155 * return self * * def clear_args(self): # <<<<<<<<<<<<<< @@ -2643,7 +2643,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_1 return __pyx_r; } -/* "dependency_injector/providers/factories.pyx":165 +/* "dependency_injector/providers/factories.pyx":164 * * @property * def kwargs(self): # <<<<<<<<<<<<<< @@ -2670,7 +2670,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":167 + /* "dependency_injector/providers/factories.pyx":166 * def kwargs(self): * """Return keyword argument injections.""" * return self.__instantiator.kwargs # <<<<<<<<<<<<<< @@ -2678,13 +2678,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, 167, __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":165 + /* "dependency_injector/providers/factories.pyx":164 * * @property * def kwargs(self): # <<<<<<<<<<<<<< @@ -2703,7 +2703,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_6 return __pyx_r; } -/* "dependency_injector/providers/factories.pyx":169 +/* "dependency_injector/providers/factories.pyx":168 * return self.__instantiator.kwargs * * def add_kwargs(self, **kwargs): # <<<<<<<<<<<<<< @@ -2743,21 +2743,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":177 + /* "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, 177, __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, 177, __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":178 + /* "dependency_injector/providers/factories.pyx":177 * """ * self.__instantiator.add_kwargs(**kwargs) * return self # <<<<<<<<<<<<<< @@ -2769,7 +2769,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":169 + /* "dependency_injector/providers/factories.pyx":168 * return self.__instantiator.kwargs * * def add_kwargs(self, **kwargs): # <<<<<<<<<<<<<< @@ -2789,7 +2789,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_1 return __pyx_r; } -/* "dependency_injector/providers/factories.pyx":180 +/* "dependency_injector/providers/factories.pyx":179 * return self * * def set_kwargs(self, **kwargs): # <<<<<<<<<<<<<< @@ -2829,21 +2829,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":190 + /* "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, 190, __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, 190, __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":191 + /* "dependency_injector/providers/factories.pyx":190 * """ * self.__instantiator.set_kwargs(**kwargs) * return self # <<<<<<<<<<<<<< @@ -2855,7 +2855,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":180 + /* "dependency_injector/providers/factories.pyx":179 * return self * * def set_kwargs(self, **kwargs): # <<<<<<<<<<<<<< @@ -2875,7 +2875,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_1 return __pyx_r; } -/* "dependency_injector/providers/factories.pyx":193 +/* "dependency_injector/providers/factories.pyx":192 * return self * * def clear_kwargs(self): # <<<<<<<<<<<<<< @@ -2905,14 +2905,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":198 + /* "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, 198, __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))) { @@ -2925,16 +2925,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, 198, __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, 198, __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":199 + /* "dependency_injector/providers/factories.pyx":198 * """ * self.__instantiator.clear_kwargs() * return self # <<<<<<<<<<<<<< @@ -2946,7 +2946,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":193 + /* "dependency_injector/providers/factories.pyx":192 * return self * * def clear_kwargs(self): # <<<<<<<<<<<<<< @@ -2967,7 +2967,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_1 return __pyx_r; } -/* "dependency_injector/providers/factories.pyx":202 +/* "dependency_injector/providers/factories.pyx":201 * * @property * def attributes(self): # <<<<<<<<<<<<<< @@ -2999,19 +2999,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_1 int __pyx_t_3; __Pyx_RefNannySetupContext("__get__", 0); - /* "dependency_injector/providers/factories.pyx":208 + /* "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, 208, __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":209 + /* "dependency_injector/providers/factories.pyx":208 * * attributes = dict() * for index in range(self.__attributes_len): # <<<<<<<<<<<<<< @@ -3022,7 +3022,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":210 + /* "dependency_injector/providers/factories.pyx":209 * attributes = dict() * for index in range(self.__attributes_len): * attribute = self.__attributes[index] # <<<<<<<<<<<<<< @@ -3031,15 +3031,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, 210, __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, 210, __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, 210, __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":211 + /* "dependency_injector/providers/factories.pyx":210 * for index in range(self.__attributes_len): * attribute = self.__attributes[index] * attributes[attribute.__name] = attribute.__value # <<<<<<<<<<<<<< @@ -3048,11 +3048,11 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_1 */ __pyx_t_1 = __pyx_v_attribute->__pyx_base.__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, 211, __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":212 + /* "dependency_injector/providers/factories.pyx":211 * attribute = self.__attributes[index] * attributes[attribute.__name] = attribute.__value * return attributes # <<<<<<<<<<<<<< @@ -3064,7 +3064,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_1 __pyx_r = __pyx_v_attributes; goto __pyx_L0; - /* "dependency_injector/providers/factories.pyx":202 + /* "dependency_injector/providers/factories.pyx":201 * * @property * def attributes(self): # <<<<<<<<<<<<<< @@ -3085,7 +3085,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_1 return __pyx_r; } -/* "dependency_injector/providers/factories.pyx":214 +/* "dependency_injector/providers/factories.pyx":213 * return attributes * * def add_attributes(self, **kwargs): # <<<<<<<<<<<<<< @@ -3122,16 +3122,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":222 + /* "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, 222, __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, 222, __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); @@ -3140,7 +3140,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":223 + /* "dependency_injector/providers/factories.pyx":222 * """ * self.__attributes += parse_named_injections(kwargs) * self.__attributes_len = len(self.__attributes) # <<<<<<<<<<<<<< @@ -3151,13 +3151,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, 223, __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, 223, __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":224 + /* "dependency_injector/providers/factories.pyx":223 * self.__attributes += parse_named_injections(kwargs) * self.__attributes_len = len(self.__attributes) * return self # <<<<<<<<<<<<<< @@ -3169,7 +3169,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":214 + /* "dependency_injector/providers/factories.pyx":213 * return attributes * * def add_attributes(self, **kwargs): # <<<<<<<<<<<<<< @@ -3189,7 +3189,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_1 return __pyx_r; } -/* "dependency_injector/providers/factories.pyx":226 +/* "dependency_injector/providers/factories.pyx":225 * return self * * def set_attributes(self, **kwargs): # <<<<<<<<<<<<<< @@ -3225,14 +3225,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":236 + /* "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, 236, __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); @@ -3240,7 +3240,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":237 + /* "dependency_injector/providers/factories.pyx":236 * """ * self.__attributes = parse_named_injections(kwargs) * self.__attributes_len = len(self.__attributes) # <<<<<<<<<<<<<< @@ -3251,13 +3251,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, 237, __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, 237, __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":238 + /* "dependency_injector/providers/factories.pyx":237 * self.__attributes = parse_named_injections(kwargs) * self.__attributes_len = len(self.__attributes) * return self # <<<<<<<<<<<<<< @@ -3269,7 +3269,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":226 + /* "dependency_injector/providers/factories.pyx":225 * return self * * def set_attributes(self, **kwargs): # <<<<<<<<<<<<<< @@ -3288,7 +3288,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_2 return __pyx_r; } -/* "dependency_injector/providers/factories.pyx":240 +/* "dependency_injector/providers/factories.pyx":239 * return self * * def clear_attributes(self): # <<<<<<<<<<<<<< @@ -3317,14 +3317,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":245 + /* "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, 245, __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); @@ -3332,7 +3332,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":246 + /* "dependency_injector/providers/factories.pyx":245 * """ * self.__attributes = tuple() * self.__attributes_len = len(self.__attributes) # <<<<<<<<<<<<<< @@ -3343,13 +3343,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, 246, __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, 246, __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":247 + /* "dependency_injector/providers/factories.pyx":246 * self.__attributes = tuple() * self.__attributes_len = len(self.__attributes) * return self # <<<<<<<<<<<<<< @@ -3361,7 +3361,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":240 + /* "dependency_injector/providers/factories.pyx":239 * return self * * def clear_attributes(self): # <<<<<<<<<<<<<< @@ -3380,12 +3380,12 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9factories_7Factory_2 return __pyx_r; } -/* "dependency_injector/providers/factories.pyx":249 +/* "dependency_injector/providers/factories.pyx":248 * return self * * cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<< * """Return new instance.""" - * return __call(self, args, kwargs) + * return __factory_call(self, args, kwargs) */ static PyObject *__pyx_pw_19dependency_injector_9providers_9factories_7Factory_25_provide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ @@ -3403,7 +3403,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, 249, __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); @@ -3423,7 +3423,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, 249, __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 @@ -3431,13 +3431,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, 249, __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, 249, __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; @@ -3448,7 +3448,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, 249, __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; } @@ -3461,26 +3461,26 @@ static PyObject *__pyx_f_19dependency_injector_9providers_9factories_7Factory__p __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - /* "dependency_injector/providers/factories.pyx":251 + /* "dependency_injector/providers/factories.pyx":250 * cpdef object _provide(self, tuple args, dict kwargs): * """Return new instance.""" - * return __call(self, args, kwargs) # <<<<<<<<<<<<<< + * return __factory_call(self, args, kwargs) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_9factories___call(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 251, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_9factories___factory_call(__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":249 + /* "dependency_injector/providers/factories.pyx":248 * return self * * cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<< * """Return new instance.""" - * return __call(self, args, kwargs) + * return __factory_call(self, args, kwargs) */ /* function exit code */ @@ -3527,11 +3527,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, 249, __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, 249, __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; @@ -3544,14 +3544,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, 249, __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, 249, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(0, 249, __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 */ @@ -3569,7 +3569,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, 249, __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; @@ -4198,37 +4198,37 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers_10inject /* "dependency_injector/providers/factories.pxd":27 * * - * cdef inline object __call(Factory self, tuple args, dict kwargs): # <<<<<<<<<<<<<< + * cdef inline object __factory_call(Factory self, tuple args, dict kwargs): # <<<<<<<<<<<<<< * cdef object instance * */ -static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers_9factories___call(struct __pyx_obj_19dependency_injector_9providers_9factories_Factory *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { +static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers_9factories___factory_call(struct __pyx_obj_19dependency_injector_9providers_9factories_Factory *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { PyObject *__pyx_v_instance = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; - __Pyx_RefNannySetupContext("__call", 0); + __Pyx_RefNannySetupContext("__factory_call", 0); /* "dependency_injector/providers/factories.pxd":30 * cdef object instance * - * instance = __call_callable(self.__instantiator, args, kwargs) # <<<<<<<<<<<<<< + * instance = __callable_call(self.__instantiator, args, kwargs) # <<<<<<<<<<<<<< * * if self.__attributes_len > 0: */ __pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx___instantiator); __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = __pyx_f_19dependency_injector_9providers_9callables___call(((struct __pyx_obj_19dependency_injector_9providers_9callables_Callable *)__pyx_t_1), __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 30, __pyx_L1_error) + __pyx_t_2 = __pyx_f_19dependency_injector_9providers_9callables___callable_call(((struct __pyx_obj_19dependency_injector_9providers_9callables_Callable *)__pyx_t_1), __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 30, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_instance = __pyx_t_2; __pyx_t_2 = 0; /* "dependency_injector/providers/factories.pxd":32 - * instance = __call_callable(self.__instantiator, args, kwargs) + * instance = __callable_call(self.__instantiator, args, kwargs) * * if self.__attributes_len > 0: # <<<<<<<<<<<<<< * __inject_attributes(instance, @@ -4260,7 +4260,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers_9factori __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "dependency_injector/providers/factories.pxd":32 - * instance = __call_callable(self.__instantiator, args, kwargs) + * instance = __callable_call(self.__instantiator, args, kwargs) * * if self.__attributes_len > 0: # <<<<<<<<<<<<<< * __inject_attributes(instance, @@ -4272,7 +4272,6 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers_9factori * self.__attributes_len) * * return instance # <<<<<<<<<<<<<< - * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_instance); @@ -4282,7 +4281,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers_9factori /* "dependency_injector/providers/factories.pxd":27 * * - * cdef inline object __call(Factory self, tuple args, dict kwargs): # <<<<<<<<<<<<<< + * cdef inline object __factory_call(Factory self, tuple args, dict kwargs): # <<<<<<<<<<<<<< * cdef object instance * */ @@ -4291,7 +4290,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers_9factori __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); - __Pyx_AddTraceback("dependency_injector.providers.factories.__call", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("dependency_injector.providers.factories.__factory_call", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_instance); @@ -4303,19 +4302,19 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers_9factori /* "callables.pxd":32 * * - * cdef inline object __call(Callable self, tuple args, dict kwargs): # <<<<<<<<<<<<<< + * cdef inline object __callable_call(Callable self, tuple args, dict kwargs): # <<<<<<<<<<<<<< * cdef tuple positional_args * cdef dict keyword_args */ -static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers_9callables___call(struct __pyx_obj_19dependency_injector_9providers_9callables_Callable *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { +static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers_9callables___callable_call(struct __pyx_obj_19dependency_injector_9providers_9callables_Callable *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { PyObject *__pyx_v_positional_args = 0; PyObject *__pyx_v_keyword_args = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; - __Pyx_RefNannySetupContext("__call", 0); + __Pyx_RefNannySetupContext("__callable_call", 0); /* "callables.pxd":37 * @@ -4386,7 +4385,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers_9callabl /* "callables.pxd":32 * * - * cdef inline object __call(Callable self, tuple args, dict kwargs): # <<<<<<<<<<<<<< + * cdef inline object __callable_call(Callable self, tuple args, dict kwargs): # <<<<<<<<<<<<<< * cdef tuple positional_args * cdef dict keyword_args */ @@ -4395,7 +4394,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers_9callabl __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); - __Pyx_AddTraceback("dependency_injector.providers.callables.__call", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("dependency_injector.providers.callables.__callable_call", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_positional_args); @@ -4687,9 +4686,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, 96, __pyx_L1_error) - __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(0, 100, __pyx_L1_error) - __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 209, __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; @@ -4803,11 +4802,11 @@ PyMODINIT_FUNC PyInit_factories(void) __pyx_vtable_19dependency_injector_9providers_9factories_Factory.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_4base_Provider; __pyx_vtable_19dependency_injector_9providers_9factories_Factory.__pyx_base._provide = (PyObject *(*)(struct __pyx_obj_19dependency_injector_9providers_4base_Provider *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_19dependency_injector_9providers_9factories_7Factory__provide; __pyx_type_19dependency_injector_9providers_9factories_Factory.tp_base = __pyx_ptype_19dependency_injector_9providers_4base_Provider; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_9factories_Factory) < 0) __PYX_ERR(0, 21, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_9factories_Factory) < 0) __PYX_ERR(0, 20, __pyx_L1_error) __pyx_type_19dependency_injector_9providers_9factories_Factory.tp_print = 0; #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_9factories_Factory, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 21, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_9factories_Factory, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 20, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_19dependency_injector_9providers_9factories_7Factory___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_19dependency_injector_9providers_9factories_7Factory___init__.doc = __pyx_doc_19dependency_injector_9providers_9factories_7Factory___init__; @@ -4817,7 +4816,7 @@ PyMODINIT_FUNC PyInit_factories(void) #endif #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_9factories_Factory, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(0, 21, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_9factories_Factory, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(0, 20, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_19dependency_injector_9providers_9factories_7Factory_4__str__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_19dependency_injector_9providers_9factories_7Factory_4__str__.doc = __pyx_doc_19dependency_injector_9providers_9factories_7Factory_4__str__; @@ -4825,16 +4824,16 @@ PyMODINIT_FUNC PyInit_factories(void) } } #endif - if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_9factories_Factory.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_9factories_Factory) < 0) __PYX_ERR(0, 21, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "Factory", (PyObject *)&__pyx_type_19dependency_injector_9providers_9factories_Factory) < 0) __PYX_ERR(0, 21, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_9factories_Factory.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_9factories_Factory) < 0) __PYX_ERR(0, 20, __pyx_L1_error) + if (PyObject_SetAttrString(__pyx_m, "Factory", (PyObject *)&__pyx_type_19dependency_injector_9providers_9factories_Factory) < 0) __PYX_ERR(0, 20, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_9factories_Factory = &__pyx_type_19dependency_injector_9providers_9factories_Factory; __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, 254, __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, 254, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "DelegatedFactory", (PyObject *)&__pyx_type_19dependency_injector_9providers_9factories_DelegatedFactory) < 0) __PYX_ERR(0, 254, __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) @@ -4889,22 +4888,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":72 + /* "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, 72, __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":272 + /* "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, 272, __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 @@ -4920,7 +4919,7 @@ PyMODINIT_FUNC PyInit_factories(void) /* "callables.pxd":32 * * - * cdef inline object __call(Callable self, tuple args, dict kwargs): # <<<<<<<<<<<<<< + * cdef inline object __callable_call(Callable self, tuple args, dict kwargs): # <<<<<<<<<<<<<< * cdef tuple positional_args * cdef dict keyword_args */ diff --git a/src/dependency_injector/providers/factories.pxd b/src/dependency_injector/providers/factories.pxd index d8c3b641..b8249852 100644 --- a/src/dependency_injector/providers/factories.pxd +++ b/src/dependency_injector/providers/factories.pxd @@ -6,7 +6,7 @@ Powered by Cython. from .base cimport Provider from .callables cimport ( Callable, - __call as __call_callable, + __callable_call, ) from .injections cimport __inject_attributes @@ -24,10 +24,10 @@ cdef class DelegatedFactory(Factory): pass -cdef inline object __call(Factory self, tuple args, dict kwargs): +cdef inline object __factory_call(Factory self, tuple args, dict kwargs): cdef object instance - instance = __call_callable(self.__instantiator, args, kwargs) + instance = __callable_call(self.__instantiator, args, kwargs) if self.__attributes_len > 0: __inject_attributes(instance, @@ -35,4 +35,3 @@ cdef inline object __call(Factory self, tuple args, dict kwargs): self.__attributes_len) return instance - diff --git a/src/dependency_injector/providers/factories.pyx b/src/dependency_injector/providers/factories.pyx index 1c3023a8..9c096d92 100644 --- a/src/dependency_injector/providers/factories.pyx +++ b/src/dependency_injector/providers/factories.pyx @@ -7,7 +7,6 @@ from dependency_injector.errors import Error from .base cimport Provider from .callables cimport Callable -from .factories cimport __call from .injections cimport ( NamedInjection, parse_named_injections, @@ -248,7 +247,7 @@ cdef class Factory(Provider): cpdef object _provide(self, tuple args, dict kwargs): """Return new instance.""" - return __call(self, args, kwargs) + return __factory_call(self, args, kwargs) cdef class DelegatedFactory(Factory): diff --git a/src/dependency_injector/providers/injections.c b/src/dependency_injector/providers/injections.c index bf8e3e4c..7598bf6c 100644 --- a/src/dependency_injector/providers/injections.c +++ b/src/dependency_injector/providers/injections.c @@ -625,9 +625,9 @@ struct __pyx_obj_19dependency_injector_9providers_10injections_PositionalInjecti struct __pyx_obj_19dependency_injector_9providers_10injections_NamedInjection; struct __pyx_opt_args_19dependency_injector_9providers_5utils_deepcopy; -/* "utils.pxd":13 - * cpdef bint is_delegated(object instance) - * cpdef str represent_provider(object provider, object provides) +/* "utils.pxd":21 + * + * * cpdef object deepcopy(object instance, dict memo=*) # <<<<<<<<<<<<<< */ struct __pyx_opt_args_19dependency_injector_9providers_5utils_deepcopy { diff --git a/src/dependency_injector/providers/injections.pxd b/src/dependency_injector/providers/injections.pxd index c1de96ee..94c5c31d 100644 --- a/src/dependency_injector/providers/injections.pxd +++ b/src/dependency_injector/providers/injections.pxd @@ -90,4 +90,6 @@ cdef inline object __inject_attributes(object instance, cpdef tuple parse_positional_injections(tuple args) + + cpdef tuple parse_named_injections(dict kwargs) diff --git a/src/dependency_injector/providers/singletons.c b/src/dependency_injector/providers/singletons.c index 295033c8..bb63a384 100644 --- a/src/dependency_injector/providers/singletons.c +++ b/src/dependency_injector/providers/singletons.c @@ -644,9 +644,9 @@ struct __pyx_obj_19dependency_injector_9providers_10singletons_ThreadLocalSingle struct __pyx_obj_19dependency_injector_9providers_10singletons_DelegatedThreadLocalSingleton; struct __pyx_opt_args_19dependency_injector_9providers_5utils_deepcopy; -/* "utils.pxd":13 - * cpdef bint is_delegated(object instance) - * cpdef str represent_provider(object provider, object provides) +/* "utils.pxd":21 + * + * * cpdef object deepcopy(object instance, dict memo=*) # <<<<<<<<<<<<<< */ struct __pyx_opt_args_19dependency_injector_9providers_5utils_deepcopy { @@ -1512,12 +1512,12 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers_10inject /* Module declarations from 'dependency_injector.providers.callables' */ static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_9callables_Callable = 0; static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_9callables_DelegatedCallable = 0; -static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers_9callables___call(struct __pyx_obj_19dependency_injector_9providers_9callables_Callable *, PyObject *, PyObject *); /*proto*/ +static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers_9callables___callable_call(struct __pyx_obj_19dependency_injector_9providers_9callables_Callable *, PyObject *, PyObject *); /*proto*/ /* Module declarations from 'dependency_injector.providers.factories' */ static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_9factories_Factory = 0; static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_9factories_DelegatedFactory = 0; -static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers_9factories___call(struct __pyx_obj_19dependency_injector_9providers_9factories_Factory *, PyObject *, PyObject *); /*proto*/ +static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers_9factories___factory_call(struct __pyx_obj_19dependency_injector_9providers_9factories_Factory *, PyObject *, PyObject *); /*proto*/ /* Module declarations from 'dependency_injector.providers.utils' */ static PyObject **__pyx_vp_19dependency_injector_9providers_5utils_CLASS_TYPES = 0; @@ -3926,7 +3926,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_10singletons_9Singleto * cpdef object _provide(self, tuple args, dict kwargs): * """Return single instance.""" * if self.__storage is None: # <<<<<<<<<<<<<< - * self.__storage = __call_factory(self.__instantiator, + * self.__storage = __factory_call(self.__instantiator, * args, kwargs) */ __pyx_t_7 = (__pyx_v_self->__pyx___storage == Py_None); @@ -3936,7 +3936,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_10singletons_9Singleto /* "dependency_injector/providers/singletons.pyx":258 * """Return single instance.""" * if self.__storage is None: - * self.__storage = __call_factory(self.__instantiator, # <<<<<<<<<<<<<< + * self.__storage = __factory_call(self.__instantiator, # <<<<<<<<<<<<<< * args, kwargs) * return self.__storage */ @@ -3945,19 +3945,19 @@ static PyObject *__pyx_f_19dependency_injector_9providers_10singletons_9Singleto /* "dependency_injector/providers/singletons.pyx":259 * if self.__storage is None: - * self.__storage = __call_factory(self.__instantiator, + * self.__storage = __factory_call(self.__instantiator, * args, kwargs) # <<<<<<<<<<<<<< * return self.__storage * */ - __pyx_t_2 = __pyx_f_19dependency_injector_9providers_9factories___call(((struct __pyx_obj_19dependency_injector_9providers_9factories_Factory *)__pyx_t_1), __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 258, __pyx_L1_error) + __pyx_t_2 = __pyx_f_19dependency_injector_9providers_9factories___factory_call(((struct __pyx_obj_19dependency_injector_9providers_9factories_Factory *)__pyx_t_1), __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 258, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "dependency_injector/providers/singletons.pyx":258 * """Return single instance.""" * if self.__storage is None: - * self.__storage = __call_factory(self.__instantiator, # <<<<<<<<<<<<<< + * self.__storage = __factory_call(self.__instantiator, # <<<<<<<<<<<<<< * args, kwargs) * return self.__storage */ @@ -3971,13 +3971,13 @@ static PyObject *__pyx_f_19dependency_injector_9providers_10singletons_9Singleto * cpdef object _provide(self, tuple args, dict kwargs): * """Return single instance.""" * if self.__storage is None: # <<<<<<<<<<<<<< - * self.__storage = __call_factory(self.__instantiator, + * self.__storage = __factory_call(self.__instantiator, * args, kwargs) */ } /* "dependency_injector/providers/singletons.pyx":260 - * self.__storage = __call_factory(self.__instantiator, + * self.__storage = __factory_call(self.__instantiator, * args, kwargs) * return self.__storage # <<<<<<<<<<<<<< * @@ -4421,7 +4421,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_10singletons_19ThreadS * """Return single instance.""" * with self.__lock: # <<<<<<<<<<<<<< * if self.__storage is None: - * self.__storage = __call_factory(self.__instantiator, + * self.__storage = __factory_call(self.__instantiator, */ /*with:*/ { __pyx_t_7 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx___lock, __pyx_n_s_exit); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 312, __pyx_L1_error) @@ -4461,7 +4461,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_10singletons_19ThreadS * """Return single instance.""" * with self.__lock: * if self.__storage is None: # <<<<<<<<<<<<<< - * self.__storage = __call_factory(self.__instantiator, + * self.__storage = __factory_call(self.__instantiator, * args, kwargs) */ __pyx_t_11 = (__pyx_v_self->__pyx___storage == Py_None); @@ -4471,7 +4471,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_10singletons_19ThreadS /* "dependency_injector/providers/singletons.pyx":314 * with self.__lock: * if self.__storage is None: - * self.__storage = __call_factory(self.__instantiator, # <<<<<<<<<<<<<< + * self.__storage = __factory_call(self.__instantiator, # <<<<<<<<<<<<<< * args, kwargs) * return self.__storage */ @@ -4480,19 +4480,19 @@ static PyObject *__pyx_f_19dependency_injector_9providers_10singletons_19ThreadS /* "dependency_injector/providers/singletons.pyx":315 * if self.__storage is None: - * self.__storage = __call_factory(self.__instantiator, + * self.__storage = __factory_call(self.__instantiator, * args, kwargs) # <<<<<<<<<<<<<< * return self.__storage * */ - __pyx_t_2 = __pyx_f_19dependency_injector_9providers_9factories___call(((struct __pyx_obj_19dependency_injector_9providers_9factories_Factory *)__pyx_t_1), __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 314, __pyx_L7_error) + __pyx_t_2 = __pyx_f_19dependency_injector_9providers_9factories___factory_call(((struct __pyx_obj_19dependency_injector_9providers_9factories_Factory *)__pyx_t_1), __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 314, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "dependency_injector/providers/singletons.pyx":314 * with self.__lock: * if self.__storage is None: - * self.__storage = __call_factory(self.__instantiator, # <<<<<<<<<<<<<< + * self.__storage = __factory_call(self.__instantiator, # <<<<<<<<<<<<<< * args, kwargs) * return self.__storage */ @@ -4506,7 +4506,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_10singletons_19ThreadS * """Return single instance.""" * with self.__lock: * if self.__storage is None: # <<<<<<<<<<<<<< - * self.__storage = __call_factory(self.__instantiator, + * self.__storage = __factory_call(self.__instantiator, * args, kwargs) */ } @@ -4516,7 +4516,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_10singletons_19ThreadS * """Return single instance.""" * with self.__lock: # <<<<<<<<<<<<<< * if self.__storage is None: - * self.__storage = __call_factory(self.__instantiator, + * self.__storage = __factory_call(self.__instantiator, */ } __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -4597,7 +4597,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_10singletons_19ThreadS } /* "dependency_injector/providers/singletons.pyx":316 - * self.__storage = __call_factory(self.__instantiator, + * self.__storage = __factory_call(self.__instantiator, * args, kwargs) * return self.__storage # <<<<<<<<<<<<<< * @@ -5067,7 +5067,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_10singletons_20ThreadL * try: * instance = self.__storage.instance # <<<<<<<<<<<<<< * except AttributeError: - * instance = __call_factory(self.__instantiator, args, kwargs) + * instance = __factory_call(self.__instantiator, args, kwargs) */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx___storage, __pyx_n_s_instance); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 385, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_1); @@ -5098,7 +5098,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_10singletons_20ThreadL * try: * instance = self.__storage.instance * except AttributeError: # <<<<<<<<<<<<<< - * instance = __call_factory(self.__instantiator, args, kwargs) + * instance = __factory_call(self.__instantiator, args, kwargs) * self.__storage.instance = instance */ __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError); @@ -5112,13 +5112,13 @@ static PyObject *__pyx_f_19dependency_injector_9providers_10singletons_20ThreadL /* "dependency_injector/providers/singletons.pyx":387 * instance = self.__storage.instance * except AttributeError: - * instance = __call_factory(self.__instantiator, args, kwargs) # <<<<<<<<<<<<<< + * instance = __factory_call(self.__instantiator, args, kwargs) # <<<<<<<<<<<<<< * self.__storage.instance = instance * finally: */ __pyx_t_6 = ((PyObject *)__pyx_v_self->__pyx_base.__pyx___instantiator); __Pyx_INCREF(__pyx_t_6); - __pyx_t_4 = __pyx_f_19dependency_injector_9providers_9factories___call(((struct __pyx_obj_19dependency_injector_9providers_9factories_Factory *)__pyx_t_6), __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 387, __pyx_L8_except_error) + __pyx_t_4 = __pyx_f_19dependency_injector_9providers_9factories___factory_call(((struct __pyx_obj_19dependency_injector_9providers_9factories_Factory *)__pyx_t_6), __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 387, __pyx_L8_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF_SET(__pyx_v_instance, __pyx_t_4); @@ -5126,7 +5126,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_10singletons_20ThreadL /* "dependency_injector/providers/singletons.pyx":388 * except AttributeError: - * instance = __call_factory(self.__instantiator, args, kwargs) + * instance = __factory_call(self.__instantiator, args, kwargs) * self.__storage.instance = instance # <<<<<<<<<<<<<< * finally: * return instance @@ -5955,19 +5955,19 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers_10inject /* "callables.pxd":32 * * - * cdef inline object __call(Callable self, tuple args, dict kwargs): # <<<<<<<<<<<<<< + * cdef inline object __callable_call(Callable self, tuple args, dict kwargs): # <<<<<<<<<<<<<< * cdef tuple positional_args * cdef dict keyword_args */ -static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers_9callables___call(struct __pyx_obj_19dependency_injector_9providers_9callables_Callable *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { +static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers_9callables___callable_call(struct __pyx_obj_19dependency_injector_9providers_9callables_Callable *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { PyObject *__pyx_v_positional_args = 0; PyObject *__pyx_v_keyword_args = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; - __Pyx_RefNannySetupContext("__call", 0); + __Pyx_RefNannySetupContext("__callable_call", 0); /* "callables.pxd":37 * @@ -6038,7 +6038,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers_9callabl /* "callables.pxd":32 * * - * cdef inline object __call(Callable self, tuple args, dict kwargs): # <<<<<<<<<<<<<< + * cdef inline object __callable_call(Callable self, tuple args, dict kwargs): # <<<<<<<<<<<<<< * cdef tuple positional_args * cdef dict keyword_args */ @@ -6047,7 +6047,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers_9callabl __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); - __Pyx_AddTraceback("dependency_injector.providers.callables.__call", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("dependency_injector.providers.callables.__callable_call", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_positional_args); @@ -6060,37 +6060,37 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers_9callabl /* "factories.pxd":27 * * - * cdef inline object __call(Factory self, tuple args, dict kwargs): # <<<<<<<<<<<<<< + * cdef inline object __factory_call(Factory self, tuple args, dict kwargs): # <<<<<<<<<<<<<< * cdef object instance * */ -static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers_9factories___call(struct __pyx_obj_19dependency_injector_9providers_9factories_Factory *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { +static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers_9factories___factory_call(struct __pyx_obj_19dependency_injector_9providers_9factories_Factory *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { PyObject *__pyx_v_instance = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; - __Pyx_RefNannySetupContext("__call", 0); + __Pyx_RefNannySetupContext("__factory_call", 0); /* "factories.pxd":30 * cdef object instance * - * instance = __call_callable(self.__instantiator, args, kwargs) # <<<<<<<<<<<<<< + * instance = __callable_call(self.__instantiator, args, kwargs) # <<<<<<<<<<<<<< * * if self.__attributes_len > 0: */ __pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx___instantiator); __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = __pyx_f_19dependency_injector_9providers_9callables___call(((struct __pyx_obj_19dependency_injector_9providers_9callables_Callable *)__pyx_t_1), __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 30, __pyx_L1_error) + __pyx_t_2 = __pyx_f_19dependency_injector_9providers_9callables___callable_call(((struct __pyx_obj_19dependency_injector_9providers_9callables_Callable *)__pyx_t_1), __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 30, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_instance = __pyx_t_2; __pyx_t_2 = 0; /* "factories.pxd":32 - * instance = __call_callable(self.__instantiator, args, kwargs) + * instance = __callable_call(self.__instantiator, args, kwargs) * * if self.__attributes_len > 0: # <<<<<<<<<<<<<< * __inject_attributes(instance, @@ -6122,7 +6122,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers_9factori __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "factories.pxd":32 - * instance = __call_callable(self.__instantiator, args, kwargs) + * instance = __callable_call(self.__instantiator, args, kwargs) * * if self.__attributes_len > 0: # <<<<<<<<<<<<<< * __inject_attributes(instance, @@ -6134,7 +6134,6 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers_9factori * self.__attributes_len) * * return instance # <<<<<<<<<<<<<< - * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_instance); @@ -6144,7 +6143,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers_9factori /* "factories.pxd":27 * * - * cdef inline object __call(Factory self, tuple args, dict kwargs): # <<<<<<<<<<<<<< + * cdef inline object __factory_call(Factory self, tuple args, dict kwargs): # <<<<<<<<<<<<<< * cdef object instance * */ @@ -6153,7 +6152,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers_9factori __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); - __Pyx_AddTraceback("dependency_injector.providers.factories.__call", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("dependency_injector.providers.factories.__factory_call", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_instance); @@ -6962,7 +6961,7 @@ static int __Pyx_InitCachedConstants(void) { * """Return single instance.""" * with self.__lock: # <<<<<<<<<<<<<< * if self.__storage is None: - * self.__storage = __call_factory(self.__instantiator, + * self.__storage = __factory_call(self.__instantiator, */ __pyx_tuple_ = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 312, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple_); @@ -7330,7 +7329,7 @@ PyMODINIT_FUNC PyInit_singletons(void) /* "factories.pxd":27 * * - * cdef inline object __call(Factory self, tuple args, dict kwargs): # <<<<<<<<<<<<<< + * cdef inline object __factory_call(Factory self, tuple args, dict kwargs): # <<<<<<<<<<<<<< * cdef object instance * */ diff --git a/src/dependency_injector/providers/singletons.pyx b/src/dependency_injector/providers/singletons.pyx index a28477b6..b9f9904b 100644 --- a/src/dependency_injector/providers/singletons.pyx +++ b/src/dependency_injector/providers/singletons.pyx @@ -10,7 +10,7 @@ from dependency_injector.errors import Error from .base cimport Provider from .factories cimport ( Factory, - __call as __call_factory, + __factory_call, ) from .utils cimport ( represent_provider, @@ -255,7 +255,7 @@ cdef class Singleton(BaseSingleton): cpdef object _provide(self, tuple args, dict kwargs): """Return single instance.""" if self.__storage is None: - self.__storage = __call_factory(self.__instantiator, + self.__storage = __factory_call(self.__instantiator, args, kwargs) return self.__storage @@ -311,7 +311,7 @@ cdef class ThreadSafeSingleton(BaseSingleton): """Return single instance.""" with self.__lock: if self.__storage is None: - self.__storage = __call_factory(self.__instantiator, + self.__storage = __factory_call(self.__instantiator, args, kwargs) return self.__storage @@ -384,7 +384,7 @@ cdef class ThreadLocalSingleton(BaseSingleton): try: instance = self.__storage.instance except AttributeError: - instance = __call_factory(self.__instantiator, args, kwargs) + instance = __factory_call(self.__instantiator, args, kwargs) self.__storage.instance = instance finally: return instance diff --git a/src/dependency_injector/providers/utils.c b/src/dependency_injector/providers/utils.c index 99e478c0..1120215c 100644 --- a/src/dependency_injector/providers/utils.c +++ b/src/dependency_injector/providers/utils.c @@ -621,9 +621,9 @@ static const char *__pyx_f[] = { /*--- Type declarations ---*/ struct __pyx_opt_args_19dependency_injector_9providers_5utils_deepcopy; -/* "dependency_injector/providers/utils.pxd":13 - * cpdef bint is_delegated(object instance) - * cpdef str represent_provider(object provider, object provides) +/* "dependency_injector/providers/utils.pxd":21 + * + * * cpdef object deepcopy(object instance, dict memo=*) # <<<<<<<<<<<<<< */ struct __pyx_opt_args_19dependency_injector_9providers_5utils_deepcopy { diff --git a/src/dependency_injector/providers/utils.pxd b/src/dependency_injector/providers/utils.pxd index 8c4b49a9..5ff82936 100644 --- a/src/dependency_injector/providers/utils.pxd +++ b/src/dependency_injector/providers/utils.pxd @@ -7,7 +7,15 @@ cdef object CLASS_TYPES cpdef bint is_provider(object instance) + + cpdef object ensure_is_provider(object instance) + + cpdef bint is_delegated(object instance) + + cpdef str represent_provider(object provider, object provides) + + cpdef object deepcopy(object instance, dict memo=*)