From a057176ae6d89d8d13b52243f0d11eb5f9fbac1d Mon Sep 17 00:00:00 2001 From: Roman Mogilatov Date: Fri, 9 Jun 2017 01:53:14 +0300 Subject: [PATCH 1/7] Update makefile --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c5c3f271..00f9477d 100644 --- a/Makefile +++ b/Makefile @@ -60,7 +60,7 @@ check: publish: cythonize # Merge release to master branch git checkout master - git merge --no-ff release/$(VERSION) -m 'Merge branch release/$(VERSION)' + git merge --no-ff release/$(VERSION) -m "Merge branch 'release/$(VERSION)' into master" git push origin master # Create and upload tag git tag -a $(VERSION) -m 'version $(VERSION)' From 175853163406ffb031f760252323bf9129ce4133 Mon Sep 17 00:00:00 2001 From: Roman Mogilatov Date: Fri, 7 Jul 2017 17:43:12 +0300 Subject: [PATCH 2/7] Add default value setting for Configuration provider --- src/dependency_injector/providers.c | 2480 ++++++++++---------- src/dependency_injector/providers.pyx | 7 +- tests/unit/providers/test_configuration.py | 15 + 3 files changed, 1285 insertions(+), 1217 deletions(-) diff --git a/src/dependency_injector/providers.c b/src/dependency_injector/providers.c index afbd3016..db4a491b 100644 --- a/src/dependency_injector/providers.c +++ b/src/dependency_injector/providers.c @@ -1087,7 +1087,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_Configuration { static struct __pyx_vtabstruct_19dependency_injector_9providers_Configuration *__pyx_vtabptr_19dependency_injector_9providers_Configuration; -/* "dependency_injector/providers.pyx":770 +/* "dependency_injector/providers.pyx":775 * * * cdef class Factory(Provider): # <<<<<<<<<<<<<< @@ -1101,7 +1101,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_Factory { static struct __pyx_vtabstruct_19dependency_injector_9providers_Factory *__pyx_vtabptr_19dependency_injector_9providers_Factory; -/* "dependency_injector/providers.pyx":1003 +/* "dependency_injector/providers.pyx":1008 * * * cdef class DelegatedFactory(Factory): # <<<<<<<<<<<<<< @@ -1115,7 +1115,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedFactory { static struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedFactory *__pyx_vtabptr_19dependency_injector_9providers_DelegatedFactory; -/* "dependency_injector/providers.pyx":1024 +/* "dependency_injector/providers.pyx":1029 * * * cdef class AbstractFactory(Factory): # <<<<<<<<<<<<<< @@ -1129,7 +1129,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_AbstractFactory { static struct __pyx_vtabstruct_19dependency_injector_9providers_AbstractFactory *__pyx_vtabptr_19dependency_injector_9providers_AbstractFactory; -/* "dependency_injector/providers.pyx":1064 +/* "dependency_injector/providers.pyx":1069 * 'to overriding provider') * * cdef class BaseSingleton(Provider): # <<<<<<<<<<<<<< @@ -1143,7 +1143,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_BaseSingleton { static struct __pyx_vtabstruct_19dependency_injector_9providers_BaseSingleton *__pyx_vtabptr_19dependency_injector_9providers_BaseSingleton; -/* "dependency_injector/providers.pyx":1238 +/* "dependency_injector/providers.pyx":1243 * * * cdef class Singleton(BaseSingleton): # <<<<<<<<<<<<<< @@ -1157,7 +1157,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_Singleton { static struct __pyx_vtabstruct_19dependency_injector_9providers_Singleton *__pyx_vtabptr_19dependency_injector_9providers_Singleton; -/* "dependency_injector/providers.pyx":1299 +/* "dependency_injector/providers.pyx":1304 * * * cdef class DelegatedSingleton(Singleton): # <<<<<<<<<<<<<< @@ -1171,7 +1171,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedSingleton { static struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedSingleton *__pyx_vtabptr_19dependency_injector_9providers_DelegatedSingleton; -/* "dependency_injector/providers.pyx":1320 +/* "dependency_injector/providers.pyx":1325 * * * cdef class ThreadSafeSingleton(BaseSingleton): # <<<<<<<<<<<<<< @@ -1185,7 +1185,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_ThreadSafeSingleton { static struct __pyx_vtabstruct_19dependency_injector_9providers_ThreadSafeSingleton *__pyx_vtabptr_19dependency_injector_9providers_ThreadSafeSingleton; -/* "dependency_injector/providers.pyx":1361 +/* "dependency_injector/providers.pyx":1366 * * * cdef class DelegatedThreadSafeSingleton(ThreadSafeSingleton): # <<<<<<<<<<<<<< @@ -1199,7 +1199,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedThreadSafeSing static struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedThreadSafeSingleton *__pyx_vtabptr_19dependency_injector_9providers_DelegatedThreadSafeSingleton; -/* "dependency_injector/providers.pyx":1382 +/* "dependency_injector/providers.pyx":1387 * * * cdef class ThreadLocalSingleton(BaseSingleton): # <<<<<<<<<<<<<< @@ -1213,7 +1213,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_ThreadLocalSingleton { static struct __pyx_vtabstruct_19dependency_injector_9providers_ThreadLocalSingleton *__pyx_vtabptr_19dependency_injector_9providers_ThreadLocalSingleton; -/* "dependency_injector/providers.pyx":1435 +/* "dependency_injector/providers.pyx":1440 * * * cdef class DelegatedThreadLocalSingleton(ThreadLocalSingleton): # <<<<<<<<<<<<<< @@ -1227,7 +1227,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedThreadLocalSin static struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedThreadLocalSingleton *__pyx_vtabptr_19dependency_injector_9providers_DelegatedThreadLocalSingleton; -/* "dependency_injector/providers.pyx":1456 +/* "dependency_injector/providers.pyx":1461 * * * cdef class AbstractSingleton(BaseSingleton): # <<<<<<<<<<<<<< @@ -1878,6 +1878,7 @@ static const char __pyx_k_module[] = "__module__"; static const char __pyx_k_name_2[] = "name"; static const char __pyx_k_update[] = "update"; static const char __pyx_k_address[] = "address"; +static const char __pyx_k_default[] = "default"; static const char __pyx_k_im_func[] = "im_func"; static const char __pyx_k_im_self[] = "im_self"; static const char __pyx_k_provide[] = "_provide"; @@ -1974,6 +1975,7 @@ static PyObject *__pyx_kp_s_cls_object_has_no_attribute_att; static PyObject *__pyx_n_s_copy; static PyObject *__pyx_n_s_deepcopy; static PyObject *__pyx_n_s_deepcopy_dispatch; +static PyObject *__pyx_n_s_default; static PyObject *__pyx_n_s_dependency_injector_providers; static PyObject *__pyx_n_s_enter; static PyObject *__pyx_n_s_errors; @@ -2075,7 +2077,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Callable_18_provide( static PyObject *__pyx_pf_19dependency_injector_9providers_16AbstractCallable___call__(struct __pyx_obj_19dependency_injector_9providers_AbstractCallable *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_16AbstractCallable_2override(struct __pyx_obj_19dependency_injector_9providers_AbstractCallable *__pyx_v_self, PyObject *__pyx_v_provider); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_16AbstractCallable_4_provide(struct __pyx_obj_19dependency_injector_9providers_AbstractCallable *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */ -static int __pyx_pf_19dependency_injector_9providers_13Configuration___init__(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self, PyObject *__pyx_v_name); /* proto */ +static int __pyx_pf_19dependency_injector_9providers_13Configuration___init__(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_default); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_2__deepcopy__(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self, PyObject *__pyx_v_memo); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_4__str__(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_6__getattr__(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self, PyObject *__pyx_v_name); /* proto */ @@ -9909,29 +9911,32 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_16AbstractCallable_4_ /* "dependency_injector/providers.pyx":670 * """ * - * def __init__(self, name): # <<<<<<<<<<<<<< + * def __init__(self, name, default=None): # <<<<<<<<<<<<<< * """Initializer. * */ /* Python wrapper */ static int __pyx_pw_19dependency_injector_9providers_13Configuration_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_19dependency_injector_9providers_13Configuration___init__[] = "Initializer.\n\n :param name: Name of configuration unit.\n :type name: str\n "; +static char __pyx_doc_19dependency_injector_9providers_13Configuration___init__[] = "Initializer.\n\n :param name: Name of configuration unit.\n :type name: str\n\n :param default: Default values of configuration unit.\n :type default: dict\n "; #if CYTHON_COMPILING_IN_CPYTHON struct wrapperbase __pyx_wrapperbase_19dependency_injector_9providers_13Configuration___init__; #endif static int __pyx_pw_19dependency_injector_9providers_13Configuration_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_name = 0; + PyObject *__pyx_v_default = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name_2,0}; - PyObject* values[1] = {0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name_2,&__pyx_n_s_default,0}; + PyObject* values[2] = {0,0}; + values[1] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; @@ -9941,48 +9946,59 @@ static int __pyx_pw_19dependency_injector_9providers_13Configuration_1__init__(P case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name_2)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; + case 1: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_default); + if (value) { values[1] = value; kw_args--; } + } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 670, __pyx_L3_error) } - } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { - goto __pyx_L5_argtuple_error; } else { - values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } } __pyx_v_name = values[0]; + __pyx_v_default = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 670, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 670, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.Configuration.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_9providers_13Configuration___init__(((struct __pyx_obj_19dependency_injector_9providers_Configuration *)__pyx_v_self), __pyx_v_name); + __pyx_r = __pyx_pf_19dependency_injector_9providers_13Configuration___init__(((struct __pyx_obj_19dependency_injector_9providers_Configuration *)__pyx_v_self), __pyx_v_name, __pyx_v_default); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static int __pyx_pf_19dependency_injector_9providers_13Configuration___init__(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self, PyObject *__pyx_v_name) { +static int __pyx_pf_19dependency_injector_9providers_13Configuration___init__(struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_default) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; - PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("__init__", 0); - /* "dependency_injector/providers.pyx":676 - * :type name: str + /* "dependency_injector/providers.pyx":679 + * :type default: dict * """ * self.__name = name # <<<<<<<<<<<<<< * self.__value = None * self.__children = dict() */ - if (!(likely(PyString_CheckExact(__pyx_v_name))||((__pyx_v_name) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_v_name)->tp_name), 0))) __PYX_ERR(1, 676, __pyx_L1_error) + if (!(likely(PyString_CheckExact(__pyx_v_name))||((__pyx_v_name) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_v_name)->tp_name), 0))) __PYX_ERR(1, 679, __pyx_L1_error) __pyx_t_1 = __pyx_v_name; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -9991,12 +10007,12 @@ static int __pyx_pf_19dependency_injector_9providers_13Configuration___init__(st __pyx_v_self->__pyx___name = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":677 + /* "dependency_injector/providers.pyx":680 * """ * self.__name = name * self.__value = None # <<<<<<<<<<<<<< * self.__children = dict() - * super(Configuration, self).__init__() + * if default is not None: */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); @@ -10004,14 +10020,14 @@ static int __pyx_pf_19dependency_injector_9providers_13Configuration___init__(st __Pyx_DECREF(__pyx_v_self->__pyx___value); __pyx_v_self->__pyx___value = Py_None; - /* "dependency_injector/providers.pyx":678 + /* "dependency_injector/providers.pyx":681 * self.__name = name * self.__value = None * self.__children = dict() # <<<<<<<<<<<<<< - * super(Configuration, self).__init__() - * + * if default is not None: + * self.update(default) */ - __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 678, __pyx_L1_error) + __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 681, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->__pyx___children); @@ -10019,51 +10035,82 @@ static int __pyx_pf_19dependency_injector_9providers_13Configuration___init__(st __pyx_v_self->__pyx___children = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":679 + /* "dependency_injector/providers.pyx":682 * self.__value = None * self.__children = dict() + * if default is not None: # <<<<<<<<<<<<<< + * self.update(default) + * super(Configuration, self).__init__() + */ + __pyx_t_2 = (__pyx_v_default != Py_None); + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "dependency_injector/providers.pyx":683 + * self.__children = dict() + * if default is not None: + * self.update(default) # <<<<<<<<<<<<<< + * super(Configuration, self).__init__() + * + */ + __pyx_t_1 = ((struct __pyx_vtabstruct_19dependency_injector_9providers_Configuration *)__pyx_v_self->__pyx_base.__pyx_vtab)->update(__pyx_v_self, __pyx_v_default, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 683, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "dependency_injector/providers.pyx":682 + * self.__value = None + * self.__children = dict() + * if default is not None: # <<<<<<<<<<<<<< + * self.update(default) + * super(Configuration, self).__init__() + */ + } + + /* "dependency_injector/providers.pyx":684 + * if default is not None: + * self.update(default) * super(Configuration, self).__init__() # <<<<<<<<<<<<<< * * def __deepcopy__(self, memo): */ - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 679, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 684, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Configuration)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Configuration)); - PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Configuration)); + PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Configuration)); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); - PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self)); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 679, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 679, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { - __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); - if (likely(__pyx_t_3)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); - __Pyx_INCREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_self)); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 684, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_init); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 684, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_2, function); + __Pyx_DECREF_SET(__pyx_t_4, function); } } - if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 679, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_5) { + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 684, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 679, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 684, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "dependency_injector/providers.pyx":670 * """ * - * def __init__(self, name): # <<<<<<<<<<<<<< + * def __init__(self, name, default=None): # <<<<<<<<<<<<<< * """Initializer. * */ @@ -10073,8 +10120,8 @@ static int __pyx_pf_19dependency_injector_9providers_13Configuration___init__(st goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("dependency_injector.providers.Configuration.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; @@ -10082,7 +10129,7 @@ static int __pyx_pf_19dependency_injector_9providers_13Configuration___init__(st return __pyx_r; } -/* "dependency_injector/providers.pyx":681 +/* "dependency_injector/providers.pyx":686 * super(Configuration, self).__init__() * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< @@ -10122,21 +10169,21 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_2__de PyObject *__pyx_t_11 = NULL; __Pyx_RefNannySetupContext("__deepcopy__", 0); - /* "dependency_injector/providers.pyx":683 + /* "dependency_injector/providers.pyx":688 * 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(1, 683, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_memo, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 688, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 683, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 688, __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(1, 683, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_id, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 688, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -10150,14 +10197,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_2__de } } if (!__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 683, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 688, __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(1, 683, __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(1, 688, __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; @@ -10166,20 +10213,20 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_2__de #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(1, 683, __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(1, 688, __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(1, 683, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 688, __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(1, 683, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 688, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } @@ -10188,7 +10235,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_2__de __pyx_v_copied = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":684 + /* "dependency_injector/providers.pyx":689 * """Create and return full copy of provider.""" * copied = memo.get(id(self)) * if copied is not None: # <<<<<<<<<<<<<< @@ -10199,7 +10246,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_2__de __pyx_t_7 = (__pyx_t_6 != 0); if (__pyx_t_7) { - /* "dependency_injector/providers.pyx":685 + /* "dependency_injector/providers.pyx":690 * copied = memo.get(id(self)) * if copied is not None: * return copied # <<<<<<<<<<<<<< @@ -10211,7 +10258,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_2__de __pyx_r = __pyx_v_copied; goto __pyx_L0; - /* "dependency_injector/providers.pyx":684 + /* "dependency_injector/providers.pyx":689 * """Create and return full copy of provider.""" * copied = memo.get(id(self)) * if copied is not None: # <<<<<<<<<<<<<< @@ -10220,14 +10267,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_2__de */ } - /* "dependency_injector/providers.pyx":687 + /* "dependency_injector/providers.pyx":692 * return copied * * copied = self.__class__(self.__name) # <<<<<<<<<<<<<< * copied.update(deepcopy(self.__value)) * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 687, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 692, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -10240,13 +10287,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_2__de } } if (!__pyx_t_5) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_self->__pyx___name); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 687, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_self->__pyx___name); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 692, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_self->__pyx___name}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 687, __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(1, 692, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -10254,19 +10301,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_2__de #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_self->__pyx___name}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 687, __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(1, 692, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 687, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 692, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = NULL; __Pyx_INCREF(__pyx_v_self->__pyx___name); __Pyx_GIVEREF(__pyx_v_self->__pyx___name); PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_self->__pyx___name); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 687, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 692, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } @@ -10275,18 +10322,18 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_2__de __Pyx_DECREF_SET(__pyx_v_copied, __pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":688 + /* "dependency_injector/providers.pyx":693 * * copied = self.__class__(self.__name) * copied.update(deepcopy(self.__value)) # <<<<<<<<<<<<<< * * for overriding_provider in self.overridden: */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_copied, __pyx_n_s_update); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 688, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_copied, __pyx_n_s_update); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 693, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __pyx_v_self->__pyx___value; __Pyx_INCREF(__pyx_t_4); - __pyx_t_5 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_4, 0, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 688, __pyx_L1_error) + __pyx_t_5 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_4, 0, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 693, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -10300,14 +10347,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_2__de } } if (!__pyx_t_4) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 688, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 693, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_5}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 688, __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(1, 693, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -10316,20 +10363,20 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_2__de #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_5}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 688, __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(1, 693, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif { - __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 688, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 693, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __pyx_t_4 = NULL; __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_t_5); __pyx_t_5 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 688, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 693, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } @@ -10337,22 +10384,22 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_2__de __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":690 + /* "dependency_injector/providers.pyx":695 * copied.update(deepcopy(self.__value)) * * 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(1, 690, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_overridden); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 695, __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_8 = 0; __pyx_t_9 = NULL; } else { - __pyx_t_8 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 690, __pyx_L1_error) + __pyx_t_8 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 695, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_9 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 690, __pyx_L1_error) + __pyx_t_9 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 695, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -10360,17 +10407,17 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_2__de if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_8 >= 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_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(1, 690, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(1, 695, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 690, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 695, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_8 >= 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_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(1, 690, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(1, 695, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 690, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 695, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -10380,7 +10427,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_2__de 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(1, 690, __pyx_L1_error) + else __PYX_ERR(1, 695, __pyx_L1_error) } break; } @@ -10389,19 +10436,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_2__de __Pyx_XDECREF_SET(__pyx_v_overriding_provider, __pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":691 + /* "dependency_injector/providers.pyx":696 * * 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(1, 691, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_copied, __pyx_n_s_override); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 696, __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(1, 691, __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(1, 696, __pyx_L1_error) __pyx_t_10.__pyx_n = 1; __pyx_t_10.memo = ((PyObject*)__pyx_v_memo); - __pyx_t_5 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_v_overriding_provider, 0, &__pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 691, __pyx_L1_error) + __pyx_t_5 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_v_overriding_provider, 0, &__pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 696, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -10414,14 +10461,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_2__de } } if (!__pyx_t_4) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 691, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 696, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_5}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 691, __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(1, 696, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -10430,20 +10477,20 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_2__de #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_5}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 691, __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(1, 696, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif { - __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 691, __pyx_L1_error) + __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 696, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_4); __pyx_t_4 = NULL; __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_t_5); __pyx_t_5 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 691, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 696, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } @@ -10451,7 +10498,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_2__de __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":690 + /* "dependency_injector/providers.pyx":695 * copied.update(deepcopy(self.__value)) * * for overriding_provider in self.overridden: # <<<<<<<<<<<<<< @@ -10461,7 +10508,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_2__de } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":693 + /* "dependency_injector/providers.pyx":698 * copied.override(deepcopy(overriding_provider, memo)) * * return copied # <<<<<<<<<<<<<< @@ -10473,7 +10520,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_2__de __pyx_r = __pyx_v_copied; goto __pyx_L0; - /* "dependency_injector/providers.pyx":681 + /* "dependency_injector/providers.pyx":686 * super(Configuration, self).__init__() * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< @@ -10499,7 +10546,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_2__de return __pyx_r; } -/* "dependency_injector/providers.pyx":695 +/* "dependency_injector/providers.pyx":700 * return copied * * def __str__(self): # <<<<<<<<<<<<<< @@ -10531,7 +10578,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_4__st PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__str__", 0); - /* "dependency_injector/providers.pyx":700 + /* "dependency_injector/providers.pyx":705 * :rtype: str * """ * return represent_provider(provider=self, provides=self.__name) # <<<<<<<<<<<<<< @@ -10541,14 +10588,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_4__st __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_v_self->__pyx___name; __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = __pyx_f_19dependency_injector_9providers_represent_provider(((PyObject *)__pyx_v_self), __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 700, __pyx_L1_error) + __pyx_t_2 = __pyx_f_19dependency_injector_9providers_represent_provider(((PyObject *)__pyx_v_self), __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 705, __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.pyx":695 + /* "dependency_injector/providers.pyx":700 * return copied * * def __str__(self): # <<<<<<<<<<<<<< @@ -10568,7 +10615,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_4__st return __pyx_r; } -/* "dependency_injector/providers.pyx":702 +/* "dependency_injector/providers.pyx":707 * return represent_provider(provider=self, provides=self.__name) * * def __getattr__(self, str name): # <<<<<<<<<<<<<< @@ -10586,7 +10633,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_7__ge PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__getattr__ (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(1, 702, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(1, 707, __pyx_L1_error) __pyx_r = __pyx_pf_19dependency_injector_9providers_13Configuration_6__getattr__(((struct __pyx_obj_19dependency_injector_9providers_Configuration *)__pyx_v_self), ((PyObject*)__pyx_v_name)); /* function exit code */ @@ -10611,7 +10658,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_6__ge PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("__getattr__", 0); - /* "dependency_injector/providers.pyx":707 + /* "dependency_injector/providers.pyx":712 * cdef object value * * if name.startswith('__') and name.endswith('__'): # <<<<<<<<<<<<<< @@ -10620,9 +10667,9 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_6__ge */ if (unlikely(__pyx_v_name == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "startswith"); - __PYX_ERR(1, 707, __pyx_L1_error) + __PYX_ERR(1, 712, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyStr_Tailmatch(__pyx_v_name, __pyx_n_s__9, 0, PY_SSIZE_T_MAX, -1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(1, 707, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyStr_Tailmatch(__pyx_v_name, __pyx_n_s__9, 0, PY_SSIZE_T_MAX, -1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(1, 712, __pyx_L1_error) if ((__pyx_t_2 != 0)) { } else { __pyx_t_1 = (__pyx_t_2 != 0); @@ -10630,73 +10677,73 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_6__ge } if (unlikely(__pyx_v_name == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "endswith"); - __PYX_ERR(1, 707, __pyx_L1_error) + __PYX_ERR(1, 712, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyStr_Tailmatch(__pyx_v_name, __pyx_n_s__9, 0, PY_SSIZE_T_MAX, 1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(1, 707, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyStr_Tailmatch(__pyx_v_name, __pyx_n_s__9, 0, PY_SSIZE_T_MAX, 1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(1, 712, __pyx_L1_error) __pyx_t_1 = (__pyx_t_2 != 0); __pyx_L4_bool_binop_done:; if (__pyx_t_1) { - /* "dependency_injector/providers.pyx":710 + /* "dependency_injector/providers.pyx":715 * raise AttributeError( * '\'{cls}\' object has no attribute ' * '\'{attribute_name}\''.format(cls=self.__class__.__name__, # <<<<<<<<<<<<<< * attribute_name=name)) * */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_cls_object_has_no_attribute_att, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 710, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_cls_object_has_no_attribute_att, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 715, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 710, __pyx_L1_error) + __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 715, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 710, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 715, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 710, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 715, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_cls, __pyx_t_6) < 0) __PYX_ERR(1, 710, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_cls, __pyx_t_6) < 0) __PYX_ERR(1, 715, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "dependency_injector/providers.pyx":711 + /* "dependency_injector/providers.pyx":716 * '\'{cls}\' object has no attribute ' * '\'{attribute_name}\''.format(cls=self.__class__.__name__, * attribute_name=name)) # <<<<<<<<<<<<<< * * child_provider = self.__children.get(name) */ - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_attribute_name, __pyx_v_name) < 0) __PYX_ERR(1, 710, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_attribute_name, __pyx_v_name) < 0) __PYX_ERR(1, 715, __pyx_L1_error) - /* "dependency_injector/providers.pyx":710 + /* "dependency_injector/providers.pyx":715 * raise AttributeError( * '\'{cls}\' object has no attribute ' * '\'{attribute_name}\''.format(cls=self.__class__.__name__, # <<<<<<<<<<<<<< * attribute_name=name)) * */ - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 710, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 715, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "dependency_injector/providers.pyx":708 + /* "dependency_injector/providers.pyx":713 * * if name.startswith('__') and name.endswith('__'): * raise AttributeError( # <<<<<<<<<<<<<< * '\'{cls}\' object has no attribute ' * '\'{attribute_name}\''.format(cls=self.__class__.__name__, */ - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 708, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 713, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 708, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 713, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __PYX_ERR(1, 708, __pyx_L1_error) + __PYX_ERR(1, 713, __pyx_L1_error) - /* "dependency_injector/providers.pyx":707 + /* "dependency_injector/providers.pyx":712 * cdef object value * * if name.startswith('__') and name.endswith('__'): # <<<<<<<<<<<<<< @@ -10705,7 +10752,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_6__ge */ } - /* "dependency_injector/providers.pyx":713 + /* "dependency_injector/providers.pyx":718 * attribute_name=name)) * * child_provider = self.__children.get(name) # <<<<<<<<<<<<<< @@ -10714,15 +10761,15 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_6__ge */ if (unlikely(__pyx_v_self->__pyx___children == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "get"); - __PYX_ERR(1, 713, __pyx_L1_error) + __PYX_ERR(1, 718, __pyx_L1_error) } - __pyx_t_6 = __Pyx_PyDict_GetItemDefault(__pyx_v_self->__pyx___children, __pyx_v_name, Py_None); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 713, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_GetItemDefault(__pyx_v_self->__pyx___children, __pyx_v_name, Py_None); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 718, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_19dependency_injector_9providers_Configuration))))) __PYX_ERR(1, 713, __pyx_L1_error) + if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_19dependency_injector_9providers_Configuration))))) __PYX_ERR(1, 718, __pyx_L1_error) __pyx_v_child_provider = ((struct __pyx_obj_19dependency_injector_9providers_Configuration *)__pyx_t_6); __pyx_t_6 = 0; - /* "dependency_injector/providers.pyx":715 + /* "dependency_injector/providers.pyx":720 * child_provider = self.__children.get(name) * * if child_provider is None: # <<<<<<<<<<<<<< @@ -10733,16 +10780,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_6__ge __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "dependency_injector/providers.pyx":716 + /* "dependency_injector/providers.pyx":721 * * if child_provider is None: * child_provider = self.__class__(self._get_child_name(name)) # <<<<<<<<<<<<<< * * if isinstance(self.__value, dict): */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 716, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 721, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = ((struct __pyx_vtabstruct_19dependency_injector_9providers_Configuration *)__pyx_v_self->__pyx_base.__pyx_vtab)->_get_child_name(__pyx_v_self, __pyx_v_name, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 716, __pyx_L1_error) + __pyx_t_3 = ((struct __pyx_vtabstruct_19dependency_injector_9providers_Configuration *)__pyx_v_self->__pyx_base.__pyx_vtab)->_get_child_name(__pyx_v_self, __pyx_v_name, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 721, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -10755,14 +10802,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_6__ge } } if (!__pyx_t_5) { - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 716, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 721, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_6); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_3}; - __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 716, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 721, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -10771,30 +10818,30 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_6__ge #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_3}; - __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 716, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 721, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { - __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 716, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 721, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_3); __pyx_t_3 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 716, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 721, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_19dependency_injector_9providers_Configuration))))) __PYX_ERR(1, 716, __pyx_L1_error) + if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_19dependency_injector_9providers_Configuration))))) __PYX_ERR(1, 721, __pyx_L1_error) __Pyx_DECREF_SET(__pyx_v_child_provider, ((struct __pyx_obj_19dependency_injector_9providers_Configuration *)__pyx_t_6)); __pyx_t_6 = 0; - /* "dependency_injector/providers.pyx":718 + /* "dependency_injector/providers.pyx":723 * child_provider = self.__class__(self._get_child_name(name)) * * if isinstance(self.__value, dict): # <<<<<<<<<<<<<< @@ -10808,14 +10855,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_6__ge __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "dependency_injector/providers.pyx":719 + /* "dependency_injector/providers.pyx":724 * * if isinstance(self.__value, dict): * child_provider.update(self.__value.get(name)) # <<<<<<<<<<<<<< * * self.__children[name] = child_provider */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx___value, __pyx_n_s_get); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 719, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx___value, __pyx_n_s_get); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 724, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -10828,13 +10875,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_6__ge } } if (!__pyx_t_7) { - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 719, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 724, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_name}; - __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 719, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 724, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_6); } else @@ -10842,30 +10889,30 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_6__ge #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_name}; - __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 719, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 724, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_6); } else #endif { - __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 719, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 724, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_7); __pyx_t_7 = NULL; __Pyx_INCREF(__pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_v_name); - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 719, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 724, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = ((struct __pyx_vtabstruct_19dependency_injector_9providers_Configuration *)__pyx_v_child_provider->__pyx_base.__pyx_vtab)->update(__pyx_v_child_provider, __pyx_t_6, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 719, __pyx_L1_error) + __pyx_t_4 = ((struct __pyx_vtabstruct_19dependency_injector_9providers_Configuration *)__pyx_v_child_provider->__pyx_base.__pyx_vtab)->update(__pyx_v_child_provider, __pyx_t_6, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 724, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "dependency_injector/providers.pyx":718 + /* "dependency_injector/providers.pyx":723 * child_provider = self.__class__(self._get_child_name(name)) * * if isinstance(self.__value, dict): # <<<<<<<<<<<<<< @@ -10874,7 +10921,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_6__ge */ } - /* "dependency_injector/providers.pyx":721 + /* "dependency_injector/providers.pyx":726 * child_provider.update(self.__value.get(name)) * * self.__children[name] = child_provider # <<<<<<<<<<<<<< @@ -10883,11 +10930,11 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_6__ge */ if (unlikely(__pyx_v_self->__pyx___children == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(1, 721, __pyx_L1_error) + __PYX_ERR(1, 726, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__pyx_v_self->__pyx___children, __pyx_v_name, ((PyObject *)__pyx_v_child_provider)) < 0)) __PYX_ERR(1, 721, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_self->__pyx___children, __pyx_v_name, ((PyObject *)__pyx_v_child_provider)) < 0)) __PYX_ERR(1, 726, __pyx_L1_error) - /* "dependency_injector/providers.pyx":715 + /* "dependency_injector/providers.pyx":720 * child_provider = self.__children.get(name) * * if child_provider is None: # <<<<<<<<<<<<<< @@ -10896,7 +10943,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_6__ge */ } - /* "dependency_injector/providers.pyx":723 + /* "dependency_injector/providers.pyx":728 * self.__children[name] = child_provider * * return child_provider # <<<<<<<<<<<<<< @@ -10908,7 +10955,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_6__ge __pyx_r = ((PyObject *)__pyx_v_child_provider); goto __pyx_L0; - /* "dependency_injector/providers.pyx":702 + /* "dependency_injector/providers.pyx":707 * return represent_provider(provider=self, provides=self.__name) * * def __getattr__(self, str name): # <<<<<<<<<<<<<< @@ -10932,7 +10979,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_6__ge return __pyx_r; } -/* "dependency_injector/providers.pyx":725 +/* "dependency_injector/providers.pyx":730 * return child_provider * * cpdef str get_name(self): # <<<<<<<<<<<<<< @@ -10953,7 +11000,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_13Configuration_get_na 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_get_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 725, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 730, __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_13Configuration_9get_name)) { __Pyx_XDECREF(__pyx_r); @@ -10969,14 +11016,14 @@ static PyObject *__pyx_f_19dependency_injector_9providers_13Configuration_get_na } } if (__pyx_t_4) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 725, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 730, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { - __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 725, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 730, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (!(likely(PyString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(1, 725, __pyx_L1_error) + if (!(likely(PyString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(1, 730, __pyx_L1_error) __pyx_r = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -10985,7 +11032,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_13Configuration_get_na __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - /* "dependency_injector/providers.pyx":727 + /* "dependency_injector/providers.pyx":732 * cpdef str get_name(self): * """Name of configuration unit.""" * return self.__name # <<<<<<<<<<<<<< @@ -10997,7 +11044,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_13Configuration_get_na __pyx_r = __pyx_v_self->__pyx___name; goto __pyx_L0; - /* "dependency_injector/providers.pyx":725 + /* "dependency_injector/providers.pyx":730 * return child_provider * * cpdef str get_name(self): # <<<<<<<<<<<<<< @@ -11039,7 +11086,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_8get_ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("get_name", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_13Configuration_get_name(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 725, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_13Configuration_get_name(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 730, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -11056,7 +11103,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_8get_ return __pyx_r; } -/* "dependency_injector/providers.pyx":729 +/* "dependency_injector/providers.pyx":734 * return self.__name * * cpdef object update(self, value): # <<<<<<<<<<<<<< @@ -11084,7 +11131,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_13Configuration_update 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_update); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 729, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_update); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 734, __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_13Configuration_11update)) { __Pyx_XDECREF(__pyx_r); @@ -11100,13 +11147,13 @@ static PyObject *__pyx_f_19dependency_injector_9providers_13Configuration_update } } if (!__pyx_t_4) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 729, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 734, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_value}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 729, __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(1, 734, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -11114,19 +11161,19 @@ static PyObject *__pyx_f_19dependency_injector_9providers_13Configuration_update #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_value}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 729, __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(1, 734, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { - __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 729, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 734, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL; __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_value); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 729, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 734, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } @@ -11140,7 +11187,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_13Configuration_update __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - /* "dependency_injector/providers.pyx":740 + /* "dependency_injector/providers.pyx":745 * cdef object child_value * * self.__value = value # <<<<<<<<<<<<<< @@ -11153,7 +11200,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_13Configuration_update __Pyx_DECREF(__pyx_v_self->__pyx___value); __pyx_v_self->__pyx___value = __pyx_v_value; - /* "dependency_injector/providers.pyx":742 + /* "dependency_injector/providers.pyx":747 * self.__value = value * * if not isinstance(self.__value, dict): # <<<<<<<<<<<<<< @@ -11167,7 +11214,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_13Configuration_update __pyx_t_7 = ((!(__pyx_t_6 != 0)) != 0); if (__pyx_t_7) { - /* "dependency_injector/providers.pyx":743 + /* "dependency_injector/providers.pyx":748 * * if not isinstance(self.__value, dict): * return # <<<<<<<<<<<<<< @@ -11178,7 +11225,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_13Configuration_update __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "dependency_injector/providers.pyx":742 + /* "dependency_injector/providers.pyx":747 * self.__value = value * * if not isinstance(self.__value, dict): # <<<<<<<<<<<<<< @@ -11187,7 +11234,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_13Configuration_update */ } - /* "dependency_injector/providers.pyx":745 + /* "dependency_injector/providers.pyx":750 * return * * for name in self.__value: # <<<<<<<<<<<<<< @@ -11198,26 +11245,26 @@ static PyObject *__pyx_f_19dependency_injector_9providers_13Configuration_update __pyx_t_1 = __pyx_v_self->__pyx___value; __Pyx_INCREF(__pyx_t_1); __pyx_t_8 = 0; __pyx_t_9 = NULL; } else { - __pyx_t_8 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_self->__pyx___value); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 745, __pyx_L1_error) + __pyx_t_8 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_self->__pyx___value); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 750, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_9 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 745, __pyx_L1_error) + __pyx_t_9 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 750, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_9)) { if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(1, 745, __pyx_L1_error) + __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(1, 750, __pyx_L1_error) #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 745, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 750, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } else { if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(1, 745, __pyx_L1_error) + __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(1, 750, __pyx_L1_error) #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 745, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 750, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } @@ -11227,7 +11274,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_13Configuration_update 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(1, 745, __pyx_L1_error) + else __PYX_ERR(1, 750, __pyx_L1_error) } break; } @@ -11236,7 +11283,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_13Configuration_update __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":746 + /* "dependency_injector/providers.pyx":751 * * for name in self.__value: * child_provider = self.__children.get(name) # <<<<<<<<<<<<<< @@ -11245,15 +11292,15 @@ static PyObject *__pyx_f_19dependency_injector_9providers_13Configuration_update */ if (unlikely(__pyx_v_self->__pyx___children == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "get"); - __PYX_ERR(1, 746, __pyx_L1_error) + __PYX_ERR(1, 751, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyDict_GetItemDefault(__pyx_v_self->__pyx___children, __pyx_v_name, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 746, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_GetItemDefault(__pyx_v_self->__pyx___children, __pyx_v_name, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 751, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_19dependency_injector_9providers_Configuration))))) __PYX_ERR(1, 746, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_19dependency_injector_9providers_Configuration))))) __PYX_ERR(1, 751, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_child_provider, ((struct __pyx_obj_19dependency_injector_9providers_Configuration *)__pyx_t_2)); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":748 + /* "dependency_injector/providers.pyx":753 * child_provider = self.__children.get(name) * * if child_provider is None: # <<<<<<<<<<<<<< @@ -11264,7 +11311,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_13Configuration_update __pyx_t_6 = (__pyx_t_7 != 0); if (__pyx_t_6) { - /* "dependency_injector/providers.pyx":749 + /* "dependency_injector/providers.pyx":754 * * if child_provider is None: * continue # <<<<<<<<<<<<<< @@ -11273,7 +11320,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_13Configuration_update */ goto __pyx_L4_continue; - /* "dependency_injector/providers.pyx":748 + /* "dependency_injector/providers.pyx":753 * child_provider = self.__children.get(name) * * if child_provider is None: # <<<<<<<<<<<<<< @@ -11282,14 +11329,14 @@ static PyObject *__pyx_f_19dependency_injector_9providers_13Configuration_update */ } - /* "dependency_injector/providers.pyx":751 + /* "dependency_injector/providers.pyx":756 * continue * * child_provider.update(self.__value.get(name)) # <<<<<<<<<<<<<< * * cpdef object _provide(self, tuple args, dict kwargs): */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx___value, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 751, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx___value, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 756, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -11302,13 +11349,13 @@ static PyObject *__pyx_f_19dependency_injector_9providers_13Configuration_update } } if (!__pyx_t_5) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 751, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 756, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_name}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 751, __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(1, 756, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -11316,30 +11363,30 @@ static PyObject *__pyx_f_19dependency_injector_9providers_13Configuration_update #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_name}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 751, __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(1, 756, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 751, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 756, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = NULL; __Pyx_INCREF(__pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_name); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 751, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 756, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = ((struct __pyx_vtabstruct_19dependency_injector_9providers_Configuration *)__pyx_v_child_provider->__pyx_base.__pyx_vtab)->update(__pyx_v_child_provider, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 751, __pyx_L1_error) + __pyx_t_3 = ((struct __pyx_vtabstruct_19dependency_injector_9providers_Configuration *)__pyx_v_child_provider->__pyx_base.__pyx_vtab)->update(__pyx_v_child_provider, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 756, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/providers.pyx":745 + /* "dependency_injector/providers.pyx":750 * return * * for name in self.__value: # <<<<<<<<<<<<<< @@ -11350,7 +11397,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_13Configuration_update } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":729 + /* "dependency_injector/providers.pyx":734 * return self.__name * * cpdef object update(self, value): # <<<<<<<<<<<<<< @@ -11397,7 +11444,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_10upd PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("update", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_13Configuration_update(__pyx_v_self, __pyx_v_value, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 729, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_13Configuration_update(__pyx_v_self, __pyx_v_value, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 734, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -11414,7 +11461,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_10upd return __pyx_r; } -/* "dependency_injector/providers.pyx":753 +/* "dependency_injector/providers.pyx":758 * child_provider.update(self.__value.get(name)) * * cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<< @@ -11437,7 +11484,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_13Configuration__provi 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(1, 753, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provide); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 758, __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_13Configuration_13_provide)) { __Pyx_XDECREF(__pyx_r); @@ -11457,7 +11504,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_13Configuration__provi #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(1, 753, __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(1, 758, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -11465,13 +11512,13 @@ static PyObject *__pyx_f_19dependency_injector_9providers_13Configuration__provi #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(1, 753, __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(1, 758, __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(1, 753, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 758, __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; @@ -11482,7 +11529,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_13Configuration__provi __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(1, 753, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 758, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -11495,7 +11542,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_13Configuration__provi __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - /* "dependency_injector/providers.pyx":755 + /* "dependency_injector/providers.pyx":760 * cpdef object _provide(self, tuple args, dict kwargs): * """Return result of provided callable's call.""" * return self.__value # <<<<<<<<<<<<<< @@ -11507,7 +11554,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_13Configuration__provi __pyx_r = __pyx_v_self->__pyx___value; goto __pyx_L0; - /* "dependency_injector/providers.pyx":753 + /* "dependency_injector/providers.pyx":758 * child_provider.update(self.__value.get(name)) * * cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<< @@ -11559,11 +11606,11 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_13_pr 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(1, 753, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, 1); __PYX_ERR(1, 758, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_provide") < 0)) __PYX_ERR(1, 753, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_provide") < 0)) __PYX_ERR(1, 758, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -11576,14 +11623,14 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_13_pr } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 753, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 758, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.Configuration._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(1, 753, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 753, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(1, 758, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 758, __pyx_L1_error) __pyx_r = __pyx_pf_19dependency_injector_9providers_13Configuration_12_provide(((struct __pyx_obj_19dependency_injector_9providers_Configuration *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs); /* function exit code */ @@ -11601,7 +11648,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_12_pr PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("_provide", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_13Configuration__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 753, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_13Configuration__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 758, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -11618,7 +11665,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_12_pr return __pyx_r; } -/* "dependency_injector/providers.pyx":757 +/* "dependency_injector/providers.pyx":762 * return self.__value * * cpdef str _get_child_name(self, str child_name): # <<<<<<<<<<<<<< @@ -11642,7 +11689,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_13Configuration__get_c 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_get_child_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 757, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_child_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 762, __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_13Configuration_15_get_child_name)) { __Pyx_XDECREF(__pyx_r); @@ -11658,13 +11705,13 @@ static PyObject *__pyx_f_19dependency_injector_9providers_13Configuration__get_c } } if (!__pyx_t_4) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_child_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 757, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_child_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 762, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_child_name}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 757, __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(1, 762, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -11672,25 +11719,25 @@ static PyObject *__pyx_f_19dependency_injector_9providers_13Configuration__get_c #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_child_name}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 757, __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(1, 762, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { - __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 757, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 762, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL; __Pyx_INCREF(__pyx_v_child_name); __Pyx_GIVEREF(__pyx_v_child_name); PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_child_name); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 757, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 762, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (!(likely(PyString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(1, 757, __pyx_L1_error) + if (!(likely(PyString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(1, 762, __pyx_L1_error) __pyx_r = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -11699,7 +11746,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_13Configuration__get_c __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - /* "dependency_injector/providers.pyx":760 + /* "dependency_injector/providers.pyx":765 * cdef str child_full_name * * child_full_name = '' # <<<<<<<<<<<<<< @@ -11709,32 +11756,32 @@ static PyObject *__pyx_f_19dependency_injector_9providers_13Configuration__get_c __Pyx_INCREF(__pyx_kp_s__10); __pyx_v_child_full_name = __pyx_kp_s__10; - /* "dependency_injector/providers.pyx":762 + /* "dependency_injector/providers.pyx":767 * child_full_name = '' * * if self.__name: # <<<<<<<<<<<<<< * child_full_name += self.__name + '.' * */ - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_self->__pyx___name); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 762, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_self->__pyx___name); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 767, __pyx_L1_error) if (__pyx_t_6) { - /* "dependency_injector/providers.pyx":763 + /* "dependency_injector/providers.pyx":768 * * if self.__name: * child_full_name += self.__name + '.' # <<<<<<<<<<<<<< * * child_full_name += child_name */ - __pyx_t_1 = PyNumber_Add(__pyx_v_self->__pyx___name, __pyx_kp_s__7); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 763, __pyx_L1_error) + __pyx_t_1 = PyNumber_Add(__pyx_v_self->__pyx___name, __pyx_kp_s__7); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 768, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_child_full_name, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 763, __pyx_L1_error) + __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_child_full_name, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 768, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_child_full_name, ((PyObject*)__pyx_t_2)); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":762 + /* "dependency_injector/providers.pyx":767 * child_full_name = '' * * if self.__name: # <<<<<<<<<<<<<< @@ -11743,19 +11790,19 @@ static PyObject *__pyx_f_19dependency_injector_9providers_13Configuration__get_c */ } - /* "dependency_injector/providers.pyx":765 + /* "dependency_injector/providers.pyx":770 * child_full_name += self.__name + '.' * * child_full_name += child_name # <<<<<<<<<<<<<< * * return child_full_name */ - __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_child_full_name, __pyx_v_child_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 765, __pyx_L1_error) + __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_child_full_name, __pyx_v_child_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 770, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_child_full_name, ((PyObject*)__pyx_t_2)); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":767 + /* "dependency_injector/providers.pyx":772 * child_full_name += child_name * * return child_full_name # <<<<<<<<<<<<<< @@ -11767,7 +11814,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_13Configuration__get_c __pyx_r = __pyx_v_child_full_name; goto __pyx_L0; - /* "dependency_injector/providers.pyx":757 + /* "dependency_injector/providers.pyx":762 * return self.__value * * cpdef str _get_child_name(self, str child_name): # <<<<<<<<<<<<<< @@ -11797,7 +11844,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_13Configuration_15_ge PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_get_child_name (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_child_name), (&PyString_Type), 1, "child_name", 1))) __PYX_ERR(1, 757, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_child_name), (&PyString_Type), 1, "child_name", 1))) __PYX_ERR(1, 762, __pyx_L1_error) __pyx_r = __pyx_pf_19dependency_injector_9providers_13Configuration_14_get_child_name(((struct __pyx_obj_19dependency_injector_9providers_Configuration *)__pyx_v_self), ((PyObject*)__pyx_v_child_name)); /* function exit code */ @@ -11815,7 +11862,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_14_ge PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("_get_child_name", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_13Configuration__get_child_name(__pyx_v_self, __pyx_v_child_name, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 757, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_13Configuration__get_child_name(__pyx_v_self, __pyx_v_child_name, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 762, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -11832,7 +11879,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13Configuration_14_ge return __pyx_r; } -/* "dependency_injector/providers.pyx":823 +/* "dependency_injector/providers.pyx":828 * provided_type = None * * def __init__(self, provides, *args, **kwargs): # <<<<<<<<<<<<<< @@ -11885,7 +11932,7 @@ static int __pyx_pw_19dependency_injector_9providers_7Factory_1__init__(PyObject } 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(1, 823, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "__init__") < 0)) __PYX_ERR(1, 828, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) < 1) { goto __pyx_L5_argtuple_error; @@ -11896,7 +11943,7 @@ static int __pyx_pw_19dependency_injector_9providers_7Factory_1__init__(PyObject } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 823, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 828, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0; __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; @@ -11930,19 +11977,19 @@ static int __pyx_pf_19dependency_injector_9providers_7Factory___init__(struct __ PyObject *__pyx_t_12 = NULL; __Pyx_RefNannySetupContext("__init__", 0); - /* "dependency_injector/providers.pyx":835 + /* "dependency_injector/providers.pyx":840 * :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(1, 835, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 840, __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(1, 835, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_provided_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 840, __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(1, 835, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 840, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_4) { } else { @@ -11950,25 +11997,25 @@ static int __pyx_pf_19dependency_injector_9providers_7Factory___init__(struct __ goto __pyx_L4_bool_binop_done; } - /* "dependency_injector/providers.pyx":836 + /* "dependency_injector/providers.pyx":841 * """ * 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(1, 836, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 841, __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(1, 836, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_provided_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 841, __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(1, 836, __pyx_L1_error) + __pyx_t_4 = PyObject_IsSubclass(__pyx_v_provides, __pyx_t_2); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(1, 841, __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.pyx":835 + /* "dependency_injector/providers.pyx":840 * :type kwargs: dict[str, object] * """ * if (self.__class__.provided_type and # <<<<<<<<<<<<<< @@ -11977,30 +12024,30 @@ static int __pyx_pf_19dependency_injector_9providers_7Factory___init__(struct __ */ if (__pyx_t_1) { - /* "dependency_injector/providers.pyx":837 + /* "dependency_injector/providers.pyx":842 * 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(1, 837, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_Error); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 842, __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(1, 837, __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(1, 842, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - /* "dependency_injector/providers.pyx":838 + /* "dependency_injector/providers.pyx":843 * 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(1, 838, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 843, __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(1, 838, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 843, __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(1, 838, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_provided_type); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 843, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = NULL; @@ -12018,7 +12065,7 @@ static int __pyx_pf_19dependency_injector_9providers_7Factory___init__(struct __ #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(1, 837, __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(1, 842, __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; @@ -12028,7 +12075,7 @@ static int __pyx_pf_19dependency_injector_9providers_7Factory___init__(struct __ #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(1, 837, __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(1, 842, __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; @@ -12036,7 +12083,7 @@ static int __pyx_pf_19dependency_injector_9providers_7Factory___init__(struct __ } else #endif { - __pyx_t_12 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 837, __pyx_L1_error) + __pyx_t_12 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 842, __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; @@ -12047,7 +12094,7 @@ static int __pyx_pf_19dependency_injector_9providers_7Factory___init__(struct __ 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(1, 837, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_12, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 842, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } @@ -12063,14 +12110,14 @@ static int __pyx_pf_19dependency_injector_9providers_7Factory___init__(struct __ } } if (!__pyx_t_7) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 837, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 842, __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(1, 837, __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(1, 842, __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; @@ -12079,20 +12126,20 @@ static int __pyx_pf_19dependency_injector_9providers_7Factory___init__(struct __ #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(1, 837, __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(1, 842, __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(1, 837, __pyx_L1_error) + __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 842, __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(1, 837, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 842, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } @@ -12100,9 +12147,9 @@ static int __pyx_pf_19dependency_injector_9providers_7Factory___init__(struct __ __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(1, 837, __pyx_L1_error) + __PYX_ERR(1, 842, __pyx_L1_error) - /* "dependency_injector/providers.pyx":835 + /* "dependency_injector/providers.pyx":840 * :type kwargs: dict[str, object] * """ * if (self.__class__.provided_type and # <<<<<<<<<<<<<< @@ -12111,22 +12158,22 @@ static int __pyx_pf_19dependency_injector_9providers_7Factory___init__(struct __ */ } - /* "dependency_injector/providers.pyx":840 + /* "dependency_injector/providers.pyx":845 * 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(1, 840, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 845, __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(1, 840, __pyx_L1_error) + __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_v_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 845, __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_Callable), __pyx_t_3, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 840, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Callable), __pyx_t_3, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 845, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GIVEREF(__pyx_t_2); @@ -12135,14 +12182,14 @@ static int __pyx_pf_19dependency_injector_9providers_7Factory___init__(struct __ __pyx_v_self->__pyx___instantiator = ((struct __pyx_obj_19dependency_injector_9providers_Callable *)__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":842 + /* "dependency_injector/providers.pyx":847 * 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(1, 842, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&PyTuple_Type)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 847, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->__pyx___attributes); @@ -12150,7 +12197,7 @@ static int __pyx_pf_19dependency_injector_9providers_7Factory___init__(struct __ __pyx_v_self->__pyx___attributes = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":843 + /* "dependency_injector/providers.pyx":848 * * self.__attributes = tuple() * self.__attributes_len = 0 # <<<<<<<<<<<<<< @@ -12159,14 +12206,14 @@ static int __pyx_pf_19dependency_injector_9providers_7Factory___init__(struct __ */ __pyx_v_self->__pyx___attributes_len = 0; - /* "dependency_injector/providers.pyx":845 + /* "dependency_injector/providers.pyx":850 * 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(1, 845, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 850, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Factory)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Factory)); @@ -12174,10 +12221,10 @@ static int __pyx_pf_19dependency_injector_9providers_7Factory___init__(struct __ __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(1, 845, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 850, __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(1, 845, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 850, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = NULL; @@ -12191,16 +12238,16 @@ static int __pyx_pf_19dependency_injector_9providers_7Factory___init__(struct __ } } if (__pyx_t_12) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 845, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 850, __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(1, 845, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 850, __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.pyx":823 + /* "dependency_injector/providers.pyx":828 * provided_type = None * * def __init__(self, provides, *args, **kwargs): # <<<<<<<<<<<<<< @@ -12227,7 +12274,7 @@ static int __pyx_pf_19dependency_injector_9providers_7Factory___init__(struct __ return __pyx_r; } -/* "dependency_injector/providers.pyx":847 +/* "dependency_injector/providers.pyx":852 * super(Factory, self).__init__() * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< @@ -12267,21 +12314,21 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_2__deepcopy_ PyObject *__pyx_t_11 = NULL; __Pyx_RefNannySetupContext("__deepcopy__", 0); - /* "dependency_injector/providers.pyx":849 + /* "dependency_injector/providers.pyx":854 * 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(1, 849, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_memo, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 854, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 849, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 854, __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(1, 849, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_id, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 854, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -12295,14 +12342,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_2__deepcopy_ } } if (!__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 849, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 854, __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(1, 849, __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(1, 854, __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; @@ -12311,20 +12358,20 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_2__deepcopy_ #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(1, 849, __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(1, 854, __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(1, 849, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 854, __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(1, 849, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 854, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } @@ -12333,7 +12380,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_2__deepcopy_ __pyx_v_copied = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":850 + /* "dependency_injector/providers.pyx":855 * """Create and return full copy of provider.""" * copied = memo.get(id(self)) * if copied is not None: # <<<<<<<<<<<<<< @@ -12344,7 +12391,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_2__deepcopy_ __pyx_t_7 = (__pyx_t_6 != 0); if (__pyx_t_7) { - /* "dependency_injector/providers.pyx":851 + /* "dependency_injector/providers.pyx":856 * copied = memo.get(id(self)) * if copied is not None: * return copied # <<<<<<<<<<<<<< @@ -12356,7 +12403,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_2__deepcopy_ __pyx_r = __pyx_v_copied; goto __pyx_L0; - /* "dependency_injector/providers.pyx":850 + /* "dependency_injector/providers.pyx":855 * """Create and return full copy of provider.""" * copied = memo.get(id(self)) * if copied is not None: # <<<<<<<<<<<<<< @@ -12365,91 +12412,91 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_2__deepcopy_ */ } - /* "dependency_injector/providers.pyx":853 + /* "dependency_injector/providers.pyx":858 * 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(1, 853, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 858, __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(1, 853, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_cls); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 858, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 853, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 858, __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.pyx":854 + /* "dependency_injector/providers.pyx":859 * * 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(1, 854, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 859, __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(1, 854, __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(1, 859, __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_deepcopy(__pyx_t_2, 0, &__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 854, __pyx_L1_error) + __pyx_t_4 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_2, 0, &__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 859, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":853 + /* "dependency_injector/providers.pyx":858 * 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(1, 853, __pyx_L1_error) + __pyx_t_2 = PySequence_Tuple(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 858, __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(1, 853, __pyx_L1_error) + __pyx_t_4 = PyNumber_Add(__pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 858, __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.pyx":855 + /* "dependency_injector/providers.pyx":860 * 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(1, 855, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_kwargs); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 860, __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(1, 855, __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(1, 860, __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_deepcopy(__pyx_t_5, 0, &__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 855, __pyx_L1_error) + __pyx_t_3 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_5, 0, &__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 860, __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(1, 855, __pyx_L1_error) + __PYX_ERR(1, 860, __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(1, 855, __pyx_L1_error) + __pyx_t_2 = PyDict_Copy(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 860, __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(1, 853, __pyx_L1_error) + __pyx_t_2 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 858, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - /* "dependency_injector/providers.pyx":853 + /* "dependency_injector/providers.pyx":858 * 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(1, 853, __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(1, 858, __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; @@ -12457,58 +12504,58 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_2__deepcopy_ __Pyx_DECREF_SET(__pyx_v_copied, __pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/providers.pyx":856 + /* "dependency_injector/providers.pyx":861 * *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(1, 856, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_copied, __pyx_n_s_set_attributes); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 861, __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(1, 856, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_attributes); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 861, __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(1, 856, __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(1, 861, __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_deepcopy(__pyx_t_4, 0, &__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 856, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_4, 0, &__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 861, __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(1, 856, __pyx_L1_error) + __PYX_ERR(1, 861, __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(1, 856, __pyx_L1_error) + __pyx_t_2 = PyDict_Copy(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 861, __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(1, 856, __pyx_L1_error) + __pyx_t_2 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 861, __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(1, 856, __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(1, 861, __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.pyx":858 + /* "dependency_injector/providers.pyx":863 * 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(1, 858, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_overridden); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 863, __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(1, 858, __pyx_L1_error) + __pyx_t_9 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 863, __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(1, 858, __pyx_L1_error) + __pyx_t_10 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 863, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -12516,17 +12563,17 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_2__deepcopy_ 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(1, 858, __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(1, 863, __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(1, 858, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 863, __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(1, 858, __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(1, 863, __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(1, 858, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 863, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -12536,7 +12583,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_2__deepcopy_ 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(1, 858, __pyx_L1_error) + else __PYX_ERR(1, 863, __pyx_L1_error) } break; } @@ -12545,19 +12592,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_2__deepcopy_ __Pyx_XDECREF_SET(__pyx_v_overriding_provider, __pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":859 + /* "dependency_injector/providers.pyx":864 * * 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(1, 859, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_copied, __pyx_n_s_override); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 864, __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(1, 859, __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(1, 864, __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_deepcopy(__pyx_v_overriding_provider, 0, &__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 859, __pyx_L1_error) + __pyx_t_4 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_v_overriding_provider, 0, &__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 864, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -12570,14 +12617,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_2__deepcopy_ } } if (!__pyx_t_5) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 859, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 864, __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(1, 859, __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(1, 864, __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; @@ -12586,20 +12633,20 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_2__deepcopy_ #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(1, 859, __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(1, 864, __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(1, 859, __pyx_L1_error) + __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 864, __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(1, 859, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 864, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } @@ -12607,7 +12654,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_2__deepcopy_ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":858 + /* "dependency_injector/providers.pyx":863 * copied.set_attributes(**deepcopy(self.attributes, memo)) * * for overriding_provider in self.overridden: # <<<<<<<<<<<<<< @@ -12617,7 +12664,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_2__deepcopy_ } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":861 + /* "dependency_injector/providers.pyx":866 * copied.override(deepcopy(overriding_provider, memo)) * * return copied # <<<<<<<<<<<<<< @@ -12629,7 +12676,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_2__deepcopy_ __pyx_r = __pyx_v_copied; goto __pyx_L0; - /* "dependency_injector/providers.pyx":847 + /* "dependency_injector/providers.pyx":852 * super(Factory, self).__init__() * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< @@ -12655,7 +12702,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_2__deepcopy_ return __pyx_r; } -/* "dependency_injector/providers.pyx":863 +/* "dependency_injector/providers.pyx":868 * return copied * * def __str__(self): # <<<<<<<<<<<<<< @@ -12687,7 +12734,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_4__str__(str PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__str__", 0); - /* "dependency_injector/providers.pyx":868 + /* "dependency_injector/providers.pyx":873 * :rtype: str * """ * return represent_provider(provider=self, # <<<<<<<<<<<<<< @@ -12696,31 +12743,31 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_4__str__(str */ __Pyx_XDECREF(__pyx_r); - /* "dependency_injector/providers.pyx":869 + /* "dependency_injector/providers.pyx":874 * """ * 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(1, 869, __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(1, 874, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - /* "dependency_injector/providers.pyx":868 + /* "dependency_injector/providers.pyx":873 * :rtype: str * """ * return represent_provider(provider=self, # <<<<<<<<<<<<<< * provides=self.__instantiator.provides) * */ - __pyx_t_2 = __pyx_f_19dependency_injector_9providers_represent_provider(((PyObject *)__pyx_v_self), __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 868, __pyx_L1_error) + __pyx_t_2 = __pyx_f_19dependency_injector_9providers_represent_provider(((PyObject *)__pyx_v_self), __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 873, __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.pyx":863 + /* "dependency_injector/providers.pyx":868 * return copied * * def __str__(self): # <<<<<<<<<<<<<< @@ -12740,7 +12787,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_4__str__(str return __pyx_r; } -/* "dependency_injector/providers.pyx":872 +/* "dependency_injector/providers.pyx":877 * * @property * def cls(self): # <<<<<<<<<<<<<< @@ -12767,7 +12814,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_3cls___get__ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - /* "dependency_injector/providers.pyx":874 + /* "dependency_injector/providers.pyx":879 * def cls(self): * """Return provided type.""" * return self.__instantiator.provides # <<<<<<<<<<<<<< @@ -12775,13 +12822,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_3cls___get__ * @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(1, 874, __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(1, 879, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":872 + /* "dependency_injector/providers.pyx":877 * * @property * def cls(self): # <<<<<<<<<<<<<< @@ -12800,7 +12847,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_3cls___get__ return __pyx_r; } -/* "dependency_injector/providers.pyx":877 +/* "dependency_injector/providers.pyx":882 * * @property * def args(self): # <<<<<<<<<<<<<< @@ -12827,7 +12874,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_4args___get_ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - /* "dependency_injector/providers.pyx":879 + /* "dependency_injector/providers.pyx":884 * def args(self): * """Return positional argument injections.""" * return self.__instantiator.args # <<<<<<<<<<<<<< @@ -12835,13 +12882,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_4args___get_ * 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(1, 879, __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(1, 884, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":877 + /* "dependency_injector/providers.pyx":882 * * @property * def args(self): # <<<<<<<<<<<<<< @@ -12860,7 +12907,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_4args___get_ return __pyx_r; } -/* "dependency_injector/providers.pyx":881 +/* "dependency_injector/providers.pyx":886 * return self.__instantiator.args * * def add_args(self, *args): # <<<<<<<<<<<<<< @@ -12894,21 +12941,21 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_6add_args(st PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("add_args", 0); - /* "dependency_injector/providers.pyx":889 + /* "dependency_injector/providers.pyx":894 * :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(1, 889, __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(1, 894, __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(1, 889, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 894, __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.pyx":890 + /* "dependency_injector/providers.pyx":895 * """ * self.__instantiator.add_args(*args) * return self # <<<<<<<<<<<<<< @@ -12920,7 +12967,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_6add_args(st __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers.pyx":881 + /* "dependency_injector/providers.pyx":886 * return self.__instantiator.args * * def add_args(self, *args): # <<<<<<<<<<<<<< @@ -12940,7 +12987,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_6add_args(st return __pyx_r; } -/* "dependency_injector/providers.pyx":892 +/* "dependency_injector/providers.pyx":897 * return self * * def set_args(self, *args): # <<<<<<<<<<<<<< @@ -12974,21 +13021,21 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_8set_args(st PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("set_args", 0); - /* "dependency_injector/providers.pyx":902 + /* "dependency_injector/providers.pyx":907 * :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(1, 902, __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(1, 907, __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(1, 902, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 907, __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.pyx":903 + /* "dependency_injector/providers.pyx":908 * """ * self.__instantiator.set_args(*args) * return self # <<<<<<<<<<<<<< @@ -13000,7 +13047,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_8set_args(st __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers.pyx":892 + /* "dependency_injector/providers.pyx":897 * return self * * def set_args(self, *args): # <<<<<<<<<<<<<< @@ -13020,7 +13067,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_8set_args(st return __pyx_r; } -/* "dependency_injector/providers.pyx":905 +/* "dependency_injector/providers.pyx":910 * return self * * def clear_args(self): # <<<<<<<<<<<<<< @@ -13050,14 +13097,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_10clear_args PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("clear_args", 0); - /* "dependency_injector/providers.pyx":910 + /* "dependency_injector/providers.pyx":915 * :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(1, 910, __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(1, 915, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -13070,16 +13117,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_10clear_args } } if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 910, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 915, __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(1, 910, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 915, __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.pyx":911 + /* "dependency_injector/providers.pyx":916 * """ * self.__instantiator.clear_args() * return self # <<<<<<<<<<<<<< @@ -13091,7 +13138,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_10clear_args __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers.pyx":905 + /* "dependency_injector/providers.pyx":910 * return self * * def clear_args(self): # <<<<<<<<<<<<<< @@ -13112,7 +13159,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_10clear_args return __pyx_r; } -/* "dependency_injector/providers.pyx":914 +/* "dependency_injector/providers.pyx":919 * * @property * def kwargs(self): # <<<<<<<<<<<<<< @@ -13139,7 +13186,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_6kwargs___ge PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - /* "dependency_injector/providers.pyx":916 + /* "dependency_injector/providers.pyx":921 * def kwargs(self): * """Return keyword argument injections.""" * return self.__instantiator.kwargs # <<<<<<<<<<<<<< @@ -13147,13 +13194,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_6kwargs___ge * 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(1, 916, __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(1, 921, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":914 + /* "dependency_injector/providers.pyx":919 * * @property * def kwargs(self): # <<<<<<<<<<<<<< @@ -13172,7 +13219,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_6kwargs___ge return __pyx_r; } -/* "dependency_injector/providers.pyx":918 +/* "dependency_injector/providers.pyx":923 * return self.__instantiator.kwargs * * def add_kwargs(self, **kwargs): # <<<<<<<<<<<<<< @@ -13212,21 +13259,21 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_12add_kwargs PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("add_kwargs", 0); - /* "dependency_injector/providers.pyx":926 + /* "dependency_injector/providers.pyx":931 * :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(1, 926, __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(1, 931, __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(1, 926, __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(1, 931, __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.pyx":927 + /* "dependency_injector/providers.pyx":932 * """ * self.__instantiator.add_kwargs(**kwargs) * return self # <<<<<<<<<<<<<< @@ -13238,7 +13285,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_12add_kwargs __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers.pyx":918 + /* "dependency_injector/providers.pyx":923 * return self.__instantiator.kwargs * * def add_kwargs(self, **kwargs): # <<<<<<<<<<<<<< @@ -13258,7 +13305,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_12add_kwargs return __pyx_r; } -/* "dependency_injector/providers.pyx":929 +/* "dependency_injector/providers.pyx":934 * return self * * def set_kwargs(self, **kwargs): # <<<<<<<<<<<<<< @@ -13298,21 +13345,21 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_14set_kwargs PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("set_kwargs", 0); - /* "dependency_injector/providers.pyx":939 + /* "dependency_injector/providers.pyx":944 * :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(1, 939, __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(1, 944, __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(1, 939, __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(1, 944, __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.pyx":940 + /* "dependency_injector/providers.pyx":945 * """ * self.__instantiator.set_kwargs(**kwargs) * return self # <<<<<<<<<<<<<< @@ -13324,7 +13371,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_14set_kwargs __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers.pyx":929 + /* "dependency_injector/providers.pyx":934 * return self * * def set_kwargs(self, **kwargs): # <<<<<<<<<<<<<< @@ -13344,7 +13391,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_14set_kwargs return __pyx_r; } -/* "dependency_injector/providers.pyx":942 +/* "dependency_injector/providers.pyx":947 * return self * * def clear_kwargs(self): # <<<<<<<<<<<<<< @@ -13374,14 +13421,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_16clear_kwar PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("clear_kwargs", 0); - /* "dependency_injector/providers.pyx":947 + /* "dependency_injector/providers.pyx":952 * :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(1, 947, __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(1, 952, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -13394,16 +13441,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_16clear_kwar } } if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 947, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 952, __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(1, 947, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 952, __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.pyx":948 + /* "dependency_injector/providers.pyx":953 * """ * self.__instantiator.clear_kwargs() * return self # <<<<<<<<<<<<<< @@ -13415,7 +13462,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_16clear_kwar __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers.pyx":942 + /* "dependency_injector/providers.pyx":947 * return self * * def clear_kwargs(self): # <<<<<<<<<<<<<< @@ -13436,7 +13483,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_16clear_kwar return __pyx_r; } -/* "dependency_injector/providers.pyx":951 +/* "dependency_injector/providers.pyx":956 * * @property * def attributes(self): # <<<<<<<<<<<<<< @@ -13468,19 +13515,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_10attributes int __pyx_t_3; __Pyx_RefNannySetupContext("__get__", 0); - /* "dependency_injector/providers.pyx":957 + /* "dependency_injector/providers.pyx":962 * 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(1, 957, __pyx_L1_error) + __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 962, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_attributes = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":958 + /* "dependency_injector/providers.pyx":963 * * attributes = dict() * for index in range(self.__attributes_len): # <<<<<<<<<<<<<< @@ -13491,7 +13538,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_10attributes for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { __pyx_v_index = __pyx_t_3; - /* "dependency_injector/providers.pyx":959 + /* "dependency_injector/providers.pyx":964 * attributes = dict() * for index in range(self.__attributes_len): * attribute = self.__attributes[index] # <<<<<<<<<<<<<< @@ -13500,15 +13547,15 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_10attributes */ if (unlikely(__pyx_v_self->__pyx___attributes == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(1, 959, __pyx_L1_error) + __PYX_ERR(1, 964, __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(1, 959, __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(1, 964, __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_NamedInjection))))) __PYX_ERR(1, 959, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19dependency_injector_9providers_NamedInjection))))) __PYX_ERR(1, 964, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_attribute, ((struct __pyx_obj_19dependency_injector_9providers_NamedInjection *)__pyx_t_1)); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":960 + /* "dependency_injector/providers.pyx":965 * for index in range(self.__attributes_len): * attribute = self.__attributes[index] * attributes[attribute.__name] = attribute.__value # <<<<<<<<<<<<<< @@ -13517,11 +13564,11 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_10attributes */ __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(1, 960, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_attributes, __pyx_v_attribute->__pyx___name, __pyx_t_1) < 0)) __PYX_ERR(1, 965, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - /* "dependency_injector/providers.pyx":961 + /* "dependency_injector/providers.pyx":966 * attribute = self.__attributes[index] * attributes[attribute.__name] = attribute.__value * return attributes # <<<<<<<<<<<<<< @@ -13533,7 +13580,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_10attributes __pyx_r = __pyx_v_attributes; goto __pyx_L0; - /* "dependency_injector/providers.pyx":951 + /* "dependency_injector/providers.pyx":956 * * @property * def attributes(self): # <<<<<<<<<<<<<< @@ -13554,7 +13601,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_10attributes return __pyx_r; } -/* "dependency_injector/providers.pyx":963 +/* "dependency_injector/providers.pyx":968 * return attributes * * def add_attributes(self, **kwargs): # <<<<<<<<<<<<<< @@ -13591,16 +13638,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_18add_attrib Py_ssize_t __pyx_t_3; __Pyx_RefNannySetupContext("add_attributes", 0); - /* "dependency_injector/providers.pyx":971 + /* "dependency_injector/providers.pyx":976 * :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_parse_named_injections(__pyx_v_kwargs, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 971, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_parse_named_injections(__pyx_v_kwargs, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 976, __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(1, 971, __pyx_L1_error) + __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_self->__pyx___attributes, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 976, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GIVEREF(__pyx_t_2); @@ -13609,7 +13656,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_18add_attrib __pyx_v_self->__pyx___attributes = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":972 + /* "dependency_injector/providers.pyx":977 * """ * self.__attributes += parse_named_injections(kwargs) * self.__attributes_len = len(self.__attributes) # <<<<<<<<<<<<<< @@ -13620,13 +13667,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_18add_attrib __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(1, 972, __pyx_L1_error) + __PYX_ERR(1, 977, __pyx_L1_error) } - __pyx_t_3 = PyTuple_GET_SIZE(__pyx_t_2); if (unlikely(__pyx_t_3 == -1)) __PYX_ERR(1, 972, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_SIZE(__pyx_t_2); if (unlikely(__pyx_t_3 == -1)) __PYX_ERR(1, 977, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_self->__pyx___attributes_len = __pyx_t_3; - /* "dependency_injector/providers.pyx":973 + /* "dependency_injector/providers.pyx":978 * self.__attributes += parse_named_injections(kwargs) * self.__attributes_len = len(self.__attributes) * return self # <<<<<<<<<<<<<< @@ -13638,7 +13685,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_18add_attrib __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers.pyx":963 + /* "dependency_injector/providers.pyx":968 * return attributes * * def add_attributes(self, **kwargs): # <<<<<<<<<<<<<< @@ -13658,7 +13705,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_18add_attrib return __pyx_r; } -/* "dependency_injector/providers.pyx":975 +/* "dependency_injector/providers.pyx":980 * return self * * def set_attributes(self, **kwargs): # <<<<<<<<<<<<<< @@ -13694,14 +13741,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_20set_attrib Py_ssize_t __pyx_t_2; __Pyx_RefNannySetupContext("set_attributes", 0); - /* "dependency_injector/providers.pyx":985 + /* "dependency_injector/providers.pyx":990 * :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_parse_named_injections(__pyx_v_kwargs, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 985, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_parse_named_injections(__pyx_v_kwargs, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 990, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->__pyx___attributes); @@ -13709,7 +13756,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_20set_attrib __pyx_v_self->__pyx___attributes = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":986 + /* "dependency_injector/providers.pyx":991 * """ * self.__attributes = parse_named_injections(kwargs) * self.__attributes_len = len(self.__attributes) # <<<<<<<<<<<<<< @@ -13720,13 +13767,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_20set_attrib __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(1, 986, __pyx_L1_error) + __PYX_ERR(1, 991, __pyx_L1_error) } - __pyx_t_2 = PyTuple_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(1, 986, __pyx_L1_error) + __pyx_t_2 = PyTuple_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(1, 991, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->__pyx___attributes_len = __pyx_t_2; - /* "dependency_injector/providers.pyx":987 + /* "dependency_injector/providers.pyx":992 * self.__attributes = parse_named_injections(kwargs) * self.__attributes_len = len(self.__attributes) * return self # <<<<<<<<<<<<<< @@ -13738,7 +13785,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_20set_attrib __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers.pyx":975 + /* "dependency_injector/providers.pyx":980 * return self * * def set_attributes(self, **kwargs): # <<<<<<<<<<<<<< @@ -13757,7 +13804,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_20set_attrib return __pyx_r; } -/* "dependency_injector/providers.pyx":989 +/* "dependency_injector/providers.pyx":994 * return self * * def clear_attributes(self): # <<<<<<<<<<<<<< @@ -13786,14 +13833,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_22clear_attr Py_ssize_t __pyx_t_2; __Pyx_RefNannySetupContext("clear_attributes", 0); - /* "dependency_injector/providers.pyx":994 + /* "dependency_injector/providers.pyx":999 * :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(1, 994, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyTuple_Type)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 999, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->__pyx___attributes); @@ -13801,7 +13848,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_22clear_attr __pyx_v_self->__pyx___attributes = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":995 + /* "dependency_injector/providers.pyx":1000 * """ * self.__attributes = tuple() * self.__attributes_len = len(self.__attributes) # <<<<<<<<<<<<<< @@ -13812,13 +13859,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_22clear_attr __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(1, 995, __pyx_L1_error) + __PYX_ERR(1, 1000, __pyx_L1_error) } - __pyx_t_2 = PyTuple_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(1, 995, __pyx_L1_error) + __pyx_t_2 = PyTuple_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(1, 1000, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->__pyx___attributes_len = __pyx_t_2; - /* "dependency_injector/providers.pyx":996 + /* "dependency_injector/providers.pyx":1001 * self.__attributes = tuple() * self.__attributes_len = len(self.__attributes) * return self # <<<<<<<<<<<<<< @@ -13830,7 +13877,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_22clear_attr __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers.pyx":989 + /* "dependency_injector/providers.pyx":994 * return self * * def clear_attributes(self): # <<<<<<<<<<<<<< @@ -13849,7 +13896,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_22clear_attr return __pyx_r; } -/* "dependency_injector/providers.pyx":998 +/* "dependency_injector/providers.pyx":1003 * return self * * cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<< @@ -13872,7 +13919,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_7Factory__provide(stru 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(1, 998, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provide); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1003, __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_7Factory_25_provide)) { __Pyx_XDECREF(__pyx_r); @@ -13892,7 +13939,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_7Factory__provide(stru #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(1, 998, __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(1, 1003, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -13900,13 +13947,13 @@ static PyObject *__pyx_f_19dependency_injector_9providers_7Factory__provide(stru #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(1, 998, __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(1, 1003, __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(1, 998, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1003, __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; @@ -13917,7 +13964,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_7Factory__provide(stru __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(1, 998, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1003, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -13930,7 +13977,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_7Factory__provide(stru __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - /* "dependency_injector/providers.pyx":1000 + /* "dependency_injector/providers.pyx":1005 * cpdef object _provide(self, tuple args, dict kwargs): * """Return new instance.""" * return __factory_call(self, args, kwargs) # <<<<<<<<<<<<<< @@ -13938,13 +13985,13 @@ static PyObject *__pyx_f_19dependency_injector_9providers_7Factory__provide(stru * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_19dependency_injector_9providers___factory_call(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1000, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers___factory_call(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1005, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":998 + /* "dependency_injector/providers.pyx":1003 * return self * * cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<< @@ -13996,11 +14043,11 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_25_provide(P 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(1, 998, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, 1); __PYX_ERR(1, 1003, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_provide") < 0)) __PYX_ERR(1, 998, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_provide") < 0)) __PYX_ERR(1, 1003, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -14013,14 +14060,14 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_7Factory_25_provide(P } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 998, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1003, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.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(1, 998, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 998, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(1, 1003, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 1003, __pyx_L1_error) __pyx_r = __pyx_pf_19dependency_injector_9providers_7Factory_24_provide(((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs); /* function exit code */ @@ -14038,7 +14085,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_24_provide(s PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("_provide", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_7Factory__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 998, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_7Factory__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1003, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -14055,7 +14102,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_24_provide(s return __pyx_r; } -/* "dependency_injector/providers.pyx":1034 +/* "dependency_injector/providers.pyx":1039 * """ * * def __call__(self, *args, **kwargs): # <<<<<<<<<<<<<< @@ -14102,7 +14149,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AbstractFactory___c PyObject *__pyx_t_8 = NULL; __Pyx_RefNannySetupContext("__call__", 0); - /* "dependency_injector/providers.pyx":1039 + /* "dependency_injector/providers.pyx":1044 * Callable interface implementation. * """ * if self.__last_overriding is None: # <<<<<<<<<<<<<< @@ -14113,16 +14160,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AbstractFactory___c __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "dependency_injector/providers.pyx":1040 + /* "dependency_injector/providers.pyx":1045 * """ * if self.__last_overriding is None: * raise Error('{0} must be overridden before calling'.format(self)) # <<<<<<<<<<<<<< * return self.__last_overriding._provide(args, kwargs) * */ - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1040, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1045, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_must_be_overridden_before_cal, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1040, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_must_be_overridden_before_cal, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1045, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { @@ -14135,13 +14182,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AbstractFactory___c } } if (!__pyx_t_7) { - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_6, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1040, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_6, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1045, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[2] = {__pyx_t_7, ((PyObject *)__pyx_v_self)}; - __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1040, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1045, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_5); } else @@ -14149,19 +14196,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AbstractFactory___c #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[2] = {__pyx_t_7, ((PyObject *)__pyx_v_self)}; - __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1040, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1045, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_5); } else #endif { - __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1040, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1045, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL; __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_8, 0+1, ((PyObject *)__pyx_v_self)); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1040, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1045, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } @@ -14178,14 +14225,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AbstractFactory___c } } if (!__pyx_t_6) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1040, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1045, __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(1, 1040, __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(1, 1045, __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; @@ -14194,20 +14241,20 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AbstractFactory___c #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(1, 1040, __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(1, 1045, __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(1, 1040, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1045, __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(1, 1040, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1045, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } @@ -14215,9 +14262,9 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AbstractFactory___c __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(1, 1040, __pyx_L1_error) + __PYX_ERR(1, 1045, __pyx_L1_error) - /* "dependency_injector/providers.pyx":1039 + /* "dependency_injector/providers.pyx":1044 * Callable interface implementation. * """ * if self.__last_overriding is None: # <<<<<<<<<<<<<< @@ -14226,7 +14273,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AbstractFactory___c */ } - /* "dependency_injector/providers.pyx":1041 + /* "dependency_injector/providers.pyx":1046 * if self.__last_overriding is None: * raise Error('{0} must be overridden before calling'.format(self)) * return self.__last_overriding._provide(args, kwargs) # <<<<<<<<<<<<<< @@ -14234,13 +14281,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AbstractFactory___c * def override(self, provider): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = ((struct __pyx_vtabstruct_19dependency_injector_9providers_Provider *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding->__pyx_vtab)->_provide(__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding, __pyx_v_args, __pyx_v_kwargs, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1041, __pyx_L1_error) + __pyx_t_3 = ((struct __pyx_vtabstruct_19dependency_injector_9providers_Provider *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding->__pyx_vtab)->_provide(__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding, __pyx_v_args, __pyx_v_kwargs, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1046, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1034 + /* "dependency_injector/providers.pyx":1039 * """ * * def __call__(self, *args, **kwargs): # <<<<<<<<<<<<<< @@ -14264,7 +14311,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AbstractFactory___c return __pyx_r; } -/* "dependency_injector/providers.pyx":1043 +/* "dependency_injector/providers.pyx":1048 * return self.__last_overriding._provide(args, kwargs) * * def override(self, provider): # <<<<<<<<<<<<<< @@ -14300,7 +14347,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AbstractFactory_2ov PyObject *__pyx_t_9 = NULL; __Pyx_RefNannySetupContext("override", 0); - /* "dependency_injector/providers.pyx":1054 + /* "dependency_injector/providers.pyx":1059 * :rtype: :py:class:`OverridingContext` * """ * if not isinstance(provider, Factory): # <<<<<<<<<<<<<< @@ -14311,24 +14358,24 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AbstractFactory_2ov __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); if (__pyx_t_2) { - /* "dependency_injector/providers.pyx":1055 + /* "dependency_injector/providers.pyx":1060 * """ * if not isinstance(provider, Factory): * raise Error('{0} must be overridden only by ' # <<<<<<<<<<<<<< * '{1} providers'.format(self, Factory)) * return super(AbstractFactory, self).override(provider) */ - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1055, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1060, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - /* "dependency_injector/providers.pyx":1056 + /* "dependency_injector/providers.pyx":1061 * if not isinstance(provider, Factory): * raise Error('{0} must be overridden only by ' * '{1} providers'.format(self, Factory)) # <<<<<<<<<<<<<< * return super(AbstractFactory, self).override(provider) * */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_must_be_overridden_only_by_1, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1056, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_must_be_overridden_only_by_1, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1061, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; __pyx_t_8 = 0; @@ -14345,7 +14392,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AbstractFactory_2ov #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_7, ((PyObject *)__pyx_v_self), ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Factory)}; - __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1056, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1061, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_5); } else @@ -14353,13 +14400,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AbstractFactory_2ov #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_7, ((PyObject *)__pyx_v_self), ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Factory)}; - __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1056, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1061, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_5); } else #endif { - __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1056, __pyx_L1_error) + __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1061, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; @@ -14370,7 +14417,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AbstractFactory_2ov __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Factory)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Factory)); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Factory)); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1056, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1061, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } @@ -14386,14 +14433,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AbstractFactory_2ov } } if (!__pyx_t_6) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1055, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1060, __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(1, 1055, __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(1, 1060, __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; @@ -14402,20 +14449,20 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AbstractFactory_2ov #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(1, 1055, __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(1, 1060, __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_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1055, __pyx_L1_error) + __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1060, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6); __pyx_t_6 = NULL; __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_5); __pyx_t_5 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1055, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1060, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } @@ -14423,9 +14470,9 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AbstractFactory_2ov __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(1, 1055, __pyx_L1_error) + __PYX_ERR(1, 1060, __pyx_L1_error) - /* "dependency_injector/providers.pyx":1054 + /* "dependency_injector/providers.pyx":1059 * :rtype: :py:class:`OverridingContext` * """ * if not isinstance(provider, Factory): # <<<<<<<<<<<<<< @@ -14434,7 +14481,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AbstractFactory_2ov */ } - /* "dependency_injector/providers.pyx":1057 + /* "dependency_injector/providers.pyx":1062 * raise Error('{0} must be overridden only by ' * '{1} providers'.format(self, Factory)) * return super(AbstractFactory, self).override(provider) # <<<<<<<<<<<<<< @@ -14442,7 +14489,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AbstractFactory_2ov * cpdef object _provide(self, tuple args, dict kwargs): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1057, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1062, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_AbstractFactory)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_AbstractFactory)); @@ -14450,10 +14497,10 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AbstractFactory_2ov __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_9 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_4, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1057, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_4, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1062, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_override); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1057, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_override); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1062, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = NULL; @@ -14467,13 +14514,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AbstractFactory_2ov } } if (!__pyx_t_9) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_provider); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1057, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_provider); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1062, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_v_provider}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1057, __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(1, 1062, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_3); } else @@ -14481,19 +14528,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AbstractFactory_2ov #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_v_provider}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1057, __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(1, 1062, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { - __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1057, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1062, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_9); __pyx_t_9 = NULL; __Pyx_INCREF(__pyx_v_provider); __Pyx_GIVEREF(__pyx_v_provider); PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_provider); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1057, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1062, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } @@ -14503,7 +14550,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AbstractFactory_2ov __pyx_t_3 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1043 + /* "dependency_injector/providers.pyx":1048 * return self.__last_overriding._provide(args, kwargs) * * def override(self, provider): # <<<<<<<<<<<<<< @@ -14527,7 +14574,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AbstractFactory_2ov return __pyx_r; } -/* "dependency_injector/providers.pyx":1059 +/* "dependency_injector/providers.pyx":1064 * return super(AbstractFactory, self).override(provider) * * cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<< @@ -14550,7 +14597,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_15AbstractFactory__pro 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(1, 1059, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provide); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1064, __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_15AbstractFactory_5_provide)) { __Pyx_XDECREF(__pyx_r); @@ -14570,7 +14617,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_15AbstractFactory__pro #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(1, 1059, __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(1, 1064, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -14578,13 +14625,13 @@ static PyObject *__pyx_f_19dependency_injector_9providers_15AbstractFactory__pro #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(1, 1059, __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(1, 1064, __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(1, 1059, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1064, __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; @@ -14595,7 +14642,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_15AbstractFactory__pro __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(1, 1059, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1064, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -14608,20 +14655,20 @@ static PyObject *__pyx_f_19dependency_injector_9providers_15AbstractFactory__pro __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - /* "dependency_injector/providers.pyx":1061 + /* "dependency_injector/providers.pyx":1066 * cpdef object _provide(self, tuple args, dict kwargs): * """Return result of provided callable's call.""" * raise NotImplementedError('Abstract provider forward providing logic ' # <<<<<<<<<<<<<< * 'to overriding provider') * */ - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1061, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1066, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(1, 1061, __pyx_L1_error) + __PYX_ERR(1, 1066, __pyx_L1_error) - /* "dependency_injector/providers.pyx":1059 + /* "dependency_injector/providers.pyx":1064 * return super(AbstractFactory, self).override(provider) * * cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<< @@ -14673,11 +14720,11 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_15AbstractFactory_5_p 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(1, 1059, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, 1); __PYX_ERR(1, 1064, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_provide") < 0)) __PYX_ERR(1, 1059, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_provide") < 0)) __PYX_ERR(1, 1064, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -14690,14 +14737,14 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_15AbstractFactory_5_p } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1059, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1064, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.AbstractFactory._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(1, 1059, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 1059, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(1, 1064, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 1064, __pyx_L1_error) __pyx_r = __pyx_pf_19dependency_injector_9providers_15AbstractFactory_4_provide(((struct __pyx_obj_19dependency_injector_9providers_AbstractFactory *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs); /* function exit code */ @@ -14715,7 +14762,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AbstractFactory_4_p PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("_provide", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_15AbstractFactory__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1059, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_15AbstractFactory__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1064, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -14732,7 +14779,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AbstractFactory_4_p return __pyx_r; } -/* "dependency_injector/providers.pyx":1069 +/* "dependency_injector/providers.pyx":1074 * provided_type = None * * def __init__(self, provides, *args, **kwargs): # <<<<<<<<<<<<<< @@ -14785,7 +14832,7 @@ static int __pyx_pw_19dependency_injector_9providers_13BaseSingleton_1__init__(P } 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(1, 1069, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "__init__") < 0)) __PYX_ERR(1, 1074, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) < 1) { goto __pyx_L5_argtuple_error; @@ -14796,7 +14843,7 @@ static int __pyx_pw_19dependency_injector_9providers_13BaseSingleton_1__init__(P } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1069, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1074, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0; __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; @@ -14830,19 +14877,19 @@ static int __pyx_pf_19dependency_injector_9providers_13BaseSingleton___init__(st PyObject *__pyx_t_12 = NULL; __Pyx_RefNannySetupContext("__init__", 0); - /* "dependency_injector/providers.pyx":1081 + /* "dependency_injector/providers.pyx":1086 * :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(1, 1081, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1086, __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(1, 1081, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_provided_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1086, __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(1, 1081, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 1086, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_4) { } else { @@ -14850,25 +14897,25 @@ static int __pyx_pf_19dependency_injector_9providers_13BaseSingleton___init__(st goto __pyx_L4_bool_binop_done; } - /* "dependency_injector/providers.pyx":1082 + /* "dependency_injector/providers.pyx":1087 * """ * 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(1, 1082, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1087, __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(1, 1082, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_provided_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1087, __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(1, 1082, __pyx_L1_error) + __pyx_t_4 = PyObject_IsSubclass(__pyx_v_provides, __pyx_t_2); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(1, 1087, __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.pyx":1081 + /* "dependency_injector/providers.pyx":1086 * :type kwargs: dict[str, object] * """ * if (self.__class__.provided_type and # <<<<<<<<<<<<<< @@ -14877,30 +14924,30 @@ static int __pyx_pf_19dependency_injector_9providers_13BaseSingleton___init__(st */ if (__pyx_t_1) { - /* "dependency_injector/providers.pyx":1083 + /* "dependency_injector/providers.pyx":1088 * 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(1, 1083, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_Error); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1088, __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(1, 1083, __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(1, 1088, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - /* "dependency_injector/providers.pyx":1084 + /* "dependency_injector/providers.pyx":1089 * not issubclass(provides, self.__class__.provided_type)): * raise Error('{0} can provide only {1} instances'.format( * self.__class__, self.__class__.provided_type)) # <<<<<<<<<<<<<< * * self.__instantiator = Factory(provides, *args, **kwargs) */ - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1084, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1089, __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(1, 1084, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1089, __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(1, 1084, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_provided_type); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1089, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = NULL; @@ -14918,7 +14965,7 @@ static int __pyx_pf_19dependency_injector_9providers_13BaseSingleton___init__(st #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(1, 1083, __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(1, 1088, __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; @@ -14928,7 +14975,7 @@ static int __pyx_pf_19dependency_injector_9providers_13BaseSingleton___init__(st #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(1, 1083, __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(1, 1088, __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; @@ -14936,7 +14983,7 @@ static int __pyx_pf_19dependency_injector_9providers_13BaseSingleton___init__(st } else #endif { - __pyx_t_12 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 1083, __pyx_L1_error) + __pyx_t_12 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 1088, __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; @@ -14947,7 +14994,7 @@ static int __pyx_pf_19dependency_injector_9providers_13BaseSingleton___init__(st 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(1, 1083, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_12, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1088, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } @@ -14963,14 +15010,14 @@ static int __pyx_pf_19dependency_injector_9providers_13BaseSingleton___init__(st } } if (!__pyx_t_7) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1083, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1088, __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(1, 1083, __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(1, 1088, __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; @@ -14979,20 +15026,20 @@ static int __pyx_pf_19dependency_injector_9providers_13BaseSingleton___init__(st #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(1, 1083, __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(1, 1088, __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(1, 1083, __pyx_L1_error) + __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 1088, __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(1, 1083, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1088, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } @@ -15000,9 +15047,9 @@ static int __pyx_pf_19dependency_injector_9providers_13BaseSingleton___init__(st __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(1, 1083, __pyx_L1_error) + __PYX_ERR(1, 1088, __pyx_L1_error) - /* "dependency_injector/providers.pyx":1081 + /* "dependency_injector/providers.pyx":1086 * :type kwargs: dict[str, object] * """ * if (self.__class__.provided_type and # <<<<<<<<<<<<<< @@ -15011,22 +15058,22 @@ static int __pyx_pf_19dependency_injector_9providers_13BaseSingleton___init__(st */ } - /* "dependency_injector/providers.pyx":1086 + /* "dependency_injector/providers.pyx":1091 * self.__class__, self.__class__.provided_type)) * * self.__instantiator = Factory(provides, *args, **kwargs) # <<<<<<<<<<<<<< * * super(BaseSingleton, self).__init__() */ - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1086, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1091, __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(1, 1086, __pyx_L1_error) + __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_v_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1091, __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_Factory), __pyx_t_3, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1086, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Factory), __pyx_t_3, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1091, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GIVEREF(__pyx_t_2); @@ -15035,14 +15082,14 @@ static int __pyx_pf_19dependency_injector_9providers_13BaseSingleton___init__(st __pyx_v_self->__pyx___instantiator = ((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":1088 + /* "dependency_injector/providers.pyx":1093 * self.__instantiator = Factory(provides, *args, **kwargs) * * super(BaseSingleton, self).__init__() # <<<<<<<<<<<<<< * * def __str__(self): */ - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1088, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1093, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_BaseSingleton)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_BaseSingleton)); @@ -15050,10 +15097,10 @@ static int __pyx_pf_19dependency_injector_9providers_13BaseSingleton___init__(st __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(1, 1088, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 1093, __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(1, 1088, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1093, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = NULL; @@ -15067,16 +15114,16 @@ static int __pyx_pf_19dependency_injector_9providers_13BaseSingleton___init__(st } } if (__pyx_t_12) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1088, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1093, __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(1, 1088, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1093, __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.pyx":1069 + /* "dependency_injector/providers.pyx":1074 * provided_type = None * * def __init__(self, provides, *args, **kwargs): # <<<<<<<<<<<<<< @@ -15103,7 +15150,7 @@ static int __pyx_pf_19dependency_injector_9providers_13BaseSingleton___init__(st return __pyx_r; } -/* "dependency_injector/providers.pyx":1090 +/* "dependency_injector/providers.pyx":1095 * super(BaseSingleton, self).__init__() * * def __str__(self): # <<<<<<<<<<<<<< @@ -15135,7 +15182,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_2__st PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__str__", 0); - /* "dependency_injector/providers.pyx":1095 + /* "dependency_injector/providers.pyx":1100 * :rtype: str * """ * return represent_provider(provider=self, # <<<<<<<<<<<<<< @@ -15144,31 +15191,31 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_2__st */ __Pyx_XDECREF(__pyx_r); - /* "dependency_injector/providers.pyx":1096 + /* "dependency_injector/providers.pyx":1101 * """ * return represent_provider(provider=self, * provides=self.__instantiator.cls) # <<<<<<<<<<<<<< * * def __deepcopy__(self, memo): */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_cls); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1096, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_cls); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - /* "dependency_injector/providers.pyx":1095 + /* "dependency_injector/providers.pyx":1100 * :rtype: str * """ * return represent_provider(provider=self, # <<<<<<<<<<<<<< * provides=self.__instantiator.cls) * */ - __pyx_t_2 = __pyx_f_19dependency_injector_9providers_represent_provider(((PyObject *)__pyx_v_self), __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1095, __pyx_L1_error) + __pyx_t_2 = __pyx_f_19dependency_injector_9providers_represent_provider(((PyObject *)__pyx_v_self), __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1100, __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.pyx":1090 + /* "dependency_injector/providers.pyx":1095 * super(BaseSingleton, self).__init__() * * def __str__(self): # <<<<<<<<<<<<<< @@ -15188,7 +15235,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_2__st return __pyx_r; } -/* "dependency_injector/providers.pyx":1098 +/* "dependency_injector/providers.pyx":1103 * provides=self.__instantiator.cls) * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< @@ -15228,21 +15275,21 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_4__de PyObject *__pyx_t_11 = NULL; __Pyx_RefNannySetupContext("__deepcopy__", 0); - /* "dependency_injector/providers.pyx":1100 + /* "dependency_injector/providers.pyx":1105 * 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(1, 1100, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_memo, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1105, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1100, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1105, __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(1, 1100, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_id, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1105, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -15256,14 +15303,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_4__de } } if (!__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1100, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1105, __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(1, 1100, __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(1, 1105, __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; @@ -15272,20 +15319,20 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_4__de #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(1, 1100, __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(1, 1105, __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(1, 1100, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1105, __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(1, 1100, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1105, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } @@ -15294,7 +15341,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_4__de __pyx_v_copied = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1101 + /* "dependency_injector/providers.pyx":1106 * """Create and return full copy of provider.""" * copied = memo.get(id(self)) * if copied is not None: # <<<<<<<<<<<<<< @@ -15305,7 +15352,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_4__de __pyx_t_7 = (__pyx_t_6 != 0); if (__pyx_t_7) { - /* "dependency_injector/providers.pyx":1102 + /* "dependency_injector/providers.pyx":1107 * copied = memo.get(id(self)) * if copied is not None: * return copied # <<<<<<<<<<<<<< @@ -15317,7 +15364,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_4__de __pyx_r = __pyx_v_copied; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1101 + /* "dependency_injector/providers.pyx":1106 * """Create and return full copy of provider.""" * copied = memo.get(id(self)) * if copied is not None: # <<<<<<<<<<<<<< @@ -15326,91 +15373,91 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_4__de */ } - /* "dependency_injector/providers.pyx":1104 + /* "dependency_injector/providers.pyx":1109 * 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(1, 1104, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1109, __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(1, 1104, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_cls); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1104, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1109, __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.pyx":1105 + /* "dependency_injector/providers.pyx":1110 * * 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(1, 1105, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1110, __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(1, 1105, __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(1, 1110, __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_deepcopy(__pyx_t_2, 0, &__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1105, __pyx_L1_error) + __pyx_t_4 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_2, 0, &__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1110, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":1104 + /* "dependency_injector/providers.pyx":1109 * 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(1, 1104, __pyx_L1_error) + __pyx_t_2 = PySequence_Tuple(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1109, __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(1, 1104, __pyx_L1_error) + __pyx_t_4 = PyNumber_Add(__pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1109, __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.pyx":1106 + /* "dependency_injector/providers.pyx":1111 * 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(1, 1106, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_kwargs); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1111, __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(1, 1106, __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(1, 1111, __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_deepcopy(__pyx_t_5, 0, &__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1106, __pyx_L1_error) + __pyx_t_3 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_5, 0, &__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1111, __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(1, 1106, __pyx_L1_error) + __PYX_ERR(1, 1111, __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(1, 1106, __pyx_L1_error) + __pyx_t_2 = PyDict_Copy(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1111, __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(1, 1104, __pyx_L1_error) + __pyx_t_2 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - /* "dependency_injector/providers.pyx":1104 + /* "dependency_injector/providers.pyx":1109 * 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(1, 1104, __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(1, 1109, __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; @@ -15418,58 +15465,58 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_4__de __Pyx_DECREF_SET(__pyx_v_copied, __pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/providers.pyx":1107 + /* "dependency_injector/providers.pyx":1112 * *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(1, 1107, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_copied, __pyx_n_s_set_attributes); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1112, __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(1, 1107, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_attributes); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1112, __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(1, 1107, __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(1, 1112, __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_deepcopy(__pyx_t_4, 0, &__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1107, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_4, 0, &__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1112, __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(1, 1107, __pyx_L1_error) + __PYX_ERR(1, 1112, __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(1, 1107, __pyx_L1_error) + __pyx_t_2 = PyDict_Copy(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1112, __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(1, 1107, __pyx_L1_error) + __pyx_t_2 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1112, __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(1, 1107, __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(1, 1112, __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.pyx":1109 + /* "dependency_injector/providers.pyx":1114 * 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(1, 1109, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_overridden); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1114, __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(1, 1109, __pyx_L1_error) + __pyx_t_9 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1114, __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(1, 1109, __pyx_L1_error) + __pyx_t_10 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1114, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -15477,17 +15524,17 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_4__de 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(1, 1109, __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(1, 1114, __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(1, 1109, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1114, __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(1, 1109, __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(1, 1114, __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(1, 1109, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1114, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -15497,7 +15544,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_4__de 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(1, 1109, __pyx_L1_error) + else __PYX_ERR(1, 1114, __pyx_L1_error) } break; } @@ -15506,19 +15553,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_4__de __Pyx_XDECREF_SET(__pyx_v_overriding_provider, __pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1110 + /* "dependency_injector/providers.pyx":1115 * * 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(1, 1110, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_copied, __pyx_n_s_override); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1115, __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(1, 1110, __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(1, 1115, __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_deepcopy(__pyx_v_overriding_provider, 0, &__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1110, __pyx_L1_error) + __pyx_t_4 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_v_overriding_provider, 0, &__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1115, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -15531,14 +15578,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_4__de } } if (!__pyx_t_5) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1110, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1115, __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(1, 1110, __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(1, 1115, __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; @@ -15547,20 +15594,20 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_4__de #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(1, 1110, __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(1, 1115, __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(1, 1110, __pyx_L1_error) + __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 1115, __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(1, 1110, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1115, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } @@ -15568,7 +15615,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_4__de __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1109 + /* "dependency_injector/providers.pyx":1114 * copied.set_attributes(**deepcopy(self.attributes, memo)) * * for overriding_provider in self.overridden: # <<<<<<<<<<<<<< @@ -15578,7 +15625,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_4__de } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":1112 + /* "dependency_injector/providers.pyx":1117 * copied.override(deepcopy(overriding_provider, memo)) * * return copied # <<<<<<<<<<<<<< @@ -15590,7 +15637,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_4__de __pyx_r = __pyx_v_copied; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1098 + /* "dependency_injector/providers.pyx":1103 * provides=self.__instantiator.cls) * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< @@ -15616,7 +15663,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_4__de return __pyx_r; } -/* "dependency_injector/providers.pyx":1115 +/* "dependency_injector/providers.pyx":1120 * * @property * def cls(self): # <<<<<<<<<<<<<< @@ -15643,7 +15690,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_3cls_ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - /* "dependency_injector/providers.pyx":1117 + /* "dependency_injector/providers.pyx":1122 * def cls(self): * """Return provided type.""" * return self.__instantiator.cls # <<<<<<<<<<<<<< @@ -15651,13 +15698,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_3cls_ * @property */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_cls); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1117, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_cls); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1122, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1115 + /* "dependency_injector/providers.pyx":1120 * * @property * def cls(self): # <<<<<<<<<<<<<< @@ -15676,7 +15723,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_3cls_ return __pyx_r; } -/* "dependency_injector/providers.pyx":1120 +/* "dependency_injector/providers.pyx":1125 * * @property * def args(self): # <<<<<<<<<<<<<< @@ -15703,7 +15750,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_4args PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - /* "dependency_injector/providers.pyx":1122 + /* "dependency_injector/providers.pyx":1127 * def args(self): * """Return positional argument injections.""" * return self.__instantiator.args # <<<<<<<<<<<<<< @@ -15711,13 +15758,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_4args * 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(1, 1122, __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(1, 1127, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1120 + /* "dependency_injector/providers.pyx":1125 * * @property * def args(self): # <<<<<<<<<<<<<< @@ -15736,7 +15783,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_4args return __pyx_r; } -/* "dependency_injector/providers.pyx":1124 +/* "dependency_injector/providers.pyx":1129 * return self.__instantiator.args * * def add_args(self, *args): # <<<<<<<<<<<<<< @@ -15770,21 +15817,21 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_6add_ PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("add_args", 0); - /* "dependency_injector/providers.pyx":1132 + /* "dependency_injector/providers.pyx":1137 * :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(1, 1132, __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(1, 1137, __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(1, 1132, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1137, __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.pyx":1133 + /* "dependency_injector/providers.pyx":1138 * """ * self.__instantiator.add_args(*args) * return self # <<<<<<<<<<<<<< @@ -15796,7 +15843,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_6add_ __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers.pyx":1124 + /* "dependency_injector/providers.pyx":1129 * return self.__instantiator.args * * def add_args(self, *args): # <<<<<<<<<<<<<< @@ -15816,7 +15863,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_6add_ return __pyx_r; } -/* "dependency_injector/providers.pyx":1135 +/* "dependency_injector/providers.pyx":1140 * return self * * def set_args(self, *args): # <<<<<<<<<<<<<< @@ -15850,21 +15897,21 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_8set_ PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("set_args", 0); - /* "dependency_injector/providers.pyx":1145 + /* "dependency_injector/providers.pyx":1150 * :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(1, 1145, __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(1, 1150, __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(1, 1145, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1150, __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.pyx":1146 + /* "dependency_injector/providers.pyx":1151 * """ * self.__instantiator.set_args(*args) * return self # <<<<<<<<<<<<<< @@ -15876,7 +15923,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_8set_ __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers.pyx":1135 + /* "dependency_injector/providers.pyx":1140 * return self * * def set_args(self, *args): # <<<<<<<<<<<<<< @@ -15896,7 +15943,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_8set_ return __pyx_r; } -/* "dependency_injector/providers.pyx":1148 +/* "dependency_injector/providers.pyx":1153 * return self * * def clear_args(self): # <<<<<<<<<<<<<< @@ -15926,14 +15973,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_10cle PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("clear_args", 0); - /* "dependency_injector/providers.pyx":1153 + /* "dependency_injector/providers.pyx":1158 * :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(1, 1153, __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(1, 1158, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -15946,16 +15993,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_10cle } } if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1153, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1158, __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(1, 1153, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1158, __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.pyx":1154 + /* "dependency_injector/providers.pyx":1159 * """ * self.__instantiator.clear_args() * return self # <<<<<<<<<<<<<< @@ -15967,7 +16014,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_10cle __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers.pyx":1148 + /* "dependency_injector/providers.pyx":1153 * return self * * def clear_args(self): # <<<<<<<<<<<<<< @@ -15988,7 +16035,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_10cle return __pyx_r; } -/* "dependency_injector/providers.pyx":1157 +/* "dependency_injector/providers.pyx":1162 * * @property * def kwargs(self): # <<<<<<<<<<<<<< @@ -16015,7 +16062,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_6kwar PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - /* "dependency_injector/providers.pyx":1159 + /* "dependency_injector/providers.pyx":1164 * def kwargs(self): * """Return keyword argument injections.""" * return self.__instantiator.kwargs # <<<<<<<<<<<<<< @@ -16023,13 +16070,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_6kwar * 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(1, 1159, __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(1, 1164, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1157 + /* "dependency_injector/providers.pyx":1162 * * @property * def kwargs(self): # <<<<<<<<<<<<<< @@ -16048,7 +16095,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_6kwar return __pyx_r; } -/* "dependency_injector/providers.pyx":1161 +/* "dependency_injector/providers.pyx":1166 * return self.__instantiator.kwargs * * def add_kwargs(self, **kwargs): # <<<<<<<<<<<<<< @@ -16088,21 +16135,21 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_12add PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("add_kwargs", 0); - /* "dependency_injector/providers.pyx":1169 + /* "dependency_injector/providers.pyx":1174 * :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(1, 1169, __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(1, 1174, __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(1, 1169, __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(1, 1174, __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.pyx":1170 + /* "dependency_injector/providers.pyx":1175 * """ * self.__instantiator.add_kwargs(**kwargs) * return self # <<<<<<<<<<<<<< @@ -16114,7 +16161,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_12add __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers.pyx":1161 + /* "dependency_injector/providers.pyx":1166 * return self.__instantiator.kwargs * * def add_kwargs(self, **kwargs): # <<<<<<<<<<<<<< @@ -16134,7 +16181,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_12add return __pyx_r; } -/* "dependency_injector/providers.pyx":1172 +/* "dependency_injector/providers.pyx":1177 * return self * * def set_kwargs(self, **kwargs): # <<<<<<<<<<<<<< @@ -16174,21 +16221,21 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_14set PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("set_kwargs", 0); - /* "dependency_injector/providers.pyx":1182 + /* "dependency_injector/providers.pyx":1187 * :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(1, 1182, __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(1, 1187, __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(1, 1182, __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(1, 1187, __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.pyx":1183 + /* "dependency_injector/providers.pyx":1188 * """ * self.__instantiator.set_kwargs(**kwargs) * return self # <<<<<<<<<<<<<< @@ -16200,7 +16247,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_14set __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers.pyx":1172 + /* "dependency_injector/providers.pyx":1177 * return self * * def set_kwargs(self, **kwargs): # <<<<<<<<<<<<<< @@ -16220,7 +16267,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_14set return __pyx_r; } -/* "dependency_injector/providers.pyx":1185 +/* "dependency_injector/providers.pyx":1190 * return self * * def clear_kwargs(self): # <<<<<<<<<<<<<< @@ -16250,14 +16297,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_16cle PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("clear_kwargs", 0); - /* "dependency_injector/providers.pyx":1190 + /* "dependency_injector/providers.pyx":1195 * :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(1, 1190, __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(1, 1195, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -16270,16 +16317,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_16cle } } if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1190, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1195, __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(1, 1190, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1195, __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.pyx":1191 + /* "dependency_injector/providers.pyx":1196 * """ * self.__instantiator.clear_kwargs() * return self # <<<<<<<<<<<<<< @@ -16291,7 +16338,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_16cle __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers.pyx":1185 + /* "dependency_injector/providers.pyx":1190 * return self * * def clear_kwargs(self): # <<<<<<<<<<<<<< @@ -16312,7 +16359,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_16cle return __pyx_r; } -/* "dependency_injector/providers.pyx":1194 +/* "dependency_injector/providers.pyx":1199 * * @property * def attributes(self): # <<<<<<<<<<<<<< @@ -16339,7 +16386,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_10att PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - /* "dependency_injector/providers.pyx":1196 + /* "dependency_injector/providers.pyx":1201 * def attributes(self): * """Return attribute injections.""" * return self.__instantiator.attributes # <<<<<<<<<<<<<< @@ -16347,13 +16394,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_10att * def add_attributes(self, **kwargs): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_attributes); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1196, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_attributes); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1201, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1194 + /* "dependency_injector/providers.pyx":1199 * * @property * def attributes(self): # <<<<<<<<<<<<<< @@ -16372,7 +16419,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_10att return __pyx_r; } -/* "dependency_injector/providers.pyx":1198 +/* "dependency_injector/providers.pyx":1203 * return self.__instantiator.attributes * * def add_attributes(self, **kwargs): # <<<<<<<<<<<<<< @@ -16412,21 +16459,21 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_18add PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("add_attributes", 0); - /* "dependency_injector/providers.pyx":1206 + /* "dependency_injector/providers.pyx":1211 * :return: Reference ``self`` * """ * self.__instantiator.add_attributes(**kwargs) # <<<<<<<<<<<<<< * return self * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_add_attributes); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1206, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_add_attributes); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1211, __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(1, 1206, __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(1, 1211, __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.pyx":1207 + /* "dependency_injector/providers.pyx":1212 * """ * self.__instantiator.add_attributes(**kwargs) * return self # <<<<<<<<<<<<<< @@ -16438,7 +16485,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_18add __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers.pyx":1198 + /* "dependency_injector/providers.pyx":1203 * return self.__instantiator.attributes * * def add_attributes(self, **kwargs): # <<<<<<<<<<<<<< @@ -16458,7 +16505,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_18add return __pyx_r; } -/* "dependency_injector/providers.pyx":1209 +/* "dependency_injector/providers.pyx":1214 * return self * * def set_attributes(self, **kwargs): # <<<<<<<<<<<<<< @@ -16498,21 +16545,21 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_20set PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("set_attributes", 0); - /* "dependency_injector/providers.pyx":1219 + /* "dependency_injector/providers.pyx":1224 * :return: Reference ``self`` * """ * self.__instantiator.set_attributes(**kwargs) # <<<<<<<<<<<<<< * return self * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_set_attributes); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1219, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_set_attributes); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1224, __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(1, 1219, __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(1, 1224, __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.pyx":1220 + /* "dependency_injector/providers.pyx":1225 * """ * self.__instantiator.set_attributes(**kwargs) * return self # <<<<<<<<<<<<<< @@ -16524,7 +16571,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_20set __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers.pyx":1209 + /* "dependency_injector/providers.pyx":1214 * return self * * def set_attributes(self, **kwargs): # <<<<<<<<<<<<<< @@ -16544,7 +16591,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_20set return __pyx_r; } -/* "dependency_injector/providers.pyx":1222 +/* "dependency_injector/providers.pyx":1227 * return self * * def clear_attributes(self): # <<<<<<<<<<<<<< @@ -16574,14 +16621,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_22cle PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("clear_attributes", 0); - /* "dependency_injector/providers.pyx":1227 + /* "dependency_injector/providers.pyx":1232 * :return: Reference ``self`` * """ * self.__instantiator.clear_attributes() # <<<<<<<<<<<<<< * return self * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_clear_attributes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1227, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_clear_attributes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -16594,16 +16641,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_22cle } } if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1227, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1232, __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(1, 1227, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1232, __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.pyx":1228 + /* "dependency_injector/providers.pyx":1233 * """ * self.__instantiator.clear_attributes() * return self # <<<<<<<<<<<<<< @@ -16615,7 +16662,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_22cle __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers.pyx":1222 + /* "dependency_injector/providers.pyx":1227 * return self * * def clear_attributes(self): # <<<<<<<<<<<<<< @@ -16636,7 +16683,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_22cle return __pyx_r; } -/* "dependency_injector/providers.pyx":1230 +/* "dependency_injector/providers.pyx":1235 * return self * * def reset(self): # <<<<<<<<<<<<<< @@ -16664,20 +16711,20 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_24res PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("reset", 0); - /* "dependency_injector/providers.pyx":1235 + /* "dependency_injector/providers.pyx":1240 * :rtype: None * """ * raise NotImplementedError() # <<<<<<<<<<<<<< * * */ - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_builtin_NotImplementedError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1235, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_builtin_NotImplementedError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1240, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(1, 1235, __pyx_L1_error) + __PYX_ERR(1, 1240, __pyx_L1_error) - /* "dependency_injector/providers.pyx":1230 + /* "dependency_injector/providers.pyx":1235 * return self * * def reset(self): # <<<<<<<<<<<<<< @@ -16695,7 +16742,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_24res return __pyx_r; } -/* "dependency_injector/providers.pyx":1269 +/* "dependency_injector/providers.pyx":1274 * """ * * def __init__(self, provides, *args, **kwargs): # <<<<<<<<<<<<<< @@ -16748,7 +16795,7 @@ static int __pyx_pw_19dependency_injector_9providers_9Singleton_1__init__(PyObje } 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(1, 1269, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "__init__") < 0)) __PYX_ERR(1, 1274, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) < 1) { goto __pyx_L5_argtuple_error; @@ -16759,7 +16806,7 @@ static int __pyx_pw_19dependency_injector_9providers_9Singleton_1__init__(PyObje } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1269, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1274, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0; __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; @@ -16784,7 +16831,7 @@ static int __pyx_pf_19dependency_injector_9providers_9Singleton___init__(struct PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__init__", 0); - /* "dependency_injector/providers.pyx":1281 + /* "dependency_injector/providers.pyx":1286 * :type kwargs: dict[str, object] * """ * self.__storage = None # <<<<<<<<<<<<<< @@ -16797,14 +16844,14 @@ static int __pyx_pf_19dependency_injector_9providers_9Singleton___init__(struct __Pyx_DECREF(__pyx_v_self->__pyx___storage); __pyx_v_self->__pyx___storage = Py_None; - /* "dependency_injector/providers.pyx":1282 + /* "dependency_injector/providers.pyx":1287 * """ * self.__storage = None * super(Singleton, self).__init__(provides, *args, **kwargs) # <<<<<<<<<<<<<< * * def reset(self): */ - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1282, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1287, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Singleton)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Singleton)); @@ -16812,27 +16859,27 @@ static int __pyx_pf_19dependency_injector_9providers_9Singleton___init__(struct __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self)); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1282, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1287, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1282, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1287, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1282, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1287, __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(1, 1282, __pyx_L1_error) + __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_v_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1287, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1282, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1287, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":1269 + /* "dependency_injector/providers.pyx":1274 * """ * * def __init__(self, provides, *args, **kwargs): # <<<<<<<<<<<<<< @@ -16854,7 +16901,7 @@ static int __pyx_pf_19dependency_injector_9providers_9Singleton___init__(struct return __pyx_r; } -/* "dependency_injector/providers.pyx":1284 +/* "dependency_injector/providers.pyx":1289 * super(Singleton, self).__init__(provides, *args, **kwargs) * * def reset(self): # <<<<<<<<<<<<<< @@ -16881,7 +16928,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Singleton_2reset(str __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("reset", 0); - /* "dependency_injector/providers.pyx":1289 + /* "dependency_injector/providers.pyx":1294 * :rtype: None * """ * self.__storage = None # <<<<<<<<<<<<<< @@ -16894,7 +16941,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Singleton_2reset(str __Pyx_DECREF(__pyx_v_self->__pyx___storage); __pyx_v_self->__pyx___storage = Py_None; - /* "dependency_injector/providers.pyx":1284 + /* "dependency_injector/providers.pyx":1289 * super(Singleton, self).__init__(provides, *args, **kwargs) * * def reset(self): # <<<<<<<<<<<<<< @@ -16909,7 +16956,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Singleton_2reset(str return __pyx_r; } -/* "dependency_injector/providers.pyx":1291 +/* "dependency_injector/providers.pyx":1296 * self.__storage = None * * cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<< @@ -16934,7 +16981,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_9Singleton__provide(st 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(1, 1291, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provide); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1296, __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_9Singleton_5_provide)) { __Pyx_XDECREF(__pyx_r); @@ -16954,7 +17001,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_9Singleton__provide(st #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(1, 1291, __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(1, 1296, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -16962,13 +17009,13 @@ static PyObject *__pyx_f_19dependency_injector_9providers_9Singleton__provide(st #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(1, 1291, __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(1, 1296, __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(1, 1291, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1296, __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; @@ -16979,7 +17026,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_9Singleton__provide(st __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(1, 1291, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1296, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -16992,7 +17039,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_9Singleton__provide(st __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - /* "dependency_injector/providers.pyx":1293 + /* "dependency_injector/providers.pyx":1298 * cpdef object _provide(self, tuple args, dict kwargs): * """Return single instance.""" * if self.__storage is None: # <<<<<<<<<<<<<< @@ -17003,7 +17050,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_9Singleton__provide(st __pyx_t_8 = (__pyx_t_7 != 0); if (__pyx_t_8) { - /* "dependency_injector/providers.pyx":1294 + /* "dependency_injector/providers.pyx":1299 * """Return single instance.""" * if self.__storage is None: * self.__storage = __factory_call(self.__instantiator, # <<<<<<<<<<<<<< @@ -17013,18 +17060,18 @@ static PyObject *__pyx_f_19dependency_injector_9providers_9Singleton__provide(st __pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx_base.__pyx___instantiator); __Pyx_INCREF(__pyx_t_1); - /* "dependency_injector/providers.pyx":1295 + /* "dependency_injector/providers.pyx":1300 * if self.__storage is None: * self.__storage = __factory_call(self.__instantiator, * args, kwargs) # <<<<<<<<<<<<<< * return self.__storage * */ - __pyx_t_2 = __pyx_f_19dependency_injector_9providers___factory_call(((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_t_1), __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1294, __pyx_L1_error) + __pyx_t_2 = __pyx_f_19dependency_injector_9providers___factory_call(((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_t_1), __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1299, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1294 + /* "dependency_injector/providers.pyx":1299 * """Return single instance.""" * if self.__storage is None: * self.__storage = __factory_call(self.__instantiator, # <<<<<<<<<<<<<< @@ -17037,7 +17084,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_9Singleton__provide(st __pyx_v_self->__pyx___storage = __pyx_t_2; __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":1293 + /* "dependency_injector/providers.pyx":1298 * cpdef object _provide(self, tuple args, dict kwargs): * """Return single instance.""" * if self.__storage is None: # <<<<<<<<<<<<<< @@ -17046,7 +17093,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_9Singleton__provide(st */ } - /* "dependency_injector/providers.pyx":1296 + /* "dependency_injector/providers.pyx":1301 * self.__storage = __factory_call(self.__instantiator, * args, kwargs) * return self.__storage # <<<<<<<<<<<<<< @@ -17058,7 +17105,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_9Singleton__provide(st __pyx_r = __pyx_v_self->__pyx___storage; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1291 + /* "dependency_injector/providers.pyx":1296 * self.__storage = None * * cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<< @@ -17110,11 +17157,11 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_9Singleton_5_provide( 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(1, 1291, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, 1); __PYX_ERR(1, 1296, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_provide") < 0)) __PYX_ERR(1, 1291, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_provide") < 0)) __PYX_ERR(1, 1296, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -17127,14 +17174,14 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_9Singleton_5_provide( } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1291, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1296, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.Singleton._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(1, 1291, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 1291, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(1, 1296, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 1296, __pyx_L1_error) __pyx_r = __pyx_pf_19dependency_injector_9providers_9Singleton_4_provide(((struct __pyx_obj_19dependency_injector_9providers_Singleton *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs); /* function exit code */ @@ -17152,7 +17199,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Singleton_4_provide( PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("_provide", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_9Singleton__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1291, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_9Singleton__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1296, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -17169,7 +17216,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Singleton_4_provide( return __pyx_r; } -/* "dependency_injector/providers.pyx":1329 +/* "dependency_injector/providers.pyx":1334 * """ * * def __init__(self, provides, *args, **kwargs): # <<<<<<<<<<<<<< @@ -17222,7 +17269,7 @@ static int __pyx_pw_19dependency_injector_9providers_19ThreadSafeSingleton_1__in } 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(1, 1329, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "__init__") < 0)) __PYX_ERR(1, 1334, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) < 1) { goto __pyx_L5_argtuple_error; @@ -17233,7 +17280,7 @@ static int __pyx_pw_19dependency_injector_9providers_19ThreadSafeSingleton_1__in } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1329, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1334, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0; __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; @@ -17258,7 +17305,7 @@ static int __pyx_pf_19dependency_injector_9providers_19ThreadSafeSingleton___ini PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__init__", 0); - /* "dependency_injector/providers.pyx":1341 + /* "dependency_injector/providers.pyx":1346 * :type kwargs: dict[str, object] * """ * self.__storage = None # <<<<<<<<<<<<<< @@ -17271,16 +17318,16 @@ static int __pyx_pf_19dependency_injector_9providers_19ThreadSafeSingleton___ini __Pyx_DECREF(__pyx_v_self->__pyx___storage); __pyx_v_self->__pyx___storage = Py_None; - /* "dependency_injector/providers.pyx":1342 + /* "dependency_injector/providers.pyx":1347 * """ * self.__storage = None * self.__storage_lock = self.__class__.storage_lock # <<<<<<<<<<<<<< * super(ThreadSafeSingleton, self).__init__(provides, *args, **kwargs) * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1342, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_storage_lock); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1342, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_storage_lock); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GIVEREF(__pyx_t_2); @@ -17289,14 +17336,14 @@ static int __pyx_pf_19dependency_injector_9providers_19ThreadSafeSingleton___ini __pyx_v_self->__pyx___storage_lock = __pyx_t_2; __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":1343 + /* "dependency_injector/providers.pyx":1348 * self.__storage = None * self.__storage_lock = self.__class__.storage_lock * super(ThreadSafeSingleton, self).__init__(provides, *args, **kwargs) # <<<<<<<<<<<<<< * * def reset(self): */ - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1343, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1348, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_ThreadSafeSingleton)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_ThreadSafeSingleton)); @@ -17304,27 +17351,27 @@ static int __pyx_pf_19dependency_injector_9providers_19ThreadSafeSingleton___ini __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self)); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1343, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1348, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1343, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1348, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1343, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1348, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_provides); __Pyx_GIVEREF(__pyx_v_provides); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_provides); - __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_v_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1343, __pyx_L1_error) + __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_v_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1348, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1343, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1348, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1329 + /* "dependency_injector/providers.pyx":1334 * """ * * def __init__(self, provides, *args, **kwargs): # <<<<<<<<<<<<<< @@ -17346,7 +17393,7 @@ static int __pyx_pf_19dependency_injector_9providers_19ThreadSafeSingleton___ini return __pyx_r; } -/* "dependency_injector/providers.pyx":1345 +/* "dependency_injector/providers.pyx":1350 * super(ThreadSafeSingleton, self).__init__(provides, *args, **kwargs) * * def reset(self): # <<<<<<<<<<<<<< @@ -17373,7 +17420,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ThreadSafeSingleton __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("reset", 0); - /* "dependency_injector/providers.pyx":1350 + /* "dependency_injector/providers.pyx":1355 * :rtype: None * """ * self.__storage = None # <<<<<<<<<<<<<< @@ -17386,7 +17433,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ThreadSafeSingleton __Pyx_DECREF(__pyx_v_self->__pyx___storage); __pyx_v_self->__pyx___storage = Py_None; - /* "dependency_injector/providers.pyx":1345 + /* "dependency_injector/providers.pyx":1350 * super(ThreadSafeSingleton, self).__init__(provides, *args, **kwargs) * * def reset(self): # <<<<<<<<<<<<<< @@ -17401,7 +17448,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ThreadSafeSingleton return __pyx_r; } -/* "dependency_injector/providers.pyx":1352 +/* "dependency_injector/providers.pyx":1357 * self.__storage = None * * cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<< @@ -17431,7 +17478,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton_ 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(1, 1352, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provide); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1357, __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_19ThreadSafeSingleton_5_provide)) { __Pyx_XDECREF(__pyx_r); @@ -17451,7 +17498,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton_ #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(1, 1352, __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(1, 1357, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -17459,13 +17506,13 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton_ #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(1, 1352, __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(1, 1357, __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(1, 1352, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1357, __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; @@ -17476,7 +17523,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton_ __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(1, 1352, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1357, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -17489,7 +17536,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton_ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - /* "dependency_injector/providers.pyx":1354 + /* "dependency_injector/providers.pyx":1359 * cpdef object _provide(self, tuple args, dict kwargs): * """Return single instance.""" * with self.__storage_lock: # <<<<<<<<<<<<<< @@ -17497,9 +17544,9 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton_ * self.__storage = __factory_call(self.__instantiator, */ /*with:*/ { - __pyx_t_7 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx___storage_lock, __pyx_n_s_exit); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1354, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx___storage_lock, __pyx_n_s_exit); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1359, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx___storage_lock, __pyx_n_s_enter); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1354, __pyx_L3_error) + __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx___storage_lock, __pyx_n_s_enter); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1359, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -17512,10 +17559,10 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton_ } } if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1354, __pyx_L3_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1359, __pyx_L3_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(1, 1354, __pyx_L3_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1359, __pyx_L3_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -17530,7 +17577,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton_ __Pyx_XGOTREF(__pyx_t_10); /*try:*/ { - /* "dependency_injector/providers.pyx":1355 + /* "dependency_injector/providers.pyx":1360 * """Return single instance.""" * with self.__storage_lock: * if self.__storage is None: # <<<<<<<<<<<<<< @@ -17541,7 +17588,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton_ __pyx_t_12 = (__pyx_t_11 != 0); if (__pyx_t_12) { - /* "dependency_injector/providers.pyx":1356 + /* "dependency_injector/providers.pyx":1361 * with self.__storage_lock: * if self.__storage is None: * self.__storage = __factory_call(self.__instantiator, # <<<<<<<<<<<<<< @@ -17551,18 +17598,18 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton_ __pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx_base.__pyx___instantiator); __Pyx_INCREF(__pyx_t_1); - /* "dependency_injector/providers.pyx":1357 + /* "dependency_injector/providers.pyx":1362 * if self.__storage is None: * self.__storage = __factory_call(self.__instantiator, * args, kwargs) # <<<<<<<<<<<<<< * return self.__storage * */ - __pyx_t_2 = __pyx_f_19dependency_injector_9providers___factory_call(((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_t_1), __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1356, __pyx_L7_error) + __pyx_t_2 = __pyx_f_19dependency_injector_9providers___factory_call(((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_t_1), __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1361, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1356 + /* "dependency_injector/providers.pyx":1361 * with self.__storage_lock: * if self.__storage is None: * self.__storage = __factory_call(self.__instantiator, # <<<<<<<<<<<<<< @@ -17575,7 +17622,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton_ __pyx_v_self->__pyx___storage = __pyx_t_2; __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":1355 + /* "dependency_injector/providers.pyx":1360 * """Return single instance.""" * with self.__storage_lock: * if self.__storage is None: # <<<<<<<<<<<<<< @@ -17584,7 +17631,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton_ */ } - /* "dependency_injector/providers.pyx":1354 + /* "dependency_injector/providers.pyx":1359 * cpdef object _provide(self, tuple args, dict kwargs): * """Return single instance.""" * with self.__storage_lock: # <<<<<<<<<<<<<< @@ -17605,20 +17652,20 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton_ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; /*except:*/ { __Pyx_AddTraceback("dependency_injector.providers.ThreadSafeSingleton._provide", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_1, &__pyx_t_3) < 0) __PYX_ERR(1, 1354, __pyx_L9_except_error) + if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_1, &__pyx_t_3) < 0) __PYX_ERR(1, 1359, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = PyTuple_Pack(3, __pyx_t_2, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1354, __pyx_L9_except_error) + __pyx_t_6 = PyTuple_Pack(3, __pyx_t_2, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1359, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_6, NULL); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 1354, __pyx_L9_except_error) + if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 1359, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_13); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - if (__pyx_t_12 < 0) __PYX_ERR(1, 1354, __pyx_L9_except_error) + if (__pyx_t_12 < 0) __PYX_ERR(1, 1359, __pyx_L9_except_error) __pyx_t_11 = ((!(__pyx_t_12 != 0)) != 0); if (__pyx_t_11) { __Pyx_GIVEREF(__pyx_t_2); @@ -17626,7 +17673,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton_ __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ErrRestoreWithState(__pyx_t_2, __pyx_t_1, __pyx_t_3); __pyx_t_2 = 0; __pyx_t_1 = 0; __pyx_t_3 = 0; - __PYX_ERR(1, 1354, __pyx_L9_except_error) + __PYX_ERR(1, 1359, __pyx_L9_except_error) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -17654,7 +17701,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton_ if (__pyx_t_7) { __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__12, NULL); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1354, __pyx_L1_error) + if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1359, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } @@ -17669,7 +17716,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton_ __pyx_L19:; } - /* "dependency_injector/providers.pyx":1358 + /* "dependency_injector/providers.pyx":1363 * self.__storage = __factory_call(self.__instantiator, * args, kwargs) * return self.__storage # <<<<<<<<<<<<<< @@ -17681,7 +17728,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton_ __pyx_r = __pyx_v_self->__pyx___storage; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1352 + /* "dependency_injector/providers.pyx":1357 * self.__storage = None * * cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<< @@ -17733,11 +17780,11 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_19ThreadSafeSingleton 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(1, 1352, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, 1); __PYX_ERR(1, 1357, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_provide") < 0)) __PYX_ERR(1, 1352, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_provide") < 0)) __PYX_ERR(1, 1357, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -17750,14 +17797,14 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_19ThreadSafeSingleton } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1352, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1357, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.ThreadSafeSingleton._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(1, 1352, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 1352, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(1, 1357, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 1357, __pyx_L1_error) __pyx_r = __pyx_pf_19dependency_injector_9providers_19ThreadSafeSingleton_4_provide(((struct __pyx_obj_19dependency_injector_9providers_ThreadSafeSingleton *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs); /* function exit code */ @@ -17775,7 +17822,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ThreadSafeSingleton PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("_provide", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1352, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1357, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -17792,7 +17839,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ThreadSafeSingleton return __pyx_r; } -/* "dependency_injector/providers.pyx":1400 +/* "dependency_injector/providers.pyx":1405 * """ * * def __init__(self, provides, *args, **kwargs): # <<<<<<<<<<<<<< @@ -17845,7 +17892,7 @@ static int __pyx_pw_19dependency_injector_9providers_20ThreadLocalSingleton_1__i } 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(1, 1400, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "__init__") < 0)) __PYX_ERR(1, 1405, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) < 1) { goto __pyx_L5_argtuple_error; @@ -17856,7 +17903,7 @@ static int __pyx_pw_19dependency_injector_9providers_20ThreadLocalSingleton_1__i } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1400, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1405, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0; __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; @@ -17881,16 +17928,16 @@ static int __pyx_pf_19dependency_injector_9providers_20ThreadLocalSingleton___in PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__init__", 0); - /* "dependency_injector/providers.pyx":1412 + /* "dependency_injector/providers.pyx":1417 * :type kwargs: dict[str, object] * """ * self.__storage = threading.local() # <<<<<<<<<<<<<< * super(ThreadLocalSingleton, self).__init__(provides, *args, **kwargs) * */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_threading); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1412, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_threading); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1417, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_local); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1412, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_local); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1417, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -17904,10 +17951,10 @@ static int __pyx_pf_19dependency_injector_9providers_20ThreadLocalSingleton___in } } if (__pyx_t_2) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1412, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1417, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1412, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1417, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -17917,14 +17964,14 @@ static int __pyx_pf_19dependency_injector_9providers_20ThreadLocalSingleton___in __pyx_v_self->__pyx___storage = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1413 + /* "dependency_injector/providers.pyx":1418 * """ * self.__storage = threading.local() * super(ThreadLocalSingleton, self).__init__(provides, *args, **kwargs) # <<<<<<<<<<<<<< * * def reset(self): */ - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1413, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1418, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_ThreadLocalSingleton)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_ThreadLocalSingleton)); @@ -17932,27 +17979,27 @@ static int __pyx_pf_19dependency_injector_9providers_20ThreadLocalSingleton___in __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self)); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1413, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1418, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1413, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1418, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1413, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1418, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_provides); __Pyx_GIVEREF(__pyx_v_provides); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_provides); - __pyx_t_2 = PyNumber_Add(__pyx_t_3, __pyx_v_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1413, __pyx_L1_error) + __pyx_t_2 = PyNumber_Add(__pyx_t_3, __pyx_v_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1418, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1413, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1418, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/providers.pyx":1400 + /* "dependency_injector/providers.pyx":1405 * """ * * def __init__(self, provides, *args, **kwargs): # <<<<<<<<<<<<<< @@ -17974,7 +18021,7 @@ static int __pyx_pf_19dependency_injector_9providers_20ThreadLocalSingleton___in return __pyx_r; } -/* "dependency_injector/providers.pyx":1415 +/* "dependency_injector/providers.pyx":1420 * super(ThreadLocalSingleton, self).__init__(provides, *args, **kwargs) * * def reset(self): # <<<<<<<<<<<<<< @@ -18001,16 +18048,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_20ThreadLocalSingleto __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("reset", 0); - /* "dependency_injector/providers.pyx":1420 + /* "dependency_injector/providers.pyx":1425 * :rtype: None * """ * self.__storage.instance = None # <<<<<<<<<<<<<< * * cpdef object _provide(self, tuple args, dict kwargs): */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self->__pyx___storage, __pyx_n_s_instance, Py_None) < 0) __PYX_ERR(1, 1420, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self->__pyx___storage, __pyx_n_s_instance, Py_None) < 0) __PYX_ERR(1, 1425, __pyx_L1_error) - /* "dependency_injector/providers.pyx":1415 + /* "dependency_injector/providers.pyx":1420 * super(ThreadLocalSingleton, self).__init__(provides, *args, **kwargs) * * def reset(self): # <<<<<<<<<<<<<< @@ -18030,7 +18077,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_20ThreadLocalSingleto return __pyx_r; } -/* "dependency_injector/providers.pyx":1422 +/* "dependency_injector/providers.pyx":1427 * self.__storage.instance = None * * cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<< @@ -18060,7 +18107,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_20ThreadLocalSingleton 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(1, 1422, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provide); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1427, __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_20ThreadLocalSingleton_5_provide)) { __Pyx_XDECREF(__pyx_r); @@ -18080,7 +18127,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_20ThreadLocalSingleton #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(1, 1422, __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(1, 1427, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -18088,13 +18135,13 @@ static PyObject *__pyx_f_19dependency_injector_9providers_20ThreadLocalSingleton #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(1, 1422, __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(1, 1427, __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(1, 1422, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1427, __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; @@ -18105,7 +18152,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_20ThreadLocalSingleton __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(1, 1422, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1427, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -18118,7 +18165,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_20ThreadLocalSingleton __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - /* "dependency_injector/providers.pyx":1426 + /* "dependency_injector/providers.pyx":1431 * cdef object instance * * try: # <<<<<<<<<<<<<< @@ -18135,19 +18182,19 @@ static PyObject *__pyx_f_19dependency_injector_9providers_20ThreadLocalSingleton __Pyx_XGOTREF(__pyx_t_9); /*try:*/ { - /* "dependency_injector/providers.pyx":1427 + /* "dependency_injector/providers.pyx":1432 * * try: * instance = self.__storage.instance # <<<<<<<<<<<<<< * except AttributeError: * 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(1, 1427, __pyx_L6_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx___storage, __pyx_n_s_instance); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1432, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_instance = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1426 + /* "dependency_injector/providers.pyx":1431 * cdef object instance * * try: # <<<<<<<<<<<<<< @@ -18167,7 +18214,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_20ThreadLocalSingleton __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1428 + /* "dependency_injector/providers.pyx":1433 * try: * instance = self.__storage.instance * except AttributeError: # <<<<<<<<<<<<<< @@ -18177,12 +18224,12 @@ static PyObject *__pyx_f_19dependency_injector_9providers_20ThreadLocalSingleton __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError); if (__pyx_t_5) { __Pyx_AddTraceback("dependency_injector.providers.ThreadLocalSingleton._provide", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3) < 0) __PYX_ERR(1, 1428, __pyx_L8_except_error) + if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3) < 0) __PYX_ERR(1, 1433, __pyx_L8_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_3); - /* "dependency_injector/providers.pyx":1429 + /* "dependency_injector/providers.pyx":1434 * instance = self.__storage.instance * except AttributeError: * instance = __factory_call(self.__instantiator, args, kwargs) # <<<<<<<<<<<<<< @@ -18191,20 +18238,20 @@ static PyObject *__pyx_f_19dependency_injector_9providers_20ThreadLocalSingleton */ __pyx_t_6 = ((PyObject *)__pyx_v_self->__pyx_base.__pyx___instantiator); __Pyx_INCREF(__pyx_t_6); - __pyx_t_4 = __pyx_f_19dependency_injector_9providers___factory_call(((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_t_6), __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1429, __pyx_L8_except_error) + __pyx_t_4 = __pyx_f_19dependency_injector_9providers___factory_call(((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_t_6), __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1434, __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); __pyx_t_4 = 0; - /* "dependency_injector/providers.pyx":1430 + /* "dependency_injector/providers.pyx":1435 * except AttributeError: * instance = __factory_call(self.__instantiator, args, kwargs) * self.__storage.instance = instance # <<<<<<<<<<<<<< * finally: * return instance */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self->__pyx___storage, __pyx_n_s_instance, __pyx_v_instance) < 0) __PYX_ERR(1, 1430, __pyx_L8_except_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self->__pyx___storage, __pyx_n_s_instance, __pyx_v_instance) < 0) __PYX_ERR(1, 1435, __pyx_L8_except_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -18213,7 +18260,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_20ThreadLocalSingleton goto __pyx_L8_except_error; __pyx_L8_except_error:; - /* "dependency_injector/providers.pyx":1426 + /* "dependency_injector/providers.pyx":1431 * cdef object instance * * try: # <<<<<<<<<<<<<< @@ -18236,7 +18283,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_20ThreadLocalSingleton } } - /* "dependency_injector/providers.pyx":1432 + /* "dependency_injector/providers.pyx":1437 * self.__storage.instance = instance * finally: * return instance # <<<<<<<<<<<<<< @@ -18270,7 +18317,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_20ThreadLocalSingleton __Pyx_XGOTREF(__pyx_t_12); { __Pyx_XDECREF(__pyx_r); - if (unlikely(!__pyx_v_instance)) { __Pyx_RaiseUnboundLocalError("instance"); __PYX_ERR(1, 1432, __pyx_L17_error) } + if (unlikely(!__pyx_v_instance)) { __Pyx_RaiseUnboundLocalError("instance"); __PYX_ERR(1, 1437, __pyx_L17_error) } __Pyx_INCREF(__pyx_v_instance); __pyx_r = __pyx_v_instance; goto __pyx_L16_return; @@ -18304,7 +18351,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_20ThreadLocalSingleton } } - /* "dependency_injector/providers.pyx":1422 + /* "dependency_injector/providers.pyx":1427 * self.__storage.instance = None * * cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<< @@ -18357,11 +18404,11 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_20ThreadLocalSingleto 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(1, 1422, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, 1); __PYX_ERR(1, 1427, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_provide") < 0)) __PYX_ERR(1, 1422, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_provide") < 0)) __PYX_ERR(1, 1427, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -18374,14 +18421,14 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_20ThreadLocalSingleto } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1422, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1427, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.ThreadLocalSingleton._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(1, 1422, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 1422, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(1, 1427, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 1427, __pyx_L1_error) __pyx_r = __pyx_pf_19dependency_injector_9providers_20ThreadLocalSingleton_4_provide(((struct __pyx_obj_19dependency_injector_9providers_ThreadLocalSingleton *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs); /* function exit code */ @@ -18399,7 +18446,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_20ThreadLocalSingleto PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("_provide", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_20ThreadLocalSingleton__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1422, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_20ThreadLocalSingleton__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1427, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -18416,7 +18463,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_20ThreadLocalSingleto return __pyx_r; } -/* "dependency_injector/providers.pyx":1466 +/* "dependency_injector/providers.pyx":1471 * """ * * def __call__(self, *args, **kwargs): # <<<<<<<<<<<<<< @@ -18463,7 +18510,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton__ PyObject *__pyx_t_8 = NULL; __Pyx_RefNannySetupContext("__call__", 0); - /* "dependency_injector/providers.pyx":1471 + /* "dependency_injector/providers.pyx":1476 * Callable interface implementation. * """ * if self.__last_overriding is None: # <<<<<<<<<<<<<< @@ -18474,16 +18521,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton__ __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "dependency_injector/providers.pyx":1472 + /* "dependency_injector/providers.pyx":1477 * """ * if self.__last_overriding is None: * raise Error('{0} must be overridden before calling'.format(self)) # <<<<<<<<<<<<<< * return self.__last_overriding._provide(args, kwargs) * */ - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1472, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1477, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_must_be_overridden_before_cal, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1472, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_must_be_overridden_before_cal, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1477, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { @@ -18496,13 +18543,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton__ } } if (!__pyx_t_7) { - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_6, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1472, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_6, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1477, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[2] = {__pyx_t_7, ((PyObject *)__pyx_v_self)}; - __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1472, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1477, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_5); } else @@ -18510,19 +18557,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton__ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[2] = {__pyx_t_7, ((PyObject *)__pyx_v_self)}; - __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1472, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1477, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_5); } else #endif { - __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1472, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1477, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL; __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_8, 0+1, ((PyObject *)__pyx_v_self)); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1472, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1477, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } @@ -18539,14 +18586,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton__ } } if (!__pyx_t_6) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1472, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1477, __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(1, 1472, __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(1, 1477, __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; @@ -18555,20 +18602,20 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton__ #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(1, 1472, __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(1, 1477, __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(1, 1472, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1477, __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(1, 1472, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1477, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } @@ -18576,9 +18623,9 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton__ __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(1, 1472, __pyx_L1_error) + __PYX_ERR(1, 1477, __pyx_L1_error) - /* "dependency_injector/providers.pyx":1471 + /* "dependency_injector/providers.pyx":1476 * Callable interface implementation. * """ * if self.__last_overriding is None: # <<<<<<<<<<<<<< @@ -18587,7 +18634,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton__ */ } - /* "dependency_injector/providers.pyx":1473 + /* "dependency_injector/providers.pyx":1478 * if self.__last_overriding is None: * raise Error('{0} must be overridden before calling'.format(self)) * return self.__last_overriding._provide(args, kwargs) # <<<<<<<<<<<<<< @@ -18595,13 +18642,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton__ * def override(self, provider): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = ((struct __pyx_vtabstruct_19dependency_injector_9providers_Provider *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding->__pyx_vtab)->_provide(__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding, __pyx_v_args, __pyx_v_kwargs, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1473, __pyx_L1_error) + __pyx_t_3 = ((struct __pyx_vtabstruct_19dependency_injector_9providers_Provider *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding->__pyx_vtab)->_provide(__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding, __pyx_v_args, __pyx_v_kwargs, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1478, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1466 + /* "dependency_injector/providers.pyx":1471 * """ * * def __call__(self, *args, **kwargs): # <<<<<<<<<<<<<< @@ -18625,7 +18672,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton__ return __pyx_r; } -/* "dependency_injector/providers.pyx":1475 +/* "dependency_injector/providers.pyx":1480 * return self.__last_overriding._provide(args, kwargs) * * def override(self, provider): # <<<<<<<<<<<<<< @@ -18661,7 +18708,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_2 PyObject *__pyx_t_9 = NULL; __Pyx_RefNannySetupContext("override", 0); - /* "dependency_injector/providers.pyx":1486 + /* "dependency_injector/providers.pyx":1491 * :rtype: :py:class:`OverridingContext` * """ * if not isinstance(provider, BaseSingleton): # <<<<<<<<<<<<<< @@ -18672,24 +18719,24 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_2 __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); if (__pyx_t_2) { - /* "dependency_injector/providers.pyx":1487 + /* "dependency_injector/providers.pyx":1492 * """ * if not isinstance(provider, BaseSingleton): * raise Error('{0} must be overridden only by ' # <<<<<<<<<<<<<< * '{1} providers'.format(self, BaseSingleton)) * return super(AbstractSingleton, self).override(provider) */ - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1487, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1492, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - /* "dependency_injector/providers.pyx":1488 + /* "dependency_injector/providers.pyx":1493 * if not isinstance(provider, BaseSingleton): * raise Error('{0} must be overridden only by ' * '{1} providers'.format(self, BaseSingleton)) # <<<<<<<<<<<<<< * return super(AbstractSingleton, self).override(provider) * */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_must_be_overridden_only_by_1, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1488, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_must_be_overridden_only_by_1, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1493, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; __pyx_t_8 = 0; @@ -18706,7 +18753,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_2 #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_7, ((PyObject *)__pyx_v_self), ((PyObject *)__pyx_ptype_19dependency_injector_9providers_BaseSingleton)}; - __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1488, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1493, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_5); } else @@ -18714,13 +18761,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_2 #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_7, ((PyObject *)__pyx_v_self), ((PyObject *)__pyx_ptype_19dependency_injector_9providers_BaseSingleton)}; - __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1488, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1493, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_5); } else #endif { - __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1488, __pyx_L1_error) + __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1493, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; @@ -18731,7 +18778,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_2 __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_BaseSingleton)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_BaseSingleton)); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_BaseSingleton)); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1488, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1493, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } @@ -18747,14 +18794,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_2 } } if (!__pyx_t_6) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1487, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1492, __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(1, 1487, __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(1, 1492, __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; @@ -18763,20 +18810,20 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_2 #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(1, 1487, __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(1, 1492, __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_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1487, __pyx_L1_error) + __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1492, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6); __pyx_t_6 = NULL; __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_5); __pyx_t_5 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1487, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1492, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } @@ -18784,9 +18831,9 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_2 __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(1, 1487, __pyx_L1_error) + __PYX_ERR(1, 1492, __pyx_L1_error) - /* "dependency_injector/providers.pyx":1486 + /* "dependency_injector/providers.pyx":1491 * :rtype: :py:class:`OverridingContext` * """ * if not isinstance(provider, BaseSingleton): # <<<<<<<<<<<<<< @@ -18795,7 +18842,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_2 */ } - /* "dependency_injector/providers.pyx":1489 + /* "dependency_injector/providers.pyx":1494 * raise Error('{0} must be overridden only by ' * '{1} providers'.format(self, BaseSingleton)) * return super(AbstractSingleton, self).override(provider) # <<<<<<<<<<<<<< @@ -18803,7 +18850,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_2 * def reset(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1489, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1494, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_AbstractSingleton)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_AbstractSingleton)); @@ -18811,10 +18858,10 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_2 __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_9 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_4, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1489, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_4, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1494, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_override); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1489, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_override); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1494, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = NULL; @@ -18828,13 +18875,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_2 } } if (!__pyx_t_9) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_provider); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1489, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_provider); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1494, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_v_provider}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1489, __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(1, 1494, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_3); } else @@ -18842,19 +18889,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_2 #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_v_provider}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1489, __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(1, 1494, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { - __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1489, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1494, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_9); __pyx_t_9 = NULL; __Pyx_INCREF(__pyx_v_provider); __Pyx_GIVEREF(__pyx_v_provider); PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_provider); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1489, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1494, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } @@ -18864,7 +18911,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_2 __pyx_t_3 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1475 + /* "dependency_injector/providers.pyx":1480 * return self.__last_overriding._provide(args, kwargs) * * def override(self, provider): # <<<<<<<<<<<<<< @@ -18888,7 +18935,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_2 return __pyx_r; } -/* "dependency_injector/providers.pyx":1491 +/* "dependency_injector/providers.pyx":1496 * return super(AbstractSingleton, self).override(provider) * * def reset(self): # <<<<<<<<<<<<<< @@ -18923,7 +18970,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_4 PyObject *__pyx_t_8 = NULL; __Pyx_RefNannySetupContext("reset", 0); - /* "dependency_injector/providers.pyx":1496 + /* "dependency_injector/providers.pyx":1501 * :rtype: None * """ * if self.__last_overriding is None: # <<<<<<<<<<<<<< @@ -18934,16 +18981,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_4 __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "dependency_injector/providers.pyx":1497 + /* "dependency_injector/providers.pyx":1502 * """ * if self.__last_overriding is None: * raise Error('{0} must be overridden before calling'.format(self)) # <<<<<<<<<<<<<< * return self.__last_overriding.reset() * */ - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1497, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1502, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_must_be_overridden_before_cal, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1497, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_must_be_overridden_before_cal, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1502, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { @@ -18956,13 +19003,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_4 } } if (!__pyx_t_7) { - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_6, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1497, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_6, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1502, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[2] = {__pyx_t_7, ((PyObject *)__pyx_v_self)}; - __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1497, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1502, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_5); } else @@ -18970,19 +19017,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_4 #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[2] = {__pyx_t_7, ((PyObject *)__pyx_v_self)}; - __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1497, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1502, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_5); } else #endif { - __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1497, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1502, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL; __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_8, 0+1, ((PyObject *)__pyx_v_self)); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1497, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1502, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } @@ -18999,14 +19046,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_4 } } if (!__pyx_t_6) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1497, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1502, __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(1, 1497, __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(1, 1502, __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; @@ -19015,20 +19062,20 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_4 #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(1, 1497, __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(1, 1502, __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(1, 1497, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1502, __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(1, 1497, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1502, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } @@ -19036,9 +19083,9 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_4 __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(1, 1497, __pyx_L1_error) + __PYX_ERR(1, 1502, __pyx_L1_error) - /* "dependency_injector/providers.pyx":1496 + /* "dependency_injector/providers.pyx":1501 * :rtype: None * """ * if self.__last_overriding is None: # <<<<<<<<<<<<<< @@ -19047,7 +19094,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_4 */ } - /* "dependency_injector/providers.pyx":1498 + /* "dependency_injector/providers.pyx":1503 * if self.__last_overriding is None: * raise Error('{0} must be overridden before calling'.format(self)) * return self.__last_overriding.reset() # <<<<<<<<<<<<<< @@ -19055,7 +19102,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_4 * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding), __pyx_n_s_reset); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1498, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding), __pyx_n_s_reset); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1503, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -19068,10 +19115,10 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_4 } } if (__pyx_t_8) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1498, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1503, __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(1, 1498, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1503, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -19079,7 +19126,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_4 __pyx_t_3 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1491 + /* "dependency_injector/providers.pyx":1496 * return super(AbstractSingleton, self).override(provider) * * def reset(self): # <<<<<<<<<<<<<< @@ -19103,7 +19150,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_4 return __pyx_r; } -/* "dependency_injector/providers.pyx":1508 +/* "dependency_injector/providers.pyx":1513 * """Positional injection class.""" * * def __init__(self, value): # <<<<<<<<<<<<<< @@ -19140,7 +19187,7 @@ static int __pyx_pw_19dependency_injector_9providers_19PositionalInjection_1__in else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 1508, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 1513, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -19151,7 +19198,7 @@ static int __pyx_pw_19dependency_injector_9providers_19PositionalInjection_1__in } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1508, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1513, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.PositionalInjection.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -19174,7 +19221,7 @@ static int __pyx_pf_19dependency_injector_9providers_19PositionalInjection___ini PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("__init__", 0); - /* "dependency_injector/providers.pyx":1510 + /* "dependency_injector/providers.pyx":1515 * def __init__(self, value): * """Initializer.""" * self.__value = value # <<<<<<<<<<<<<< @@ -19187,7 +19234,7 @@ static int __pyx_pf_19dependency_injector_9providers_19PositionalInjection___ini __Pyx_DECREF(__pyx_v_self->__pyx_base.__pyx___value); __pyx_v_self->__pyx_base.__pyx___value = __pyx_v_value; - /* "dependency_injector/providers.pyx":1511 + /* "dependency_injector/providers.pyx":1516 * """Initializer.""" * self.__value = value * self.__is_provider = is_provider(value) # <<<<<<<<<<<<<< @@ -19196,7 +19243,7 @@ static int __pyx_pf_19dependency_injector_9providers_19PositionalInjection___ini */ __pyx_v_self->__pyx_base.__pyx___is_provider = ((int)__pyx_f_19dependency_injector_9providers_is_provider(__pyx_v_value, 0)); - /* "dependency_injector/providers.pyx":1512 + /* "dependency_injector/providers.pyx":1517 * self.__value = value * self.__is_provider = is_provider(value) * self.__is_delegated = is_delegated(value) # <<<<<<<<<<<<<< @@ -19205,7 +19252,7 @@ static int __pyx_pf_19dependency_injector_9providers_19PositionalInjection___ini */ __pyx_v_self->__pyx_base.__pyx___is_delegated = ((int)__pyx_f_19dependency_injector_9providers_is_delegated(__pyx_v_value, 0)); - /* "dependency_injector/providers.pyx":1513 + /* "dependency_injector/providers.pyx":1518 * self.__is_provider = is_provider(value) * self.__is_delegated = is_delegated(value) * self.__call = (self.__is_provider == 1 and # <<<<<<<<<<<<<< @@ -19219,7 +19266,7 @@ static int __pyx_pf_19dependency_injector_9providers_19PositionalInjection___ini goto __pyx_L3_bool_binop_done; } - /* "dependency_injector/providers.pyx":1514 + /* "dependency_injector/providers.pyx":1519 * self.__is_delegated = is_delegated(value) * self.__call = (self.__is_provider == 1 and * self.__is_delegated == 0) # <<<<<<<<<<<<<< @@ -19230,7 +19277,7 @@ static int __pyx_pf_19dependency_injector_9providers_19PositionalInjection___ini __pyx_t_1 = __pyx_t_2; __pyx_L3_bool_binop_done:; - /* "dependency_injector/providers.pyx":1513 + /* "dependency_injector/providers.pyx":1518 * self.__is_provider = is_provider(value) * self.__is_delegated = is_delegated(value) * self.__call = (self.__is_provider == 1 and # <<<<<<<<<<<<<< @@ -19239,14 +19286,14 @@ static int __pyx_pf_19dependency_injector_9providers_19PositionalInjection___ini */ __pyx_v_self->__pyx_base.__pyx___call = ((int)__pyx_t_1); - /* "dependency_injector/providers.pyx":1515 + /* "dependency_injector/providers.pyx":1520 * self.__call = (self.__is_provider == 1 and * self.__is_delegated == 0) * super(PositionalInjection, self).__init__() # <<<<<<<<<<<<<< * * def __deepcopy__(self, memo): */ - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1515, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1520, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_PositionalInjection)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_PositionalInjection)); @@ -19254,10 +19301,10 @@ static int __pyx_pf_19dependency_injector_9providers_19PositionalInjection___ini __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_5 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1515, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1520, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_init); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1515, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_init); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1520, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -19271,16 +19318,16 @@ static int __pyx_pf_19dependency_injector_9providers_19PositionalInjection___ini } } if (__pyx_t_5) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1515, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1520, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { - __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1515, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1520, __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.pyx":1508 + /* "dependency_injector/providers.pyx":1513 * """Positional injection class.""" * * def __init__(self, value): # <<<<<<<<<<<<<< @@ -19302,7 +19349,7 @@ static int __pyx_pf_19dependency_injector_9providers_19PositionalInjection___ini return __pyx_r; } -/* "dependency_injector/providers.pyx":1517 +/* "dependency_injector/providers.pyx":1522 * super(PositionalInjection, self).__init__() * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< @@ -19338,21 +19385,21 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19PositionalInjection struct __pyx_opt_args_19dependency_injector_9providers_deepcopy __pyx_t_8; __Pyx_RefNannySetupContext("__deepcopy__", 0); - /* "dependency_injector/providers.pyx":1519 + /* "dependency_injector/providers.pyx":1524 * 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(1, 1519, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_memo, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1524, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1519, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1524, __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(1, 1519, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_id, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1524, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -19366,14 +19413,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19PositionalInjection } } if (!__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1519, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1524, __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(1, 1519, __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(1, 1524, __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; @@ -19382,20 +19429,20 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19PositionalInjection #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(1, 1519, __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(1, 1524, __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(1, 1519, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1524, __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(1, 1519, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1524, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } @@ -19404,7 +19451,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19PositionalInjection __pyx_v_copied = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1520 + /* "dependency_injector/providers.pyx":1525 * """Create and return full copy of provider.""" * copied = memo.get(id(self)) * if copied is not None: # <<<<<<<<<<<<<< @@ -19415,7 +19462,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19PositionalInjection __pyx_t_7 = (__pyx_t_6 != 0); if (__pyx_t_7) { - /* "dependency_injector/providers.pyx":1521 + /* "dependency_injector/providers.pyx":1526 * copied = memo.get(id(self)) * if copied is not None: * return copied # <<<<<<<<<<<<<< @@ -19427,7 +19474,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19PositionalInjection __pyx_r = __pyx_v_copied; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1520 + /* "dependency_injector/providers.pyx":1525 * """Create and return full copy of provider.""" * copied = memo.get(id(self)) * if copied is not None: # <<<<<<<<<<<<<< @@ -19436,7 +19483,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19PositionalInjection */ } - /* "dependency_injector/providers.pyx":1522 + /* "dependency_injector/providers.pyx":1527 * if copied is not None: * return copied * return self.__class__(deepcopy(self.__value, memo)) # <<<<<<<<<<<<<< @@ -19444,14 +19491,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19PositionalInjection * def get_value(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1522, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1527, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __pyx_v_self->__pyx_base.__pyx___value; __Pyx_INCREF(__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(1, 1522, __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(1, 1527, __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_deepcopy(__pyx_t_5, 0, &__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1522, __pyx_L1_error) + __pyx_t_4 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_5, 0, &__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1527, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -19465,14 +19512,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19PositionalInjection } } if (!__pyx_t_5) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1522, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1527, __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_5, __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(1, 1522, __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(1, 1527, __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; @@ -19481,20 +19528,20 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19PositionalInjection #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __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(1, 1522, __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(1, 1527, __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_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1522, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1527, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); __pyx_t_5 = NULL; __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_t_4); __pyx_t_4 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1522, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1527, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } @@ -19504,7 +19551,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19PositionalInjection __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1517 + /* "dependency_injector/providers.pyx":1522 * super(PositionalInjection, self).__init__() * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< @@ -19528,7 +19575,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19PositionalInjection return __pyx_r; } -/* "dependency_injector/providers.pyx":1524 +/* "dependency_injector/providers.pyx":1529 * return self.__class__(deepcopy(self.__value, memo)) * * def get_value(self): # <<<<<<<<<<<<<< @@ -19556,7 +19603,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19PositionalInjection PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("get_value", 0); - /* "dependency_injector/providers.pyx":1526 + /* "dependency_injector/providers.pyx":1531 * def get_value(self): * """Return injection value.""" * return __get_value(self) # <<<<<<<<<<<<<< @@ -19564,13 +19611,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19PositionalInjection * def get_original_value(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_19dependency_injector_9providers___get_value(((struct __pyx_obj_19dependency_injector_9providers_Injection *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1526, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers___get_value(((struct __pyx_obj_19dependency_injector_9providers_Injection *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1531, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1524 + /* "dependency_injector/providers.pyx":1529 * return self.__class__(deepcopy(self.__value, memo)) * * def get_value(self): # <<<<<<<<<<<<<< @@ -19589,7 +19636,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19PositionalInjection return __pyx_r; } -/* "dependency_injector/providers.pyx":1528 +/* "dependency_injector/providers.pyx":1533 * return __get_value(self) * * def get_original_value(self): # <<<<<<<<<<<<<< @@ -19616,7 +19663,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19PositionalInjection __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_original_value", 0); - /* "dependency_injector/providers.pyx":1530 + /* "dependency_injector/providers.pyx":1535 * def get_original_value(self): * """Return original value.""" * return self.__value # <<<<<<<<<<<<<< @@ -19628,7 +19675,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19PositionalInjection __pyx_r = __pyx_v_self->__pyx_base.__pyx___value; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1528 + /* "dependency_injector/providers.pyx":1533 * return __get_value(self) * * def get_original_value(self): # <<<<<<<<<<<<<< @@ -19643,7 +19690,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19PositionalInjection return __pyx_r; } -/* "dependency_injector/providers.pyx":1536 +/* "dependency_injector/providers.pyx":1541 * """Keyword injection class.""" * * def __init__(self, name, value): # <<<<<<<<<<<<<< @@ -19683,11 +19730,11 @@ static int __pyx_pw_19dependency_injector_9providers_14NamedInjection_1__init__( case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(1, 1536, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(1, 1541, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 1536, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 1541, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -19700,7 +19747,7 @@ static int __pyx_pw_19dependency_injector_9providers_14NamedInjection_1__init__( } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1536, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1541, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.NamedInjection.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -19723,7 +19770,7 @@ static int __pyx_pf_19dependency_injector_9providers_14NamedInjection___init__(s PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("__init__", 0); - /* "dependency_injector/providers.pyx":1538 + /* "dependency_injector/providers.pyx":1543 * def __init__(self, name, value): * """Initializer.""" * self.__name = name # <<<<<<<<<<<<<< @@ -19736,7 +19783,7 @@ static int __pyx_pf_19dependency_injector_9providers_14NamedInjection___init__(s __Pyx_DECREF(__pyx_v_self->__pyx___name); __pyx_v_self->__pyx___name = __pyx_v_name; - /* "dependency_injector/providers.pyx":1539 + /* "dependency_injector/providers.pyx":1544 * """Initializer.""" * self.__name = name * self.__value = value # <<<<<<<<<<<<<< @@ -19749,7 +19796,7 @@ static int __pyx_pf_19dependency_injector_9providers_14NamedInjection___init__(s __Pyx_DECREF(__pyx_v_self->__pyx_base.__pyx___value); __pyx_v_self->__pyx_base.__pyx___value = __pyx_v_value; - /* "dependency_injector/providers.pyx":1540 + /* "dependency_injector/providers.pyx":1545 * self.__name = name * self.__value = value * self.__is_provider = is_provider(value) # <<<<<<<<<<<<<< @@ -19758,7 +19805,7 @@ static int __pyx_pf_19dependency_injector_9providers_14NamedInjection___init__(s */ __pyx_v_self->__pyx_base.__pyx___is_provider = ((int)__pyx_f_19dependency_injector_9providers_is_provider(__pyx_v_value, 0)); - /* "dependency_injector/providers.pyx":1541 + /* "dependency_injector/providers.pyx":1546 * self.__value = value * self.__is_provider = is_provider(value) * self.__is_delegated = is_delegated(value) # <<<<<<<<<<<<<< @@ -19767,7 +19814,7 @@ static int __pyx_pf_19dependency_injector_9providers_14NamedInjection___init__(s */ __pyx_v_self->__pyx_base.__pyx___is_delegated = ((int)__pyx_f_19dependency_injector_9providers_is_delegated(__pyx_v_value, 0)); - /* "dependency_injector/providers.pyx":1542 + /* "dependency_injector/providers.pyx":1547 * self.__is_provider = is_provider(value) * self.__is_delegated = is_delegated(value) * self.__call = (self.__is_provider == 1 and # <<<<<<<<<<<<<< @@ -19781,7 +19828,7 @@ static int __pyx_pf_19dependency_injector_9providers_14NamedInjection___init__(s goto __pyx_L3_bool_binop_done; } - /* "dependency_injector/providers.pyx":1543 + /* "dependency_injector/providers.pyx":1548 * self.__is_delegated = is_delegated(value) * self.__call = (self.__is_provider == 1 and * self.__is_delegated == 0) # <<<<<<<<<<<<<< @@ -19792,7 +19839,7 @@ static int __pyx_pf_19dependency_injector_9providers_14NamedInjection___init__(s __pyx_t_1 = __pyx_t_2; __pyx_L3_bool_binop_done:; - /* "dependency_injector/providers.pyx":1542 + /* "dependency_injector/providers.pyx":1547 * self.__is_provider = is_provider(value) * self.__is_delegated = is_delegated(value) * self.__call = (self.__is_provider == 1 and # <<<<<<<<<<<<<< @@ -19801,14 +19848,14 @@ static int __pyx_pf_19dependency_injector_9providers_14NamedInjection___init__(s */ __pyx_v_self->__pyx_base.__pyx___call = ((int)__pyx_t_1); - /* "dependency_injector/providers.pyx":1544 + /* "dependency_injector/providers.pyx":1549 * self.__call = (self.__is_provider == 1 and * self.__is_delegated == 0) * super(NamedInjection, self).__init__() # <<<<<<<<<<<<<< * * def __deepcopy__(self, memo): */ - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1544, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1549, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_NamedInjection)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_NamedInjection)); @@ -19816,10 +19863,10 @@ static int __pyx_pf_19dependency_injector_9providers_14NamedInjection___init__(s __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_5 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1544, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1549, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_init); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1544, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_init); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1549, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -19833,16 +19880,16 @@ static int __pyx_pf_19dependency_injector_9providers_14NamedInjection___init__(s } } if (__pyx_t_5) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1544, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1549, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { - __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1544, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1549, __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.pyx":1536 + /* "dependency_injector/providers.pyx":1541 * """Keyword injection class.""" * * def __init__(self, name, value): # <<<<<<<<<<<<<< @@ -19864,7 +19911,7 @@ static int __pyx_pf_19dependency_injector_9providers_14NamedInjection___init__(s return __pyx_r; } -/* "dependency_injector/providers.pyx":1546 +/* "dependency_injector/providers.pyx":1551 * super(NamedInjection, self).__init__() * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< @@ -19902,21 +19949,21 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_2__d PyObject *__pyx_t_10 = NULL; __Pyx_RefNannySetupContext("__deepcopy__", 0); - /* "dependency_injector/providers.pyx":1548 + /* "dependency_injector/providers.pyx":1553 * 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(1, 1548, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_memo, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1553, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1548, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1553, __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(1, 1548, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_id, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1553, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -19930,14 +19977,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_2__d } } if (!__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1548, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1553, __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(1, 1548, __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(1, 1553, __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; @@ -19946,20 +19993,20 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_2__d #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(1, 1548, __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(1, 1553, __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(1, 1548, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1553, __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(1, 1548, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1553, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } @@ -19968,7 +20015,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_2__d __pyx_v_copied = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1549 + /* "dependency_injector/providers.pyx":1554 * """Create and return full copy of provider.""" * copied = memo.get(id(self)) * if copied is not None: # <<<<<<<<<<<<<< @@ -19979,7 +20026,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_2__d __pyx_t_7 = (__pyx_t_6 != 0); if (__pyx_t_7) { - /* "dependency_injector/providers.pyx":1550 + /* "dependency_injector/providers.pyx":1555 * copied = memo.get(id(self)) * if copied is not None: * return copied # <<<<<<<<<<<<<< @@ -19991,7 +20038,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_2__d __pyx_r = __pyx_v_copied; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1549 + /* "dependency_injector/providers.pyx":1554 * """Create and return full copy of provider.""" * copied = memo.get(id(self)) * if copied is not None: # <<<<<<<<<<<<<< @@ -20000,7 +20047,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_2__d */ } - /* "dependency_injector/providers.pyx":1551 + /* "dependency_injector/providers.pyx":1556 * if copied is not None: * return copied * return self.__class__(deepcopy(self.__name, memo), # <<<<<<<<<<<<<< @@ -20008,18 +20055,18 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_2__d * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1551, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1556, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __pyx_v_self->__pyx___name; __Pyx_INCREF(__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(1, 1551, __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(1, 1556, __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_deepcopy(__pyx_t_5, 0, &__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1551, __pyx_L1_error) + __pyx_t_4 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_5, 0, &__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1556, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "dependency_injector/providers.pyx":1552 + /* "dependency_injector/providers.pyx":1557 * return copied * return self.__class__(deepcopy(self.__name, memo), * deepcopy(self.__value, memo)) # <<<<<<<<<<<<<< @@ -20028,10 +20075,10 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_2__d */ __pyx_t_5 = __pyx_v_self->__pyx_base.__pyx___value; __Pyx_INCREF(__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(1, 1552, __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(1, 1557, __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_deepcopy(__pyx_t_5, 0, &__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1552, __pyx_L1_error) + __pyx_t_3 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_5, 0, &__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1557, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -20049,7 +20096,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_2__d #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_4, __pyx_t_3}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1551, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1556, __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; @@ -20059,7 +20106,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_2__d #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_4, __pyx_t_3}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1551, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1556, __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; @@ -20067,7 +20114,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_2__d } else #endif { - __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1551, __pyx_L1_error) + __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1556, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_5); __pyx_t_5 = NULL; @@ -20078,7 +20125,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_2__d PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_3); __pyx_t_4 = 0; __pyx_t_3 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1551, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1556, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } @@ -20087,7 +20134,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_2__d __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1546 + /* "dependency_injector/providers.pyx":1551 * super(NamedInjection, self).__init__() * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< @@ -20112,7 +20159,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_2__d return __pyx_r; } -/* "dependency_injector/providers.pyx":1554 +/* "dependency_injector/providers.pyx":1559 * deepcopy(self.__value, memo)) * * def get_name(self): # <<<<<<<<<<<<<< @@ -20140,7 +20187,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_4get PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("get_name", 0); - /* "dependency_injector/providers.pyx":1556 + /* "dependency_injector/providers.pyx":1561 * def get_name(self): * """Return injection value.""" * return __get_name(self) # <<<<<<<<<<<<<< @@ -20148,13 +20195,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_4get * def get_value(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_19dependency_injector_9providers___get_name(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1556, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers___get_name(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1561, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1554 + /* "dependency_injector/providers.pyx":1559 * deepcopy(self.__value, memo)) * * def get_name(self): # <<<<<<<<<<<<<< @@ -20173,7 +20220,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_4get return __pyx_r; } -/* "dependency_injector/providers.pyx":1558 +/* "dependency_injector/providers.pyx":1563 * return __get_name(self) * * def get_value(self): # <<<<<<<<<<<<<< @@ -20201,7 +20248,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_6get PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("get_value", 0); - /* "dependency_injector/providers.pyx":1560 + /* "dependency_injector/providers.pyx":1565 * def get_value(self): * """Return injection value.""" * return __get_value(self) # <<<<<<<<<<<<<< @@ -20209,13 +20256,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_6get * def get_original_value(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_19dependency_injector_9providers___get_value(((struct __pyx_obj_19dependency_injector_9providers_Injection *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1560, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers___get_value(((struct __pyx_obj_19dependency_injector_9providers_Injection *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1565, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1558 + /* "dependency_injector/providers.pyx":1563 * return __get_name(self) * * def get_value(self): # <<<<<<<<<<<<<< @@ -20234,7 +20281,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_6get return __pyx_r; } -/* "dependency_injector/providers.pyx":1562 +/* "dependency_injector/providers.pyx":1567 * return __get_value(self) * * def get_original_value(self): # <<<<<<<<<<<<<< @@ -20261,7 +20308,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_8get __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_original_value", 0); - /* "dependency_injector/providers.pyx":1564 + /* "dependency_injector/providers.pyx":1569 * def get_original_value(self): * """Return original value.""" * return self.__value # <<<<<<<<<<<<<< @@ -20273,7 +20320,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_8get __pyx_r = __pyx_v_self->__pyx_base.__pyx___value; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1562 + /* "dependency_injector/providers.pyx":1567 * return __get_value(self) * * def get_original_value(self): # <<<<<<<<<<<<<< @@ -20288,7 +20335,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_8get return __pyx_r; } -/* "dependency_injector/providers.pyx":1569 +/* "dependency_injector/providers.pyx":1574 * @cython.boundscheck(False) * @cython.wraparound(False) * cpdef tuple parse_positional_injections(tuple args): # <<<<<<<<<<<<<< @@ -20313,19 +20360,19 @@ static PyObject *__pyx_f_19dependency_injector_9providers_parse_positional_injec int __pyx_t_6; __Pyx_RefNannySetupContext("parse_positional_injections", 0); - /* "dependency_injector/providers.pyx":1571 + /* "dependency_injector/providers.pyx":1576 * cpdef tuple parse_positional_injections(tuple args): * """Parse positional injections.""" * cdef list injections = list() # <<<<<<<<<<<<<< * cdef int args_len = len(args) * */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1571, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1576, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_injections = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1572 + /* "dependency_injector/providers.pyx":1577 * """Parse positional injections.""" * cdef list injections = list() * cdef int args_len = len(args) # <<<<<<<<<<<<<< @@ -20334,12 +20381,12 @@ static PyObject *__pyx_f_19dependency_injector_9providers_parse_positional_injec */ if (unlikely(__pyx_v_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(1, 1572, __pyx_L1_error) + __PYX_ERR(1, 1577, __pyx_L1_error) } - __pyx_t_2 = PyTuple_GET_SIZE(__pyx_v_args); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(1, 1572, __pyx_L1_error) + __pyx_t_2 = PyTuple_GET_SIZE(__pyx_v_args); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(1, 1577, __pyx_L1_error) __pyx_v_args_len = __pyx_t_2; - /* "dependency_injector/providers.pyx":1578 + /* "dependency_injector/providers.pyx":1583 * cdef PositionalInjection injection * * for index in range(args_len): # <<<<<<<<<<<<<< @@ -20350,7 +20397,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_parse_positional_injec for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { __pyx_v_index = __pyx_t_4; - /* "dependency_injector/providers.pyx":1579 + /* "dependency_injector/providers.pyx":1584 * * for index in range(args_len): * arg = args[index] # <<<<<<<<<<<<<< @@ -20359,42 +20406,42 @@ static PyObject *__pyx_f_19dependency_injector_9providers_parse_positional_injec */ if (unlikely(__pyx_v_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(1, 1579, __pyx_L1_error) + __PYX_ERR(1, 1584, __pyx_L1_error) } __pyx_t_1 = PyTuple_GET_ITEM(__pyx_v_args, __pyx_v_index); __Pyx_INCREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_arg, __pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1580 + /* "dependency_injector/providers.pyx":1585 * for index in range(args_len): * arg = args[index] * injection = PositionalInjection(arg) # <<<<<<<<<<<<<< * injections.append(injection) * */ - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1580, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1585, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_arg); __Pyx_GIVEREF(__pyx_v_arg); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_arg); - __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_19dependency_injector_9providers_PositionalInjection), __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1580, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_19dependency_injector_9providers_PositionalInjection), __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1585, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF_SET(__pyx_v_injection, ((struct __pyx_obj_19dependency_injector_9providers_PositionalInjection *)__pyx_t_5)); __pyx_t_5 = 0; - /* "dependency_injector/providers.pyx":1581 + /* "dependency_injector/providers.pyx":1586 * arg = args[index] * injection = PositionalInjection(arg) * injections.append(injection) # <<<<<<<<<<<<<< * * return tuple(injections) */ - __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_injections, ((PyObject *)__pyx_v_injection)); if (unlikely(__pyx_t_6 == -1)) __PYX_ERR(1, 1581, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_injections, ((PyObject *)__pyx_v_injection)); if (unlikely(__pyx_t_6 == -1)) __PYX_ERR(1, 1586, __pyx_L1_error) } - /* "dependency_injector/providers.pyx":1583 + /* "dependency_injector/providers.pyx":1588 * injections.append(injection) * * return tuple(injections) # <<<<<<<<<<<<<< @@ -20402,13 +20449,13 @@ static PyObject *__pyx_f_19dependency_injector_9providers_parse_positional_injec * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_5 = PyList_AsTuple(__pyx_v_injections); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1583, __pyx_L1_error) + __pyx_t_5 = PyList_AsTuple(__pyx_v_injections); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1588, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_r = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1569 + /* "dependency_injector/providers.pyx":1574 * @cython.boundscheck(False) * @cython.wraparound(False) * cpdef tuple parse_positional_injections(tuple args): # <<<<<<<<<<<<<< @@ -20438,7 +20485,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_1parse_positional_inj PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("parse_positional_injections (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(1, 1569, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(1, 1574, __pyx_L1_error) __pyx_r = __pyx_pf_19dependency_injector_9providers_parse_positional_injections(__pyx_self, ((PyObject*)__pyx_v_args)); /* function exit code */ @@ -20456,7 +20503,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_parse_positional_inje PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("parse_positional_injections", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_parse_positional_injections(__pyx_v_args, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1569, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_parse_positional_injections(__pyx_v_args, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1574, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -20473,7 +20520,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_parse_positional_inje return __pyx_r; } -/* "dependency_injector/providers.pyx":1588 +/* "dependency_injector/providers.pyx":1593 * @cython.boundscheck(False) * @cython.wraparound(False) * cpdef tuple parse_named_injections(dict kwargs): # <<<<<<<<<<<<<< @@ -20500,19 +20547,19 @@ static PyObject *__pyx_f_19dependency_injector_9providers_parse_named_injections int __pyx_t_9; __Pyx_RefNannySetupContext("parse_named_injections", 0); - /* "dependency_injector/providers.pyx":1590 + /* "dependency_injector/providers.pyx":1595 * cpdef tuple parse_named_injections(dict kwargs): * """Parse named injections.""" * cdef list injections = list() # <<<<<<<<<<<<<< * * cdef object name */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1590, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1595, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_injections = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1596 + /* "dependency_injector/providers.pyx":1601 * cdef NamedInjection injection * * for name, arg in kwargs.items(): # <<<<<<<<<<<<<< @@ -20521,17 +20568,17 @@ static PyObject *__pyx_f_19dependency_injector_9providers_parse_named_injections */ if (unlikely(__pyx_v_kwargs == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "items"); - __PYX_ERR(1, 1596, __pyx_L1_error) + __PYX_ERR(1, 1601, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_Items(__pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1596, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_Items(__pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1601, __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_3 = 0; __pyx_t_4 = NULL; } else { - __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1596, __pyx_L1_error) + __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1601, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1596, __pyx_L1_error) + __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1601, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -20539,17 +20586,17 @@ static PyObject *__pyx_f_19dependency_injector_9providers_parse_named_injections if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_3 >= 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_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 1596, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 1601, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1596, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1601, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_3 >= 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_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 1596, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 1601, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1596, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1601, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -20559,7 +20606,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_parse_named_injections 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(1, 1596, __pyx_L1_error) + else __PYX_ERR(1, 1601, __pyx_L1_error) } break; } @@ -20575,7 +20622,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_parse_named_injections if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(1, 1596, __pyx_L1_error) + __PYX_ERR(1, 1601, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -20588,15 +20635,15 @@ static PyObject *__pyx_f_19dependency_injector_9providers_parse_named_injections __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); #else - __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1596, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1601, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1596, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1601, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; - __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1596, __pyx_L1_error) + __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1601, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext; @@ -20604,7 +20651,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_parse_named_injections __Pyx_GOTREF(__pyx_t_5); index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(1, 1596, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(1, 1601, __pyx_L1_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L6_unpacking_done; @@ -20612,7 +20659,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_parse_named_injections __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(1, 1596, __pyx_L1_error) + __PYX_ERR(1, 1601, __pyx_L1_error) __pyx_L6_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_5); @@ -20620,14 +20667,14 @@ static PyObject *__pyx_f_19dependency_injector_9providers_parse_named_injections __Pyx_XDECREF_SET(__pyx_v_arg, __pyx_t_6); __pyx_t_6 = 0; - /* "dependency_injector/providers.pyx":1597 + /* "dependency_injector/providers.pyx":1602 * * for name, arg in kwargs.items(): * injection = NamedInjection(name, arg) # <<<<<<<<<<<<<< * injections.append(injection) * */ - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1597, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1602, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); @@ -20635,22 +20682,22 @@ static PyObject *__pyx_f_19dependency_injector_9providers_parse_named_injections __Pyx_INCREF(__pyx_v_arg); __Pyx_GIVEREF(__pyx_v_arg); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_arg); - __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_19dependency_injector_9providers_NamedInjection), __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1597, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_19dependency_injector_9providers_NamedInjection), __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1602, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF_SET(__pyx_v_injection, ((struct __pyx_obj_19dependency_injector_9providers_NamedInjection *)__pyx_t_6)); __pyx_t_6 = 0; - /* "dependency_injector/providers.pyx":1598 + /* "dependency_injector/providers.pyx":1603 * for name, arg in kwargs.items(): * injection = NamedInjection(name, arg) * injections.append(injection) # <<<<<<<<<<<<<< * * return tuple(injections) */ - __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_injections, ((PyObject *)__pyx_v_injection)); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(1, 1598, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_injections, ((PyObject *)__pyx_v_injection)); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(1, 1603, __pyx_L1_error) - /* "dependency_injector/providers.pyx":1596 + /* "dependency_injector/providers.pyx":1601 * cdef NamedInjection injection * * for name, arg in kwargs.items(): # <<<<<<<<<<<<<< @@ -20660,7 +20707,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_parse_named_injections } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":1600 + /* "dependency_injector/providers.pyx":1605 * injections.append(injection) * * return tuple(injections) # <<<<<<<<<<<<<< @@ -20668,13 +20715,13 @@ static PyObject *__pyx_f_19dependency_injector_9providers_parse_named_injections * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = PyList_AsTuple(__pyx_v_injections); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1600, __pyx_L1_error) + __pyx_t_2 = PyList_AsTuple(__pyx_v_injections); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1605, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1588 + /* "dependency_injector/providers.pyx":1593 * @cython.boundscheck(False) * @cython.wraparound(False) * cpdef tuple parse_named_injections(dict kwargs): # <<<<<<<<<<<<<< @@ -20708,7 +20755,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_3parse_named_injectio PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("parse_named_injections (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 1588, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 1593, __pyx_L1_error) __pyx_r = __pyx_pf_19dependency_injector_9providers_2parse_named_injections(__pyx_self, ((PyObject*)__pyx_v_kwargs)); /* function exit code */ @@ -20726,7 +20773,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_2parse_named_injectio PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("parse_named_injections", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_parse_named_injections(__pyx_v_kwargs, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1588, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_parse_named_injections(__pyx_v_kwargs, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1593, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -20743,7 +20790,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_2parse_named_injectio return __pyx_r; } -/* "dependency_injector/providers.pyx":1603 +/* "dependency_injector/providers.pyx":1608 * * * cpdef bint is_provider(object instance): # <<<<<<<<<<<<<< @@ -20761,7 +20808,7 @@ static int __pyx_f_19dependency_injector_9providers_is_provider(PyObject *__pyx_ int __pyx_t_4; __Pyx_RefNannySetupContext("is_provider", 0); - /* "dependency_injector/providers.pyx":1611 + /* "dependency_injector/providers.pyx":1616 * :rtype: bool * """ * return (not isinstance(instance, CLASS_TYPES) and # <<<<<<<<<<<<<< @@ -20770,7 +20817,7 @@ static int __pyx_f_19dependency_injector_9providers_is_provider(PyObject *__pyx_ */ __pyx_t_2 = __pyx_v_19dependency_injector_9providers_CLASS_TYPES; __Pyx_INCREF(__pyx_t_2); - __pyx_t_3 = PyObject_IsInstance(__pyx_v_instance, __pyx_t_2); if (unlikely(__pyx_t_3 == -1)) __PYX_ERR(1, 1611, __pyx_L1_error) + __pyx_t_3 = PyObject_IsInstance(__pyx_v_instance, __pyx_t_2); if (unlikely(__pyx_t_3 == -1)) __PYX_ERR(1, 1616, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = ((!(__pyx_t_3 != 0)) != 0); if (__pyx_t_4) { @@ -20779,14 +20826,14 @@ static int __pyx_f_19dependency_injector_9providers_is_provider(PyObject *__pyx_ goto __pyx_L3_bool_binop_done; } - /* "dependency_injector/providers.pyx":1612 + /* "dependency_injector/providers.pyx":1617 * """ * return (not isinstance(instance, CLASS_TYPES) and * getattr(instance, '__IS_PROVIDER__', False) is True) # <<<<<<<<<<<<<< * * */ - __pyx_t_2 = __Pyx_GetAttr3(__pyx_v_instance, __pyx_n_s_IS_PROVIDER, Py_False); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1612, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetAttr3(__pyx_v_instance, __pyx_n_s_IS_PROVIDER, Py_False); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1617, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = (__pyx_t_2 == Py_True); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -20796,7 +20843,7 @@ static int __pyx_f_19dependency_injector_9providers_is_provider(PyObject *__pyx_ __pyx_r = __pyx_t_1; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1603 + /* "dependency_injector/providers.pyx":1608 * * * cpdef bint is_provider(object instance): # <<<<<<<<<<<<<< @@ -20834,7 +20881,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4is_provider(CYTHON_U PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("is_provider", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_19dependency_injector_9providers_is_provider(__pyx_v_instance, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1603, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_19dependency_injector_9providers_is_provider(__pyx_v_instance, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1608, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -20851,7 +20898,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4is_provider(CYTHON_U return __pyx_r; } -/* "dependency_injector/providers.pyx":1615 +/* "dependency_injector/providers.pyx":1620 * * * cpdef object ensure_is_provider(object instance): # <<<<<<<<<<<<<< @@ -20873,7 +20920,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_ensure_is_provider(PyO PyObject *__pyx_t_8 = NULL; __Pyx_RefNannySetupContext("ensure_is_provider", 0); - /* "dependency_injector/providers.pyx":1626 + /* "dependency_injector/providers.pyx":1631 * :rtype: :py:class:`dependency_injector.providers.Provider` * """ * if not is_provider(instance): # <<<<<<<<<<<<<< @@ -20883,31 +20930,31 @@ static PyObject *__pyx_f_19dependency_injector_9providers_ensure_is_provider(PyO __pyx_t_1 = ((!(__pyx_f_19dependency_injector_9providers_is_provider(__pyx_v_instance, 0) != 0)) != 0); if (__pyx_t_1) { - /* "dependency_injector/providers.pyx":1627 + /* "dependency_injector/providers.pyx":1632 * """ * if not is_provider(instance): * raise Error('Expected provider instance, ' # <<<<<<<<<<<<<< * 'got {0}'.format(str(instance))) * return instance */ - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_Error); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1627, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_Error); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1632, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - /* "dependency_injector/providers.pyx":1628 + /* "dependency_injector/providers.pyx":1633 * if not is_provider(instance): * raise Error('Expected provider instance, ' * 'got {0}'.format(str(instance))) # <<<<<<<<<<<<<< * return instance * */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Expected_provider_instance_got_0, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1628, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Expected_provider_instance_got_0, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1633, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1628, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1633, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_instance); __Pyx_GIVEREF(__pyx_v_instance); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_instance); - __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1628, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1633, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; @@ -20921,14 +20968,14 @@ static PyObject *__pyx_f_19dependency_injector_9providers_ensure_is_provider(PyO } } if (!__pyx_t_6) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1628, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1633, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_4); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_7}; - __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1628, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1633, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -20937,20 +20984,20 @@ static PyObject *__pyx_f_19dependency_injector_9providers_ensure_is_provider(PyO #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_7}; - __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1628, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1633, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif { - __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1628, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1633, __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_7); PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_7); __pyx_t_7 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1628, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1633, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } @@ -20967,14 +21014,14 @@ static PyObject *__pyx_f_19dependency_injector_9providers_ensure_is_provider(PyO } } if (!__pyx_t_5) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1627, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1632, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1627, __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(1, 1632, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -20983,20 +21030,20 @@ static PyObject *__pyx_f_19dependency_injector_9providers_ensure_is_provider(PyO #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1627, __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(1, 1632, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { - __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1627, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1632, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL; __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_4); __pyx_t_4 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1627, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1632, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } @@ -21004,9 +21051,9 @@ static PyObject *__pyx_f_19dependency_injector_9providers_ensure_is_provider(PyO __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(1, 1627, __pyx_L1_error) + __PYX_ERR(1, 1632, __pyx_L1_error) - /* "dependency_injector/providers.pyx":1626 + /* "dependency_injector/providers.pyx":1631 * :rtype: :py:class:`dependency_injector.providers.Provider` * """ * if not is_provider(instance): # <<<<<<<<<<<<<< @@ -21015,7 +21062,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_ensure_is_provider(PyO */ } - /* "dependency_injector/providers.pyx":1629 + /* "dependency_injector/providers.pyx":1634 * raise Error('Expected provider instance, ' * 'got {0}'.format(str(instance))) * return instance # <<<<<<<<<<<<<< @@ -21027,7 +21074,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_ensure_is_provider(PyO __pyx_r = __pyx_v_instance; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1615 + /* "dependency_injector/providers.pyx":1620 * * * cpdef object ensure_is_provider(object instance): # <<<<<<<<<<<<<< @@ -21072,7 +21119,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_6ensure_is_provider(C PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("ensure_is_provider", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_ensure_is_provider(__pyx_v_instance, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1615, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_ensure_is_provider(__pyx_v_instance, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1620, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -21089,7 +21136,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_6ensure_is_provider(C return __pyx_r; } -/* "dependency_injector/providers.pyx":1632 +/* "dependency_injector/providers.pyx":1637 * * * cpdef bint is_delegated(object instance): # <<<<<<<<<<<<<< @@ -21107,7 +21154,7 @@ static int __pyx_f_19dependency_injector_9providers_is_delegated(PyObject *__pyx int __pyx_t_4; __Pyx_RefNannySetupContext("is_delegated", 0); - /* "dependency_injector/providers.pyx":1640 + /* "dependency_injector/providers.pyx":1645 * :rtype: bool * """ * return (not isinstance(instance, CLASS_TYPES) and # <<<<<<<<<<<<<< @@ -21116,7 +21163,7 @@ static int __pyx_f_19dependency_injector_9providers_is_delegated(PyObject *__pyx */ __pyx_t_2 = __pyx_v_19dependency_injector_9providers_CLASS_TYPES; __Pyx_INCREF(__pyx_t_2); - __pyx_t_3 = PyObject_IsInstance(__pyx_v_instance, __pyx_t_2); if (unlikely(__pyx_t_3 == -1)) __PYX_ERR(1, 1640, __pyx_L1_error) + __pyx_t_3 = PyObject_IsInstance(__pyx_v_instance, __pyx_t_2); if (unlikely(__pyx_t_3 == -1)) __PYX_ERR(1, 1645, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = ((!(__pyx_t_3 != 0)) != 0); if (__pyx_t_4) { @@ -21125,14 +21172,14 @@ static int __pyx_f_19dependency_injector_9providers_is_delegated(PyObject *__pyx goto __pyx_L3_bool_binop_done; } - /* "dependency_injector/providers.pyx":1641 + /* "dependency_injector/providers.pyx":1646 * """ * return (not isinstance(instance, CLASS_TYPES) and * getattr(instance, '__IS_DELEGATED__', False) is True) # <<<<<<<<<<<<<< * * */ - __pyx_t_2 = __Pyx_GetAttr3(__pyx_v_instance, __pyx_n_s_IS_DELEGATED, Py_False); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1641, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetAttr3(__pyx_v_instance, __pyx_n_s_IS_DELEGATED, Py_False); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1646, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = (__pyx_t_2 == Py_True); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -21142,7 +21189,7 @@ static int __pyx_f_19dependency_injector_9providers_is_delegated(PyObject *__pyx __pyx_r = __pyx_t_1; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1632 + /* "dependency_injector/providers.pyx":1637 * * * cpdef bint is_delegated(object instance): # <<<<<<<<<<<<<< @@ -21180,7 +21227,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8is_delegated(CYTHON_ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("is_delegated", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_19dependency_injector_9providers_is_delegated(__pyx_v_instance, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1632, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_19dependency_injector_9providers_is_delegated(__pyx_v_instance, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1637, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -21197,7 +21244,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8is_delegated(CYTHON_ return __pyx_r; } -/* "dependency_injector/providers.pyx":1644 +/* "dependency_injector/providers.pyx":1649 * * * cpdef str represent_provider(object provider, object provides): # <<<<<<<<<<<<<< @@ -21217,7 +21264,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_represent_provider(PyO int __pyx_t_6; __Pyx_RefNannySetupContext("represent_provider", 0); - /* "dependency_injector/providers.pyx":1656 + /* "dependency_injector/providers.pyx":1661 * :rtype: str * """ * return '<{provider}({provides}) at {address}>'.format( # <<<<<<<<<<<<<< @@ -21225,45 +21272,45 @@ static PyObject *__pyx_f_19dependency_injector_9providers_represent_provider(PyO * provider.__class__.__name__)), */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_provider_provides_at_address, __pyx_n_s_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1656, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_provider_provides_at_address, __pyx_n_s_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1661, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - /* "dependency_injector/providers.pyx":1657 + /* "dependency_injector/providers.pyx":1662 * """ * return '<{provider}({provides}) at {address}>'.format( * provider='.'.join((provider.__class__.__module__, # <<<<<<<<<<<<<< * provider.__class__.__name__)), * provides=repr(provides) if provides is not None else '', */ - __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1657, __pyx_L1_error) + __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1662, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_provider, __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1657, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_provider, __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1662, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_module); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1657, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_module); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1662, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/providers.pyx":1658 + /* "dependency_injector/providers.pyx":1663 * return '<{provider}({provides}) at {address}>'.format( * provider='.'.join((provider.__class__.__module__, * provider.__class__.__name__)), # <<<<<<<<<<<<<< * provides=repr(provides) if provides is not None else '', * address=hex(id(provider))) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_provider, __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1658, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_provider, __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1663, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1658, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1663, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/providers.pyx":1657 + /* "dependency_injector/providers.pyx":1662 * """ * return '<{provider}({provides}) at {address}>'.format( * provider='.'.join((provider.__class__.__module__, # <<<<<<<<<<<<<< * provider.__class__.__name__)), * provides=repr(provides) if provides is not None else '', */ - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1657, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1662, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); @@ -21271,13 +21318,13 @@ static PyObject *__pyx_f_19dependency_injector_9providers_represent_provider(PyO PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5); __pyx_t_4 = 0; __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyString_Join(__pyx_kp_s__7, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1657, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyString_Join(__pyx_kp_s__7, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1662, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_provider, __pyx_t_5) < 0) __PYX_ERR(1, 1657, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_provider, __pyx_t_5) < 0) __PYX_ERR(1, 1662, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "dependency_injector/providers.pyx":1659 + /* "dependency_injector/providers.pyx":1664 * provider='.'.join((provider.__class__.__module__, * provider.__class__.__name__)), * provides=repr(provides) if provides is not None else '', # <<<<<<<<<<<<<< @@ -21286,7 +21333,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_represent_provider(PyO */ __pyx_t_6 = (__pyx_v_provides != Py_None); if ((__pyx_t_6 != 0)) { - __pyx_t_3 = PyObject_Repr(__pyx_v_provides); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1659, __pyx_L1_error) + __pyx_t_3 = PyObject_Repr(__pyx_v_provides); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1664, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __pyx_t_3; __pyx_t_3 = 0; @@ -21294,52 +21341,52 @@ static PyObject *__pyx_f_19dependency_injector_9providers_represent_provider(PyO __Pyx_INCREF(__pyx_kp_s__10); __pyx_t_5 = __pyx_kp_s__10; } - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_provides, __pyx_t_5) < 0) __PYX_ERR(1, 1657, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_provides, __pyx_t_5) < 0) __PYX_ERR(1, 1662, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "dependency_injector/providers.pyx":1660 + /* "dependency_injector/providers.pyx":1665 * provider.__class__.__name__)), * provides=repr(provides) if provides is not None else '', * address=hex(id(provider))) # <<<<<<<<<<<<<< * * */ - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1660, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1665, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_provider); __Pyx_GIVEREF(__pyx_v_provider); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_provider); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_id, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1660, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_id, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1665, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1660, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1665, __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 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_hex, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1660, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_hex, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1665, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_address, __pyx_t_3) < 0) __PYX_ERR(1, 1657, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_address, __pyx_t_3) < 0) __PYX_ERR(1, 1662, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/providers.pyx":1656 + /* "dependency_injector/providers.pyx":1661 * :rtype: str * """ * return '<{provider}({provides}) at {address}>'.format( # <<<<<<<<<<<<<< * provider='.'.join((provider.__class__.__module__, * provider.__class__.__name__)), */ - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1656, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1661, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (!(likely(PyString_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(1, 1656, __pyx_L1_error) + if (!(likely(PyString_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(1, 1661, __pyx_L1_error) __pyx_r = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1644 + /* "dependency_injector/providers.pyx":1649 * * * cpdef str represent_provider(object provider, object provides): # <<<<<<<<<<<<<< @@ -21391,11 +21438,11 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_11represent_provider( case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_provides)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("represent_provider", 1, 2, 2, 1); __PYX_ERR(1, 1644, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("represent_provider", 1, 2, 2, 1); __PYX_ERR(1, 1649, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "represent_provider") < 0)) __PYX_ERR(1, 1644, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "represent_provider") < 0)) __PYX_ERR(1, 1649, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -21408,7 +21455,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_11represent_provider( } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("represent_provider", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1644, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("represent_provider", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1649, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.represent_provider", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -21427,7 +21474,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10represent_provider( PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("represent_provider", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_represent_provider(__pyx_v_provider, __pyx_v_provides, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1644, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_represent_provider(__pyx_v_provider, __pyx_v_provides, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1649, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -21444,7 +21491,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10represent_provider( return __pyx_r; } -/* "dependency_injector/providers.pyx":1663 +/* "dependency_injector/providers.pyx":1668 * * * cpdef object deepcopy(object instance, dict memo=None): # <<<<<<<<<<<<<< @@ -21469,15 +21516,15 @@ static PyObject *__pyx_f_19dependency_injector_9providers_deepcopy(PyObject *__p } } - /* "dependency_injector/providers.pyx":1665 + /* "dependency_injector/providers.pyx":1670 * cpdef object deepcopy(object instance, dict memo=None): * """Return full copy of provider or container with providers.""" * return copy.deepcopy(instance, memo) # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_copy); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1665, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_copy); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1670, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_deepcopy); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1665, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_deepcopy); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1670, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -21495,7 +21542,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_deepcopy(PyObject *__p #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_instance, __pyx_v_memo}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1665, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1670, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -21503,13 +21550,13 @@ static PyObject *__pyx_f_19dependency_injector_9providers_deepcopy(PyObject *__p #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_instance, __pyx_v_memo}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1665, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1670, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1665, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1670, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__pyx_t_2) { __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = NULL; @@ -21520,7 +21567,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_deepcopy(PyObject *__p __Pyx_INCREF(__pyx_v_memo); __Pyx_GIVEREF(__pyx_v_memo); PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_memo); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1665, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1670, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } @@ -21529,7 +21576,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_deepcopy(PyObject *__p __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1663 + /* "dependency_injector/providers.pyx":1668 * * * cpdef object deepcopy(object instance, dict memo=None): # <<<<<<<<<<<<<< @@ -21585,7 +21632,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_13deepcopy(PyObject * } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "deepcopy") < 0)) __PYX_ERR(1, 1663, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "deepcopy") < 0)) __PYX_ERR(1, 1668, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -21600,13 +21647,13 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_13deepcopy(PyObject * } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("deepcopy", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1663, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("deepcopy", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1668, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.deepcopy", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_memo), (&PyDict_Type), 1, "memo", 1))) __PYX_ERR(1, 1663, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_memo), (&PyDict_Type), 1, "memo", 1))) __PYX_ERR(1, 1668, __pyx_L1_error) __pyx_r = __pyx_pf_19dependency_injector_9providers_12deepcopy(__pyx_self, __pyx_v_instance, __pyx_v_memo); /* function exit code */ @@ -21627,7 +21674,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_12deepcopy(CYTHON_UNU __Pyx_XDECREF(__pyx_r); __pyx_t_2.__pyx_n = 1; __pyx_t_2.memo = __pyx_v_memo; - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_v_instance, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1663, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_v_instance, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1668, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -25035,6 +25082,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_copy, __pyx_k_copy, sizeof(__pyx_k_copy), 0, 0, 1, 1}, {&__pyx_n_s_deepcopy, __pyx_k_deepcopy, sizeof(__pyx_k_deepcopy), 0, 0, 1, 1}, {&__pyx_n_s_deepcopy_dispatch, __pyx_k_deepcopy_dispatch, sizeof(__pyx_k_deepcopy_dispatch), 0, 0, 1, 1}, + {&__pyx_n_s_default, __pyx_k_default, sizeof(__pyx_k_default), 0, 0, 1, 1}, {&__pyx_n_s_dependency_injector_providers, __pyx_k_dependency_injector_providers, sizeof(__pyx_k_dependency_injector_providers), 0, 0, 1, 1}, {&__pyx_n_s_enter, __pyx_k_enter, sizeof(__pyx_k_enter), 0, 0, 1, 1}, {&__pyx_n_s_errors, __pyx_k_errors, sizeof(__pyx_k_errors), 0, 0, 1, 1}, @@ -25099,8 +25147,8 @@ static int __Pyx_InitCachedBuiltins(void) { __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(1, 101, __pyx_L1_error) __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(1, 179, __pyx_L1_error) __pyx_builtin_NotImplementedError = __Pyx_GetBuiltinName(__pyx_n_s_NotImplementedError); if (!__pyx_builtin_NotImplementedError) __PYX_ERR(1, 205, __pyx_L1_error) - __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s_AttributeError); if (!__pyx_builtin_AttributeError) __PYX_ERR(1, 708, __pyx_L1_error) - __pyx_builtin_hex = __Pyx_GetBuiltinName(__pyx_n_s_hex); if (!__pyx_builtin_hex) __PYX_ERR(1, 1660, __pyx_L1_error) + __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s_AttributeError); if (!__pyx_builtin_AttributeError) __PYX_ERR(1, 713, __pyx_L1_error) + __pyx_builtin_hex = __Pyx_GetBuiltinName(__pyx_n_s_hex); if (!__pyx_builtin_hex) __PYX_ERR(1, 1665, __pyx_L1_error) return 0; __pyx_L1_error:; return -1; @@ -25179,25 +25227,25 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__8); __Pyx_GIVEREF(__pyx_tuple__8); - /* "dependency_injector/providers.pyx":1061 + /* "dependency_injector/providers.pyx":1066 * cpdef object _provide(self, tuple args, dict kwargs): * """Return result of provided callable's call.""" * raise NotImplementedError('Abstract provider forward providing logic ' # <<<<<<<<<<<<<< * 'to overriding provider') * */ - __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_s_Abstract_provider_forward_provid); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(1, 1061, __pyx_L1_error) + __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_s_Abstract_provider_forward_provid); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(1, 1066, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__11); __Pyx_GIVEREF(__pyx_tuple__11); - /* "dependency_injector/providers.pyx":1354 + /* "dependency_injector/providers.pyx":1359 * cpdef object _provide(self, tuple args, dict kwargs): * """Return single instance.""" * with self.__storage_lock: # <<<<<<<<<<<<<< * if self.__storage is None: * self.__storage = __factory_call(self.__instantiator, */ - __pyx_tuple__12 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(1, 1354, __pyx_L1_error) + __pyx_tuple__12 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(1, 1359, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__12); __Pyx_GIVEREF(__pyx_tuple__12); __Pyx_RefNannyFinishContext(); @@ -25581,11 +25629,11 @@ PyMODINIT_FUNC PyInit_providers(void) __pyx_vtable_19dependency_injector_9providers_Factory.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_Provider; __pyx_vtable_19dependency_injector_9providers_Factory.__pyx_base._provide = (PyObject *(*)(struct __pyx_obj_19dependency_injector_9providers_Provider *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_19dependency_injector_9providers_7Factory__provide; __pyx_type_19dependency_injector_9providers_Factory.tp_base = __pyx_ptype_19dependency_injector_9providers_Provider; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_Factory) < 0) __PYX_ERR(1, 770, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_Factory) < 0) __PYX_ERR(1, 775, __pyx_L1_error) __pyx_type_19dependency_injector_9providers_Factory.tp_print = 0; #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Factory, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 770, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Factory, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 775, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_19dependency_injector_9providers_7Factory___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_19dependency_injector_9providers_7Factory___init__.doc = __pyx_doc_19dependency_injector_9providers_7Factory___init__; @@ -25595,7 +25643,7 @@ PyMODINIT_FUNC PyInit_providers(void) #endif #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Factory, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(1, 770, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Factory, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(1, 775, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_19dependency_injector_9providers_7Factory_4__str__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_19dependency_injector_9providers_7Factory_4__str__.doc = __pyx_doc_19dependency_injector_9providers_7Factory_4__str__; @@ -25603,26 +25651,26 @@ PyMODINIT_FUNC PyInit_providers(void) } } #endif - if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_Factory.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_Factory) < 0) __PYX_ERR(1, 770, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "Factory", (PyObject *)&__pyx_type_19dependency_injector_9providers_Factory) < 0) __PYX_ERR(1, 770, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_Factory.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_Factory) < 0) __PYX_ERR(1, 775, __pyx_L1_error) + if (PyObject_SetAttrString(__pyx_m, "Factory", (PyObject *)&__pyx_type_19dependency_injector_9providers_Factory) < 0) __PYX_ERR(1, 775, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_Factory = &__pyx_type_19dependency_injector_9providers_Factory; __pyx_vtabptr_19dependency_injector_9providers_DelegatedFactory = &__pyx_vtable_19dependency_injector_9providers_DelegatedFactory; __pyx_vtable_19dependency_injector_9providers_DelegatedFactory.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_Factory; __pyx_type_19dependency_injector_9providers_DelegatedFactory.tp_base = __pyx_ptype_19dependency_injector_9providers_Factory; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_DelegatedFactory) < 0) __PYX_ERR(1, 1003, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_DelegatedFactory) < 0) __PYX_ERR(1, 1008, __pyx_L1_error) __pyx_type_19dependency_injector_9providers_DelegatedFactory.tp_print = 0; - if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_DelegatedFactory.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_DelegatedFactory) < 0) __PYX_ERR(1, 1003, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "DelegatedFactory", (PyObject *)&__pyx_type_19dependency_injector_9providers_DelegatedFactory) < 0) __PYX_ERR(1, 1003, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_DelegatedFactory.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_DelegatedFactory) < 0) __PYX_ERR(1, 1008, __pyx_L1_error) + if (PyObject_SetAttrString(__pyx_m, "DelegatedFactory", (PyObject *)&__pyx_type_19dependency_injector_9providers_DelegatedFactory) < 0) __PYX_ERR(1, 1008, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_DelegatedFactory = &__pyx_type_19dependency_injector_9providers_DelegatedFactory; __pyx_vtabptr_19dependency_injector_9providers_AbstractFactory = &__pyx_vtable_19dependency_injector_9providers_AbstractFactory; __pyx_vtable_19dependency_injector_9providers_AbstractFactory.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_Factory; __pyx_vtable_19dependency_injector_9providers_AbstractFactory.__pyx_base.__pyx_base._provide = (PyObject *(*)(struct __pyx_obj_19dependency_injector_9providers_Provider *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_19dependency_injector_9providers_15AbstractFactory__provide; __pyx_type_19dependency_injector_9providers_AbstractFactory.tp_base = __pyx_ptype_19dependency_injector_9providers_Factory; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_AbstractFactory) < 0) __PYX_ERR(1, 1024, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_AbstractFactory) < 0) __PYX_ERR(1, 1029, __pyx_L1_error) __pyx_type_19dependency_injector_9providers_AbstractFactory.tp_print = 0; #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_AbstractFactory, "__call__"); if (unlikely(!wrapper)) __PYX_ERR(1, 1024, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_AbstractFactory, "__call__"); if (unlikely(!wrapper)) __PYX_ERR(1, 1029, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_19dependency_injector_9providers_15AbstractFactory___call__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_19dependency_injector_9providers_15AbstractFactory___call__.doc = __pyx_doc_19dependency_injector_9providers_15AbstractFactory___call__; @@ -25630,17 +25678,17 @@ PyMODINIT_FUNC PyInit_providers(void) } } #endif - if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_AbstractFactory.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_AbstractFactory) < 0) __PYX_ERR(1, 1024, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "AbstractFactory", (PyObject *)&__pyx_type_19dependency_injector_9providers_AbstractFactory) < 0) __PYX_ERR(1, 1024, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_AbstractFactory.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_AbstractFactory) < 0) __PYX_ERR(1, 1029, __pyx_L1_error) + if (PyObject_SetAttrString(__pyx_m, "AbstractFactory", (PyObject *)&__pyx_type_19dependency_injector_9providers_AbstractFactory) < 0) __PYX_ERR(1, 1029, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_AbstractFactory = &__pyx_type_19dependency_injector_9providers_AbstractFactory; __pyx_vtabptr_19dependency_injector_9providers_BaseSingleton = &__pyx_vtable_19dependency_injector_9providers_BaseSingleton; __pyx_vtable_19dependency_injector_9providers_BaseSingleton.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_Provider; __pyx_type_19dependency_injector_9providers_BaseSingleton.tp_base = __pyx_ptype_19dependency_injector_9providers_Provider; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_BaseSingleton) < 0) __PYX_ERR(1, 1064, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_BaseSingleton) < 0) __PYX_ERR(1, 1069, __pyx_L1_error) __pyx_type_19dependency_injector_9providers_BaseSingleton.tp_print = 0; #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_BaseSingleton, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 1064, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_BaseSingleton, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 1069, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_19dependency_injector_9providers_13BaseSingleton___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_19dependency_injector_9providers_13BaseSingleton___init__.doc = __pyx_doc_19dependency_injector_9providers_13BaseSingleton___init__; @@ -25650,7 +25698,7 @@ PyMODINIT_FUNC PyInit_providers(void) #endif #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_BaseSingleton, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(1, 1064, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_BaseSingleton, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(1, 1069, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_19dependency_injector_9providers_13BaseSingleton_2__str__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_19dependency_injector_9providers_13BaseSingleton_2__str__.doc = __pyx_doc_19dependency_injector_9providers_13BaseSingleton_2__str__; @@ -25658,18 +25706,18 @@ PyMODINIT_FUNC PyInit_providers(void) } } #endif - if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_BaseSingleton.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_BaseSingleton) < 0) __PYX_ERR(1, 1064, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "BaseSingleton", (PyObject *)&__pyx_type_19dependency_injector_9providers_BaseSingleton) < 0) __PYX_ERR(1, 1064, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_BaseSingleton.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_BaseSingleton) < 0) __PYX_ERR(1, 1069, __pyx_L1_error) + if (PyObject_SetAttrString(__pyx_m, "BaseSingleton", (PyObject *)&__pyx_type_19dependency_injector_9providers_BaseSingleton) < 0) __PYX_ERR(1, 1069, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_BaseSingleton = &__pyx_type_19dependency_injector_9providers_BaseSingleton; __pyx_vtabptr_19dependency_injector_9providers_Singleton = &__pyx_vtable_19dependency_injector_9providers_Singleton; __pyx_vtable_19dependency_injector_9providers_Singleton.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_BaseSingleton; __pyx_vtable_19dependency_injector_9providers_Singleton.__pyx_base.__pyx_base._provide = (PyObject *(*)(struct __pyx_obj_19dependency_injector_9providers_Provider *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_19dependency_injector_9providers_9Singleton__provide; __pyx_type_19dependency_injector_9providers_Singleton.tp_base = __pyx_ptype_19dependency_injector_9providers_BaseSingleton; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_Singleton) < 0) __PYX_ERR(1, 1238, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_Singleton) < 0) __PYX_ERR(1, 1243, __pyx_L1_error) __pyx_type_19dependency_injector_9providers_Singleton.tp_print = 0; #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Singleton, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 1238, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Singleton, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 1243, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_19dependency_injector_9providers_9Singleton___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_19dependency_injector_9providers_9Singleton___init__.doc = __pyx_doc_19dependency_injector_9providers_9Singleton___init__; @@ -25677,26 +25725,26 @@ PyMODINIT_FUNC PyInit_providers(void) } } #endif - if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_Singleton.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_Singleton) < 0) __PYX_ERR(1, 1238, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "Singleton", (PyObject *)&__pyx_type_19dependency_injector_9providers_Singleton) < 0) __PYX_ERR(1, 1238, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_Singleton.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_Singleton) < 0) __PYX_ERR(1, 1243, __pyx_L1_error) + if (PyObject_SetAttrString(__pyx_m, "Singleton", (PyObject *)&__pyx_type_19dependency_injector_9providers_Singleton) < 0) __PYX_ERR(1, 1243, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_Singleton = &__pyx_type_19dependency_injector_9providers_Singleton; __pyx_vtabptr_19dependency_injector_9providers_DelegatedSingleton = &__pyx_vtable_19dependency_injector_9providers_DelegatedSingleton; __pyx_vtable_19dependency_injector_9providers_DelegatedSingleton.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_Singleton; __pyx_type_19dependency_injector_9providers_DelegatedSingleton.tp_base = __pyx_ptype_19dependency_injector_9providers_Singleton; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_DelegatedSingleton) < 0) __PYX_ERR(1, 1299, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_DelegatedSingleton) < 0) __PYX_ERR(1, 1304, __pyx_L1_error) __pyx_type_19dependency_injector_9providers_DelegatedSingleton.tp_print = 0; - if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_DelegatedSingleton.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_DelegatedSingleton) < 0) __PYX_ERR(1, 1299, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "DelegatedSingleton", (PyObject *)&__pyx_type_19dependency_injector_9providers_DelegatedSingleton) < 0) __PYX_ERR(1, 1299, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_DelegatedSingleton.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_DelegatedSingleton) < 0) __PYX_ERR(1, 1304, __pyx_L1_error) + if (PyObject_SetAttrString(__pyx_m, "DelegatedSingleton", (PyObject *)&__pyx_type_19dependency_injector_9providers_DelegatedSingleton) < 0) __PYX_ERR(1, 1304, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_DelegatedSingleton = &__pyx_type_19dependency_injector_9providers_DelegatedSingleton; __pyx_vtabptr_19dependency_injector_9providers_ThreadSafeSingleton = &__pyx_vtable_19dependency_injector_9providers_ThreadSafeSingleton; __pyx_vtable_19dependency_injector_9providers_ThreadSafeSingleton.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_BaseSingleton; __pyx_vtable_19dependency_injector_9providers_ThreadSafeSingleton.__pyx_base.__pyx_base._provide = (PyObject *(*)(struct __pyx_obj_19dependency_injector_9providers_Provider *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton__provide; __pyx_type_19dependency_injector_9providers_ThreadSafeSingleton.tp_base = __pyx_ptype_19dependency_injector_9providers_BaseSingleton; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_ThreadSafeSingleton) < 0) __PYX_ERR(1, 1320, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_ThreadSafeSingleton) < 0) __PYX_ERR(1, 1325, __pyx_L1_error) __pyx_type_19dependency_injector_9providers_ThreadSafeSingleton.tp_print = 0; #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_ThreadSafeSingleton, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 1320, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_ThreadSafeSingleton, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 1325, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_19dependency_injector_9providers_19ThreadSafeSingleton___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_19dependency_injector_9providers_19ThreadSafeSingleton___init__.doc = __pyx_doc_19dependency_injector_9providers_19ThreadSafeSingleton___init__; @@ -25704,26 +25752,26 @@ PyMODINIT_FUNC PyInit_providers(void) } } #endif - if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_ThreadSafeSingleton.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_ThreadSafeSingleton) < 0) __PYX_ERR(1, 1320, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "ThreadSafeSingleton", (PyObject *)&__pyx_type_19dependency_injector_9providers_ThreadSafeSingleton) < 0) __PYX_ERR(1, 1320, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_ThreadSafeSingleton.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_ThreadSafeSingleton) < 0) __PYX_ERR(1, 1325, __pyx_L1_error) + if (PyObject_SetAttrString(__pyx_m, "ThreadSafeSingleton", (PyObject *)&__pyx_type_19dependency_injector_9providers_ThreadSafeSingleton) < 0) __PYX_ERR(1, 1325, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_ThreadSafeSingleton = &__pyx_type_19dependency_injector_9providers_ThreadSafeSingleton; __pyx_vtabptr_19dependency_injector_9providers_DelegatedThreadSafeSingleton = &__pyx_vtable_19dependency_injector_9providers_DelegatedThreadSafeSingleton; __pyx_vtable_19dependency_injector_9providers_DelegatedThreadSafeSingleton.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_ThreadSafeSingleton; __pyx_type_19dependency_injector_9providers_DelegatedThreadSafeSingleton.tp_base = __pyx_ptype_19dependency_injector_9providers_ThreadSafeSingleton; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_DelegatedThreadSafeSingleton) < 0) __PYX_ERR(1, 1361, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_DelegatedThreadSafeSingleton) < 0) __PYX_ERR(1, 1366, __pyx_L1_error) __pyx_type_19dependency_injector_9providers_DelegatedThreadSafeSingleton.tp_print = 0; - if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_DelegatedThreadSafeSingleton.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_DelegatedThreadSafeSingleton) < 0) __PYX_ERR(1, 1361, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "DelegatedThreadSafeSingleton", (PyObject *)&__pyx_type_19dependency_injector_9providers_DelegatedThreadSafeSingleton) < 0) __PYX_ERR(1, 1361, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_DelegatedThreadSafeSingleton.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_DelegatedThreadSafeSingleton) < 0) __PYX_ERR(1, 1366, __pyx_L1_error) + if (PyObject_SetAttrString(__pyx_m, "DelegatedThreadSafeSingleton", (PyObject *)&__pyx_type_19dependency_injector_9providers_DelegatedThreadSafeSingleton) < 0) __PYX_ERR(1, 1366, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_DelegatedThreadSafeSingleton = &__pyx_type_19dependency_injector_9providers_DelegatedThreadSafeSingleton; __pyx_vtabptr_19dependency_injector_9providers_ThreadLocalSingleton = &__pyx_vtable_19dependency_injector_9providers_ThreadLocalSingleton; __pyx_vtable_19dependency_injector_9providers_ThreadLocalSingleton.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_BaseSingleton; __pyx_vtable_19dependency_injector_9providers_ThreadLocalSingleton.__pyx_base.__pyx_base._provide = (PyObject *(*)(struct __pyx_obj_19dependency_injector_9providers_Provider *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_19dependency_injector_9providers_20ThreadLocalSingleton__provide; __pyx_type_19dependency_injector_9providers_ThreadLocalSingleton.tp_base = __pyx_ptype_19dependency_injector_9providers_BaseSingleton; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_ThreadLocalSingleton) < 0) __PYX_ERR(1, 1382, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_ThreadLocalSingleton) < 0) __PYX_ERR(1, 1387, __pyx_L1_error) __pyx_type_19dependency_injector_9providers_ThreadLocalSingleton.tp_print = 0; #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_ThreadLocalSingleton, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 1382, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_ThreadLocalSingleton, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 1387, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_19dependency_injector_9providers_20ThreadLocalSingleton___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_19dependency_injector_9providers_20ThreadLocalSingleton___init__.doc = __pyx_doc_19dependency_injector_9providers_20ThreadLocalSingleton___init__; @@ -25731,25 +25779,25 @@ PyMODINIT_FUNC PyInit_providers(void) } } #endif - if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_ThreadLocalSingleton.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_ThreadLocalSingleton) < 0) __PYX_ERR(1, 1382, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "ThreadLocalSingleton", (PyObject *)&__pyx_type_19dependency_injector_9providers_ThreadLocalSingleton) < 0) __PYX_ERR(1, 1382, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_ThreadLocalSingleton.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_ThreadLocalSingleton) < 0) __PYX_ERR(1, 1387, __pyx_L1_error) + if (PyObject_SetAttrString(__pyx_m, "ThreadLocalSingleton", (PyObject *)&__pyx_type_19dependency_injector_9providers_ThreadLocalSingleton) < 0) __PYX_ERR(1, 1387, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_ThreadLocalSingleton = &__pyx_type_19dependency_injector_9providers_ThreadLocalSingleton; __pyx_vtabptr_19dependency_injector_9providers_DelegatedThreadLocalSingleton = &__pyx_vtable_19dependency_injector_9providers_DelegatedThreadLocalSingleton; __pyx_vtable_19dependency_injector_9providers_DelegatedThreadLocalSingleton.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_ThreadLocalSingleton; __pyx_type_19dependency_injector_9providers_DelegatedThreadLocalSingleton.tp_base = __pyx_ptype_19dependency_injector_9providers_ThreadLocalSingleton; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_DelegatedThreadLocalSingleton) < 0) __PYX_ERR(1, 1435, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_DelegatedThreadLocalSingleton) < 0) __PYX_ERR(1, 1440, __pyx_L1_error) __pyx_type_19dependency_injector_9providers_DelegatedThreadLocalSingleton.tp_print = 0; - if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_DelegatedThreadLocalSingleton.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_DelegatedThreadLocalSingleton) < 0) __PYX_ERR(1, 1435, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "DelegatedThreadLocalSingleton", (PyObject *)&__pyx_type_19dependency_injector_9providers_DelegatedThreadLocalSingleton) < 0) __PYX_ERR(1, 1435, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_DelegatedThreadLocalSingleton.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_DelegatedThreadLocalSingleton) < 0) __PYX_ERR(1, 1440, __pyx_L1_error) + if (PyObject_SetAttrString(__pyx_m, "DelegatedThreadLocalSingleton", (PyObject *)&__pyx_type_19dependency_injector_9providers_DelegatedThreadLocalSingleton) < 0) __PYX_ERR(1, 1440, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_DelegatedThreadLocalSingleton = &__pyx_type_19dependency_injector_9providers_DelegatedThreadLocalSingleton; __pyx_vtabptr_19dependency_injector_9providers_AbstractSingleton = &__pyx_vtable_19dependency_injector_9providers_AbstractSingleton; __pyx_vtable_19dependency_injector_9providers_AbstractSingleton.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_BaseSingleton; __pyx_type_19dependency_injector_9providers_AbstractSingleton.tp_base = __pyx_ptype_19dependency_injector_9providers_BaseSingleton; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_AbstractSingleton) < 0) __PYX_ERR(1, 1456, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_AbstractSingleton) < 0) __PYX_ERR(1, 1461, __pyx_L1_error) __pyx_type_19dependency_injector_9providers_AbstractSingleton.tp_print = 0; #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_AbstractSingleton, "__call__"); if (unlikely(!wrapper)) __PYX_ERR(1, 1456, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_AbstractSingleton, "__call__"); if (unlikely(!wrapper)) __PYX_ERR(1, 1461, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_19dependency_injector_9providers_17AbstractSingleton___call__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_19dependency_injector_9providers_17AbstractSingleton___call__.doc = __pyx_doc_19dependency_injector_9providers_17AbstractSingleton___call__; @@ -25757,19 +25805,19 @@ PyMODINIT_FUNC PyInit_providers(void) } } #endif - if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_AbstractSingleton.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_AbstractSingleton) < 0) __PYX_ERR(1, 1456, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "AbstractSingleton", (PyObject *)&__pyx_type_19dependency_injector_9providers_AbstractSingleton) < 0) __PYX_ERR(1, 1456, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_AbstractSingleton.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_AbstractSingleton) < 0) __PYX_ERR(1, 1461, __pyx_L1_error) + if (PyObject_SetAttrString(__pyx_m, "AbstractSingleton", (PyObject *)&__pyx_type_19dependency_injector_9providers_AbstractSingleton) < 0) __PYX_ERR(1, 1461, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_AbstractSingleton = &__pyx_type_19dependency_injector_9providers_AbstractSingleton; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_Injection) < 0) __PYX_ERR(1, 1501, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_Injection) < 0) __PYX_ERR(1, 1506, __pyx_L1_error) __pyx_type_19dependency_injector_9providers_Injection.tp_print = 0; - if (PyObject_SetAttrString(__pyx_m, "Injection", (PyObject *)&__pyx_type_19dependency_injector_9providers_Injection) < 0) __PYX_ERR(1, 1501, __pyx_L1_error) + if (PyObject_SetAttrString(__pyx_m, "Injection", (PyObject *)&__pyx_type_19dependency_injector_9providers_Injection) < 0) __PYX_ERR(1, 1506, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_Injection = &__pyx_type_19dependency_injector_9providers_Injection; __pyx_type_19dependency_injector_9providers_PositionalInjection.tp_base = __pyx_ptype_19dependency_injector_9providers_Injection; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_PositionalInjection) < 0) __PYX_ERR(1, 1505, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_PositionalInjection) < 0) __PYX_ERR(1, 1510, __pyx_L1_error) __pyx_type_19dependency_injector_9providers_PositionalInjection.tp_print = 0; #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_PositionalInjection, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 1505, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_PositionalInjection, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 1510, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_19dependency_injector_9providers_19PositionalInjection___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_19dependency_injector_9providers_19PositionalInjection___init__.doc = __pyx_doc_19dependency_injector_9providers_19PositionalInjection___init__; @@ -25777,14 +25825,14 @@ PyMODINIT_FUNC PyInit_providers(void) } } #endif - if (PyObject_SetAttrString(__pyx_m, "PositionalInjection", (PyObject *)&__pyx_type_19dependency_injector_9providers_PositionalInjection) < 0) __PYX_ERR(1, 1505, __pyx_L1_error) + if (PyObject_SetAttrString(__pyx_m, "PositionalInjection", (PyObject *)&__pyx_type_19dependency_injector_9providers_PositionalInjection) < 0) __PYX_ERR(1, 1510, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_PositionalInjection = &__pyx_type_19dependency_injector_9providers_PositionalInjection; __pyx_type_19dependency_injector_9providers_NamedInjection.tp_base = __pyx_ptype_19dependency_injector_9providers_Injection; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_NamedInjection) < 0) __PYX_ERR(1, 1533, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_NamedInjection) < 0) __PYX_ERR(1, 1538, __pyx_L1_error) __pyx_type_19dependency_injector_9providers_NamedInjection.tp_print = 0; #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_NamedInjection, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 1533, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_NamedInjection, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 1538, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_19dependency_injector_9providers_14NamedInjection___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_19dependency_injector_9providers_14NamedInjection___init__.doc = __pyx_doc_19dependency_injector_9providers_14NamedInjection___init__; @@ -25792,7 +25840,7 @@ PyMODINIT_FUNC PyInit_providers(void) } } #endif - if (PyObject_SetAttrString(__pyx_m, "NamedInjection", (PyObject *)&__pyx_type_19dependency_injector_9providers_NamedInjection) < 0) __PYX_ERR(1, 1533, __pyx_L1_error) + if (PyObject_SetAttrString(__pyx_m, "NamedInjection", (PyObject *)&__pyx_type_19dependency_injector_9providers_NamedInjection) < 0) __PYX_ERR(1, 1538, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_NamedInjection = &__pyx_type_19dependency_injector_9providers_NamedInjection; /*--- Type import code ---*/ /*--- Variable import code ---*/ @@ -26034,56 +26082,56 @@ PyMODINIT_FUNC PyInit_providers(void) if (PyDict_SetItem((PyObject *)__pyx_ptype_19dependency_injector_9providers_DelegatedCallable->tp_dict, __pyx_n_s_IS_DELEGATED, Py_True) < 0) __PYX_ERR(1, 606, __pyx_L1_error) PyType_Modified(__pyx_ptype_19dependency_injector_9providers_DelegatedCallable); - /* "dependency_injector/providers.pyx":821 + /* "dependency_injector/providers.pyx":826 * """ * * provided_type = None # <<<<<<<<<<<<<< * * def __init__(self, provides, *args, **kwargs): */ - if (PyDict_SetItem((PyObject *)__pyx_ptype_19dependency_injector_9providers_Factory->tp_dict, __pyx_n_s_provided_type, Py_None) < 0) __PYX_ERR(1, 821, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_19dependency_injector_9providers_Factory->tp_dict, __pyx_n_s_provided_type, Py_None) < 0) __PYX_ERR(1, 826, __pyx_L1_error) PyType_Modified(__pyx_ptype_19dependency_injector_9providers_Factory); - /* "dependency_injector/providers.pyx":1021 + /* "dependency_injector/providers.pyx":1026 * """ * * __IS_DELEGATED__ = True # <<<<<<<<<<<<<< * * */ - if (PyDict_SetItem((PyObject *)__pyx_ptype_19dependency_injector_9providers_DelegatedFactory->tp_dict, __pyx_n_s_IS_DELEGATED, Py_True) < 0) __PYX_ERR(1, 1021, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_19dependency_injector_9providers_DelegatedFactory->tp_dict, __pyx_n_s_IS_DELEGATED, Py_True) < 0) __PYX_ERR(1, 1026, __pyx_L1_error) PyType_Modified(__pyx_ptype_19dependency_injector_9providers_DelegatedFactory); - /* "dependency_injector/providers.pyx":1067 + /* "dependency_injector/providers.pyx":1072 * """Base class of singleton providers.""" * * provided_type = None # <<<<<<<<<<<<<< * * def __init__(self, provides, *args, **kwargs): */ - if (PyDict_SetItem((PyObject *)__pyx_ptype_19dependency_injector_9providers_BaseSingleton->tp_dict, __pyx_n_s_provided_type, Py_None) < 0) __PYX_ERR(1, 1067, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_19dependency_injector_9providers_BaseSingleton->tp_dict, __pyx_n_s_provided_type, Py_None) < 0) __PYX_ERR(1, 1072, __pyx_L1_error) PyType_Modified(__pyx_ptype_19dependency_injector_9providers_BaseSingleton); - /* "dependency_injector/providers.pyx":1317 + /* "dependency_injector/providers.pyx":1322 * """ * * __IS_DELEGATED__ = True # <<<<<<<<<<<<<< * * */ - if (PyDict_SetItem((PyObject *)__pyx_ptype_19dependency_injector_9providers_DelegatedSingleton->tp_dict, __pyx_n_s_IS_DELEGATED, Py_True) < 0) __PYX_ERR(1, 1317, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_19dependency_injector_9providers_DelegatedSingleton->tp_dict, __pyx_n_s_IS_DELEGATED, Py_True) < 0) __PYX_ERR(1, 1322, __pyx_L1_error) PyType_Modified(__pyx_ptype_19dependency_injector_9providers_DelegatedSingleton); - /* "dependency_injector/providers.pyx":1323 + /* "dependency_injector/providers.pyx":1328 * """Thread-safe singleton provider.""" * * storage_lock = threading.RLock() # <<<<<<<<<<<<<< * """Storage reentrant lock. * */ - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_threading); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1323, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_threading); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1328, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_RLock); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1323, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_RLock); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1328, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -26097,35 +26145,35 @@ PyMODINIT_FUNC PyInit_providers(void) } } if (__pyx_t_4) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1323, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1328, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1323, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1328, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (PyDict_SetItem((PyObject *)__pyx_ptype_19dependency_injector_9providers_ThreadSafeSingleton->tp_dict, __pyx_n_s_storage_lock, __pyx_t_1) < 0) __PYX_ERR(1, 1323, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_19dependency_injector_9providers_ThreadSafeSingleton->tp_dict, __pyx_n_s_storage_lock, __pyx_t_1) < 0) __PYX_ERR(1, 1328, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_19dependency_injector_9providers_ThreadSafeSingleton); - /* "dependency_injector/providers.pyx":1379 + /* "dependency_injector/providers.pyx":1384 * """ * * __IS_DELEGATED__ = True # <<<<<<<<<<<<<< * * */ - if (PyDict_SetItem((PyObject *)__pyx_ptype_19dependency_injector_9providers_DelegatedThreadSafeSingleton->tp_dict, __pyx_n_s_IS_DELEGATED, Py_True) < 0) __PYX_ERR(1, 1379, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_19dependency_injector_9providers_DelegatedThreadSafeSingleton->tp_dict, __pyx_n_s_IS_DELEGATED, Py_True) < 0) __PYX_ERR(1, 1384, __pyx_L1_error) PyType_Modified(__pyx_ptype_19dependency_injector_9providers_DelegatedThreadSafeSingleton); - /* "dependency_injector/providers.pyx":1453 + /* "dependency_injector/providers.pyx":1458 * """ * * __IS_DELEGATED__ = True # <<<<<<<<<<<<<< * * */ - if (PyDict_SetItem((PyObject *)__pyx_ptype_19dependency_injector_9providers_DelegatedThreadLocalSingleton->tp_dict, __pyx_n_s_IS_DELEGATED, Py_True) < 0) __PYX_ERR(1, 1453, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_19dependency_injector_9providers_DelegatedThreadLocalSingleton->tp_dict, __pyx_n_s_IS_DELEGATED, Py_True) < 0) __PYX_ERR(1, 1458, __pyx_L1_error) PyType_Modified(__pyx_ptype_19dependency_injector_9providers_DelegatedThreadLocalSingleton); /* "dependency_injector/providers.pyx":1 diff --git a/src/dependency_injector/providers.pyx b/src/dependency_injector/providers.pyx index 9e5f7026..350fd574 100644 --- a/src/dependency_injector/providers.pyx +++ b/src/dependency_injector/providers.pyx @@ -667,15 +667,20 @@ cdef class Configuration(Provider): print(config.section1.option2()) # 2 """ - def __init__(self, name): + def __init__(self, name, default=None): """Initializer. :param name: Name of configuration unit. :type name: str + + :param default: Default values of configuration unit. + :type default: dict """ self.__name = name self.__value = None self.__children = dict() + if default is not None: + self.update(default) super(Configuration, self).__init__() def __deepcopy__(self, memo): diff --git a/tests/unit/providers/test_configuration.py b/tests/unit/providers/test_configuration.py index f5611b0a..dc5b45bb 100644 --- a/tests/unit/providers/test_configuration.py +++ b/tests/unit/providers/test_configuration.py @@ -60,6 +60,21 @@ class ConfigTests(unittest.TestCase): self.assertEqual(abc(), 1) self.assertEqual(abd(), 2) + def test_providers_with_default_value(self): + + self.config = providers.Configuration( + name='config', default={'a': {'b': {'c': 1, 'd': 2}}}) + + a = self.config.a + ab = self.config.a.b + abc = self.config.a.b.c + abd = self.config.a.b.d + + self.assertEqual(a(), {'b': {'c': 1, 'd': 2}}) + self.assertEqual(ab(), {'c': 1, 'd': 2}) + self.assertEqual(abc(), 1) + self.assertEqual(abd(), 2) + def test_value_of_undefined_option(self): self.assertIsNone(self.config.a()) From e9fd48406715f071f7e09382e98fbed35688767c Mon Sep 17 00:00:00 2001 From: Roman Mogilatov Date: Fri, 7 Jul 2017 17:49:16 +0300 Subject: [PATCH 3/7] Update changelog --- docs/main/changelog.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/main/changelog.rst b/docs/main/changelog.rst index 3676a07c..626c7fb6 100644 --- a/docs/main/changelog.rst +++ b/docs/main/changelog.rst @@ -9,7 +9,8 @@ follows `Semantic versioning`_ Development version ------------------- -- No features. +- Add functionality for initializing ``Configuration`` provider with default + values. 3.4.8 ----- From 9b6310a9362bc6179f231a3d4d5d721302f85b8c Mon Sep 17 00:00:00 2001 From: Roman Mogilatov Date: Fri, 7 Jul 2017 17:52:58 +0300 Subject: [PATCH 4/7] Remove section "Development version" from changelog --- docs/main/changelog.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/main/changelog.rst b/docs/main/changelog.rst index 626c7fb6..8c024d16 100644 --- a/docs/main/changelog.rst +++ b/docs/main/changelog.rst @@ -7,8 +7,8 @@ that were made in every particular version. From version 0.7.6 *Dependency Injector* framework strictly follows `Semantic versioning`_ -Development version -------------------- +3.5.0 +----- - Add functionality for initializing ``Configuration`` provider with default values. From 16eb1a3869259e47683f7966b28d6fef4f347429 Mon Sep 17 00:00:00 2001 From: Roman Mogilatov Date: Fri, 7 Jul 2017 17:54:00 +0300 Subject: [PATCH 5/7] Update version --- src/dependency_injector/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dependency_injector/__init__.py b/src/dependency_injector/__init__.py index 35faf460..e39cb7ca 100644 --- a/src/dependency_injector/__init__.py +++ b/src/dependency_injector/__init__.py @@ -1,6 +1,6 @@ """Dependency injector top-level package.""" -__version__ = '3.4.8' +__version__ = '3.5.0' """Version number that follows semantic versioning. :type: str From 35d795d09767ad9e075db5f4e279f27147a420ed Mon Sep 17 00:00:00 2001 From: Roman Mogilatov Date: Sun, 9 Jul 2017 23:13:10 +0300 Subject: [PATCH 6/7] Add FactoryDelegate provider + tests --- src/dependency_injector/containers.c | 292 ++-- src/dependency_injector/providers.c | 2018 +++++++++++++++--------- src/dependency_injector/providers.pxd | 4 + src/dependency_injector/providers.pyx | 23 + tests/unit/providers/test_factories.py | 15 + 5 files changed, 1434 insertions(+), 918 deletions(-) diff --git a/src/dependency_injector/containers.c b/src/dependency_injector/containers.c index 3c82bef8..b730bbc2 100644 --- a/src/dependency_injector/containers.c +++ b/src/dependency_injector/containers.c @@ -641,6 +641,7 @@ struct __pyx_obj_19dependency_injector_9providers_Configuration; struct __pyx_obj_19dependency_injector_9providers_Factory; struct __pyx_obj_19dependency_injector_9providers_DelegatedFactory; struct __pyx_obj_19dependency_injector_9providers_AbstractFactory; +struct __pyx_obj_19dependency_injector_9providers_FactoryDelegate; struct __pyx_obj_19dependency_injector_9providers_BaseSingleton; struct __pyx_obj_19dependency_injector_9providers_Singleton; struct __pyx_obj_19dependency_injector_9providers_DelegatedSingleton; @@ -659,7 +660,7 @@ struct __pyx_obj_19dependency_injector_10containers___pyx_scope_struct_3_overrid struct __pyx_obj_19dependency_injector_10containers___pyx_scope_struct_4_copy; struct __pyx_opt_args_19dependency_injector_9providers_deepcopy; -/* "providers.pxd":166 +/* "providers.pxd":170 * * * cpdef object deepcopy(object instance, dict memo=*) # <<<<<<<<<<<<<< @@ -834,7 +835,19 @@ struct __pyx_obj_19dependency_injector_9providers_AbstractFactory { }; -/* "providers.pxd":89 +/* "providers.pxd":88 + * + * + * cdef class FactoryDelegate(Delegate): # <<<<<<<<<<<<<< + * pass + * + */ +struct __pyx_obj_19dependency_injector_9providers_FactoryDelegate { + struct __pyx_obj_19dependency_injector_9providers_Delegate __pyx_base; +}; + + +/* "providers.pxd":93 * * # Singleton providers * cdef class BaseSingleton(Provider): # <<<<<<<<<<<<<< @@ -847,7 +860,7 @@ struct __pyx_obj_19dependency_injector_9providers_BaseSingleton { }; -/* "providers.pxd":93 +/* "providers.pxd":97 * * * cdef class Singleton(BaseSingleton): # <<<<<<<<<<<<<< @@ -860,7 +873,7 @@ struct __pyx_obj_19dependency_injector_9providers_Singleton { }; -/* "providers.pxd":99 +/* "providers.pxd":103 * * * cdef class DelegatedSingleton(Singleton): # <<<<<<<<<<<<<< @@ -872,7 +885,7 @@ struct __pyx_obj_19dependency_injector_9providers_DelegatedSingleton { }; -/* "providers.pxd":103 +/* "providers.pxd":107 * * * cdef class ThreadSafeSingleton(BaseSingleton): # <<<<<<<<<<<<<< @@ -886,7 +899,7 @@ struct __pyx_obj_19dependency_injector_9providers_ThreadSafeSingleton { }; -/* "providers.pxd":110 +/* "providers.pxd":114 * * * cdef class DelegatedThreadSafeSingleton(ThreadSafeSingleton): # <<<<<<<<<<<<<< @@ -898,7 +911,7 @@ struct __pyx_obj_19dependency_injector_9providers_DelegatedThreadSafeSingleton { }; -/* "providers.pxd":114 +/* "providers.pxd":118 * * * cdef class ThreadLocalSingleton(BaseSingleton): # <<<<<<<<<<<<<< @@ -911,7 +924,7 @@ struct __pyx_obj_19dependency_injector_9providers_ThreadLocalSingleton { }; -/* "providers.pxd":120 +/* "providers.pxd":124 * * * cdef class DelegatedThreadLocalSingleton(ThreadLocalSingleton): # <<<<<<<<<<<<<< @@ -923,7 +936,7 @@ struct __pyx_obj_19dependency_injector_9providers_DelegatedThreadLocalSingleton }; -/* "providers.pxd":124 +/* "providers.pxd":128 * * * cdef class AbstractSingleton(BaseSingleton): # <<<<<<<<<<<<<< @@ -935,7 +948,7 @@ struct __pyx_obj_19dependency_injector_9providers_AbstractSingleton { }; -/* "providers.pxd":129 +/* "providers.pxd":133 * * # Injections * cdef class Injection(object): # <<<<<<<<<<<<<< @@ -951,7 +964,7 @@ struct __pyx_obj_19dependency_injector_9providers_Injection { }; -/* "providers.pxd":136 +/* "providers.pxd":140 * * * cdef class PositionalInjection(Injection): # <<<<<<<<<<<<<< @@ -963,7 +976,7 @@ struct __pyx_obj_19dependency_injector_9providers_PositionalInjection { }; -/* "providers.pxd":140 +/* "providers.pxd":144 * * * cdef class NamedInjection(Injection): # <<<<<<<<<<<<<< @@ -1213,7 +1226,21 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_AbstractFactory { static struct __pyx_vtabstruct_19dependency_injector_9providers_AbstractFactory *__pyx_vtabptr_19dependency_injector_9providers_AbstractFactory; -/* "providers.pxd":89 +/* "providers.pxd":88 + * + * + * cdef class FactoryDelegate(Delegate): # <<<<<<<<<<<<<< + * pass + * + */ + +struct __pyx_vtabstruct_19dependency_injector_9providers_FactoryDelegate { + struct __pyx_vtabstruct_19dependency_injector_9providers_Delegate __pyx_base; +}; +static struct __pyx_vtabstruct_19dependency_injector_9providers_FactoryDelegate *__pyx_vtabptr_19dependency_injector_9providers_FactoryDelegate; + + +/* "providers.pxd":93 * * # Singleton providers * cdef class BaseSingleton(Provider): # <<<<<<<<<<<<<< @@ -1227,7 +1254,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_BaseSingleton { static struct __pyx_vtabstruct_19dependency_injector_9providers_BaseSingleton *__pyx_vtabptr_19dependency_injector_9providers_BaseSingleton; -/* "providers.pxd":93 +/* "providers.pxd":97 * * * cdef class Singleton(BaseSingleton): # <<<<<<<<<<<<<< @@ -1241,7 +1268,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_Singleton { static struct __pyx_vtabstruct_19dependency_injector_9providers_Singleton *__pyx_vtabptr_19dependency_injector_9providers_Singleton; -/* "providers.pxd":99 +/* "providers.pxd":103 * * * cdef class DelegatedSingleton(Singleton): # <<<<<<<<<<<<<< @@ -1255,7 +1282,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedSingleton { static struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedSingleton *__pyx_vtabptr_19dependency_injector_9providers_DelegatedSingleton; -/* "providers.pxd":103 +/* "providers.pxd":107 * * * cdef class ThreadSafeSingleton(BaseSingleton): # <<<<<<<<<<<<<< @@ -1269,7 +1296,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_ThreadSafeSingleton { static struct __pyx_vtabstruct_19dependency_injector_9providers_ThreadSafeSingleton *__pyx_vtabptr_19dependency_injector_9providers_ThreadSafeSingleton; -/* "providers.pxd":110 +/* "providers.pxd":114 * * * cdef class DelegatedThreadSafeSingleton(ThreadSafeSingleton): # <<<<<<<<<<<<<< @@ -1283,7 +1310,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedThreadSafeSing static struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedThreadSafeSingleton *__pyx_vtabptr_19dependency_injector_9providers_DelegatedThreadSafeSingleton; -/* "providers.pxd":114 +/* "providers.pxd":118 * * * cdef class ThreadLocalSingleton(BaseSingleton): # <<<<<<<<<<<<<< @@ -1297,7 +1324,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_ThreadLocalSingleton { static struct __pyx_vtabstruct_19dependency_injector_9providers_ThreadLocalSingleton *__pyx_vtabptr_19dependency_injector_9providers_ThreadLocalSingleton; -/* "providers.pxd":120 +/* "providers.pxd":124 * * * cdef class DelegatedThreadLocalSingleton(ThreadLocalSingleton): # <<<<<<<<<<<<<< @@ -1311,7 +1338,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedThreadLocalSin static struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedThreadLocalSingleton *__pyx_vtabptr_19dependency_injector_9providers_DelegatedThreadLocalSingleton; -/* "providers.pxd":124 +/* "providers.pxd":128 * * * cdef class AbstractSingleton(BaseSingleton): # <<<<<<<<<<<<<< @@ -1817,6 +1844,7 @@ static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_Configuration static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_Factory = 0; static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_DelegatedFactory = 0; static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_AbstractFactory = 0; +static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_FactoryDelegate = 0; static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_BaseSingleton = 0; static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_Singleton = 0; static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_DelegatedSingleton = 0; @@ -8163,7 +8191,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_6_check_provider_ty return __pyx_r; } -/* "providers.pxd":170 +/* "providers.pxd":174 * * # Inline helper functions * cdef inline object __get_name(NamedInjection self): # <<<<<<<<<<<<<< @@ -8176,7 +8204,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___get_na __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get_name", 0); - /* "providers.pxd":171 + /* "providers.pxd":175 * # Inline helper functions * cdef inline object __get_name(NamedInjection self): * return self.__name # <<<<<<<<<<<<<< @@ -8188,7 +8216,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___get_na __pyx_r = __pyx_v_self->__pyx___name; goto __pyx_L0; - /* "providers.pxd":170 + /* "providers.pxd":174 * * # Inline helper functions * cdef inline object __get_name(NamedInjection self): # <<<<<<<<<<<<<< @@ -8203,7 +8231,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___get_na return __pyx_r; } -/* "providers.pxd":174 +/* "providers.pxd":178 * * * cdef inline object __get_value(Injection self): # <<<<<<<<<<<<<< @@ -8220,7 +8248,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___get_va PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("__get_value", 0); - /* "providers.pxd":175 + /* "providers.pxd":179 * * cdef inline object __get_value(Injection self): * if self.__call == 0: # <<<<<<<<<<<<<< @@ -8230,7 +8258,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___get_va __pyx_t_1 = ((__pyx_v_self->__pyx___call == 0) != 0); if (__pyx_t_1) { - /* "providers.pxd":176 + /* "providers.pxd":180 * cdef inline object __get_value(Injection self): * if self.__call == 0: * return self.__value # <<<<<<<<<<<<<< @@ -8242,7 +8270,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___get_va __pyx_r = __pyx_v_self->__pyx___value; goto __pyx_L0; - /* "providers.pxd":175 + /* "providers.pxd":179 * * cdef inline object __get_value(Injection self): * if self.__call == 0: # <<<<<<<<<<<<<< @@ -8251,7 +8279,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___get_va */ } - /* "providers.pxd":177 + /* "providers.pxd":181 * if self.__call == 0: * return self.__value * return self.__value() # <<<<<<<<<<<<<< @@ -8271,10 +8299,10 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___get_va } } if (__pyx_t_4) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 177, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 181, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { - __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 177, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 181, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -8282,7 +8310,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___get_va __pyx_t_2 = 0; goto __pyx_L0; - /* "providers.pxd":174 + /* "providers.pxd":178 * * * cdef inline object __get_value(Injection self): # <<<<<<<<<<<<<< @@ -8303,7 +8331,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___get_va return __pyx_r; } -/* "providers.pxd":182 +/* "providers.pxd":186 * @cython.boundscheck(False) * @cython.wraparound(False) * cdef inline tuple __provide_positional_args(tuple args, # <<<<<<<<<<<<<< @@ -8324,7 +8352,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid int __pyx_t_5; __Pyx_RefNannySetupContext("__provide_positional_args", 0); - /* "providers.pxd":189 + /* "providers.pxd":193 * cdef PositionalInjection injection * * if inj_args_len == 0: # <<<<<<<<<<<<<< @@ -8334,7 +8362,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid __pyx_t_1 = ((__pyx_v_inj_args_len == 0) != 0); if (__pyx_t_1) { - /* "providers.pxd":190 + /* "providers.pxd":194 * * if inj_args_len == 0: * return args # <<<<<<<<<<<<<< @@ -8346,7 +8374,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid __pyx_r = __pyx_v_args; goto __pyx_L0; - /* "providers.pxd":189 + /* "providers.pxd":193 * cdef PositionalInjection injection * * if inj_args_len == 0: # <<<<<<<<<<<<<< @@ -8355,19 +8383,19 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid */ } - /* "providers.pxd":192 + /* "providers.pxd":196 * return args * * positional_args = list() # <<<<<<<<<<<<<< * for index in range(inj_args_len): * injection = inj_args[index] */ - __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 192, __pyx_L1_error) + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_positional_args = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "providers.pxd":193 + /* "providers.pxd":197 * * positional_args = list() * for index in range(inj_args_len): # <<<<<<<<<<<<<< @@ -8378,7 +8406,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { __pyx_v_index = __pyx_t_4; - /* "providers.pxd":194 + /* "providers.pxd":198 * positional_args = list() * for index in range(inj_args_len): * injection = inj_args[index] # <<<<<<<<<<<<<< @@ -8387,36 +8415,36 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid */ if (unlikely(__pyx_v_inj_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(1, 194, __pyx_L1_error) + __PYX_ERR(1, 198, __pyx_L1_error) } __pyx_t_2 = PyTuple_GET_ITEM(__pyx_v_inj_args, __pyx_v_index); __Pyx_INCREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_injection, ((struct __pyx_obj_19dependency_injector_9providers_PositionalInjection *)__pyx_t_2)); __pyx_t_2 = 0; - /* "providers.pxd":195 + /* "providers.pxd":199 * for index in range(inj_args_len): * injection = inj_args[index] * positional_args.append(__get_value(injection)) # <<<<<<<<<<<<<< * positional_args.extend(args) * */ - __pyx_t_2 = __pyx_f_19dependency_injector_9providers___get_value(((struct __pyx_obj_19dependency_injector_9providers_Injection *)__pyx_v_injection)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 195, __pyx_L1_error) + __pyx_t_2 = __pyx_f_19dependency_injector_9providers___get_value(((struct __pyx_obj_19dependency_injector_9providers_Injection *)__pyx_v_injection)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_positional_args, __pyx_t_2); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(1, 195, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_positional_args, __pyx_t_2); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(1, 199, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } - /* "providers.pxd":196 + /* "providers.pxd":200 * injection = inj_args[index] * positional_args.append(__get_value(injection)) * positional_args.extend(args) # <<<<<<<<<<<<<< * * return tuple(positional_args) */ - __pyx_t_5 = __Pyx_PyList_Extend(__pyx_v_positional_args, __pyx_v_args); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(1, 196, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyList_Extend(__pyx_v_positional_args, __pyx_v_args); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(1, 200, __pyx_L1_error) - /* "providers.pxd":198 + /* "providers.pxd":202 * positional_args.extend(args) * * return tuple(positional_args) # <<<<<<<<<<<<<< @@ -8424,13 +8452,13 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = PyList_AsTuple(__pyx_v_positional_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 198, __pyx_L1_error) + __pyx_t_2 = PyList_AsTuple(__pyx_v_positional_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 202, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; - /* "providers.pxd":182 + /* "providers.pxd":186 * @cython.boundscheck(False) * @cython.wraparound(False) * cdef inline tuple __provide_positional_args(tuple args, # <<<<<<<<<<<<<< @@ -8451,7 +8479,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid return __pyx_r; } -/* "providers.pxd":203 +/* "providers.pxd":207 * @cython.boundscheck(False) * @cython.wraparound(False) * cdef inline dict __provide_keyword_args(dict kwargs, # <<<<<<<<<<<<<< @@ -8473,7 +8501,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid int __pyx_t_6; __Pyx_RefNannySetupContext("__provide_keyword_args", 0); - /* "providers.pxd":210 + /* "providers.pxd":214 * cdef NamedInjection kw_injection * * if len(kwargs) == 0: # <<<<<<<<<<<<<< @@ -8482,13 +8510,13 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid */ if (unlikely(__pyx_v_kwargs == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(1, 210, __pyx_L1_error) + __PYX_ERR(1, 214, __pyx_L1_error) } - __pyx_t_1 = PyDict_Size(__pyx_v_kwargs); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(1, 210, __pyx_L1_error) + __pyx_t_1 = PyDict_Size(__pyx_v_kwargs); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(1, 214, __pyx_L1_error) __pyx_t_2 = ((__pyx_t_1 == 0) != 0); if (__pyx_t_2) { - /* "providers.pxd":211 + /* "providers.pxd":215 * * if len(kwargs) == 0: * for index in range(inj_kwargs_len): # <<<<<<<<<<<<<< @@ -8499,7 +8527,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { __pyx_v_index = __pyx_t_4; - /* "providers.pxd":212 + /* "providers.pxd":216 * if len(kwargs) == 0: * for index in range(inj_kwargs_len): * kw_injection = inj_kwargs[index] # <<<<<<<<<<<<<< @@ -8508,43 +8536,43 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid */ if (unlikely(__pyx_v_inj_kwargs == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(1, 212, __pyx_L1_error) + __PYX_ERR(1, 216, __pyx_L1_error) } __pyx_t_5 = PyTuple_GET_ITEM(__pyx_v_inj_kwargs, __pyx_v_index); __Pyx_INCREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_kw_injection, ((struct __pyx_obj_19dependency_injector_9providers_NamedInjection *)__pyx_t_5)); __pyx_t_5 = 0; - /* "providers.pxd":213 + /* "providers.pxd":217 * for index in range(inj_kwargs_len): * kw_injection = inj_kwargs[index] * name = __get_name(kw_injection) # <<<<<<<<<<<<<< * kwargs[name] = __get_value(kw_injection) * else: */ - __pyx_t_5 = __pyx_f_19dependency_injector_9providers___get_name(__pyx_v_kw_injection); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 213, __pyx_L1_error) + __pyx_t_5 = __pyx_f_19dependency_injector_9providers___get_name(__pyx_v_kw_injection); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 217, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_5); __pyx_t_5 = 0; - /* "providers.pxd":214 + /* "providers.pxd":218 * kw_injection = inj_kwargs[index] * name = __get_name(kw_injection) * kwargs[name] = __get_value(kw_injection) # <<<<<<<<<<<<<< * else: * for index in range(inj_kwargs_len): */ - __pyx_t_5 = __pyx_f_19dependency_injector_9providers___get_value(((struct __pyx_obj_19dependency_injector_9providers_Injection *)__pyx_v_kw_injection)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 214, __pyx_L1_error) + __pyx_t_5 = __pyx_f_19dependency_injector_9providers___get_value(((struct __pyx_obj_19dependency_injector_9providers_Injection *)__pyx_v_kw_injection)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (unlikely(__pyx_v_kwargs == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(1, 214, __pyx_L1_error) + __PYX_ERR(1, 218, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__pyx_v_kwargs, __pyx_v_name, __pyx_t_5) < 0)) __PYX_ERR(1, 214, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_kwargs, __pyx_v_name, __pyx_t_5) < 0)) __PYX_ERR(1, 218, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } - /* "providers.pxd":210 + /* "providers.pxd":214 * cdef NamedInjection kw_injection * * if len(kwargs) == 0: # <<<<<<<<<<<<<< @@ -8554,7 +8582,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid goto __pyx_L3; } - /* "providers.pxd":216 + /* "providers.pxd":220 * kwargs[name] = __get_value(kw_injection) * else: * for index in range(inj_kwargs_len): # <<<<<<<<<<<<<< @@ -8566,7 +8594,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { __pyx_v_index = __pyx_t_4; - /* "providers.pxd":217 + /* "providers.pxd":221 * else: * for index in range(inj_kwargs_len): * kw_injection = inj_kwargs[index] # <<<<<<<<<<<<<< @@ -8575,26 +8603,26 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid */ if (unlikely(__pyx_v_inj_kwargs == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(1, 217, __pyx_L1_error) + __PYX_ERR(1, 221, __pyx_L1_error) } __pyx_t_5 = PyTuple_GET_ITEM(__pyx_v_inj_kwargs, __pyx_v_index); __Pyx_INCREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_kw_injection, ((struct __pyx_obj_19dependency_injector_9providers_NamedInjection *)__pyx_t_5)); __pyx_t_5 = 0; - /* "providers.pxd":218 + /* "providers.pxd":222 * for index in range(inj_kwargs_len): * kw_injection = inj_kwargs[index] * name = __get_name(kw_injection) # <<<<<<<<<<<<<< * if name not in kwargs: * kwargs[name] = __get_value(kw_injection) */ - __pyx_t_5 = __pyx_f_19dependency_injector_9providers___get_name(__pyx_v_kw_injection); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 218, __pyx_L1_error) + __pyx_t_5 = __pyx_f_19dependency_injector_9providers___get_name(__pyx_v_kw_injection); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 222, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_5); __pyx_t_5 = 0; - /* "providers.pxd":219 + /* "providers.pxd":223 * kw_injection = inj_kwargs[index] * name = __get_name(kw_injection) * if name not in kwargs: # <<<<<<<<<<<<<< @@ -8603,29 +8631,29 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid */ if (unlikely(__pyx_v_kwargs == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(1, 219, __pyx_L1_error) + __PYX_ERR(1, 223, __pyx_L1_error) } - __pyx_t_2 = (__Pyx_PyDict_ContainsTF(__pyx_v_name, __pyx_v_kwargs, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 219, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PyDict_ContainsTF(__pyx_v_name, __pyx_v_kwargs, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 223, __pyx_L1_error) __pyx_t_6 = (__pyx_t_2 != 0); if (__pyx_t_6) { - /* "providers.pxd":220 + /* "providers.pxd":224 * name = __get_name(kw_injection) * if name not in kwargs: * kwargs[name] = __get_value(kw_injection) # <<<<<<<<<<<<<< * * return kwargs */ - __pyx_t_5 = __pyx_f_19dependency_injector_9providers___get_value(((struct __pyx_obj_19dependency_injector_9providers_Injection *)__pyx_v_kw_injection)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 220, __pyx_L1_error) + __pyx_t_5 = __pyx_f_19dependency_injector_9providers___get_value(((struct __pyx_obj_19dependency_injector_9providers_Injection *)__pyx_v_kw_injection)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (unlikely(__pyx_v_kwargs == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(1, 220, __pyx_L1_error) + __PYX_ERR(1, 224, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__pyx_v_kwargs, __pyx_v_name, __pyx_t_5) < 0)) __PYX_ERR(1, 220, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_kwargs, __pyx_v_name, __pyx_t_5) < 0)) __PYX_ERR(1, 224, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "providers.pxd":219 + /* "providers.pxd":223 * kw_injection = inj_kwargs[index] * name = __get_name(kw_injection) * if name not in kwargs: # <<<<<<<<<<<<<< @@ -8637,7 +8665,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid } __pyx_L3:; - /* "providers.pxd":222 + /* "providers.pxd":226 * kwargs[name] = __get_value(kw_injection) * * return kwargs # <<<<<<<<<<<<<< @@ -8649,7 +8677,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid __pyx_r = __pyx_v_kwargs; goto __pyx_L0; - /* "providers.pxd":203 + /* "providers.pxd":207 * @cython.boundscheck(False) * @cython.wraparound(False) * cdef inline dict __provide_keyword_args(dict kwargs, # <<<<<<<<<<<<<< @@ -8670,7 +8698,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid return __pyx_r; } -/* "providers.pxd":227 +/* "providers.pxd":231 * @cython.boundscheck(False) * @cython.wraparound(False) * cdef inline object __inject_attributes(object instance, # <<<<<<<<<<<<<< @@ -8690,7 +8718,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___inject int __pyx_t_5; __Pyx_RefNannySetupContext("__inject_attributes", 0); - /* "providers.pxd":231 + /* "providers.pxd":235 * int attributes_len): * cdef NamedInjection attr_injection * for index in range(attributes_len): # <<<<<<<<<<<<<< @@ -8701,7 +8729,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___inject for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_index = __pyx_t_2; - /* "providers.pxd":232 + /* "providers.pxd":236 * cdef NamedInjection attr_injection * for index in range(attributes_len): * attr_injection = attributes[index] # <<<<<<<<<<<<<< @@ -8710,46 +8738,46 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___inject */ if (unlikely(__pyx_v_attributes == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(1, 232, __pyx_L1_error) + __PYX_ERR(1, 236, __pyx_L1_error) } __pyx_t_3 = PyTuple_GET_ITEM(__pyx_v_attributes, __pyx_v_index); __Pyx_INCREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_attr_injection, ((struct __pyx_obj_19dependency_injector_9providers_NamedInjection *)__pyx_t_3)); __pyx_t_3 = 0; - /* "providers.pxd":234 + /* "providers.pxd":238 * attr_injection = attributes[index] * setattr(instance, * __get_name(attr_injection), # <<<<<<<<<<<<<< * __get_value(attr_injection)) * */ - __pyx_t_3 = __pyx_f_19dependency_injector_9providers___get_name(__pyx_v_attr_injection); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 234, __pyx_L1_error) + __pyx_t_3 = __pyx_f_19dependency_injector_9providers___get_name(__pyx_v_attr_injection); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - /* "providers.pxd":235 + /* "providers.pxd":239 * setattr(instance, * __get_name(attr_injection), * __get_value(attr_injection)) # <<<<<<<<<<<<<< * * */ - __pyx_t_4 = __pyx_f_19dependency_injector_9providers___get_value(((struct __pyx_obj_19dependency_injector_9providers_Injection *)__pyx_v_attr_injection)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 235, __pyx_L1_error) + __pyx_t_4 = __pyx_f_19dependency_injector_9providers___get_value(((struct __pyx_obj_19dependency_injector_9providers_Injection *)__pyx_v_attr_injection)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 239, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - /* "providers.pxd":233 + /* "providers.pxd":237 * for index in range(attributes_len): * attr_injection = attributes[index] * setattr(instance, # <<<<<<<<<<<<<< * __get_name(attr_injection), * __get_value(attr_injection)) */ - __pyx_t_5 = PyObject_SetAttr(__pyx_v_instance, __pyx_t_3, __pyx_t_4); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(1, 233, __pyx_L1_error) + __pyx_t_5 = PyObject_SetAttr(__pyx_v_instance, __pyx_t_3, __pyx_t_4); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(1, 237, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } - /* "providers.pxd":227 + /* "providers.pxd":231 * @cython.boundscheck(False) * @cython.wraparound(False) * cdef inline object __inject_attributes(object instance, # <<<<<<<<<<<<<< @@ -8772,7 +8800,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___inject return __pyx_r; } -/* "providers.pxd":238 +/* "providers.pxd":242 * * * cdef inline object __callable_call(Callable self, tuple args, dict kwargs): # <<<<<<<<<<<<<< @@ -8789,7 +8817,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___callab PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__callable_call", 0); - /* "providers.pxd":243 + /* "providers.pxd":247 * * positional_args = __provide_positional_args(args, * self.__args, # <<<<<<<<<<<<<< @@ -8799,20 +8827,20 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___callab __pyx_t_1 = __pyx_v_self->__pyx___args; __Pyx_INCREF(__pyx_t_1); - /* "providers.pxd":242 + /* "providers.pxd":246 * cdef dict keyword_args * * positional_args = __provide_positional_args(args, # <<<<<<<<<<<<<< * self.__args, * self.__args_len) */ - __pyx_t_2 = __pyx_f_19dependency_injector_9providers___provide_positional_args(__pyx_v_args, ((PyObject*)__pyx_t_1), __pyx_v_self->__pyx___args_len); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 242, __pyx_L1_error) + __pyx_t_2 = __pyx_f_19dependency_injector_9providers___provide_positional_args(__pyx_v_args, ((PyObject*)__pyx_t_1), __pyx_v_self->__pyx___args_len); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 246, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_positional_args = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "providers.pxd":246 + /* "providers.pxd":250 * self.__args_len) * keyword_args = __provide_keyword_args(kwargs, * self.__kwargs, # <<<<<<<<<<<<<< @@ -8822,20 +8850,20 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___callab __pyx_t_2 = __pyx_v_self->__pyx___kwargs; __Pyx_INCREF(__pyx_t_2); - /* "providers.pxd":245 + /* "providers.pxd":249 * self.__args, * self.__args_len) * keyword_args = __provide_keyword_args(kwargs, # <<<<<<<<<<<<<< * self.__kwargs, * self.__kwargs_len) */ - __pyx_t_1 = __pyx_f_19dependency_injector_9providers___provide_keyword_args(__pyx_v_kwargs, ((PyObject*)__pyx_t_2), __pyx_v_self->__pyx___kwargs_len); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 245, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers___provide_keyword_args(__pyx_v_kwargs, ((PyObject*)__pyx_t_2), __pyx_v_self->__pyx___kwargs_len); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 249, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_keyword_args = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "providers.pxd":249 + /* "providers.pxd":253 * self.__kwargs_len) * * return self.__provides(*positional_args, **keyword_args) # <<<<<<<<<<<<<< @@ -8845,19 +8873,19 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___callab __Pyx_XDECREF(__pyx_r); if (unlikely(__pyx_v_positional_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(1, 249, __pyx_L1_error) + __PYX_ERR(1, 253, __pyx_L1_error) } if (unlikely(__pyx_v_keyword_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); - __PYX_ERR(1, 249, __pyx_L1_error) + __PYX_ERR(1, 253, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_v_self->__pyx___provides, __pyx_v_positional_args, __pyx_v_keyword_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 249, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_v_self->__pyx___provides, __pyx_v_positional_args, __pyx_v_keyword_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 253, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "providers.pxd":238 + /* "providers.pxd":242 * * * cdef inline object __callable_call(Callable self, tuple args, dict kwargs): # <<<<<<<<<<<<<< @@ -8879,7 +8907,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___callab return __pyx_r; } -/* "providers.pxd":252 +/* "providers.pxd":256 * * * cdef inline object __factory_call(Factory self, tuple args, dict kwargs): # <<<<<<<<<<<<<< @@ -8896,7 +8924,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___factor int __pyx_t_3; __Pyx_RefNannySetupContext("__factory_call", 0); - /* "providers.pxd":255 + /* "providers.pxd":259 * cdef object instance * * instance = __callable_call(self.__instantiator, args, kwargs) # <<<<<<<<<<<<<< @@ -8905,13 +8933,13 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___factor */ __pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx___instantiator); __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = __pyx_f_19dependency_injector_9providers___callable_call(((struct __pyx_obj_19dependency_injector_9providers_Callable *)__pyx_t_1), __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 255, __pyx_L1_error) + __pyx_t_2 = __pyx_f_19dependency_injector_9providers___callable_call(((struct __pyx_obj_19dependency_injector_9providers_Callable *)__pyx_t_1), __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 259, __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; - /* "providers.pxd":257 + /* "providers.pxd":261 * instance = __callable_call(self.__instantiator, args, kwargs) * * if self.__attributes_len > 0: # <<<<<<<<<<<<<< @@ -8921,7 +8949,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___factor __pyx_t_3 = ((__pyx_v_self->__pyx___attributes_len > 0) != 0); if (__pyx_t_3) { - /* "providers.pxd":259 + /* "providers.pxd":263 * if self.__attributes_len > 0: * __inject_attributes(instance, * self.__attributes, # <<<<<<<<<<<<<< @@ -8931,19 +8959,19 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___factor __pyx_t_2 = __pyx_v_self->__pyx___attributes; __Pyx_INCREF(__pyx_t_2); - /* "providers.pxd":258 + /* "providers.pxd":262 * * if self.__attributes_len > 0: * __inject_attributes(instance, # <<<<<<<<<<<<<< * self.__attributes, * self.__attributes_len) */ - __pyx_t_1 = __pyx_f_19dependency_injector_9providers___inject_attributes(__pyx_v_instance, ((PyObject*)__pyx_t_2), __pyx_v_self->__pyx___attributes_len); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 258, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers___inject_attributes(__pyx_v_instance, ((PyObject*)__pyx_t_2), __pyx_v_self->__pyx___attributes_len); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 262, __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; - /* "providers.pxd":257 + /* "providers.pxd":261 * instance = __callable_call(self.__instantiator, args, kwargs) * * if self.__attributes_len > 0: # <<<<<<<<<<<<<< @@ -8952,7 +8980,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___factor */ } - /* "providers.pxd":262 + /* "providers.pxd":266 * self.__attributes_len) * * return instance # <<<<<<<<<<<<<< @@ -8962,7 +8990,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___factor __pyx_r = __pyx_v_instance; goto __pyx_L0; - /* "providers.pxd":252 + /* "providers.pxd":256 * * * cdef inline object __factory_call(Factory self, tuple args, dict kwargs): # <<<<<<<<<<<<<< @@ -9685,7 +9713,7 @@ static int __Pyx_InitCachedBuiltins(void) { __pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_n_s_super); if (!__pyx_builtin_super) __PYX_ERR(0, 55, __pyx_L1_error) __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s_AttributeError); if (!__pyx_builtin_AttributeError) __PYX_ERR(0, 111, __pyx_L1_error) __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(0, 358, __pyx_L1_error) - __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(1, 193, __pyx_L1_error) + __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(1, 197, __pyx_L1_error) return 0; __pyx_L1_error:; return -1; @@ -10070,25 +10098,27 @@ PyMODINIT_FUNC PyInit_containers(void) __pyx_vtabptr_19dependency_injector_9providers_DelegatedFactory = (struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedFactory*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_DelegatedFactory->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_DelegatedFactory)) __PYX_ERR(1, 80, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_AbstractFactory = __Pyx_ImportType("dependency_injector.providers", "AbstractFactory", sizeof(struct __pyx_obj_19dependency_injector_9providers_AbstractFactory), 1); if (unlikely(!__pyx_ptype_19dependency_injector_9providers_AbstractFactory)) __PYX_ERR(1, 84, __pyx_L1_error) __pyx_vtabptr_19dependency_injector_9providers_AbstractFactory = (struct __pyx_vtabstruct_19dependency_injector_9providers_AbstractFactory*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_AbstractFactory->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_AbstractFactory)) __PYX_ERR(1, 84, __pyx_L1_error) - __pyx_ptype_19dependency_injector_9providers_BaseSingleton = __Pyx_ImportType("dependency_injector.providers", "BaseSingleton", sizeof(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton), 1); if (unlikely(!__pyx_ptype_19dependency_injector_9providers_BaseSingleton)) __PYX_ERR(1, 89, __pyx_L1_error) - __pyx_vtabptr_19dependency_injector_9providers_BaseSingleton = (struct __pyx_vtabstruct_19dependency_injector_9providers_BaseSingleton*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_BaseSingleton->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_BaseSingleton)) __PYX_ERR(1, 89, __pyx_L1_error) - __pyx_ptype_19dependency_injector_9providers_Singleton = __Pyx_ImportType("dependency_injector.providers", "Singleton", sizeof(struct __pyx_obj_19dependency_injector_9providers_Singleton), 1); if (unlikely(!__pyx_ptype_19dependency_injector_9providers_Singleton)) __PYX_ERR(1, 93, __pyx_L1_error) - __pyx_vtabptr_19dependency_injector_9providers_Singleton = (struct __pyx_vtabstruct_19dependency_injector_9providers_Singleton*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_Singleton->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_Singleton)) __PYX_ERR(1, 93, __pyx_L1_error) - __pyx_ptype_19dependency_injector_9providers_DelegatedSingleton = __Pyx_ImportType("dependency_injector.providers", "DelegatedSingleton", sizeof(struct __pyx_obj_19dependency_injector_9providers_DelegatedSingleton), 1); if (unlikely(!__pyx_ptype_19dependency_injector_9providers_DelegatedSingleton)) __PYX_ERR(1, 99, __pyx_L1_error) - __pyx_vtabptr_19dependency_injector_9providers_DelegatedSingleton = (struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedSingleton*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_DelegatedSingleton->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_DelegatedSingleton)) __PYX_ERR(1, 99, __pyx_L1_error) - __pyx_ptype_19dependency_injector_9providers_ThreadSafeSingleton = __Pyx_ImportType("dependency_injector.providers", "ThreadSafeSingleton", sizeof(struct __pyx_obj_19dependency_injector_9providers_ThreadSafeSingleton), 1); if (unlikely(!__pyx_ptype_19dependency_injector_9providers_ThreadSafeSingleton)) __PYX_ERR(1, 103, __pyx_L1_error) - __pyx_vtabptr_19dependency_injector_9providers_ThreadSafeSingleton = (struct __pyx_vtabstruct_19dependency_injector_9providers_ThreadSafeSingleton*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_ThreadSafeSingleton->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_ThreadSafeSingleton)) __PYX_ERR(1, 103, __pyx_L1_error) - __pyx_ptype_19dependency_injector_9providers_DelegatedThreadSafeSingleton = __Pyx_ImportType("dependency_injector.providers", "DelegatedThreadSafeSingleton", sizeof(struct __pyx_obj_19dependency_injector_9providers_DelegatedThreadSafeSingleton), 1); if (unlikely(!__pyx_ptype_19dependency_injector_9providers_DelegatedThreadSafeSingleton)) __PYX_ERR(1, 110, __pyx_L1_error) - __pyx_vtabptr_19dependency_injector_9providers_DelegatedThreadSafeSingleton = (struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedThreadSafeSingleton*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_DelegatedThreadSafeSingleton->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_DelegatedThreadSafeSingleton)) __PYX_ERR(1, 110, __pyx_L1_error) - __pyx_ptype_19dependency_injector_9providers_ThreadLocalSingleton = __Pyx_ImportType("dependency_injector.providers", "ThreadLocalSingleton", sizeof(struct __pyx_obj_19dependency_injector_9providers_ThreadLocalSingleton), 1); if (unlikely(!__pyx_ptype_19dependency_injector_9providers_ThreadLocalSingleton)) __PYX_ERR(1, 114, __pyx_L1_error) - __pyx_vtabptr_19dependency_injector_9providers_ThreadLocalSingleton = (struct __pyx_vtabstruct_19dependency_injector_9providers_ThreadLocalSingleton*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_ThreadLocalSingleton->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_ThreadLocalSingleton)) __PYX_ERR(1, 114, __pyx_L1_error) - __pyx_ptype_19dependency_injector_9providers_DelegatedThreadLocalSingleton = __Pyx_ImportType("dependency_injector.providers", "DelegatedThreadLocalSingleton", sizeof(struct __pyx_obj_19dependency_injector_9providers_DelegatedThreadLocalSingleton), 1); if (unlikely(!__pyx_ptype_19dependency_injector_9providers_DelegatedThreadLocalSingleton)) __PYX_ERR(1, 120, __pyx_L1_error) - __pyx_vtabptr_19dependency_injector_9providers_DelegatedThreadLocalSingleton = (struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedThreadLocalSingleton*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_DelegatedThreadLocalSingleton->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_DelegatedThreadLocalSingleton)) __PYX_ERR(1, 120, __pyx_L1_error) - __pyx_ptype_19dependency_injector_9providers_AbstractSingleton = __Pyx_ImportType("dependency_injector.providers", "AbstractSingleton", sizeof(struct __pyx_obj_19dependency_injector_9providers_AbstractSingleton), 1); if (unlikely(!__pyx_ptype_19dependency_injector_9providers_AbstractSingleton)) __PYX_ERR(1, 124, __pyx_L1_error) - __pyx_vtabptr_19dependency_injector_9providers_AbstractSingleton = (struct __pyx_vtabstruct_19dependency_injector_9providers_AbstractSingleton*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_AbstractSingleton->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_AbstractSingleton)) __PYX_ERR(1, 124, __pyx_L1_error) - __pyx_ptype_19dependency_injector_9providers_Injection = __Pyx_ImportType("dependency_injector.providers", "Injection", sizeof(struct __pyx_obj_19dependency_injector_9providers_Injection), 1); if (unlikely(!__pyx_ptype_19dependency_injector_9providers_Injection)) __PYX_ERR(1, 129, __pyx_L1_error) - __pyx_ptype_19dependency_injector_9providers_PositionalInjection = __Pyx_ImportType("dependency_injector.providers", "PositionalInjection", sizeof(struct __pyx_obj_19dependency_injector_9providers_PositionalInjection), 1); if (unlikely(!__pyx_ptype_19dependency_injector_9providers_PositionalInjection)) __PYX_ERR(1, 136, __pyx_L1_error) - __pyx_ptype_19dependency_injector_9providers_NamedInjection = __Pyx_ImportType("dependency_injector.providers", "NamedInjection", sizeof(struct __pyx_obj_19dependency_injector_9providers_NamedInjection), 1); if (unlikely(!__pyx_ptype_19dependency_injector_9providers_NamedInjection)) __PYX_ERR(1, 140, __pyx_L1_error) + __pyx_ptype_19dependency_injector_9providers_FactoryDelegate = __Pyx_ImportType("dependency_injector.providers", "FactoryDelegate", sizeof(struct __pyx_obj_19dependency_injector_9providers_FactoryDelegate), 1); if (unlikely(!__pyx_ptype_19dependency_injector_9providers_FactoryDelegate)) __PYX_ERR(1, 88, __pyx_L1_error) + __pyx_vtabptr_19dependency_injector_9providers_FactoryDelegate = (struct __pyx_vtabstruct_19dependency_injector_9providers_FactoryDelegate*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_FactoryDelegate->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_FactoryDelegate)) __PYX_ERR(1, 88, __pyx_L1_error) + __pyx_ptype_19dependency_injector_9providers_BaseSingleton = __Pyx_ImportType("dependency_injector.providers", "BaseSingleton", sizeof(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton), 1); if (unlikely(!__pyx_ptype_19dependency_injector_9providers_BaseSingleton)) __PYX_ERR(1, 93, __pyx_L1_error) + __pyx_vtabptr_19dependency_injector_9providers_BaseSingleton = (struct __pyx_vtabstruct_19dependency_injector_9providers_BaseSingleton*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_BaseSingleton->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_BaseSingleton)) __PYX_ERR(1, 93, __pyx_L1_error) + __pyx_ptype_19dependency_injector_9providers_Singleton = __Pyx_ImportType("dependency_injector.providers", "Singleton", sizeof(struct __pyx_obj_19dependency_injector_9providers_Singleton), 1); if (unlikely(!__pyx_ptype_19dependency_injector_9providers_Singleton)) __PYX_ERR(1, 97, __pyx_L1_error) + __pyx_vtabptr_19dependency_injector_9providers_Singleton = (struct __pyx_vtabstruct_19dependency_injector_9providers_Singleton*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_Singleton->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_Singleton)) __PYX_ERR(1, 97, __pyx_L1_error) + __pyx_ptype_19dependency_injector_9providers_DelegatedSingleton = __Pyx_ImportType("dependency_injector.providers", "DelegatedSingleton", sizeof(struct __pyx_obj_19dependency_injector_9providers_DelegatedSingleton), 1); if (unlikely(!__pyx_ptype_19dependency_injector_9providers_DelegatedSingleton)) __PYX_ERR(1, 103, __pyx_L1_error) + __pyx_vtabptr_19dependency_injector_9providers_DelegatedSingleton = (struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedSingleton*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_DelegatedSingleton->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_DelegatedSingleton)) __PYX_ERR(1, 103, __pyx_L1_error) + __pyx_ptype_19dependency_injector_9providers_ThreadSafeSingleton = __Pyx_ImportType("dependency_injector.providers", "ThreadSafeSingleton", sizeof(struct __pyx_obj_19dependency_injector_9providers_ThreadSafeSingleton), 1); if (unlikely(!__pyx_ptype_19dependency_injector_9providers_ThreadSafeSingleton)) __PYX_ERR(1, 107, __pyx_L1_error) + __pyx_vtabptr_19dependency_injector_9providers_ThreadSafeSingleton = (struct __pyx_vtabstruct_19dependency_injector_9providers_ThreadSafeSingleton*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_ThreadSafeSingleton->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_ThreadSafeSingleton)) __PYX_ERR(1, 107, __pyx_L1_error) + __pyx_ptype_19dependency_injector_9providers_DelegatedThreadSafeSingleton = __Pyx_ImportType("dependency_injector.providers", "DelegatedThreadSafeSingleton", sizeof(struct __pyx_obj_19dependency_injector_9providers_DelegatedThreadSafeSingleton), 1); if (unlikely(!__pyx_ptype_19dependency_injector_9providers_DelegatedThreadSafeSingleton)) __PYX_ERR(1, 114, __pyx_L1_error) + __pyx_vtabptr_19dependency_injector_9providers_DelegatedThreadSafeSingleton = (struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedThreadSafeSingleton*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_DelegatedThreadSafeSingleton->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_DelegatedThreadSafeSingleton)) __PYX_ERR(1, 114, __pyx_L1_error) + __pyx_ptype_19dependency_injector_9providers_ThreadLocalSingleton = __Pyx_ImportType("dependency_injector.providers", "ThreadLocalSingleton", sizeof(struct __pyx_obj_19dependency_injector_9providers_ThreadLocalSingleton), 1); if (unlikely(!__pyx_ptype_19dependency_injector_9providers_ThreadLocalSingleton)) __PYX_ERR(1, 118, __pyx_L1_error) + __pyx_vtabptr_19dependency_injector_9providers_ThreadLocalSingleton = (struct __pyx_vtabstruct_19dependency_injector_9providers_ThreadLocalSingleton*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_ThreadLocalSingleton->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_ThreadLocalSingleton)) __PYX_ERR(1, 118, __pyx_L1_error) + __pyx_ptype_19dependency_injector_9providers_DelegatedThreadLocalSingleton = __Pyx_ImportType("dependency_injector.providers", "DelegatedThreadLocalSingleton", sizeof(struct __pyx_obj_19dependency_injector_9providers_DelegatedThreadLocalSingleton), 1); if (unlikely(!__pyx_ptype_19dependency_injector_9providers_DelegatedThreadLocalSingleton)) __PYX_ERR(1, 124, __pyx_L1_error) + __pyx_vtabptr_19dependency_injector_9providers_DelegatedThreadLocalSingleton = (struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedThreadLocalSingleton*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_DelegatedThreadLocalSingleton->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_DelegatedThreadLocalSingleton)) __PYX_ERR(1, 124, __pyx_L1_error) + __pyx_ptype_19dependency_injector_9providers_AbstractSingleton = __Pyx_ImportType("dependency_injector.providers", "AbstractSingleton", sizeof(struct __pyx_obj_19dependency_injector_9providers_AbstractSingleton), 1); if (unlikely(!__pyx_ptype_19dependency_injector_9providers_AbstractSingleton)) __PYX_ERR(1, 128, __pyx_L1_error) + __pyx_vtabptr_19dependency_injector_9providers_AbstractSingleton = (struct __pyx_vtabstruct_19dependency_injector_9providers_AbstractSingleton*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_AbstractSingleton->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_AbstractSingleton)) __PYX_ERR(1, 128, __pyx_L1_error) + __pyx_ptype_19dependency_injector_9providers_Injection = __Pyx_ImportType("dependency_injector.providers", "Injection", sizeof(struct __pyx_obj_19dependency_injector_9providers_Injection), 1); if (unlikely(!__pyx_ptype_19dependency_injector_9providers_Injection)) __PYX_ERR(1, 133, __pyx_L1_error) + __pyx_ptype_19dependency_injector_9providers_PositionalInjection = __Pyx_ImportType("dependency_injector.providers", "PositionalInjection", sizeof(struct __pyx_obj_19dependency_injector_9providers_PositionalInjection), 1); if (unlikely(!__pyx_ptype_19dependency_injector_9providers_PositionalInjection)) __PYX_ERR(1, 140, __pyx_L1_error) + __pyx_ptype_19dependency_injector_9providers_NamedInjection = __Pyx_ImportType("dependency_injector.providers", "NamedInjection", sizeof(struct __pyx_obj_19dependency_injector_9providers_NamedInjection), 1); if (unlikely(!__pyx_ptype_19dependency_injector_9providers_NamedInjection)) __PYX_ERR(1, 144, __pyx_L1_error) /*--- Variable import code ---*/ __pyx_t_1 = __Pyx_ImportModule("dependency_injector.providers"); if (!__pyx_t_1) __PYX_ERR(0, 1, __pyx_L1_error) if (__Pyx_ImportVoidPtr(__pyx_t_1, "CLASS_TYPES", (void **)&__pyx_vp_19dependency_injector_9providers_CLASS_TYPES, "PyObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error) @@ -10648,7 +10678,7 @@ PyMODINIT_FUNC PyInit_containers(void) if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_4) < 0) __PYX_ERR(0, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "providers.pxd":252 + /* "providers.pxd":256 * * * cdef inline object __factory_call(Factory self, tuple args, dict kwargs): # <<<<<<<<<<<<<< diff --git a/src/dependency_injector/providers.c b/src/dependency_injector/providers.c index db4a491b..020e68ef 100644 --- a/src/dependency_injector/providers.c +++ b/src/dependency_injector/providers.c @@ -641,6 +641,7 @@ struct __pyx_obj_19dependency_injector_9providers_Configuration; struct __pyx_obj_19dependency_injector_9providers_Factory; struct __pyx_obj_19dependency_injector_9providers_DelegatedFactory; struct __pyx_obj_19dependency_injector_9providers_AbstractFactory; +struct __pyx_obj_19dependency_injector_9providers_FactoryDelegate; struct __pyx_obj_19dependency_injector_9providers_BaseSingleton; struct __pyx_obj_19dependency_injector_9providers_Singleton; struct __pyx_obj_19dependency_injector_9providers_DelegatedSingleton; @@ -654,7 +655,7 @@ struct __pyx_obj_19dependency_injector_9providers_PositionalInjection; struct __pyx_obj_19dependency_injector_9providers_NamedInjection; struct __pyx_opt_args_19dependency_injector_9providers_deepcopy; -/* "dependency_injector/providers.pxd":166 +/* "dependency_injector/providers.pxd":170 * * * cpdef object deepcopy(object instance, dict memo=*) # <<<<<<<<<<<<<< @@ -829,7 +830,19 @@ struct __pyx_obj_19dependency_injector_9providers_AbstractFactory { }; -/* "dependency_injector/providers.pxd":89 +/* "dependency_injector/providers.pxd":88 + * + * + * cdef class FactoryDelegate(Delegate): # <<<<<<<<<<<<<< + * pass + * + */ +struct __pyx_obj_19dependency_injector_9providers_FactoryDelegate { + struct __pyx_obj_19dependency_injector_9providers_Delegate __pyx_base; +}; + + +/* "dependency_injector/providers.pxd":93 * * # Singleton providers * cdef class BaseSingleton(Provider): # <<<<<<<<<<<<<< @@ -842,7 +855,7 @@ struct __pyx_obj_19dependency_injector_9providers_BaseSingleton { }; -/* "dependency_injector/providers.pxd":93 +/* "dependency_injector/providers.pxd":97 * * * cdef class Singleton(BaseSingleton): # <<<<<<<<<<<<<< @@ -855,7 +868,7 @@ struct __pyx_obj_19dependency_injector_9providers_Singleton { }; -/* "dependency_injector/providers.pxd":99 +/* "dependency_injector/providers.pxd":103 * * * cdef class DelegatedSingleton(Singleton): # <<<<<<<<<<<<<< @@ -867,7 +880,7 @@ struct __pyx_obj_19dependency_injector_9providers_DelegatedSingleton { }; -/* "dependency_injector/providers.pxd":103 +/* "dependency_injector/providers.pxd":107 * * * cdef class ThreadSafeSingleton(BaseSingleton): # <<<<<<<<<<<<<< @@ -881,7 +894,7 @@ struct __pyx_obj_19dependency_injector_9providers_ThreadSafeSingleton { }; -/* "dependency_injector/providers.pxd":110 +/* "dependency_injector/providers.pxd":114 * * * cdef class DelegatedThreadSafeSingleton(ThreadSafeSingleton): # <<<<<<<<<<<<<< @@ -893,7 +906,7 @@ struct __pyx_obj_19dependency_injector_9providers_DelegatedThreadSafeSingleton { }; -/* "dependency_injector/providers.pxd":114 +/* "dependency_injector/providers.pxd":118 * * * cdef class ThreadLocalSingleton(BaseSingleton): # <<<<<<<<<<<<<< @@ -906,7 +919,7 @@ struct __pyx_obj_19dependency_injector_9providers_ThreadLocalSingleton { }; -/* "dependency_injector/providers.pxd":120 +/* "dependency_injector/providers.pxd":124 * * * cdef class DelegatedThreadLocalSingleton(ThreadLocalSingleton): # <<<<<<<<<<<<<< @@ -918,7 +931,7 @@ struct __pyx_obj_19dependency_injector_9providers_DelegatedThreadLocalSingleton }; -/* "dependency_injector/providers.pxd":124 +/* "dependency_injector/providers.pxd":128 * * * cdef class AbstractSingleton(BaseSingleton): # <<<<<<<<<<<<<< @@ -930,7 +943,7 @@ struct __pyx_obj_19dependency_injector_9providers_AbstractSingleton { }; -/* "dependency_injector/providers.pxd":129 +/* "dependency_injector/providers.pxd":133 * * # Injections * cdef class Injection(object): # <<<<<<<<<<<<<< @@ -946,7 +959,7 @@ struct __pyx_obj_19dependency_injector_9providers_Injection { }; -/* "dependency_injector/providers.pxd":136 +/* "dependency_injector/providers.pxd":140 * * * cdef class PositionalInjection(Injection): # <<<<<<<<<<<<<< @@ -958,7 +971,7 @@ struct __pyx_obj_19dependency_injector_9providers_PositionalInjection { }; -/* "dependency_injector/providers.pxd":140 +/* "dependency_injector/providers.pxd":144 * * * cdef class NamedInjection(Injection): # <<<<<<<<<<<<<< @@ -1129,8 +1142,22 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_AbstractFactory { static struct __pyx_vtabstruct_19dependency_injector_9providers_AbstractFactory *__pyx_vtabptr_19dependency_injector_9providers_AbstractFactory; -/* "dependency_injector/providers.pyx":1069 - * 'to overriding provider') +/* "dependency_injector/providers.pyx":1070 + * + * + * cdef class FactoryDelegate(Delegate): # <<<<<<<<<<<<<< + * """Factory delegate injects delegating factory "as is". + * + */ + +struct __pyx_vtabstruct_19dependency_injector_9providers_FactoryDelegate { + struct __pyx_vtabstruct_19dependency_injector_9providers_Delegate __pyx_base; +}; +static struct __pyx_vtabstruct_19dependency_injector_9providers_FactoryDelegate *__pyx_vtabptr_19dependency_injector_9providers_FactoryDelegate; + + +/* "dependency_injector/providers.pyx":1092 + * * * cdef class BaseSingleton(Provider): # <<<<<<<<<<<<<< * """Base class of singleton providers.""" @@ -1143,7 +1170,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_BaseSingleton { static struct __pyx_vtabstruct_19dependency_injector_9providers_BaseSingleton *__pyx_vtabptr_19dependency_injector_9providers_BaseSingleton; -/* "dependency_injector/providers.pyx":1243 +/* "dependency_injector/providers.pyx":1266 * * * cdef class Singleton(BaseSingleton): # <<<<<<<<<<<<<< @@ -1157,7 +1184,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_Singleton { static struct __pyx_vtabstruct_19dependency_injector_9providers_Singleton *__pyx_vtabptr_19dependency_injector_9providers_Singleton; -/* "dependency_injector/providers.pyx":1304 +/* "dependency_injector/providers.pyx":1327 * * * cdef class DelegatedSingleton(Singleton): # <<<<<<<<<<<<<< @@ -1171,7 +1198,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedSingleton { static struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedSingleton *__pyx_vtabptr_19dependency_injector_9providers_DelegatedSingleton; -/* "dependency_injector/providers.pyx":1325 +/* "dependency_injector/providers.pyx":1348 * * * cdef class ThreadSafeSingleton(BaseSingleton): # <<<<<<<<<<<<<< @@ -1185,7 +1212,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_ThreadSafeSingleton { static struct __pyx_vtabstruct_19dependency_injector_9providers_ThreadSafeSingleton *__pyx_vtabptr_19dependency_injector_9providers_ThreadSafeSingleton; -/* "dependency_injector/providers.pyx":1366 +/* "dependency_injector/providers.pyx":1389 * * * cdef class DelegatedThreadSafeSingleton(ThreadSafeSingleton): # <<<<<<<<<<<<<< @@ -1199,7 +1226,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedThreadSafeSing static struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedThreadSafeSingleton *__pyx_vtabptr_19dependency_injector_9providers_DelegatedThreadSafeSingleton; -/* "dependency_injector/providers.pyx":1387 +/* "dependency_injector/providers.pyx":1410 * * * cdef class ThreadLocalSingleton(BaseSingleton): # <<<<<<<<<<<<<< @@ -1213,7 +1240,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_ThreadLocalSingleton { static struct __pyx_vtabstruct_19dependency_injector_9providers_ThreadLocalSingleton *__pyx_vtabptr_19dependency_injector_9providers_ThreadLocalSingleton; -/* "dependency_injector/providers.pyx":1440 +/* "dependency_injector/providers.pyx":1463 * * * cdef class DelegatedThreadLocalSingleton(ThreadLocalSingleton): # <<<<<<<<<<<<<< @@ -1227,7 +1254,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedThreadLocalSin static struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedThreadLocalSingleton *__pyx_vtabptr_19dependency_injector_9providers_DelegatedThreadLocalSingleton; -/* "dependency_injector/providers.pyx":1461 +/* "dependency_injector/providers.pyx":1484 * * * cdef class AbstractSingleton(BaseSingleton): # <<<<<<<<<<<<<< @@ -1802,6 +1829,7 @@ static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_Configuration static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_Factory = 0; static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_DelegatedFactory = 0; static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_AbstractFactory = 0; +static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_FactoryDelegate = 0; static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_BaseSingleton = 0; static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_Singleton = 0; static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_DelegatedSingleton = 0; @@ -1879,6 +1907,7 @@ static const char __pyx_k_name_2[] = "name"; static const char __pyx_k_update[] = "update"; static const char __pyx_k_address[] = "address"; static const char __pyx_k_default[] = "default"; +static const char __pyx_k_factory[] = "factory"; static const char __pyx_k_im_func[] = "im_func"; static const char __pyx_k_im_self[] = "im_self"; static const char __pyx_k_provide[] = "_provide"; @@ -1924,6 +1953,7 @@ static const char __pyx_k_deepcopy_dispatch[] = "_deepcopy_dispatch"; static const char __pyx_k_NotImplementedError[] = "NotImplementedError"; static const char __pyx_k_reset_last_overriding[] = "reset_last_overriding"; static const char __pyx_k_Dependency_is_not_defined[] = "Dependency is not defined"; +static const char __pyx_k_0_can_wrap_only_1_providers[] = "{0} can wrap only {1} providers"; static const char __pyx_k_Provider_0_is_not_overridden[] = "Provider {0} is not overridden"; static const char __pyx_k_provider_provides_at_address[] = "<{provider}({provides}) at {address}>"; static const char __pyx_k_dependency_injector_providers[] = "dependency_injector.providers"; @@ -1937,6 +1967,7 @@ static const char __pyx_k_Expected_provider_instance_got_0[] = "Expected provide static const char __pyx_k_Provider_0_could_not_be_overridd[] = "Provider {0} could not be overridden with itself"; static const char __pyx_k_Provider_0_expected_to_get_calla[] = "Provider {0} expected to get callable, got {0}"; static PyObject *__pyx_kp_s_0_can_provide_only_1_instances; +static PyObject *__pyx_kp_s_0_can_wrap_only_1_providers; static PyObject *__pyx_kp_s_0_is_not_an; static PyObject *__pyx_kp_s_0_must_be_overridden_before_cal; static PyObject *__pyx_kp_s_0_must_be_overridden_only_by_1; @@ -1980,6 +2011,7 @@ static PyObject *__pyx_n_s_dependency_injector_providers; static PyObject *__pyx_n_s_enter; static PyObject *__pyx_n_s_errors; static PyObject *__pyx_n_s_exit; +static PyObject *__pyx_n_s_factory; static PyObject *__pyx_n_s_format; static PyObject *__pyx_n_s_get; static PyObject *__pyx_n_s_get_child_name; @@ -2105,6 +2137,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_7Factory_24_provide(s static PyObject *__pyx_pf_19dependency_injector_9providers_15AbstractFactory___call__(struct __pyx_obj_19dependency_injector_9providers_AbstractFactory *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_15AbstractFactory_2override(struct __pyx_obj_19dependency_injector_9providers_AbstractFactory *__pyx_v_self, PyObject *__pyx_v_provider); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_15AbstractFactory_4_provide(struct __pyx_obj_19dependency_injector_9providers_AbstractFactory *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */ +static int __pyx_pf_19dependency_injector_9providers_15FactoryDelegate___init__(struct __pyx_obj_19dependency_injector_9providers_FactoryDelegate *__pyx_v_self, PyObject *__pyx_v_factory); /* proto */ static int __pyx_pf_19dependency_injector_9providers_13BaseSingleton___init__(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self, PyObject *__pyx_v_provides, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_2__str__(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_4__deepcopy__(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton *__pyx_v_self, PyObject *__pyx_v_memo); /* proto */ @@ -2162,6 +2195,7 @@ static PyObject *__pyx_tp_new_19dependency_injector_9providers_Configuration(PyT static PyObject *__pyx_tp_new_19dependency_injector_9providers_Factory(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_19dependency_injector_9providers_DelegatedFactory(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_19dependency_injector_9providers_AbstractFactory(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_19dependency_injector_9providers_FactoryDelegate(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_19dependency_injector_9providers_BaseSingleton(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_19dependency_injector_9providers_Singleton(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_19dependency_injector_9providers_DelegatedSingleton(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ @@ -14779,7 +14813,313 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_15AbstractFactory_4_p return __pyx_r; } -/* "dependency_injector/providers.pyx":1074 +/* "dependency_injector/providers.pyx":1080 + * """ + * + * def __init__(self, factory): # <<<<<<<<<<<<<< + * """Initializer. + * + */ + +/* Python wrapper */ +static int __pyx_pw_19dependency_injector_9providers_15FactoryDelegate_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_19dependency_injector_9providers_15FactoryDelegate___init__[] = "Initializer.\n\n :param provides: Value that have to be provided.\n :type provides: object\n "; +#if CYTHON_COMPILING_IN_CPYTHON +struct wrapperbase __pyx_wrapperbase_19dependency_injector_9providers_15FactoryDelegate___init__; +#endif +static int __pyx_pw_19dependency_injector_9providers_15FactoryDelegate_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_factory = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_factory,0}; + PyObject* values[1] = {0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_factory)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 1080, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + } + __pyx_v_factory = values[0]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1080, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("dependency_injector.providers.FactoryDelegate.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_19dependency_injector_9providers_15FactoryDelegate___init__(((struct __pyx_obj_19dependency_injector_9providers_FactoryDelegate *)__pyx_v_self), __pyx_v_factory); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_19dependency_injector_9providers_15FactoryDelegate___init__(struct __pyx_obj_19dependency_injector_9providers_FactoryDelegate *__pyx_v_self, PyObject *__pyx_v_factory) { + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + int __pyx_t_9; + PyObject *__pyx_t_10 = NULL; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "dependency_injector/providers.pyx":1086 + * :type provides: object + * """ + * if isinstance(factory, Factory) is False: # <<<<<<<<<<<<<< + * raise Error('{0} can wrap only {1} providers'.format( + * self.__class__, Factory)) + */ + __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_factory, __pyx_ptype_19dependency_injector_9providers_Factory); + __pyx_t_2 = ((__pyx_t_1 == 0) != 0); + if (__pyx_t_2) { + + /* "dependency_injector/providers.pyx":1087 + * """ + * if isinstance(factory, Factory) is False: + * raise Error('{0} can wrap only {1} providers'.format( # <<<<<<<<<<<<<< + * self.__class__, Factory)) + * super(Delegate, self).__init__(factory) + */ + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1087, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_can_wrap_only_1_providers, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1087, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "dependency_injector/providers.pyx":1088 + * if isinstance(factory, Factory) is False: + * raise Error('{0} can wrap only {1} providers'.format( + * self.__class__, Factory)) # <<<<<<<<<<<<<< + * super(Delegate, self).__init__(factory) + * + */ + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1088, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = NULL; + __pyx_t_9 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_9 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_7, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Factory)}; + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1087, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_7, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Factory)}; + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1087, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } else + #endif + { + __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1087, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (__pyx_t_8) { + __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL; + } + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_7); + __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Factory)); + __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Factory)); + PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Factory)); + __pyx_t_7 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1087, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + if (!__pyx_t_6) { + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1087, __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(1, 1087, __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 + #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(1, 1087, __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_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1087, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_6); __pyx_t_6 = NULL; + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_5); + __pyx_t_5 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_10, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1087, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + } + } + __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(1, 1087, __pyx_L1_error) + + /* "dependency_injector/providers.pyx":1086 + * :type provides: object + * """ + * if isinstance(factory, Factory) is False: # <<<<<<<<<<<<<< + * raise Error('{0} can wrap only {1} providers'.format( + * self.__class__, Factory)) + */ + } + + /* "dependency_injector/providers.pyx":1089 + * raise Error('{0} can wrap only {1} providers'.format( + * self.__class__, Factory)) + * super(Delegate, self).__init__(factory) # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1089, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Delegate)); + __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Delegate)); + PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_Delegate)); + __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_10 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_4, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1089, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_init); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1089, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_10 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_10)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_10); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + if (!__pyx_t_10) { + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_factory); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1089, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } else { + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_v_factory}; + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1089, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_GOTREF(__pyx_t_3); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_v_factory}; + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1089, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_GOTREF(__pyx_t_3); + } else + #endif + { + __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1089, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_10); __pyx_t_10 = NULL; + __Pyx_INCREF(__pyx_v_factory); + __Pyx_GIVEREF(__pyx_v_factory); + PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_factory); + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1089, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "dependency_injector/providers.pyx":1080 + * """ + * + * def __init__(self, factory): # <<<<<<<<<<<<<< + * """Initializer. + * + */ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_AddTraceback("dependency_injector.providers.FactoryDelegate.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "dependency_injector/providers.pyx":1097 * provided_type = None * * def __init__(self, provides, *args, **kwargs): # <<<<<<<<<<<<<< @@ -14832,7 +15172,7 @@ static int __pyx_pw_19dependency_injector_9providers_13BaseSingleton_1__init__(P } 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(1, 1074, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "__init__") < 0)) __PYX_ERR(1, 1097, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) < 1) { goto __pyx_L5_argtuple_error; @@ -14843,7 +15183,7 @@ static int __pyx_pw_19dependency_injector_9providers_13BaseSingleton_1__init__(P } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1074, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1097, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0; __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; @@ -14877,19 +15217,19 @@ static int __pyx_pf_19dependency_injector_9providers_13BaseSingleton___init__(st PyObject *__pyx_t_12 = NULL; __Pyx_RefNannySetupContext("__init__", 0); - /* "dependency_injector/providers.pyx":1086 + /* "dependency_injector/providers.pyx":1109 * :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(1, 1086, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1109, __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(1, 1086, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_provided_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1109, __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(1, 1086, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 1109, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_4) { } else { @@ -14897,25 +15237,25 @@ static int __pyx_pf_19dependency_injector_9providers_13BaseSingleton___init__(st goto __pyx_L4_bool_binop_done; } - /* "dependency_injector/providers.pyx":1087 + /* "dependency_injector/providers.pyx":1110 * """ * 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(1, 1087, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1110, __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(1, 1087, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_provided_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1110, __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(1, 1087, __pyx_L1_error) + __pyx_t_4 = PyObject_IsSubclass(__pyx_v_provides, __pyx_t_2); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(1, 1110, __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.pyx":1086 + /* "dependency_injector/providers.pyx":1109 * :type kwargs: dict[str, object] * """ * if (self.__class__.provided_type and # <<<<<<<<<<<<<< @@ -14924,30 +15264,30 @@ static int __pyx_pf_19dependency_injector_9providers_13BaseSingleton___init__(st */ if (__pyx_t_1) { - /* "dependency_injector/providers.pyx":1088 + /* "dependency_injector/providers.pyx":1111 * 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(1, 1088, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_Error); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1111, __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(1, 1088, __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(1, 1111, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - /* "dependency_injector/providers.pyx":1089 + /* "dependency_injector/providers.pyx":1112 * not issubclass(provides, self.__class__.provided_type)): * raise Error('{0} can provide only {1} instances'.format( * self.__class__, self.__class__.provided_type)) # <<<<<<<<<<<<<< * * self.__instantiator = Factory(provides, *args, **kwargs) */ - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1089, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1112, __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(1, 1089, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1112, __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(1, 1089, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_provided_type); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1112, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = NULL; @@ -14965,7 +15305,7 @@ static int __pyx_pf_19dependency_injector_9providers_13BaseSingleton___init__(st #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(1, 1088, __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(1, 1111, __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; @@ -14975,7 +15315,7 @@ static int __pyx_pf_19dependency_injector_9providers_13BaseSingleton___init__(st #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(1, 1088, __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(1, 1111, __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; @@ -14983,7 +15323,7 @@ static int __pyx_pf_19dependency_injector_9providers_13BaseSingleton___init__(st } else #endif { - __pyx_t_12 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 1088, __pyx_L1_error) + __pyx_t_12 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 1111, __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; @@ -14994,7 +15334,7 @@ static int __pyx_pf_19dependency_injector_9providers_13BaseSingleton___init__(st 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(1, 1088, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_12, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1111, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } @@ -15010,14 +15350,14 @@ static int __pyx_pf_19dependency_injector_9providers_13BaseSingleton___init__(st } } if (!__pyx_t_7) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1088, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1111, __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(1, 1088, __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(1, 1111, __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; @@ -15026,20 +15366,20 @@ static int __pyx_pf_19dependency_injector_9providers_13BaseSingleton___init__(st #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(1, 1088, __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(1, 1111, __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(1, 1088, __pyx_L1_error) + __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 1111, __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(1, 1088, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1111, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } @@ -15047,9 +15387,9 @@ static int __pyx_pf_19dependency_injector_9providers_13BaseSingleton___init__(st __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(1, 1088, __pyx_L1_error) + __PYX_ERR(1, 1111, __pyx_L1_error) - /* "dependency_injector/providers.pyx":1086 + /* "dependency_injector/providers.pyx":1109 * :type kwargs: dict[str, object] * """ * if (self.__class__.provided_type and # <<<<<<<<<<<<<< @@ -15058,22 +15398,22 @@ static int __pyx_pf_19dependency_injector_9providers_13BaseSingleton___init__(st */ } - /* "dependency_injector/providers.pyx":1091 + /* "dependency_injector/providers.pyx":1114 * self.__class__, self.__class__.provided_type)) * * self.__instantiator = Factory(provides, *args, **kwargs) # <<<<<<<<<<<<<< * * super(BaseSingleton, self).__init__() */ - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1091, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1114, __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(1, 1091, __pyx_L1_error) + __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_v_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1114, __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_Factory), __pyx_t_3, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1091, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Factory), __pyx_t_3, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1114, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GIVEREF(__pyx_t_2); @@ -15082,14 +15422,14 @@ static int __pyx_pf_19dependency_injector_9providers_13BaseSingleton___init__(st __pyx_v_self->__pyx___instantiator = ((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":1093 + /* "dependency_injector/providers.pyx":1116 * self.__instantiator = Factory(provides, *args, **kwargs) * * super(BaseSingleton, self).__init__() # <<<<<<<<<<<<<< * * def __str__(self): */ - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1093, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_BaseSingleton)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_BaseSingleton)); @@ -15097,10 +15437,10 @@ static int __pyx_pf_19dependency_injector_9providers_13BaseSingleton___init__(st __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(1, 1093, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 1116, __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(1, 1093, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = NULL; @@ -15114,16 +15454,16 @@ static int __pyx_pf_19dependency_injector_9providers_13BaseSingleton___init__(st } } if (__pyx_t_12) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1093, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1116, __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(1, 1093, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1116, __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.pyx":1074 + /* "dependency_injector/providers.pyx":1097 * provided_type = None * * def __init__(self, provides, *args, **kwargs): # <<<<<<<<<<<<<< @@ -15150,7 +15490,7 @@ static int __pyx_pf_19dependency_injector_9providers_13BaseSingleton___init__(st return __pyx_r; } -/* "dependency_injector/providers.pyx":1095 +/* "dependency_injector/providers.pyx":1118 * super(BaseSingleton, self).__init__() * * def __str__(self): # <<<<<<<<<<<<<< @@ -15182,7 +15522,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_2__st PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__str__", 0); - /* "dependency_injector/providers.pyx":1100 + /* "dependency_injector/providers.pyx":1123 * :rtype: str * """ * return represent_provider(provider=self, # <<<<<<<<<<<<<< @@ -15191,31 +15531,31 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_2__st */ __Pyx_XDECREF(__pyx_r); - /* "dependency_injector/providers.pyx":1101 + /* "dependency_injector/providers.pyx":1124 * """ * return represent_provider(provider=self, * provides=self.__instantiator.cls) # <<<<<<<<<<<<<< * * def __deepcopy__(self, memo): */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_cls); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1101, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_cls); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - /* "dependency_injector/providers.pyx":1100 + /* "dependency_injector/providers.pyx":1123 * :rtype: str * """ * return represent_provider(provider=self, # <<<<<<<<<<<<<< * provides=self.__instantiator.cls) * */ - __pyx_t_2 = __pyx_f_19dependency_injector_9providers_represent_provider(((PyObject *)__pyx_v_self), __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1100, __pyx_L1_error) + __pyx_t_2 = __pyx_f_19dependency_injector_9providers_represent_provider(((PyObject *)__pyx_v_self), __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1123, __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.pyx":1095 + /* "dependency_injector/providers.pyx":1118 * super(BaseSingleton, self).__init__() * * def __str__(self): # <<<<<<<<<<<<<< @@ -15235,7 +15575,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_2__st return __pyx_r; } -/* "dependency_injector/providers.pyx":1103 +/* "dependency_injector/providers.pyx":1126 * provides=self.__instantiator.cls) * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< @@ -15275,21 +15615,21 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_4__de PyObject *__pyx_t_11 = NULL; __Pyx_RefNannySetupContext("__deepcopy__", 0); - /* "dependency_injector/providers.pyx":1105 + /* "dependency_injector/providers.pyx":1128 * 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(1, 1105, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_memo, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1128, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1105, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1128, __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(1, 1105, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_id, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1128, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -15303,14 +15643,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_4__de } } if (!__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1105, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1128, __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(1, 1105, __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(1, 1128, __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; @@ -15319,20 +15659,20 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_4__de #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(1, 1105, __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(1, 1128, __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(1, 1105, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1128, __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(1, 1105, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1128, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } @@ -15341,7 +15681,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_4__de __pyx_v_copied = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1106 + /* "dependency_injector/providers.pyx":1129 * """Create and return full copy of provider.""" * copied = memo.get(id(self)) * if copied is not None: # <<<<<<<<<<<<<< @@ -15352,7 +15692,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_4__de __pyx_t_7 = (__pyx_t_6 != 0); if (__pyx_t_7) { - /* "dependency_injector/providers.pyx":1107 + /* "dependency_injector/providers.pyx":1130 * copied = memo.get(id(self)) * if copied is not None: * return copied # <<<<<<<<<<<<<< @@ -15364,7 +15704,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_4__de __pyx_r = __pyx_v_copied; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1106 + /* "dependency_injector/providers.pyx":1129 * """Create and return full copy of provider.""" * copied = memo.get(id(self)) * if copied is not None: # <<<<<<<<<<<<<< @@ -15373,91 +15713,91 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_4__de */ } - /* "dependency_injector/providers.pyx":1109 + /* "dependency_injector/providers.pyx":1132 * 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(1, 1109, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1132, __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(1, 1109, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_cls); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1132, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1109, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1132, __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.pyx":1110 + /* "dependency_injector/providers.pyx":1133 * * 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(1, 1110, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1133, __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(1, 1110, __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(1, 1133, __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_deepcopy(__pyx_t_2, 0, &__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1110, __pyx_L1_error) + __pyx_t_4 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_2, 0, &__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":1109 + /* "dependency_injector/providers.pyx":1132 * 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(1, 1109, __pyx_L1_error) + __pyx_t_2 = PySequence_Tuple(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1132, __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(1, 1109, __pyx_L1_error) + __pyx_t_4 = PyNumber_Add(__pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1132, __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.pyx":1111 + /* "dependency_injector/providers.pyx":1134 * 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(1, 1111, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_kwargs); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1134, __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(1, 1111, __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(1, 1134, __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_deepcopy(__pyx_t_5, 0, &__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1111, __pyx_L1_error) + __pyx_t_3 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_5, 0, &__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1134, __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(1, 1111, __pyx_L1_error) + __PYX_ERR(1, 1134, __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(1, 1111, __pyx_L1_error) + __pyx_t_2 = PyDict_Copy(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1134, __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(1, 1109, __pyx_L1_error) + __pyx_t_2 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1132, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - /* "dependency_injector/providers.pyx":1109 + /* "dependency_injector/providers.pyx":1132 * 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(1, 1109, __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(1, 1132, __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; @@ -15465,58 +15805,58 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_4__de __Pyx_DECREF_SET(__pyx_v_copied, __pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/providers.pyx":1112 + /* "dependency_injector/providers.pyx":1135 * *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(1, 1112, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_copied, __pyx_n_s_set_attributes); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1135, __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(1, 1112, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_attributes); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1135, __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(1, 1112, __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(1, 1135, __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_deepcopy(__pyx_t_4, 0, &__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1112, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_4, 0, &__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1135, __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(1, 1112, __pyx_L1_error) + __PYX_ERR(1, 1135, __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(1, 1112, __pyx_L1_error) + __pyx_t_2 = PyDict_Copy(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1135, __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(1, 1112, __pyx_L1_error) + __pyx_t_2 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1135, __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(1, 1112, __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(1, 1135, __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.pyx":1114 + /* "dependency_injector/providers.pyx":1137 * 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(1, 1114, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_overridden); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1137, __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(1, 1114, __pyx_L1_error) + __pyx_t_9 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1137, __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(1, 1114, __pyx_L1_error) + __pyx_t_10 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1137, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -15524,17 +15864,17 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_4__de 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(1, 1114, __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(1, 1137, __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(1, 1114, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1137, __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(1, 1114, __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(1, 1137, __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(1, 1114, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1137, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -15544,7 +15884,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_4__de 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(1, 1114, __pyx_L1_error) + else __PYX_ERR(1, 1137, __pyx_L1_error) } break; } @@ -15553,19 +15893,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_4__de __Pyx_XDECREF_SET(__pyx_v_overriding_provider, __pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1115 + /* "dependency_injector/providers.pyx":1138 * * 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(1, 1115, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_copied, __pyx_n_s_override); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1138, __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(1, 1115, __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(1, 1138, __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_deepcopy(__pyx_v_overriding_provider, 0, &__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1115, __pyx_L1_error) + __pyx_t_4 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_v_overriding_provider, 0, &__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1138, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -15578,14 +15918,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_4__de } } if (!__pyx_t_5) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1115, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1138, __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(1, 1115, __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(1, 1138, __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; @@ -15594,20 +15934,20 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_4__de #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(1, 1115, __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(1, 1138, __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(1, 1115, __pyx_L1_error) + __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 1138, __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(1, 1115, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1138, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } @@ -15615,7 +15955,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_4__de __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1114 + /* "dependency_injector/providers.pyx":1137 * copied.set_attributes(**deepcopy(self.attributes, memo)) * * for overriding_provider in self.overridden: # <<<<<<<<<<<<<< @@ -15625,7 +15965,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_4__de } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":1117 + /* "dependency_injector/providers.pyx":1140 * copied.override(deepcopy(overriding_provider, memo)) * * return copied # <<<<<<<<<<<<<< @@ -15637,7 +15977,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_4__de __pyx_r = __pyx_v_copied; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1103 + /* "dependency_injector/providers.pyx":1126 * provides=self.__instantiator.cls) * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< @@ -15663,7 +16003,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_4__de return __pyx_r; } -/* "dependency_injector/providers.pyx":1120 +/* "dependency_injector/providers.pyx":1143 * * @property * def cls(self): # <<<<<<<<<<<<<< @@ -15690,7 +16030,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_3cls_ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - /* "dependency_injector/providers.pyx":1122 + /* "dependency_injector/providers.pyx":1145 * def cls(self): * """Return provided type.""" * return self.__instantiator.cls # <<<<<<<<<<<<<< @@ -15698,13 +16038,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_3cls_ * @property */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_cls); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1122, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_cls); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1145, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1120 + /* "dependency_injector/providers.pyx":1143 * * @property * def cls(self): # <<<<<<<<<<<<<< @@ -15723,7 +16063,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_3cls_ return __pyx_r; } -/* "dependency_injector/providers.pyx":1125 +/* "dependency_injector/providers.pyx":1148 * * @property * def args(self): # <<<<<<<<<<<<<< @@ -15750,7 +16090,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_4args PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - /* "dependency_injector/providers.pyx":1127 + /* "dependency_injector/providers.pyx":1150 * def args(self): * """Return positional argument injections.""" * return self.__instantiator.args # <<<<<<<<<<<<<< @@ -15758,13 +16098,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_4args * 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(1, 1127, __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(1, 1150, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1125 + /* "dependency_injector/providers.pyx":1148 * * @property * def args(self): # <<<<<<<<<<<<<< @@ -15783,7 +16123,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_4args return __pyx_r; } -/* "dependency_injector/providers.pyx":1129 +/* "dependency_injector/providers.pyx":1152 * return self.__instantiator.args * * def add_args(self, *args): # <<<<<<<<<<<<<< @@ -15817,21 +16157,21 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_6add_ PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("add_args", 0); - /* "dependency_injector/providers.pyx":1137 + /* "dependency_injector/providers.pyx":1160 * :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(1, 1137, __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(1, 1160, __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(1, 1137, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1160, __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.pyx":1138 + /* "dependency_injector/providers.pyx":1161 * """ * self.__instantiator.add_args(*args) * return self # <<<<<<<<<<<<<< @@ -15843,7 +16183,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_6add_ __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers.pyx":1129 + /* "dependency_injector/providers.pyx":1152 * return self.__instantiator.args * * def add_args(self, *args): # <<<<<<<<<<<<<< @@ -15863,7 +16203,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_6add_ return __pyx_r; } -/* "dependency_injector/providers.pyx":1140 +/* "dependency_injector/providers.pyx":1163 * return self * * def set_args(self, *args): # <<<<<<<<<<<<<< @@ -15897,21 +16237,21 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_8set_ PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("set_args", 0); - /* "dependency_injector/providers.pyx":1150 + /* "dependency_injector/providers.pyx":1173 * :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(1, 1150, __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(1, 1173, __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(1, 1150, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1173, __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.pyx":1151 + /* "dependency_injector/providers.pyx":1174 * """ * self.__instantiator.set_args(*args) * return self # <<<<<<<<<<<<<< @@ -15923,7 +16263,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_8set_ __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers.pyx":1140 + /* "dependency_injector/providers.pyx":1163 * return self * * def set_args(self, *args): # <<<<<<<<<<<<<< @@ -15943,7 +16283,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_8set_ return __pyx_r; } -/* "dependency_injector/providers.pyx":1153 +/* "dependency_injector/providers.pyx":1176 * return self * * def clear_args(self): # <<<<<<<<<<<<<< @@ -15973,14 +16313,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_10cle PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("clear_args", 0); - /* "dependency_injector/providers.pyx":1158 + /* "dependency_injector/providers.pyx":1181 * :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(1, 1158, __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(1, 1181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -15993,16 +16333,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_10cle } } if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1158, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1181, __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(1, 1158, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1181, __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.pyx":1159 + /* "dependency_injector/providers.pyx":1182 * """ * self.__instantiator.clear_args() * return self # <<<<<<<<<<<<<< @@ -16014,7 +16354,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_10cle __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers.pyx":1153 + /* "dependency_injector/providers.pyx":1176 * return self * * def clear_args(self): # <<<<<<<<<<<<<< @@ -16035,7 +16375,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_10cle return __pyx_r; } -/* "dependency_injector/providers.pyx":1162 +/* "dependency_injector/providers.pyx":1185 * * @property * def kwargs(self): # <<<<<<<<<<<<<< @@ -16062,7 +16402,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_6kwar PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - /* "dependency_injector/providers.pyx":1164 + /* "dependency_injector/providers.pyx":1187 * def kwargs(self): * """Return keyword argument injections.""" * return self.__instantiator.kwargs # <<<<<<<<<<<<<< @@ -16070,13 +16410,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_6kwar * 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(1, 1164, __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(1, 1187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1162 + /* "dependency_injector/providers.pyx":1185 * * @property * def kwargs(self): # <<<<<<<<<<<<<< @@ -16095,7 +16435,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_6kwar return __pyx_r; } -/* "dependency_injector/providers.pyx":1166 +/* "dependency_injector/providers.pyx":1189 * return self.__instantiator.kwargs * * def add_kwargs(self, **kwargs): # <<<<<<<<<<<<<< @@ -16135,21 +16475,21 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_12add PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("add_kwargs", 0); - /* "dependency_injector/providers.pyx":1174 + /* "dependency_injector/providers.pyx":1197 * :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(1, 1174, __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(1, 1197, __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(1, 1174, __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(1, 1197, __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.pyx":1175 + /* "dependency_injector/providers.pyx":1198 * """ * self.__instantiator.add_kwargs(**kwargs) * return self # <<<<<<<<<<<<<< @@ -16161,7 +16501,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_12add __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers.pyx":1166 + /* "dependency_injector/providers.pyx":1189 * return self.__instantiator.kwargs * * def add_kwargs(self, **kwargs): # <<<<<<<<<<<<<< @@ -16181,7 +16521,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_12add return __pyx_r; } -/* "dependency_injector/providers.pyx":1177 +/* "dependency_injector/providers.pyx":1200 * return self * * def set_kwargs(self, **kwargs): # <<<<<<<<<<<<<< @@ -16221,21 +16561,21 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_14set PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("set_kwargs", 0); - /* "dependency_injector/providers.pyx":1187 + /* "dependency_injector/providers.pyx":1210 * :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(1, 1187, __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(1, 1210, __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(1, 1187, __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(1, 1210, __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.pyx":1188 + /* "dependency_injector/providers.pyx":1211 * """ * self.__instantiator.set_kwargs(**kwargs) * return self # <<<<<<<<<<<<<< @@ -16247,7 +16587,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_14set __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers.pyx":1177 + /* "dependency_injector/providers.pyx":1200 * return self * * def set_kwargs(self, **kwargs): # <<<<<<<<<<<<<< @@ -16267,7 +16607,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_14set return __pyx_r; } -/* "dependency_injector/providers.pyx":1190 +/* "dependency_injector/providers.pyx":1213 * return self * * def clear_kwargs(self): # <<<<<<<<<<<<<< @@ -16297,14 +16637,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_16cle PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("clear_kwargs", 0); - /* "dependency_injector/providers.pyx":1195 + /* "dependency_injector/providers.pyx":1218 * :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(1, 1195, __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(1, 1218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -16317,16 +16657,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_16cle } } if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1195, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1218, __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(1, 1195, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1218, __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.pyx":1196 + /* "dependency_injector/providers.pyx":1219 * """ * self.__instantiator.clear_kwargs() * return self # <<<<<<<<<<<<<< @@ -16338,7 +16678,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_16cle __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers.pyx":1190 + /* "dependency_injector/providers.pyx":1213 * return self * * def clear_kwargs(self): # <<<<<<<<<<<<<< @@ -16359,7 +16699,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_16cle return __pyx_r; } -/* "dependency_injector/providers.pyx":1199 +/* "dependency_injector/providers.pyx":1222 * * @property * def attributes(self): # <<<<<<<<<<<<<< @@ -16386,7 +16726,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_10att PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - /* "dependency_injector/providers.pyx":1201 + /* "dependency_injector/providers.pyx":1224 * def attributes(self): * """Return attribute injections.""" * return self.__instantiator.attributes # <<<<<<<<<<<<<< @@ -16394,13 +16734,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_10att * def add_attributes(self, **kwargs): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_attributes); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1201, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_attributes); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1199 + /* "dependency_injector/providers.pyx":1222 * * @property * def attributes(self): # <<<<<<<<<<<<<< @@ -16419,7 +16759,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_10att return __pyx_r; } -/* "dependency_injector/providers.pyx":1203 +/* "dependency_injector/providers.pyx":1226 * return self.__instantiator.attributes * * def add_attributes(self, **kwargs): # <<<<<<<<<<<<<< @@ -16459,21 +16799,21 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_18add PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("add_attributes", 0); - /* "dependency_injector/providers.pyx":1211 + /* "dependency_injector/providers.pyx":1234 * :return: Reference ``self`` * """ * self.__instantiator.add_attributes(**kwargs) # <<<<<<<<<<<<<< * return self * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_add_attributes); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1211, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_add_attributes); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1234, __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(1, 1211, __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(1, 1234, __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.pyx":1212 + /* "dependency_injector/providers.pyx":1235 * """ * self.__instantiator.add_attributes(**kwargs) * return self # <<<<<<<<<<<<<< @@ -16485,7 +16825,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_18add __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers.pyx":1203 + /* "dependency_injector/providers.pyx":1226 * return self.__instantiator.attributes * * def add_attributes(self, **kwargs): # <<<<<<<<<<<<<< @@ -16505,7 +16845,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_18add return __pyx_r; } -/* "dependency_injector/providers.pyx":1214 +/* "dependency_injector/providers.pyx":1237 * return self * * def set_attributes(self, **kwargs): # <<<<<<<<<<<<<< @@ -16545,21 +16885,21 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_20set PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("set_attributes", 0); - /* "dependency_injector/providers.pyx":1224 + /* "dependency_injector/providers.pyx":1247 * :return: Reference ``self`` * """ * self.__instantiator.set_attributes(**kwargs) # <<<<<<<<<<<<<< * return self * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_set_attributes); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1224, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_set_attributes); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1247, __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(1, 1224, __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(1, 1247, __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.pyx":1225 + /* "dependency_injector/providers.pyx":1248 * """ * self.__instantiator.set_attributes(**kwargs) * return self # <<<<<<<<<<<<<< @@ -16571,7 +16911,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_20set __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers.pyx":1214 + /* "dependency_injector/providers.pyx":1237 * return self * * def set_attributes(self, **kwargs): # <<<<<<<<<<<<<< @@ -16591,7 +16931,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_20set return __pyx_r; } -/* "dependency_injector/providers.pyx":1227 +/* "dependency_injector/providers.pyx":1250 * return self * * def clear_attributes(self): # <<<<<<<<<<<<<< @@ -16621,14 +16961,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_22cle PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("clear_attributes", 0); - /* "dependency_injector/providers.pyx":1232 + /* "dependency_injector/providers.pyx":1255 * :return: Reference ``self`` * """ * self.__instantiator.clear_attributes() # <<<<<<<<<<<<<< * return self * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_clear_attributes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1232, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx___instantiator), __pyx_n_s_clear_attributes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1255, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -16641,16 +16981,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_22cle } } if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1232, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1255, __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(1, 1232, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1255, __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.pyx":1233 + /* "dependency_injector/providers.pyx":1256 * """ * self.__instantiator.clear_attributes() * return self # <<<<<<<<<<<<<< @@ -16662,7 +17002,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_22cle __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "dependency_injector/providers.pyx":1227 + /* "dependency_injector/providers.pyx":1250 * return self * * def clear_attributes(self): # <<<<<<<<<<<<<< @@ -16683,7 +17023,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_22cle return __pyx_r; } -/* "dependency_injector/providers.pyx":1235 +/* "dependency_injector/providers.pyx":1258 * return self * * def reset(self): # <<<<<<<<<<<<<< @@ -16711,20 +17051,20 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_24res PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("reset", 0); - /* "dependency_injector/providers.pyx":1240 + /* "dependency_injector/providers.pyx":1263 * :rtype: None * """ * raise NotImplementedError() # <<<<<<<<<<<<<< * * */ - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_builtin_NotImplementedError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1240, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_builtin_NotImplementedError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1263, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(1, 1240, __pyx_L1_error) + __PYX_ERR(1, 1263, __pyx_L1_error) - /* "dependency_injector/providers.pyx":1235 + /* "dependency_injector/providers.pyx":1258 * return self * * def reset(self): # <<<<<<<<<<<<<< @@ -16742,7 +17082,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_13BaseSingleton_24res return __pyx_r; } -/* "dependency_injector/providers.pyx":1274 +/* "dependency_injector/providers.pyx":1297 * """ * * def __init__(self, provides, *args, **kwargs): # <<<<<<<<<<<<<< @@ -16795,7 +17135,7 @@ static int __pyx_pw_19dependency_injector_9providers_9Singleton_1__init__(PyObje } 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(1, 1274, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "__init__") < 0)) __PYX_ERR(1, 1297, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) < 1) { goto __pyx_L5_argtuple_error; @@ -16806,7 +17146,7 @@ static int __pyx_pw_19dependency_injector_9providers_9Singleton_1__init__(PyObje } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1274, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1297, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0; __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; @@ -16831,7 +17171,7 @@ static int __pyx_pf_19dependency_injector_9providers_9Singleton___init__(struct PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__init__", 0); - /* "dependency_injector/providers.pyx":1286 + /* "dependency_injector/providers.pyx":1309 * :type kwargs: dict[str, object] * """ * self.__storage = None # <<<<<<<<<<<<<< @@ -16844,14 +17184,14 @@ static int __pyx_pf_19dependency_injector_9providers_9Singleton___init__(struct __Pyx_DECREF(__pyx_v_self->__pyx___storage); __pyx_v_self->__pyx___storage = Py_None; - /* "dependency_injector/providers.pyx":1287 + /* "dependency_injector/providers.pyx":1310 * """ * self.__storage = None * super(Singleton, self).__init__(provides, *args, **kwargs) # <<<<<<<<<<<<<< * * def reset(self): */ - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1287, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1310, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Singleton)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_Singleton)); @@ -16859,27 +17199,27 @@ static int __pyx_pf_19dependency_injector_9providers_9Singleton___init__(struct __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self)); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1287, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1310, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1287, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1310, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1287, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1310, __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(1, 1287, __pyx_L1_error) + __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_v_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1310, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1287, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1310, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":1274 + /* "dependency_injector/providers.pyx":1297 * """ * * def __init__(self, provides, *args, **kwargs): # <<<<<<<<<<<<<< @@ -16901,7 +17241,7 @@ static int __pyx_pf_19dependency_injector_9providers_9Singleton___init__(struct return __pyx_r; } -/* "dependency_injector/providers.pyx":1289 +/* "dependency_injector/providers.pyx":1312 * super(Singleton, self).__init__(provides, *args, **kwargs) * * def reset(self): # <<<<<<<<<<<<<< @@ -16928,7 +17268,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Singleton_2reset(str __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("reset", 0); - /* "dependency_injector/providers.pyx":1294 + /* "dependency_injector/providers.pyx":1317 * :rtype: None * """ * self.__storage = None # <<<<<<<<<<<<<< @@ -16941,7 +17281,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Singleton_2reset(str __Pyx_DECREF(__pyx_v_self->__pyx___storage); __pyx_v_self->__pyx___storage = Py_None; - /* "dependency_injector/providers.pyx":1289 + /* "dependency_injector/providers.pyx":1312 * super(Singleton, self).__init__(provides, *args, **kwargs) * * def reset(self): # <<<<<<<<<<<<<< @@ -16956,7 +17296,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Singleton_2reset(str return __pyx_r; } -/* "dependency_injector/providers.pyx":1296 +/* "dependency_injector/providers.pyx":1319 * self.__storage = None * * cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<< @@ -16981,7 +17321,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_9Singleton__provide(st 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(1, 1296, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provide); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1319, __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_9Singleton_5_provide)) { __Pyx_XDECREF(__pyx_r); @@ -17001,7 +17341,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_9Singleton__provide(st #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(1, 1296, __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(1, 1319, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -17009,13 +17349,13 @@ static PyObject *__pyx_f_19dependency_injector_9providers_9Singleton__provide(st #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(1, 1296, __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(1, 1319, __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(1, 1296, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1319, __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; @@ -17026,7 +17366,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_9Singleton__provide(st __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(1, 1296, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1319, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -17039,7 +17379,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_9Singleton__provide(st __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - /* "dependency_injector/providers.pyx":1298 + /* "dependency_injector/providers.pyx":1321 * cpdef object _provide(self, tuple args, dict kwargs): * """Return single instance.""" * if self.__storage is None: # <<<<<<<<<<<<<< @@ -17050,7 +17390,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_9Singleton__provide(st __pyx_t_8 = (__pyx_t_7 != 0); if (__pyx_t_8) { - /* "dependency_injector/providers.pyx":1299 + /* "dependency_injector/providers.pyx":1322 * """Return single instance.""" * if self.__storage is None: * self.__storage = __factory_call(self.__instantiator, # <<<<<<<<<<<<<< @@ -17060,18 +17400,18 @@ static PyObject *__pyx_f_19dependency_injector_9providers_9Singleton__provide(st __pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx_base.__pyx___instantiator); __Pyx_INCREF(__pyx_t_1); - /* "dependency_injector/providers.pyx":1300 + /* "dependency_injector/providers.pyx":1323 * if self.__storage is None: * self.__storage = __factory_call(self.__instantiator, * args, kwargs) # <<<<<<<<<<<<<< * return self.__storage * */ - __pyx_t_2 = __pyx_f_19dependency_injector_9providers___factory_call(((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_t_1), __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1299, __pyx_L1_error) + __pyx_t_2 = __pyx_f_19dependency_injector_9providers___factory_call(((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_t_1), __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1322, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1299 + /* "dependency_injector/providers.pyx":1322 * """Return single instance.""" * if self.__storage is None: * self.__storage = __factory_call(self.__instantiator, # <<<<<<<<<<<<<< @@ -17084,7 +17424,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_9Singleton__provide(st __pyx_v_self->__pyx___storage = __pyx_t_2; __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":1298 + /* "dependency_injector/providers.pyx":1321 * cpdef object _provide(self, tuple args, dict kwargs): * """Return single instance.""" * if self.__storage is None: # <<<<<<<<<<<<<< @@ -17093,7 +17433,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_9Singleton__provide(st */ } - /* "dependency_injector/providers.pyx":1301 + /* "dependency_injector/providers.pyx":1324 * self.__storage = __factory_call(self.__instantiator, * args, kwargs) * return self.__storage # <<<<<<<<<<<<<< @@ -17105,7 +17445,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_9Singleton__provide(st __pyx_r = __pyx_v_self->__pyx___storage; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1296 + /* "dependency_injector/providers.pyx":1319 * self.__storage = None * * cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<< @@ -17157,11 +17497,11 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_9Singleton_5_provide( 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(1, 1296, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, 1); __PYX_ERR(1, 1319, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_provide") < 0)) __PYX_ERR(1, 1296, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_provide") < 0)) __PYX_ERR(1, 1319, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -17174,14 +17514,14 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_9Singleton_5_provide( } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1296, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1319, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.Singleton._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(1, 1296, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 1296, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(1, 1319, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 1319, __pyx_L1_error) __pyx_r = __pyx_pf_19dependency_injector_9providers_9Singleton_4_provide(((struct __pyx_obj_19dependency_injector_9providers_Singleton *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs); /* function exit code */ @@ -17199,7 +17539,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Singleton_4_provide( PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("_provide", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_9Singleton__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1296, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_9Singleton__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1319, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -17216,7 +17556,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_9Singleton_4_provide( return __pyx_r; } -/* "dependency_injector/providers.pyx":1334 +/* "dependency_injector/providers.pyx":1357 * """ * * def __init__(self, provides, *args, **kwargs): # <<<<<<<<<<<<<< @@ -17269,7 +17609,7 @@ static int __pyx_pw_19dependency_injector_9providers_19ThreadSafeSingleton_1__in } 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(1, 1334, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "__init__") < 0)) __PYX_ERR(1, 1357, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) < 1) { goto __pyx_L5_argtuple_error; @@ -17280,7 +17620,7 @@ static int __pyx_pw_19dependency_injector_9providers_19ThreadSafeSingleton_1__in } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1334, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1357, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0; __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; @@ -17305,7 +17645,7 @@ static int __pyx_pf_19dependency_injector_9providers_19ThreadSafeSingleton___ini PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__init__", 0); - /* "dependency_injector/providers.pyx":1346 + /* "dependency_injector/providers.pyx":1369 * :type kwargs: dict[str, object] * """ * self.__storage = None # <<<<<<<<<<<<<< @@ -17318,16 +17658,16 @@ static int __pyx_pf_19dependency_injector_9providers_19ThreadSafeSingleton___ini __Pyx_DECREF(__pyx_v_self->__pyx___storage); __pyx_v_self->__pyx___storage = Py_None; - /* "dependency_injector/providers.pyx":1347 + /* "dependency_injector/providers.pyx":1370 * """ * self.__storage = None * self.__storage_lock = self.__class__.storage_lock # <<<<<<<<<<<<<< * super(ThreadSafeSingleton, self).__init__(provides, *args, **kwargs) * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1347, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1370, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_storage_lock); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1347, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_storage_lock); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1370, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GIVEREF(__pyx_t_2); @@ -17336,14 +17676,14 @@ static int __pyx_pf_19dependency_injector_9providers_19ThreadSafeSingleton___ini __pyx_v_self->__pyx___storage_lock = __pyx_t_2; __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":1348 + /* "dependency_injector/providers.pyx":1371 * self.__storage = None * self.__storage_lock = self.__class__.storage_lock * super(ThreadSafeSingleton, self).__init__(provides, *args, **kwargs) # <<<<<<<<<<<<<< * * def reset(self): */ - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1348, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_ThreadSafeSingleton)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_ThreadSafeSingleton)); @@ -17351,27 +17691,27 @@ static int __pyx_pf_19dependency_injector_9providers_19ThreadSafeSingleton___ini __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self)); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1348, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1348, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1348, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_provides); __Pyx_GIVEREF(__pyx_v_provides); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_provides); - __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_v_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1348, __pyx_L1_error) + __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_v_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1348, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1334 + /* "dependency_injector/providers.pyx":1357 * """ * * def __init__(self, provides, *args, **kwargs): # <<<<<<<<<<<<<< @@ -17393,7 +17733,7 @@ static int __pyx_pf_19dependency_injector_9providers_19ThreadSafeSingleton___ini return __pyx_r; } -/* "dependency_injector/providers.pyx":1350 +/* "dependency_injector/providers.pyx":1373 * super(ThreadSafeSingleton, self).__init__(provides, *args, **kwargs) * * def reset(self): # <<<<<<<<<<<<<< @@ -17420,7 +17760,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ThreadSafeSingleton __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("reset", 0); - /* "dependency_injector/providers.pyx":1355 + /* "dependency_injector/providers.pyx":1378 * :rtype: None * """ * self.__storage = None # <<<<<<<<<<<<<< @@ -17433,7 +17773,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ThreadSafeSingleton __Pyx_DECREF(__pyx_v_self->__pyx___storage); __pyx_v_self->__pyx___storage = Py_None; - /* "dependency_injector/providers.pyx":1350 + /* "dependency_injector/providers.pyx":1373 * super(ThreadSafeSingleton, self).__init__(provides, *args, **kwargs) * * def reset(self): # <<<<<<<<<<<<<< @@ -17448,7 +17788,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ThreadSafeSingleton return __pyx_r; } -/* "dependency_injector/providers.pyx":1357 +/* "dependency_injector/providers.pyx":1380 * self.__storage = None * * cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<< @@ -17478,7 +17818,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton_ 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(1, 1357, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provide); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1380, __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_19ThreadSafeSingleton_5_provide)) { __Pyx_XDECREF(__pyx_r); @@ -17498,7 +17838,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton_ #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(1, 1357, __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(1, 1380, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -17506,13 +17846,13 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton_ #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(1, 1357, __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(1, 1380, __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(1, 1357, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1380, __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; @@ -17523,7 +17863,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton_ __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(1, 1357, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1380, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -17536,7 +17876,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton_ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - /* "dependency_injector/providers.pyx":1359 + /* "dependency_injector/providers.pyx":1382 * cpdef object _provide(self, tuple args, dict kwargs): * """Return single instance.""" * with self.__storage_lock: # <<<<<<<<<<<<<< @@ -17544,9 +17884,9 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton_ * self.__storage = __factory_call(self.__instantiator, */ /*with:*/ { - __pyx_t_7 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx___storage_lock, __pyx_n_s_exit); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1359, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx___storage_lock, __pyx_n_s_exit); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1382, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx___storage_lock, __pyx_n_s_enter); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1359, __pyx_L3_error) + __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_v_self->__pyx___storage_lock, __pyx_n_s_enter); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1382, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -17559,10 +17899,10 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton_ } } if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1359, __pyx_L3_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1382, __pyx_L3_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(1, 1359, __pyx_L3_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1382, __pyx_L3_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -17577,7 +17917,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton_ __Pyx_XGOTREF(__pyx_t_10); /*try:*/ { - /* "dependency_injector/providers.pyx":1360 + /* "dependency_injector/providers.pyx":1383 * """Return single instance.""" * with self.__storage_lock: * if self.__storage is None: # <<<<<<<<<<<<<< @@ -17588,7 +17928,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton_ __pyx_t_12 = (__pyx_t_11 != 0); if (__pyx_t_12) { - /* "dependency_injector/providers.pyx":1361 + /* "dependency_injector/providers.pyx":1384 * with self.__storage_lock: * if self.__storage is None: * self.__storage = __factory_call(self.__instantiator, # <<<<<<<<<<<<<< @@ -17598,18 +17938,18 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton_ __pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx_base.__pyx___instantiator); __Pyx_INCREF(__pyx_t_1); - /* "dependency_injector/providers.pyx":1362 + /* "dependency_injector/providers.pyx":1385 * if self.__storage is None: * self.__storage = __factory_call(self.__instantiator, * args, kwargs) # <<<<<<<<<<<<<< * return self.__storage * */ - __pyx_t_2 = __pyx_f_19dependency_injector_9providers___factory_call(((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_t_1), __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1361, __pyx_L7_error) + __pyx_t_2 = __pyx_f_19dependency_injector_9providers___factory_call(((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_t_1), __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1384, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1361 + /* "dependency_injector/providers.pyx":1384 * with self.__storage_lock: * if self.__storage is None: * self.__storage = __factory_call(self.__instantiator, # <<<<<<<<<<<<<< @@ -17622,7 +17962,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton_ __pyx_v_self->__pyx___storage = __pyx_t_2; __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":1360 + /* "dependency_injector/providers.pyx":1383 * """Return single instance.""" * with self.__storage_lock: * if self.__storage is None: # <<<<<<<<<<<<<< @@ -17631,7 +17971,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton_ */ } - /* "dependency_injector/providers.pyx":1359 + /* "dependency_injector/providers.pyx":1382 * cpdef object _provide(self, tuple args, dict kwargs): * """Return single instance.""" * with self.__storage_lock: # <<<<<<<<<<<<<< @@ -17652,20 +17992,20 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton_ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; /*except:*/ { __Pyx_AddTraceback("dependency_injector.providers.ThreadSafeSingleton._provide", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_1, &__pyx_t_3) < 0) __PYX_ERR(1, 1359, __pyx_L9_except_error) + if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_1, &__pyx_t_3) < 0) __PYX_ERR(1, 1382, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = PyTuple_Pack(3, __pyx_t_2, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1359, __pyx_L9_except_error) + __pyx_t_6 = PyTuple_Pack(3, __pyx_t_2, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1382, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_6, NULL); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 1359, __pyx_L9_except_error) + if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 1382, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_13); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - if (__pyx_t_12 < 0) __PYX_ERR(1, 1359, __pyx_L9_except_error) + if (__pyx_t_12 < 0) __PYX_ERR(1, 1382, __pyx_L9_except_error) __pyx_t_11 = ((!(__pyx_t_12 != 0)) != 0); if (__pyx_t_11) { __Pyx_GIVEREF(__pyx_t_2); @@ -17673,7 +18013,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton_ __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ErrRestoreWithState(__pyx_t_2, __pyx_t_1, __pyx_t_3); __pyx_t_2 = 0; __pyx_t_1 = 0; __pyx_t_3 = 0; - __PYX_ERR(1, 1359, __pyx_L9_except_error) + __PYX_ERR(1, 1382, __pyx_L9_except_error) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -17701,7 +18041,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton_ if (__pyx_t_7) { __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__12, NULL); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1359, __pyx_L1_error) + if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1382, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } @@ -17716,7 +18056,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton_ __pyx_L19:; } - /* "dependency_injector/providers.pyx":1363 + /* "dependency_injector/providers.pyx":1386 * self.__storage = __factory_call(self.__instantiator, * args, kwargs) * return self.__storage # <<<<<<<<<<<<<< @@ -17728,7 +18068,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton_ __pyx_r = __pyx_v_self->__pyx___storage; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1357 + /* "dependency_injector/providers.pyx":1380 * self.__storage = None * * cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<< @@ -17780,11 +18120,11 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_19ThreadSafeSingleton 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(1, 1357, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, 1); __PYX_ERR(1, 1380, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_provide") < 0)) __PYX_ERR(1, 1357, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_provide") < 0)) __PYX_ERR(1, 1380, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -17797,14 +18137,14 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_19ThreadSafeSingleton } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1357, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1380, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.ThreadSafeSingleton._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(1, 1357, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 1357, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(1, 1380, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 1380, __pyx_L1_error) __pyx_r = __pyx_pf_19dependency_injector_9providers_19ThreadSafeSingleton_4_provide(((struct __pyx_obj_19dependency_injector_9providers_ThreadSafeSingleton *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs); /* function exit code */ @@ -17822,7 +18162,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ThreadSafeSingleton PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("_provide", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1357, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1380, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -17839,7 +18179,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19ThreadSafeSingleton return __pyx_r; } -/* "dependency_injector/providers.pyx":1405 +/* "dependency_injector/providers.pyx":1428 * """ * * def __init__(self, provides, *args, **kwargs): # <<<<<<<<<<<<<< @@ -17892,7 +18232,7 @@ static int __pyx_pw_19dependency_injector_9providers_20ThreadLocalSingleton_1__i } 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(1, 1405, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "__init__") < 0)) __PYX_ERR(1, 1428, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) < 1) { goto __pyx_L5_argtuple_error; @@ -17903,7 +18243,7 @@ static int __pyx_pw_19dependency_injector_9providers_20ThreadLocalSingleton_1__i } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1405, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1428, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0; __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; @@ -17928,16 +18268,16 @@ static int __pyx_pf_19dependency_injector_9providers_20ThreadLocalSingleton___in PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__init__", 0); - /* "dependency_injector/providers.pyx":1417 + /* "dependency_injector/providers.pyx":1440 * :type kwargs: dict[str, object] * """ * self.__storage = threading.local() # <<<<<<<<<<<<<< * super(ThreadLocalSingleton, self).__init__(provides, *args, **kwargs) * */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_threading); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1417, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_threading); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1440, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_local); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1417, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_local); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1440, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -17951,10 +18291,10 @@ static int __pyx_pf_19dependency_injector_9providers_20ThreadLocalSingleton___in } } if (__pyx_t_2) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1417, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1440, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1417, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1440, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -17964,14 +18304,14 @@ static int __pyx_pf_19dependency_injector_9providers_20ThreadLocalSingleton___in __pyx_v_self->__pyx___storage = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1418 + /* "dependency_injector/providers.pyx":1441 * """ * self.__storage = threading.local() * super(ThreadLocalSingleton, self).__init__(provides, *args, **kwargs) # <<<<<<<<<<<<<< * * def reset(self): */ - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1418, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1441, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_ThreadLocalSingleton)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_ThreadLocalSingleton)); @@ -17979,27 +18319,27 @@ static int __pyx_pf_19dependency_injector_9providers_20ThreadLocalSingleton___in __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self)); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1418, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1441, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1418, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1441, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1418, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1441, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_provides); __Pyx_GIVEREF(__pyx_v_provides); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_provides); - __pyx_t_2 = PyNumber_Add(__pyx_t_3, __pyx_v_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1418, __pyx_L1_error) + __pyx_t_2 = PyNumber_Add(__pyx_t_3, __pyx_v_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1441, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1418, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1441, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/providers.pyx":1405 + /* "dependency_injector/providers.pyx":1428 * """ * * def __init__(self, provides, *args, **kwargs): # <<<<<<<<<<<<<< @@ -18021,7 +18361,7 @@ static int __pyx_pf_19dependency_injector_9providers_20ThreadLocalSingleton___in return __pyx_r; } -/* "dependency_injector/providers.pyx":1420 +/* "dependency_injector/providers.pyx":1443 * super(ThreadLocalSingleton, self).__init__(provides, *args, **kwargs) * * def reset(self): # <<<<<<<<<<<<<< @@ -18048,16 +18388,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_20ThreadLocalSingleto __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("reset", 0); - /* "dependency_injector/providers.pyx":1425 + /* "dependency_injector/providers.pyx":1448 * :rtype: None * """ * self.__storage.instance = None # <<<<<<<<<<<<<< * * cpdef object _provide(self, tuple args, dict kwargs): */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self->__pyx___storage, __pyx_n_s_instance, Py_None) < 0) __PYX_ERR(1, 1425, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self->__pyx___storage, __pyx_n_s_instance, Py_None) < 0) __PYX_ERR(1, 1448, __pyx_L1_error) - /* "dependency_injector/providers.pyx":1420 + /* "dependency_injector/providers.pyx":1443 * super(ThreadLocalSingleton, self).__init__(provides, *args, **kwargs) * * def reset(self): # <<<<<<<<<<<<<< @@ -18077,7 +18417,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_20ThreadLocalSingleto return __pyx_r; } -/* "dependency_injector/providers.pyx":1427 +/* "dependency_injector/providers.pyx":1450 * self.__storage.instance = None * * cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<< @@ -18107,7 +18447,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_20ThreadLocalSingleton 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(1, 1427, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_provide); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1450, __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_20ThreadLocalSingleton_5_provide)) { __Pyx_XDECREF(__pyx_r); @@ -18127,7 +18467,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_20ThreadLocalSingleton #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(1, 1427, __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(1, 1450, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -18135,13 +18475,13 @@ static PyObject *__pyx_f_19dependency_injector_9providers_20ThreadLocalSingleton #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(1, 1427, __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(1, 1450, __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(1, 1427, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1450, __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; @@ -18152,7 +18492,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_20ThreadLocalSingleton __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(1, 1427, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1450, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -18165,7 +18505,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_20ThreadLocalSingleton __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - /* "dependency_injector/providers.pyx":1431 + /* "dependency_injector/providers.pyx":1454 * cdef object instance * * try: # <<<<<<<<<<<<<< @@ -18182,19 +18522,19 @@ static PyObject *__pyx_f_19dependency_injector_9providers_20ThreadLocalSingleton __Pyx_XGOTREF(__pyx_t_9); /*try:*/ { - /* "dependency_injector/providers.pyx":1432 + /* "dependency_injector/providers.pyx":1455 * * try: * instance = self.__storage.instance # <<<<<<<<<<<<<< * except AttributeError: * 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(1, 1432, __pyx_L6_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx___storage, __pyx_n_s_instance); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1455, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_instance = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1431 + /* "dependency_injector/providers.pyx":1454 * cdef object instance * * try: # <<<<<<<<<<<<<< @@ -18214,7 +18554,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_20ThreadLocalSingleton __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1433 + /* "dependency_injector/providers.pyx":1456 * try: * instance = self.__storage.instance * except AttributeError: # <<<<<<<<<<<<<< @@ -18224,12 +18564,12 @@ static PyObject *__pyx_f_19dependency_injector_9providers_20ThreadLocalSingleton __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError); if (__pyx_t_5) { __Pyx_AddTraceback("dependency_injector.providers.ThreadLocalSingleton._provide", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3) < 0) __PYX_ERR(1, 1433, __pyx_L8_except_error) + if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3) < 0) __PYX_ERR(1, 1456, __pyx_L8_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_3); - /* "dependency_injector/providers.pyx":1434 + /* "dependency_injector/providers.pyx":1457 * instance = self.__storage.instance * except AttributeError: * instance = __factory_call(self.__instantiator, args, kwargs) # <<<<<<<<<<<<<< @@ -18238,20 +18578,20 @@ static PyObject *__pyx_f_19dependency_injector_9providers_20ThreadLocalSingleton */ __pyx_t_6 = ((PyObject *)__pyx_v_self->__pyx_base.__pyx___instantiator); __Pyx_INCREF(__pyx_t_6); - __pyx_t_4 = __pyx_f_19dependency_injector_9providers___factory_call(((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_t_6), __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1434, __pyx_L8_except_error) + __pyx_t_4 = __pyx_f_19dependency_injector_9providers___factory_call(((struct __pyx_obj_19dependency_injector_9providers_Factory *)__pyx_t_6), __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1457, __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); __pyx_t_4 = 0; - /* "dependency_injector/providers.pyx":1435 + /* "dependency_injector/providers.pyx":1458 * except AttributeError: * instance = __factory_call(self.__instantiator, args, kwargs) * self.__storage.instance = instance # <<<<<<<<<<<<<< * finally: * return instance */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self->__pyx___storage, __pyx_n_s_instance, __pyx_v_instance) < 0) __PYX_ERR(1, 1435, __pyx_L8_except_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self->__pyx___storage, __pyx_n_s_instance, __pyx_v_instance) < 0) __PYX_ERR(1, 1458, __pyx_L8_except_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -18260,7 +18600,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_20ThreadLocalSingleton goto __pyx_L8_except_error; __pyx_L8_except_error:; - /* "dependency_injector/providers.pyx":1431 + /* "dependency_injector/providers.pyx":1454 * cdef object instance * * try: # <<<<<<<<<<<<<< @@ -18283,7 +18623,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_20ThreadLocalSingleton } } - /* "dependency_injector/providers.pyx":1437 + /* "dependency_injector/providers.pyx":1460 * self.__storage.instance = instance * finally: * return instance # <<<<<<<<<<<<<< @@ -18317,7 +18657,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_20ThreadLocalSingleton __Pyx_XGOTREF(__pyx_t_12); { __Pyx_XDECREF(__pyx_r); - if (unlikely(!__pyx_v_instance)) { __Pyx_RaiseUnboundLocalError("instance"); __PYX_ERR(1, 1437, __pyx_L17_error) } + if (unlikely(!__pyx_v_instance)) { __Pyx_RaiseUnboundLocalError("instance"); __PYX_ERR(1, 1460, __pyx_L17_error) } __Pyx_INCREF(__pyx_v_instance); __pyx_r = __pyx_v_instance; goto __pyx_L16_return; @@ -18351,7 +18691,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_20ThreadLocalSingleton } } - /* "dependency_injector/providers.pyx":1427 + /* "dependency_injector/providers.pyx":1450 * self.__storage.instance = None * * cpdef object _provide(self, tuple args, dict kwargs): # <<<<<<<<<<<<<< @@ -18404,11 +18744,11 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_20ThreadLocalSingleto 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(1, 1427, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, 1); __PYX_ERR(1, 1450, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_provide") < 0)) __PYX_ERR(1, 1427, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_provide") < 0)) __PYX_ERR(1, 1450, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -18421,14 +18761,14 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_20ThreadLocalSingleto } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1427, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_provide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1450, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.ThreadLocalSingleton._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(1, 1427, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 1427, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(1, 1450, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 1450, __pyx_L1_error) __pyx_r = __pyx_pf_19dependency_injector_9providers_20ThreadLocalSingleton_4_provide(((struct __pyx_obj_19dependency_injector_9providers_ThreadLocalSingleton *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs); /* function exit code */ @@ -18446,7 +18786,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_20ThreadLocalSingleto PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("_provide", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_20ThreadLocalSingleton__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1427, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_20ThreadLocalSingleton__provide(__pyx_v_self, __pyx_v_args, __pyx_v_kwargs, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1450, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -18463,7 +18803,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_20ThreadLocalSingleto return __pyx_r; } -/* "dependency_injector/providers.pyx":1471 +/* "dependency_injector/providers.pyx":1494 * """ * * def __call__(self, *args, **kwargs): # <<<<<<<<<<<<<< @@ -18510,7 +18850,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton__ PyObject *__pyx_t_8 = NULL; __Pyx_RefNannySetupContext("__call__", 0); - /* "dependency_injector/providers.pyx":1476 + /* "dependency_injector/providers.pyx":1499 * Callable interface implementation. * """ * if self.__last_overriding is None: # <<<<<<<<<<<<<< @@ -18521,16 +18861,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton__ __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "dependency_injector/providers.pyx":1477 + /* "dependency_injector/providers.pyx":1500 * """ * if self.__last_overriding is None: * raise Error('{0} must be overridden before calling'.format(self)) # <<<<<<<<<<<<<< * return self.__last_overriding._provide(args, kwargs) * */ - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1477, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1500, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_must_be_overridden_before_cal, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1477, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_must_be_overridden_before_cal, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1500, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { @@ -18543,13 +18883,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton__ } } if (!__pyx_t_7) { - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_6, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1477, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_6, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1500, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[2] = {__pyx_t_7, ((PyObject *)__pyx_v_self)}; - __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1477, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1500, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_5); } else @@ -18557,19 +18897,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton__ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[2] = {__pyx_t_7, ((PyObject *)__pyx_v_self)}; - __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1477, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1500, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_5); } else #endif { - __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1477, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1500, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL; __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_8, 0+1, ((PyObject *)__pyx_v_self)); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1477, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1500, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } @@ -18586,14 +18926,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton__ } } if (!__pyx_t_6) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1477, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1500, __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(1, 1477, __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(1, 1500, __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; @@ -18602,20 +18942,20 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton__ #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(1, 1477, __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(1, 1500, __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(1, 1477, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1500, __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(1, 1477, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1500, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } @@ -18623,9 +18963,9 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton__ __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(1, 1477, __pyx_L1_error) + __PYX_ERR(1, 1500, __pyx_L1_error) - /* "dependency_injector/providers.pyx":1476 + /* "dependency_injector/providers.pyx":1499 * Callable interface implementation. * """ * if self.__last_overriding is None: # <<<<<<<<<<<<<< @@ -18634,7 +18974,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton__ */ } - /* "dependency_injector/providers.pyx":1478 + /* "dependency_injector/providers.pyx":1501 * if self.__last_overriding is None: * raise Error('{0} must be overridden before calling'.format(self)) * return self.__last_overriding._provide(args, kwargs) # <<<<<<<<<<<<<< @@ -18642,13 +18982,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton__ * def override(self, provider): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = ((struct __pyx_vtabstruct_19dependency_injector_9providers_Provider *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding->__pyx_vtab)->_provide(__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding, __pyx_v_args, __pyx_v_kwargs, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1478, __pyx_L1_error) + __pyx_t_3 = ((struct __pyx_vtabstruct_19dependency_injector_9providers_Provider *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding->__pyx_vtab)->_provide(__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding, __pyx_v_args, __pyx_v_kwargs, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1501, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1471 + /* "dependency_injector/providers.pyx":1494 * """ * * def __call__(self, *args, **kwargs): # <<<<<<<<<<<<<< @@ -18672,7 +19012,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton__ return __pyx_r; } -/* "dependency_injector/providers.pyx":1480 +/* "dependency_injector/providers.pyx":1503 * return self.__last_overriding._provide(args, kwargs) * * def override(self, provider): # <<<<<<<<<<<<<< @@ -18708,7 +19048,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_2 PyObject *__pyx_t_9 = NULL; __Pyx_RefNannySetupContext("override", 0); - /* "dependency_injector/providers.pyx":1491 + /* "dependency_injector/providers.pyx":1514 * :rtype: :py:class:`OverridingContext` * """ * if not isinstance(provider, BaseSingleton): # <<<<<<<<<<<<<< @@ -18719,24 +19059,24 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_2 __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); if (__pyx_t_2) { - /* "dependency_injector/providers.pyx":1492 + /* "dependency_injector/providers.pyx":1515 * """ * if not isinstance(provider, BaseSingleton): * raise Error('{0} must be overridden only by ' # <<<<<<<<<<<<<< * '{1} providers'.format(self, BaseSingleton)) * return super(AbstractSingleton, self).override(provider) */ - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1492, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1515, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - /* "dependency_injector/providers.pyx":1493 + /* "dependency_injector/providers.pyx":1516 * if not isinstance(provider, BaseSingleton): * raise Error('{0} must be overridden only by ' * '{1} providers'.format(self, BaseSingleton)) # <<<<<<<<<<<<<< * return super(AbstractSingleton, self).override(provider) * */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_must_be_overridden_only_by_1, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1493, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_must_be_overridden_only_by_1, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1516, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; __pyx_t_8 = 0; @@ -18753,7 +19093,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_2 #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_7, ((PyObject *)__pyx_v_self), ((PyObject *)__pyx_ptype_19dependency_injector_9providers_BaseSingleton)}; - __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1493, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1516, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_5); } else @@ -18761,13 +19101,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_2 #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_7, ((PyObject *)__pyx_v_self), ((PyObject *)__pyx_ptype_19dependency_injector_9providers_BaseSingleton)}; - __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1493, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1516, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_5); } else #endif { - __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1493, __pyx_L1_error) + __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1516, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; @@ -18778,7 +19118,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_2 __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_BaseSingleton)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_BaseSingleton)); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, ((PyObject *)__pyx_ptype_19dependency_injector_9providers_BaseSingleton)); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1493, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1516, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } @@ -18794,14 +19134,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_2 } } if (!__pyx_t_6) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1492, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1515, __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(1, 1492, __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(1, 1515, __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; @@ -18810,20 +19150,20 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_2 #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(1, 1492, __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(1, 1515, __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_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1492, __pyx_L1_error) + __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1515, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6); __pyx_t_6 = NULL; __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_5); __pyx_t_5 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1492, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1515, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } @@ -18831,9 +19171,9 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_2 __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(1, 1492, __pyx_L1_error) + __PYX_ERR(1, 1515, __pyx_L1_error) - /* "dependency_injector/providers.pyx":1491 + /* "dependency_injector/providers.pyx":1514 * :rtype: :py:class:`OverridingContext` * """ * if not isinstance(provider, BaseSingleton): # <<<<<<<<<<<<<< @@ -18842,7 +19182,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_2 */ } - /* "dependency_injector/providers.pyx":1494 + /* "dependency_injector/providers.pyx":1517 * raise Error('{0} must be overridden only by ' * '{1} providers'.format(self, BaseSingleton)) * return super(AbstractSingleton, self).override(provider) # <<<<<<<<<<<<<< @@ -18850,7 +19190,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_2 * def reset(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1494, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1517, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_AbstractSingleton)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_AbstractSingleton)); @@ -18858,10 +19198,10 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_2 __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_9 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_4, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1494, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_4, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1517, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_override); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1494, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_override); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1517, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = NULL; @@ -18875,13 +19215,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_2 } } if (!__pyx_t_9) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_provider); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1494, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_provider); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1517, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_v_provider}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1494, __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(1, 1517, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_3); } else @@ -18889,19 +19229,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_2 #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_v_provider}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1494, __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(1, 1517, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { - __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1494, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1517, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_9); __pyx_t_9 = NULL; __Pyx_INCREF(__pyx_v_provider); __Pyx_GIVEREF(__pyx_v_provider); PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_provider); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1494, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1517, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } @@ -18911,7 +19251,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_2 __pyx_t_3 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1480 + /* "dependency_injector/providers.pyx":1503 * return self.__last_overriding._provide(args, kwargs) * * def override(self, provider): # <<<<<<<<<<<<<< @@ -18935,7 +19275,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_2 return __pyx_r; } -/* "dependency_injector/providers.pyx":1496 +/* "dependency_injector/providers.pyx":1519 * return super(AbstractSingleton, self).override(provider) * * def reset(self): # <<<<<<<<<<<<<< @@ -18970,7 +19310,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_4 PyObject *__pyx_t_8 = NULL; __Pyx_RefNannySetupContext("reset", 0); - /* "dependency_injector/providers.pyx":1501 + /* "dependency_injector/providers.pyx":1524 * :rtype: None * """ * if self.__last_overriding is None: # <<<<<<<<<<<<<< @@ -18981,16 +19321,16 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_4 __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "dependency_injector/providers.pyx":1502 + /* "dependency_injector/providers.pyx":1525 * """ * if self.__last_overriding is None: * raise Error('{0} must be overridden before calling'.format(self)) # <<<<<<<<<<<<<< * return self.__last_overriding.reset() * */ - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1502, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_Error); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1525, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_must_be_overridden_before_cal, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1502, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_must_be_overridden_before_cal, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1525, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { @@ -19003,13 +19343,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_4 } } if (!__pyx_t_7) { - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_6, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1502, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_6, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1525, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[2] = {__pyx_t_7, ((PyObject *)__pyx_v_self)}; - __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1502, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1525, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_5); } else @@ -19017,19 +19357,19 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_4 #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[2] = {__pyx_t_7, ((PyObject *)__pyx_v_self)}; - __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1502, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1525, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_5); } else #endif { - __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1502, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1525, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL; __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_8, 0+1, ((PyObject *)__pyx_v_self)); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1502, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1525, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } @@ -19046,14 +19386,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_4 } } if (!__pyx_t_6) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1502, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1525, __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(1, 1502, __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(1, 1525, __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; @@ -19062,20 +19402,20 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_4 #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(1, 1502, __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(1, 1525, __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(1, 1502, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1525, __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(1, 1502, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1525, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } @@ -19083,9 +19423,9 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_4 __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(1, 1502, __pyx_L1_error) + __PYX_ERR(1, 1525, __pyx_L1_error) - /* "dependency_injector/providers.pyx":1501 + /* "dependency_injector/providers.pyx":1524 * :rtype: None * """ * if self.__last_overriding is None: # <<<<<<<<<<<<<< @@ -19094,7 +19434,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_4 */ } - /* "dependency_injector/providers.pyx":1503 + /* "dependency_injector/providers.pyx":1526 * if self.__last_overriding is None: * raise Error('{0} must be overridden before calling'.format(self)) * return self.__last_overriding.reset() # <<<<<<<<<<<<<< @@ -19102,7 +19442,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_4 * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding), __pyx_n_s_reset); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1503, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx___last_overriding), __pyx_n_s_reset); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1526, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -19115,10 +19455,10 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_4 } } if (__pyx_t_8) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1503, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1526, __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(1, 1503, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1526, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -19126,7 +19466,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_4 __pyx_t_3 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1496 + /* "dependency_injector/providers.pyx":1519 * return super(AbstractSingleton, self).override(provider) * * def reset(self): # <<<<<<<<<<<<<< @@ -19150,7 +19490,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_17AbstractSingleton_4 return __pyx_r; } -/* "dependency_injector/providers.pyx":1513 +/* "dependency_injector/providers.pyx":1536 * """Positional injection class.""" * * def __init__(self, value): # <<<<<<<<<<<<<< @@ -19187,7 +19527,7 @@ static int __pyx_pw_19dependency_injector_9providers_19PositionalInjection_1__in else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 1513, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 1536, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -19198,7 +19538,7 @@ static int __pyx_pw_19dependency_injector_9providers_19PositionalInjection_1__in } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1513, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1536, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.PositionalInjection.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -19221,7 +19561,7 @@ static int __pyx_pf_19dependency_injector_9providers_19PositionalInjection___ini PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("__init__", 0); - /* "dependency_injector/providers.pyx":1515 + /* "dependency_injector/providers.pyx":1538 * def __init__(self, value): * """Initializer.""" * self.__value = value # <<<<<<<<<<<<<< @@ -19234,7 +19574,7 @@ static int __pyx_pf_19dependency_injector_9providers_19PositionalInjection___ini __Pyx_DECREF(__pyx_v_self->__pyx_base.__pyx___value); __pyx_v_self->__pyx_base.__pyx___value = __pyx_v_value; - /* "dependency_injector/providers.pyx":1516 + /* "dependency_injector/providers.pyx":1539 * """Initializer.""" * self.__value = value * self.__is_provider = is_provider(value) # <<<<<<<<<<<<<< @@ -19243,7 +19583,7 @@ static int __pyx_pf_19dependency_injector_9providers_19PositionalInjection___ini */ __pyx_v_self->__pyx_base.__pyx___is_provider = ((int)__pyx_f_19dependency_injector_9providers_is_provider(__pyx_v_value, 0)); - /* "dependency_injector/providers.pyx":1517 + /* "dependency_injector/providers.pyx":1540 * self.__value = value * self.__is_provider = is_provider(value) * self.__is_delegated = is_delegated(value) # <<<<<<<<<<<<<< @@ -19252,7 +19592,7 @@ static int __pyx_pf_19dependency_injector_9providers_19PositionalInjection___ini */ __pyx_v_self->__pyx_base.__pyx___is_delegated = ((int)__pyx_f_19dependency_injector_9providers_is_delegated(__pyx_v_value, 0)); - /* "dependency_injector/providers.pyx":1518 + /* "dependency_injector/providers.pyx":1541 * self.__is_provider = is_provider(value) * self.__is_delegated = is_delegated(value) * self.__call = (self.__is_provider == 1 and # <<<<<<<<<<<<<< @@ -19266,7 +19606,7 @@ static int __pyx_pf_19dependency_injector_9providers_19PositionalInjection___ini goto __pyx_L3_bool_binop_done; } - /* "dependency_injector/providers.pyx":1519 + /* "dependency_injector/providers.pyx":1542 * self.__is_delegated = is_delegated(value) * self.__call = (self.__is_provider == 1 and * self.__is_delegated == 0) # <<<<<<<<<<<<<< @@ -19277,7 +19617,7 @@ static int __pyx_pf_19dependency_injector_9providers_19PositionalInjection___ini __pyx_t_1 = __pyx_t_2; __pyx_L3_bool_binop_done:; - /* "dependency_injector/providers.pyx":1518 + /* "dependency_injector/providers.pyx":1541 * self.__is_provider = is_provider(value) * self.__is_delegated = is_delegated(value) * self.__call = (self.__is_provider == 1 and # <<<<<<<<<<<<<< @@ -19286,14 +19626,14 @@ static int __pyx_pf_19dependency_injector_9providers_19PositionalInjection___ini */ __pyx_v_self->__pyx_base.__pyx___call = ((int)__pyx_t_1); - /* "dependency_injector/providers.pyx":1520 + /* "dependency_injector/providers.pyx":1543 * self.__call = (self.__is_provider == 1 and * self.__is_delegated == 0) * super(PositionalInjection, self).__init__() # <<<<<<<<<<<<<< * * def __deepcopy__(self, memo): */ - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1520, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1543, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_PositionalInjection)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_PositionalInjection)); @@ -19301,10 +19641,10 @@ static int __pyx_pf_19dependency_injector_9providers_19PositionalInjection___ini __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_5 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1520, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1543, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_init); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1520, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_init); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1543, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -19318,16 +19658,16 @@ static int __pyx_pf_19dependency_injector_9providers_19PositionalInjection___ini } } if (__pyx_t_5) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1520, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1543, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { - __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1520, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1543, __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.pyx":1513 + /* "dependency_injector/providers.pyx":1536 * """Positional injection class.""" * * def __init__(self, value): # <<<<<<<<<<<<<< @@ -19349,7 +19689,7 @@ static int __pyx_pf_19dependency_injector_9providers_19PositionalInjection___ini return __pyx_r; } -/* "dependency_injector/providers.pyx":1522 +/* "dependency_injector/providers.pyx":1545 * super(PositionalInjection, self).__init__() * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< @@ -19385,21 +19725,21 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19PositionalInjection struct __pyx_opt_args_19dependency_injector_9providers_deepcopy __pyx_t_8; __Pyx_RefNannySetupContext("__deepcopy__", 0); - /* "dependency_injector/providers.pyx":1524 + /* "dependency_injector/providers.pyx":1547 * 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(1, 1524, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_memo, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1547, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1524, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1547, __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(1, 1524, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_id, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1547, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -19413,14 +19753,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19PositionalInjection } } if (!__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1524, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1547, __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(1, 1524, __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(1, 1547, __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; @@ -19429,20 +19769,20 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19PositionalInjection #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(1, 1524, __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(1, 1547, __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(1, 1524, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1547, __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(1, 1524, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1547, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } @@ -19451,7 +19791,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19PositionalInjection __pyx_v_copied = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1525 + /* "dependency_injector/providers.pyx":1548 * """Create and return full copy of provider.""" * copied = memo.get(id(self)) * if copied is not None: # <<<<<<<<<<<<<< @@ -19462,7 +19802,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19PositionalInjection __pyx_t_7 = (__pyx_t_6 != 0); if (__pyx_t_7) { - /* "dependency_injector/providers.pyx":1526 + /* "dependency_injector/providers.pyx":1549 * copied = memo.get(id(self)) * if copied is not None: * return copied # <<<<<<<<<<<<<< @@ -19474,7 +19814,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19PositionalInjection __pyx_r = __pyx_v_copied; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1525 + /* "dependency_injector/providers.pyx":1548 * """Create and return full copy of provider.""" * copied = memo.get(id(self)) * if copied is not None: # <<<<<<<<<<<<<< @@ -19483,7 +19823,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19PositionalInjection */ } - /* "dependency_injector/providers.pyx":1527 + /* "dependency_injector/providers.pyx":1550 * if copied is not None: * return copied * return self.__class__(deepcopy(self.__value, memo)) # <<<<<<<<<<<<<< @@ -19491,14 +19831,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19PositionalInjection * def get_value(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1527, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1550, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __pyx_v_self->__pyx_base.__pyx___value; __Pyx_INCREF(__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(1, 1527, __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(1, 1550, __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_deepcopy(__pyx_t_5, 0, &__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1527, __pyx_L1_error) + __pyx_t_4 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_5, 0, &__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1550, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -19512,14 +19852,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19PositionalInjection } } if (!__pyx_t_5) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1527, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1550, __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_5, __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(1, 1527, __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(1, 1550, __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; @@ -19528,20 +19868,20 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19PositionalInjection #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __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(1, 1527, __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(1, 1550, __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_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1527, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1550, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); __pyx_t_5 = NULL; __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_t_4); __pyx_t_4 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1527, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1550, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } @@ -19551,7 +19891,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19PositionalInjection __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1522 + /* "dependency_injector/providers.pyx":1545 * super(PositionalInjection, self).__init__() * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< @@ -19575,7 +19915,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19PositionalInjection return __pyx_r; } -/* "dependency_injector/providers.pyx":1529 +/* "dependency_injector/providers.pyx":1552 * return self.__class__(deepcopy(self.__value, memo)) * * def get_value(self): # <<<<<<<<<<<<<< @@ -19603,7 +19943,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19PositionalInjection PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("get_value", 0); - /* "dependency_injector/providers.pyx":1531 + /* "dependency_injector/providers.pyx":1554 * def get_value(self): * """Return injection value.""" * return __get_value(self) # <<<<<<<<<<<<<< @@ -19611,13 +19951,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19PositionalInjection * def get_original_value(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_19dependency_injector_9providers___get_value(((struct __pyx_obj_19dependency_injector_9providers_Injection *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1531, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers___get_value(((struct __pyx_obj_19dependency_injector_9providers_Injection *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1554, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1529 + /* "dependency_injector/providers.pyx":1552 * return self.__class__(deepcopy(self.__value, memo)) * * def get_value(self): # <<<<<<<<<<<<<< @@ -19636,7 +19976,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19PositionalInjection return __pyx_r; } -/* "dependency_injector/providers.pyx":1533 +/* "dependency_injector/providers.pyx":1556 * return __get_value(self) * * def get_original_value(self): # <<<<<<<<<<<<<< @@ -19663,7 +20003,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19PositionalInjection __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_original_value", 0); - /* "dependency_injector/providers.pyx":1535 + /* "dependency_injector/providers.pyx":1558 * def get_original_value(self): * """Return original value.""" * return self.__value # <<<<<<<<<<<<<< @@ -19675,7 +20015,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19PositionalInjection __pyx_r = __pyx_v_self->__pyx_base.__pyx___value; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1533 + /* "dependency_injector/providers.pyx":1556 * return __get_value(self) * * def get_original_value(self): # <<<<<<<<<<<<<< @@ -19690,7 +20030,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_19PositionalInjection return __pyx_r; } -/* "dependency_injector/providers.pyx":1541 +/* "dependency_injector/providers.pyx":1564 * """Keyword injection class.""" * * def __init__(self, name, value): # <<<<<<<<<<<<<< @@ -19730,11 +20070,11 @@ static int __pyx_pw_19dependency_injector_9providers_14NamedInjection_1__init__( case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(1, 1541, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(1, 1564, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 1541, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 1564, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -19747,7 +20087,7 @@ static int __pyx_pw_19dependency_injector_9providers_14NamedInjection_1__init__( } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1541, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1564, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.NamedInjection.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -19770,7 +20110,7 @@ static int __pyx_pf_19dependency_injector_9providers_14NamedInjection___init__(s PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("__init__", 0); - /* "dependency_injector/providers.pyx":1543 + /* "dependency_injector/providers.pyx":1566 * def __init__(self, name, value): * """Initializer.""" * self.__name = name # <<<<<<<<<<<<<< @@ -19783,7 +20123,7 @@ static int __pyx_pf_19dependency_injector_9providers_14NamedInjection___init__(s __Pyx_DECREF(__pyx_v_self->__pyx___name); __pyx_v_self->__pyx___name = __pyx_v_name; - /* "dependency_injector/providers.pyx":1544 + /* "dependency_injector/providers.pyx":1567 * """Initializer.""" * self.__name = name * self.__value = value # <<<<<<<<<<<<<< @@ -19796,7 +20136,7 @@ static int __pyx_pf_19dependency_injector_9providers_14NamedInjection___init__(s __Pyx_DECREF(__pyx_v_self->__pyx_base.__pyx___value); __pyx_v_self->__pyx_base.__pyx___value = __pyx_v_value; - /* "dependency_injector/providers.pyx":1545 + /* "dependency_injector/providers.pyx":1568 * self.__name = name * self.__value = value * self.__is_provider = is_provider(value) # <<<<<<<<<<<<<< @@ -19805,7 +20145,7 @@ static int __pyx_pf_19dependency_injector_9providers_14NamedInjection___init__(s */ __pyx_v_self->__pyx_base.__pyx___is_provider = ((int)__pyx_f_19dependency_injector_9providers_is_provider(__pyx_v_value, 0)); - /* "dependency_injector/providers.pyx":1546 + /* "dependency_injector/providers.pyx":1569 * self.__value = value * self.__is_provider = is_provider(value) * self.__is_delegated = is_delegated(value) # <<<<<<<<<<<<<< @@ -19814,7 +20154,7 @@ static int __pyx_pf_19dependency_injector_9providers_14NamedInjection___init__(s */ __pyx_v_self->__pyx_base.__pyx___is_delegated = ((int)__pyx_f_19dependency_injector_9providers_is_delegated(__pyx_v_value, 0)); - /* "dependency_injector/providers.pyx":1547 + /* "dependency_injector/providers.pyx":1570 * self.__is_provider = is_provider(value) * self.__is_delegated = is_delegated(value) * self.__call = (self.__is_provider == 1 and # <<<<<<<<<<<<<< @@ -19828,7 +20168,7 @@ static int __pyx_pf_19dependency_injector_9providers_14NamedInjection___init__(s goto __pyx_L3_bool_binop_done; } - /* "dependency_injector/providers.pyx":1548 + /* "dependency_injector/providers.pyx":1571 * self.__is_delegated = is_delegated(value) * self.__call = (self.__is_provider == 1 and * self.__is_delegated == 0) # <<<<<<<<<<<<<< @@ -19839,7 +20179,7 @@ static int __pyx_pf_19dependency_injector_9providers_14NamedInjection___init__(s __pyx_t_1 = __pyx_t_2; __pyx_L3_bool_binop_done:; - /* "dependency_injector/providers.pyx":1547 + /* "dependency_injector/providers.pyx":1570 * self.__is_provider = is_provider(value) * self.__is_delegated = is_delegated(value) * self.__call = (self.__is_provider == 1 and # <<<<<<<<<<<<<< @@ -19848,14 +20188,14 @@ static int __pyx_pf_19dependency_injector_9providers_14NamedInjection___init__(s */ __pyx_v_self->__pyx_base.__pyx___call = ((int)__pyx_t_1); - /* "dependency_injector/providers.pyx":1549 + /* "dependency_injector/providers.pyx":1572 * self.__call = (self.__is_provider == 1 and * self.__is_delegated == 0) * super(NamedInjection, self).__init__() # <<<<<<<<<<<<<< * * def __deepcopy__(self, memo): */ - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1549, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1572, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_NamedInjection)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_19dependency_injector_9providers_NamedInjection)); @@ -19863,10 +20203,10 @@ static int __pyx_pf_19dependency_injector_9providers_14NamedInjection___init__(s __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_5 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1549, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1572, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_init); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1549, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_init); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1572, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -19880,16 +20220,16 @@ static int __pyx_pf_19dependency_injector_9providers_14NamedInjection___init__(s } } if (__pyx_t_5) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1549, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1572, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { - __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1549, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1572, __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.pyx":1541 + /* "dependency_injector/providers.pyx":1564 * """Keyword injection class.""" * * def __init__(self, name, value): # <<<<<<<<<<<<<< @@ -19911,7 +20251,7 @@ static int __pyx_pf_19dependency_injector_9providers_14NamedInjection___init__(s return __pyx_r; } -/* "dependency_injector/providers.pyx":1551 +/* "dependency_injector/providers.pyx":1574 * super(NamedInjection, self).__init__() * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< @@ -19949,21 +20289,21 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_2__d PyObject *__pyx_t_10 = NULL; __Pyx_RefNannySetupContext("__deepcopy__", 0); - /* "dependency_injector/providers.pyx":1553 + /* "dependency_injector/providers.pyx":1576 * 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(1, 1553, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_memo, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1576, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1553, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1576, __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(1, 1553, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_id, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1576, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -19977,14 +20317,14 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_2__d } } if (!__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1553, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1576, __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(1, 1553, __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(1, 1576, __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; @@ -19993,20 +20333,20 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_2__d #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(1, 1553, __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(1, 1576, __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(1, 1553, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1576, __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(1, 1553, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1576, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } @@ -20015,7 +20355,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_2__d __pyx_v_copied = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1554 + /* "dependency_injector/providers.pyx":1577 * """Create and return full copy of provider.""" * copied = memo.get(id(self)) * if copied is not None: # <<<<<<<<<<<<<< @@ -20026,7 +20366,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_2__d __pyx_t_7 = (__pyx_t_6 != 0); if (__pyx_t_7) { - /* "dependency_injector/providers.pyx":1555 + /* "dependency_injector/providers.pyx":1578 * copied = memo.get(id(self)) * if copied is not None: * return copied # <<<<<<<<<<<<<< @@ -20038,7 +20378,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_2__d __pyx_r = __pyx_v_copied; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1554 + /* "dependency_injector/providers.pyx":1577 * """Create and return full copy of provider.""" * copied = memo.get(id(self)) * if copied is not None: # <<<<<<<<<<<<<< @@ -20047,7 +20387,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_2__d */ } - /* "dependency_injector/providers.pyx":1556 + /* "dependency_injector/providers.pyx":1579 * if copied is not None: * return copied * return self.__class__(deepcopy(self.__name, memo), # <<<<<<<<<<<<<< @@ -20055,18 +20395,18 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_2__d * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1556, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1579, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __pyx_v_self->__pyx___name; __Pyx_INCREF(__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(1, 1556, __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(1, 1579, __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_deepcopy(__pyx_t_5, 0, &__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1556, __pyx_L1_error) + __pyx_t_4 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_5, 0, &__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1579, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "dependency_injector/providers.pyx":1557 + /* "dependency_injector/providers.pyx":1580 * return copied * return self.__class__(deepcopy(self.__name, memo), * deepcopy(self.__value, memo)) # <<<<<<<<<<<<<< @@ -20075,10 +20415,10 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_2__d */ __pyx_t_5 = __pyx_v_self->__pyx_base.__pyx___value; __Pyx_INCREF(__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(1, 1557, __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(1, 1580, __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_deepcopy(__pyx_t_5, 0, &__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1557, __pyx_L1_error) + __pyx_t_3 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_t_5, 0, &__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1580, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -20096,7 +20436,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_2__d #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_4, __pyx_t_3}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1556, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1579, __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; @@ -20106,7 +20446,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_2__d #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_4, __pyx_t_3}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1556, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1579, __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; @@ -20114,7 +20454,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_2__d } else #endif { - __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1556, __pyx_L1_error) + __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1579, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_5); __pyx_t_5 = NULL; @@ -20125,7 +20465,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_2__d PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_3); __pyx_t_4 = 0; __pyx_t_3 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1556, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1579, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } @@ -20134,7 +20474,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_2__d __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1551 + /* "dependency_injector/providers.pyx":1574 * super(NamedInjection, self).__init__() * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< @@ -20159,7 +20499,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_2__d return __pyx_r; } -/* "dependency_injector/providers.pyx":1559 +/* "dependency_injector/providers.pyx":1582 * deepcopy(self.__value, memo)) * * def get_name(self): # <<<<<<<<<<<<<< @@ -20187,7 +20527,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_4get PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("get_name", 0); - /* "dependency_injector/providers.pyx":1561 + /* "dependency_injector/providers.pyx":1584 * def get_name(self): * """Return injection value.""" * return __get_name(self) # <<<<<<<<<<<<<< @@ -20195,13 +20535,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_4get * def get_value(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_19dependency_injector_9providers___get_name(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1561, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers___get_name(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1584, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1559 + /* "dependency_injector/providers.pyx":1582 * deepcopy(self.__value, memo)) * * def get_name(self): # <<<<<<<<<<<<<< @@ -20220,7 +20560,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_4get return __pyx_r; } -/* "dependency_injector/providers.pyx":1563 +/* "dependency_injector/providers.pyx":1586 * return __get_name(self) * * def get_value(self): # <<<<<<<<<<<<<< @@ -20248,7 +20588,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_6get PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("get_value", 0); - /* "dependency_injector/providers.pyx":1565 + /* "dependency_injector/providers.pyx":1588 * def get_value(self): * """Return injection value.""" * return __get_value(self) # <<<<<<<<<<<<<< @@ -20256,13 +20596,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_6get * def get_original_value(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_19dependency_injector_9providers___get_value(((struct __pyx_obj_19dependency_injector_9providers_Injection *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1565, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers___get_value(((struct __pyx_obj_19dependency_injector_9providers_Injection *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1588, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1563 + /* "dependency_injector/providers.pyx":1586 * return __get_name(self) * * def get_value(self): # <<<<<<<<<<<<<< @@ -20281,7 +20621,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_6get return __pyx_r; } -/* "dependency_injector/providers.pyx":1567 +/* "dependency_injector/providers.pyx":1590 * return __get_value(self) * * def get_original_value(self): # <<<<<<<<<<<<<< @@ -20308,7 +20648,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_8get __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_original_value", 0); - /* "dependency_injector/providers.pyx":1569 + /* "dependency_injector/providers.pyx":1592 * def get_original_value(self): * """Return original value.""" * return self.__value # <<<<<<<<<<<<<< @@ -20320,7 +20660,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_8get __pyx_r = __pyx_v_self->__pyx_base.__pyx___value; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1567 + /* "dependency_injector/providers.pyx":1590 * return __get_value(self) * * def get_original_value(self): # <<<<<<<<<<<<<< @@ -20335,7 +20675,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_14NamedInjection_8get return __pyx_r; } -/* "dependency_injector/providers.pyx":1574 +/* "dependency_injector/providers.pyx":1597 * @cython.boundscheck(False) * @cython.wraparound(False) * cpdef tuple parse_positional_injections(tuple args): # <<<<<<<<<<<<<< @@ -20360,19 +20700,19 @@ static PyObject *__pyx_f_19dependency_injector_9providers_parse_positional_injec int __pyx_t_6; __Pyx_RefNannySetupContext("parse_positional_injections", 0); - /* "dependency_injector/providers.pyx":1576 + /* "dependency_injector/providers.pyx":1599 * cpdef tuple parse_positional_injections(tuple args): * """Parse positional injections.""" * cdef list injections = list() # <<<<<<<<<<<<<< * cdef int args_len = len(args) * */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1576, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1599, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_injections = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1577 + /* "dependency_injector/providers.pyx":1600 * """Parse positional injections.""" * cdef list injections = list() * cdef int args_len = len(args) # <<<<<<<<<<<<<< @@ -20381,12 +20721,12 @@ static PyObject *__pyx_f_19dependency_injector_9providers_parse_positional_injec */ if (unlikely(__pyx_v_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(1, 1577, __pyx_L1_error) + __PYX_ERR(1, 1600, __pyx_L1_error) } - __pyx_t_2 = PyTuple_GET_SIZE(__pyx_v_args); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(1, 1577, __pyx_L1_error) + __pyx_t_2 = PyTuple_GET_SIZE(__pyx_v_args); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(1, 1600, __pyx_L1_error) __pyx_v_args_len = __pyx_t_2; - /* "dependency_injector/providers.pyx":1583 + /* "dependency_injector/providers.pyx":1606 * cdef PositionalInjection injection * * for index in range(args_len): # <<<<<<<<<<<<<< @@ -20397,7 +20737,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_parse_positional_injec for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { __pyx_v_index = __pyx_t_4; - /* "dependency_injector/providers.pyx":1584 + /* "dependency_injector/providers.pyx":1607 * * for index in range(args_len): * arg = args[index] # <<<<<<<<<<<<<< @@ -20406,42 +20746,42 @@ static PyObject *__pyx_f_19dependency_injector_9providers_parse_positional_injec */ if (unlikely(__pyx_v_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(1, 1584, __pyx_L1_error) + __PYX_ERR(1, 1607, __pyx_L1_error) } __pyx_t_1 = PyTuple_GET_ITEM(__pyx_v_args, __pyx_v_index); __Pyx_INCREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_arg, __pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1585 + /* "dependency_injector/providers.pyx":1608 * for index in range(args_len): * arg = args[index] * injection = PositionalInjection(arg) # <<<<<<<<<<<<<< * injections.append(injection) * */ - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1585, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1608, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_arg); __Pyx_GIVEREF(__pyx_v_arg); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_arg); - __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_19dependency_injector_9providers_PositionalInjection), __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1585, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_19dependency_injector_9providers_PositionalInjection), __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1608, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF_SET(__pyx_v_injection, ((struct __pyx_obj_19dependency_injector_9providers_PositionalInjection *)__pyx_t_5)); __pyx_t_5 = 0; - /* "dependency_injector/providers.pyx":1586 + /* "dependency_injector/providers.pyx":1609 * arg = args[index] * injection = PositionalInjection(arg) * injections.append(injection) # <<<<<<<<<<<<<< * * return tuple(injections) */ - __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_injections, ((PyObject *)__pyx_v_injection)); if (unlikely(__pyx_t_6 == -1)) __PYX_ERR(1, 1586, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_injections, ((PyObject *)__pyx_v_injection)); if (unlikely(__pyx_t_6 == -1)) __PYX_ERR(1, 1609, __pyx_L1_error) } - /* "dependency_injector/providers.pyx":1588 + /* "dependency_injector/providers.pyx":1611 * injections.append(injection) * * return tuple(injections) # <<<<<<<<<<<<<< @@ -20449,13 +20789,13 @@ static PyObject *__pyx_f_19dependency_injector_9providers_parse_positional_injec * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_5 = PyList_AsTuple(__pyx_v_injections); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1588, __pyx_L1_error) + __pyx_t_5 = PyList_AsTuple(__pyx_v_injections); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1611, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_r = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1574 + /* "dependency_injector/providers.pyx":1597 * @cython.boundscheck(False) * @cython.wraparound(False) * cpdef tuple parse_positional_injections(tuple args): # <<<<<<<<<<<<<< @@ -20485,7 +20825,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_1parse_positional_inj PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("parse_positional_injections (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(1, 1574, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(1, 1597, __pyx_L1_error) __pyx_r = __pyx_pf_19dependency_injector_9providers_parse_positional_injections(__pyx_self, ((PyObject*)__pyx_v_args)); /* function exit code */ @@ -20503,7 +20843,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_parse_positional_inje PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("parse_positional_injections", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_parse_positional_injections(__pyx_v_args, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1574, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_parse_positional_injections(__pyx_v_args, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1597, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -20520,7 +20860,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_parse_positional_inje return __pyx_r; } -/* "dependency_injector/providers.pyx":1593 +/* "dependency_injector/providers.pyx":1616 * @cython.boundscheck(False) * @cython.wraparound(False) * cpdef tuple parse_named_injections(dict kwargs): # <<<<<<<<<<<<<< @@ -20547,19 +20887,19 @@ static PyObject *__pyx_f_19dependency_injector_9providers_parse_named_injections int __pyx_t_9; __Pyx_RefNannySetupContext("parse_named_injections", 0); - /* "dependency_injector/providers.pyx":1595 + /* "dependency_injector/providers.pyx":1618 * cpdef tuple parse_named_injections(dict kwargs): * """Parse named injections.""" * cdef list injections = list() # <<<<<<<<<<<<<< * * cdef object name */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1595, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1618, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_injections = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pyx":1601 + /* "dependency_injector/providers.pyx":1624 * cdef NamedInjection injection * * for name, arg in kwargs.items(): # <<<<<<<<<<<<<< @@ -20568,17 +20908,17 @@ static PyObject *__pyx_f_19dependency_injector_9providers_parse_named_injections */ if (unlikely(__pyx_v_kwargs == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "items"); - __PYX_ERR(1, 1601, __pyx_L1_error) + __PYX_ERR(1, 1624, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_Items(__pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1601, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_Items(__pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1624, __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_3 = 0; __pyx_t_4 = NULL; } else { - __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1601, __pyx_L1_error) + __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1624, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1601, __pyx_L1_error) + __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1624, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -20586,17 +20926,17 @@ static PyObject *__pyx_f_19dependency_injector_9providers_parse_named_injections if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_3 >= 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_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 1601, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 1624, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1601, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1624, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_3 >= 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_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 1601, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 1624, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1601, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1624, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -20606,7 +20946,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_parse_named_injections 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(1, 1601, __pyx_L1_error) + else __PYX_ERR(1, 1624, __pyx_L1_error) } break; } @@ -20622,7 +20962,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_parse_named_injections if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(1, 1601, __pyx_L1_error) + __PYX_ERR(1, 1624, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -20635,15 +20975,15 @@ static PyObject *__pyx_f_19dependency_injector_9providers_parse_named_injections __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); #else - __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1601, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1624, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1601, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1624, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; - __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1601, __pyx_L1_error) + __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1624, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext; @@ -20651,7 +20991,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_parse_named_injections __Pyx_GOTREF(__pyx_t_5); index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(1, 1601, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(1, 1624, __pyx_L1_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L6_unpacking_done; @@ -20659,7 +20999,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_parse_named_injections __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(1, 1601, __pyx_L1_error) + __PYX_ERR(1, 1624, __pyx_L1_error) __pyx_L6_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_5); @@ -20667,14 +21007,14 @@ static PyObject *__pyx_f_19dependency_injector_9providers_parse_named_injections __Pyx_XDECREF_SET(__pyx_v_arg, __pyx_t_6); __pyx_t_6 = 0; - /* "dependency_injector/providers.pyx":1602 + /* "dependency_injector/providers.pyx":1625 * * for name, arg in kwargs.items(): * injection = NamedInjection(name, arg) # <<<<<<<<<<<<<< * injections.append(injection) * */ - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1602, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1625, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); @@ -20682,22 +21022,22 @@ static PyObject *__pyx_f_19dependency_injector_9providers_parse_named_injections __Pyx_INCREF(__pyx_v_arg); __Pyx_GIVEREF(__pyx_v_arg); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_arg); - __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_19dependency_injector_9providers_NamedInjection), __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1602, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_19dependency_injector_9providers_NamedInjection), __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1625, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF_SET(__pyx_v_injection, ((struct __pyx_obj_19dependency_injector_9providers_NamedInjection *)__pyx_t_6)); __pyx_t_6 = 0; - /* "dependency_injector/providers.pyx":1603 + /* "dependency_injector/providers.pyx":1626 * for name, arg in kwargs.items(): * injection = NamedInjection(name, arg) * injections.append(injection) # <<<<<<<<<<<<<< * * return tuple(injections) */ - __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_injections, ((PyObject *)__pyx_v_injection)); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(1, 1603, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_injections, ((PyObject *)__pyx_v_injection)); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(1, 1626, __pyx_L1_error) - /* "dependency_injector/providers.pyx":1601 + /* "dependency_injector/providers.pyx":1624 * cdef NamedInjection injection * * for name, arg in kwargs.items(): # <<<<<<<<<<<<<< @@ -20707,7 +21047,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_parse_named_injections } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pyx":1605 + /* "dependency_injector/providers.pyx":1628 * injections.append(injection) * * return tuple(injections) # <<<<<<<<<<<<<< @@ -20715,13 +21055,13 @@ static PyObject *__pyx_f_19dependency_injector_9providers_parse_named_injections * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = PyList_AsTuple(__pyx_v_injections); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1605, __pyx_L1_error) + __pyx_t_2 = PyList_AsTuple(__pyx_v_injections); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1628, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1593 + /* "dependency_injector/providers.pyx":1616 * @cython.boundscheck(False) * @cython.wraparound(False) * cpdef tuple parse_named_injections(dict kwargs): # <<<<<<<<<<<<<< @@ -20755,7 +21095,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_3parse_named_injectio PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("parse_named_injections (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 1593, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(1, 1616, __pyx_L1_error) __pyx_r = __pyx_pf_19dependency_injector_9providers_2parse_named_injections(__pyx_self, ((PyObject*)__pyx_v_kwargs)); /* function exit code */ @@ -20773,7 +21113,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_2parse_named_injectio PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("parse_named_injections", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_parse_named_injections(__pyx_v_kwargs, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1593, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_parse_named_injections(__pyx_v_kwargs, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1616, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -20790,7 +21130,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_2parse_named_injectio return __pyx_r; } -/* "dependency_injector/providers.pyx":1608 +/* "dependency_injector/providers.pyx":1631 * * * cpdef bint is_provider(object instance): # <<<<<<<<<<<<<< @@ -20808,7 +21148,7 @@ static int __pyx_f_19dependency_injector_9providers_is_provider(PyObject *__pyx_ int __pyx_t_4; __Pyx_RefNannySetupContext("is_provider", 0); - /* "dependency_injector/providers.pyx":1616 + /* "dependency_injector/providers.pyx":1639 * :rtype: bool * """ * return (not isinstance(instance, CLASS_TYPES) and # <<<<<<<<<<<<<< @@ -20817,7 +21157,7 @@ static int __pyx_f_19dependency_injector_9providers_is_provider(PyObject *__pyx_ */ __pyx_t_2 = __pyx_v_19dependency_injector_9providers_CLASS_TYPES; __Pyx_INCREF(__pyx_t_2); - __pyx_t_3 = PyObject_IsInstance(__pyx_v_instance, __pyx_t_2); if (unlikely(__pyx_t_3 == -1)) __PYX_ERR(1, 1616, __pyx_L1_error) + __pyx_t_3 = PyObject_IsInstance(__pyx_v_instance, __pyx_t_2); if (unlikely(__pyx_t_3 == -1)) __PYX_ERR(1, 1639, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = ((!(__pyx_t_3 != 0)) != 0); if (__pyx_t_4) { @@ -20826,14 +21166,14 @@ static int __pyx_f_19dependency_injector_9providers_is_provider(PyObject *__pyx_ goto __pyx_L3_bool_binop_done; } - /* "dependency_injector/providers.pyx":1617 + /* "dependency_injector/providers.pyx":1640 * """ * return (not isinstance(instance, CLASS_TYPES) and * getattr(instance, '__IS_PROVIDER__', False) is True) # <<<<<<<<<<<<<< * * */ - __pyx_t_2 = __Pyx_GetAttr3(__pyx_v_instance, __pyx_n_s_IS_PROVIDER, Py_False); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1617, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetAttr3(__pyx_v_instance, __pyx_n_s_IS_PROVIDER, Py_False); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1640, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = (__pyx_t_2 == Py_True); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -20843,7 +21183,7 @@ static int __pyx_f_19dependency_injector_9providers_is_provider(PyObject *__pyx_ __pyx_r = __pyx_t_1; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1608 + /* "dependency_injector/providers.pyx":1631 * * * cpdef bint is_provider(object instance): # <<<<<<<<<<<<<< @@ -20881,7 +21221,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4is_provider(CYTHON_U PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("is_provider", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_19dependency_injector_9providers_is_provider(__pyx_v_instance, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1608, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_19dependency_injector_9providers_is_provider(__pyx_v_instance, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1631, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -20898,7 +21238,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_4is_provider(CYTHON_U return __pyx_r; } -/* "dependency_injector/providers.pyx":1620 +/* "dependency_injector/providers.pyx":1643 * * * cpdef object ensure_is_provider(object instance): # <<<<<<<<<<<<<< @@ -20920,7 +21260,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_ensure_is_provider(PyO PyObject *__pyx_t_8 = NULL; __Pyx_RefNannySetupContext("ensure_is_provider", 0); - /* "dependency_injector/providers.pyx":1631 + /* "dependency_injector/providers.pyx":1654 * :rtype: :py:class:`dependency_injector.providers.Provider` * """ * if not is_provider(instance): # <<<<<<<<<<<<<< @@ -20930,31 +21270,31 @@ static PyObject *__pyx_f_19dependency_injector_9providers_ensure_is_provider(PyO __pyx_t_1 = ((!(__pyx_f_19dependency_injector_9providers_is_provider(__pyx_v_instance, 0) != 0)) != 0); if (__pyx_t_1) { - /* "dependency_injector/providers.pyx":1632 + /* "dependency_injector/providers.pyx":1655 * """ * if not is_provider(instance): * raise Error('Expected provider instance, ' # <<<<<<<<<<<<<< * 'got {0}'.format(str(instance))) * return instance */ - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_Error); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1632, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_Error); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1655, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - /* "dependency_injector/providers.pyx":1633 + /* "dependency_injector/providers.pyx":1656 * if not is_provider(instance): * raise Error('Expected provider instance, ' * 'got {0}'.format(str(instance))) # <<<<<<<<<<<<<< * return instance * */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Expected_provider_instance_got_0, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1633, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Expected_provider_instance_got_0, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1656, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1633, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1656, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_instance); __Pyx_GIVEREF(__pyx_v_instance); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_instance); - __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1633, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1656, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; @@ -20968,14 +21308,14 @@ static PyObject *__pyx_f_19dependency_injector_9providers_ensure_is_provider(PyO } } if (!__pyx_t_6) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1633, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1656, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_4); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_7}; - __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1633, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1656, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -20984,20 +21324,20 @@ static PyObject *__pyx_f_19dependency_injector_9providers_ensure_is_provider(PyO #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_7}; - __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1633, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1656, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif { - __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1633, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1656, __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_7); PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_7); __pyx_t_7 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1633, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1656, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } @@ -21014,14 +21354,14 @@ static PyObject *__pyx_f_19dependency_injector_9providers_ensure_is_provider(PyO } } if (!__pyx_t_5) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1632, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1655, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1632, __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(1, 1655, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -21030,20 +21370,20 @@ static PyObject *__pyx_f_19dependency_injector_9providers_ensure_is_provider(PyO #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1632, __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(1, 1655, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { - __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1632, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1655, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL; __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_4); __pyx_t_4 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1632, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1655, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } @@ -21051,9 +21391,9 @@ static PyObject *__pyx_f_19dependency_injector_9providers_ensure_is_provider(PyO __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(1, 1632, __pyx_L1_error) + __PYX_ERR(1, 1655, __pyx_L1_error) - /* "dependency_injector/providers.pyx":1631 + /* "dependency_injector/providers.pyx":1654 * :rtype: :py:class:`dependency_injector.providers.Provider` * """ * if not is_provider(instance): # <<<<<<<<<<<<<< @@ -21062,7 +21402,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_ensure_is_provider(PyO */ } - /* "dependency_injector/providers.pyx":1634 + /* "dependency_injector/providers.pyx":1657 * raise Error('Expected provider instance, ' * 'got {0}'.format(str(instance))) * return instance # <<<<<<<<<<<<<< @@ -21074,7 +21414,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_ensure_is_provider(PyO __pyx_r = __pyx_v_instance; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1620 + /* "dependency_injector/providers.pyx":1643 * * * cpdef object ensure_is_provider(object instance): # <<<<<<<<<<<<<< @@ -21119,7 +21459,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_6ensure_is_provider(C PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("ensure_is_provider", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_ensure_is_provider(__pyx_v_instance, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1620, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_ensure_is_provider(__pyx_v_instance, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1643, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -21136,7 +21476,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_6ensure_is_provider(C return __pyx_r; } -/* "dependency_injector/providers.pyx":1637 +/* "dependency_injector/providers.pyx":1660 * * * cpdef bint is_delegated(object instance): # <<<<<<<<<<<<<< @@ -21154,7 +21494,7 @@ static int __pyx_f_19dependency_injector_9providers_is_delegated(PyObject *__pyx int __pyx_t_4; __Pyx_RefNannySetupContext("is_delegated", 0); - /* "dependency_injector/providers.pyx":1645 + /* "dependency_injector/providers.pyx":1668 * :rtype: bool * """ * return (not isinstance(instance, CLASS_TYPES) and # <<<<<<<<<<<<<< @@ -21163,7 +21503,7 @@ static int __pyx_f_19dependency_injector_9providers_is_delegated(PyObject *__pyx */ __pyx_t_2 = __pyx_v_19dependency_injector_9providers_CLASS_TYPES; __Pyx_INCREF(__pyx_t_2); - __pyx_t_3 = PyObject_IsInstance(__pyx_v_instance, __pyx_t_2); if (unlikely(__pyx_t_3 == -1)) __PYX_ERR(1, 1645, __pyx_L1_error) + __pyx_t_3 = PyObject_IsInstance(__pyx_v_instance, __pyx_t_2); if (unlikely(__pyx_t_3 == -1)) __PYX_ERR(1, 1668, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = ((!(__pyx_t_3 != 0)) != 0); if (__pyx_t_4) { @@ -21172,14 +21512,14 @@ static int __pyx_f_19dependency_injector_9providers_is_delegated(PyObject *__pyx goto __pyx_L3_bool_binop_done; } - /* "dependency_injector/providers.pyx":1646 + /* "dependency_injector/providers.pyx":1669 * """ * return (not isinstance(instance, CLASS_TYPES) and * getattr(instance, '__IS_DELEGATED__', False) is True) # <<<<<<<<<<<<<< * * */ - __pyx_t_2 = __Pyx_GetAttr3(__pyx_v_instance, __pyx_n_s_IS_DELEGATED, Py_False); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1646, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetAttr3(__pyx_v_instance, __pyx_n_s_IS_DELEGATED, Py_False); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1669, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = (__pyx_t_2 == Py_True); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -21189,7 +21529,7 @@ static int __pyx_f_19dependency_injector_9providers_is_delegated(PyObject *__pyx __pyx_r = __pyx_t_1; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1637 + /* "dependency_injector/providers.pyx":1660 * * * cpdef bint is_delegated(object instance): # <<<<<<<<<<<<<< @@ -21227,7 +21567,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8is_delegated(CYTHON_ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("is_delegated", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_19dependency_injector_9providers_is_delegated(__pyx_v_instance, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1637, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_19dependency_injector_9providers_is_delegated(__pyx_v_instance, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1660, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -21244,7 +21584,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8is_delegated(CYTHON_ return __pyx_r; } -/* "dependency_injector/providers.pyx":1649 +/* "dependency_injector/providers.pyx":1672 * * * cpdef str represent_provider(object provider, object provides): # <<<<<<<<<<<<<< @@ -21264,7 +21604,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_represent_provider(PyO int __pyx_t_6; __Pyx_RefNannySetupContext("represent_provider", 0); - /* "dependency_injector/providers.pyx":1661 + /* "dependency_injector/providers.pyx":1684 * :rtype: str * """ * return '<{provider}({provides}) at {address}>'.format( # <<<<<<<<<<<<<< @@ -21272,45 +21612,45 @@ static PyObject *__pyx_f_19dependency_injector_9providers_represent_provider(PyO * provider.__class__.__name__)), */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_provider_provides_at_address, __pyx_n_s_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1661, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_provider_provides_at_address, __pyx_n_s_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1684, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - /* "dependency_injector/providers.pyx":1662 + /* "dependency_injector/providers.pyx":1685 * """ * return '<{provider}({provides}) at {address}>'.format( * provider='.'.join((provider.__class__.__module__, # <<<<<<<<<<<<<< * provider.__class__.__name__)), * provides=repr(provides) if provides is not None else '', */ - __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1662, __pyx_L1_error) + __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1685, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_provider, __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1662, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_provider, __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1685, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_module); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1662, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_module); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1685, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/providers.pyx":1663 + /* "dependency_injector/providers.pyx":1686 * return '<{provider}({provides}) at {address}>'.format( * provider='.'.join((provider.__class__.__module__, * provider.__class__.__name__)), # <<<<<<<<<<<<<< * provides=repr(provides) if provides is not None else '', * address=hex(id(provider))) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_provider, __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1663, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_provider, __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1686, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1663, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1686, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/providers.pyx":1662 + /* "dependency_injector/providers.pyx":1685 * """ * return '<{provider}({provides}) at {address}>'.format( * provider='.'.join((provider.__class__.__module__, # <<<<<<<<<<<<<< * provider.__class__.__name__)), * provides=repr(provides) if provides is not None else '', */ - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1662, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1685, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); @@ -21318,13 +21658,13 @@ static PyObject *__pyx_f_19dependency_injector_9providers_represent_provider(PyO PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5); __pyx_t_4 = 0; __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyString_Join(__pyx_kp_s__7, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1662, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyString_Join(__pyx_kp_s__7, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1685, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_provider, __pyx_t_5) < 0) __PYX_ERR(1, 1662, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_provider, __pyx_t_5) < 0) __PYX_ERR(1, 1685, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "dependency_injector/providers.pyx":1664 + /* "dependency_injector/providers.pyx":1687 * provider='.'.join((provider.__class__.__module__, * provider.__class__.__name__)), * provides=repr(provides) if provides is not None else '', # <<<<<<<<<<<<<< @@ -21333,7 +21673,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_represent_provider(PyO */ __pyx_t_6 = (__pyx_v_provides != Py_None); if ((__pyx_t_6 != 0)) { - __pyx_t_3 = PyObject_Repr(__pyx_v_provides); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1664, __pyx_L1_error) + __pyx_t_3 = PyObject_Repr(__pyx_v_provides); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1687, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __pyx_t_3; __pyx_t_3 = 0; @@ -21341,52 +21681,52 @@ static PyObject *__pyx_f_19dependency_injector_9providers_represent_provider(PyO __Pyx_INCREF(__pyx_kp_s__10); __pyx_t_5 = __pyx_kp_s__10; } - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_provides, __pyx_t_5) < 0) __PYX_ERR(1, 1662, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_provides, __pyx_t_5) < 0) __PYX_ERR(1, 1685, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "dependency_injector/providers.pyx":1665 + /* "dependency_injector/providers.pyx":1688 * provider.__class__.__name__)), * provides=repr(provides) if provides is not None else '', * address=hex(id(provider))) # <<<<<<<<<<<<<< * * */ - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1665, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1688, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_provider); __Pyx_GIVEREF(__pyx_v_provider); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_provider); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_id, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1665, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_id, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1688, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1665, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1688, __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 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_hex, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1665, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_hex, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1688, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_address, __pyx_t_3) < 0) __PYX_ERR(1, 1662, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_address, __pyx_t_3) < 0) __PYX_ERR(1, 1685, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/providers.pyx":1661 + /* "dependency_injector/providers.pyx":1684 * :rtype: str * """ * return '<{provider}({provides}) at {address}>'.format( # <<<<<<<<<<<<<< * provider='.'.join((provider.__class__.__module__, * provider.__class__.__name__)), */ - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1661, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1684, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (!(likely(PyString_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(1, 1661, __pyx_L1_error) + if (!(likely(PyString_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(1, 1684, __pyx_L1_error) __pyx_r = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1649 + /* "dependency_injector/providers.pyx":1672 * * * cpdef str represent_provider(object provider, object provides): # <<<<<<<<<<<<<< @@ -21438,11 +21778,11 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_11represent_provider( case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_provides)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("represent_provider", 1, 2, 2, 1); __PYX_ERR(1, 1649, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("represent_provider", 1, 2, 2, 1); __PYX_ERR(1, 1672, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "represent_provider") < 0)) __PYX_ERR(1, 1649, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "represent_provider") < 0)) __PYX_ERR(1, 1672, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -21455,7 +21795,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_11represent_provider( } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("represent_provider", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1649, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("represent_provider", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1672, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.represent_provider", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -21474,7 +21814,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10represent_provider( PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("represent_provider", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_represent_provider(__pyx_v_provider, __pyx_v_provides, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1649, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_represent_provider(__pyx_v_provider, __pyx_v_provides, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1672, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -21491,7 +21831,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_10represent_provider( return __pyx_r; } -/* "dependency_injector/providers.pyx":1668 +/* "dependency_injector/providers.pyx":1691 * * * cpdef object deepcopy(object instance, dict memo=None): # <<<<<<<<<<<<<< @@ -21516,15 +21856,15 @@ static PyObject *__pyx_f_19dependency_injector_9providers_deepcopy(PyObject *__p } } - /* "dependency_injector/providers.pyx":1670 + /* "dependency_injector/providers.pyx":1693 * cpdef object deepcopy(object instance, dict memo=None): * """Return full copy of provider or container with providers.""" * return copy.deepcopy(instance, memo) # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_copy); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1670, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_copy); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1693, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_deepcopy); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1670, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_deepcopy); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1693, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -21542,7 +21882,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_deepcopy(PyObject *__p #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_instance, __pyx_v_memo}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1670, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1693, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -21550,13 +21890,13 @@ static PyObject *__pyx_f_19dependency_injector_9providers_deepcopy(PyObject *__p #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_instance, __pyx_v_memo}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1670, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1693, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1670, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1693, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__pyx_t_2) { __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = NULL; @@ -21567,7 +21907,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_deepcopy(PyObject *__p __Pyx_INCREF(__pyx_v_memo); __Pyx_GIVEREF(__pyx_v_memo); PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_memo); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1670, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1693, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } @@ -21576,7 +21916,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers_deepcopy(PyObject *__p __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":1668 + /* "dependency_injector/providers.pyx":1691 * * * cpdef object deepcopy(object instance, dict memo=None): # <<<<<<<<<<<<<< @@ -21632,7 +21972,7 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_13deepcopy(PyObject * } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "deepcopy") < 0)) __PYX_ERR(1, 1668, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "deepcopy") < 0)) __PYX_ERR(1, 1691, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -21647,13 +21987,13 @@ static PyObject *__pyx_pw_19dependency_injector_9providers_13deepcopy(PyObject * } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("deepcopy", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1668, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("deepcopy", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1691, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dependency_injector.providers.deepcopy", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_memo), (&PyDict_Type), 1, "memo", 1))) __PYX_ERR(1, 1668, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_memo), (&PyDict_Type), 1, "memo", 1))) __PYX_ERR(1, 1691, __pyx_L1_error) __pyx_r = __pyx_pf_19dependency_injector_9providers_12deepcopy(__pyx_self, __pyx_v_instance, __pyx_v_memo); /* function exit code */ @@ -21674,7 +22014,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_12deepcopy(CYTHON_UNU __Pyx_XDECREF(__pyx_r); __pyx_t_2.__pyx_n = 1; __pyx_t_2.memo = __pyx_v_memo; - __pyx_t_1 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_v_instance, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1668, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers_deepcopy(__pyx_v_instance, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1691, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -21691,7 +22031,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_12deepcopy(CYTHON_UNU return __pyx_r; } -/* "dependency_injector/providers.pxd":170 +/* "dependency_injector/providers.pxd":174 * * # Inline helper functions * cdef inline object __get_name(NamedInjection self): # <<<<<<<<<<<<<< @@ -21704,7 +22044,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___get_na __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get_name", 0); - /* "dependency_injector/providers.pxd":171 + /* "dependency_injector/providers.pxd":175 * # Inline helper functions * cdef inline object __get_name(NamedInjection self): * return self.__name # <<<<<<<<<<<<<< @@ -21716,7 +22056,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___get_na __pyx_r = __pyx_v_self->__pyx___name; goto __pyx_L0; - /* "dependency_injector/providers.pxd":170 + /* "dependency_injector/providers.pxd":174 * * # Inline helper functions * cdef inline object __get_name(NamedInjection self): # <<<<<<<<<<<<<< @@ -21731,7 +22071,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___get_na return __pyx_r; } -/* "dependency_injector/providers.pxd":174 +/* "dependency_injector/providers.pxd":178 * * * cdef inline object __get_value(Injection self): # <<<<<<<<<<<<<< @@ -21748,7 +22088,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___get_va PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("__get_value", 0); - /* "dependency_injector/providers.pxd":175 + /* "dependency_injector/providers.pxd":179 * * cdef inline object __get_value(Injection self): * if self.__call == 0: # <<<<<<<<<<<<<< @@ -21758,7 +22098,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___get_va __pyx_t_1 = ((__pyx_v_self->__pyx___call == 0) != 0); if (__pyx_t_1) { - /* "dependency_injector/providers.pxd":176 + /* "dependency_injector/providers.pxd":180 * cdef inline object __get_value(Injection self): * if self.__call == 0: * return self.__value # <<<<<<<<<<<<<< @@ -21770,7 +22110,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___get_va __pyx_r = __pyx_v_self->__pyx___value; goto __pyx_L0; - /* "dependency_injector/providers.pxd":175 + /* "dependency_injector/providers.pxd":179 * * cdef inline object __get_value(Injection self): * if self.__call == 0: # <<<<<<<<<<<<<< @@ -21779,7 +22119,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___get_va */ } - /* "dependency_injector/providers.pxd":177 + /* "dependency_injector/providers.pxd":181 * if self.__call == 0: * return self.__value * return self.__value() # <<<<<<<<<<<<<< @@ -21799,10 +22139,10 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___get_va } } if (__pyx_t_4) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 177, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { - __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 177, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 181, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -21810,7 +22150,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___get_va __pyx_t_2 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pxd":174 + /* "dependency_injector/providers.pxd":178 * * * cdef inline object __get_value(Injection self): # <<<<<<<<<<<<<< @@ -21831,7 +22171,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___get_va return __pyx_r; } -/* "dependency_injector/providers.pxd":182 +/* "dependency_injector/providers.pxd":186 * @cython.boundscheck(False) * @cython.wraparound(False) * cdef inline tuple __provide_positional_args(tuple args, # <<<<<<<<<<<<<< @@ -21852,7 +22192,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid int __pyx_t_5; __Pyx_RefNannySetupContext("__provide_positional_args", 0); - /* "dependency_injector/providers.pxd":189 + /* "dependency_injector/providers.pxd":193 * cdef PositionalInjection injection * * if inj_args_len == 0: # <<<<<<<<<<<<<< @@ -21862,7 +22202,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid __pyx_t_1 = ((__pyx_v_inj_args_len == 0) != 0); if (__pyx_t_1) { - /* "dependency_injector/providers.pxd":190 + /* "dependency_injector/providers.pxd":194 * * if inj_args_len == 0: * return args # <<<<<<<<<<<<<< @@ -21874,7 +22214,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid __pyx_r = __pyx_v_args; goto __pyx_L0; - /* "dependency_injector/providers.pxd":189 + /* "dependency_injector/providers.pxd":193 * cdef PositionalInjection injection * * if inj_args_len == 0: # <<<<<<<<<<<<<< @@ -21883,19 +22223,19 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid */ } - /* "dependency_injector/providers.pxd":192 + /* "dependency_injector/providers.pxd":196 * return args * * positional_args = list() # <<<<<<<<<<<<<< * for index in range(inj_args_len): * injection = inj_args[index] */ - __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 192, __pyx_L1_error) + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_positional_args = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pxd":193 + /* "dependency_injector/providers.pxd":197 * * positional_args = list() * for index in range(inj_args_len): # <<<<<<<<<<<<<< @@ -21906,7 +22246,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { __pyx_v_index = __pyx_t_4; - /* "dependency_injector/providers.pxd":194 + /* "dependency_injector/providers.pxd":198 * positional_args = list() * for index in range(inj_args_len): * injection = inj_args[index] # <<<<<<<<<<<<<< @@ -21915,36 +22255,36 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid */ if (unlikely(__pyx_v_inj_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 194, __pyx_L1_error) + __PYX_ERR(0, 198, __pyx_L1_error) } __pyx_t_2 = PyTuple_GET_ITEM(__pyx_v_inj_args, __pyx_v_index); __Pyx_INCREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_injection, ((struct __pyx_obj_19dependency_injector_9providers_PositionalInjection *)__pyx_t_2)); __pyx_t_2 = 0; - /* "dependency_injector/providers.pxd":195 + /* "dependency_injector/providers.pxd":199 * for index in range(inj_args_len): * injection = inj_args[index] * positional_args.append(__get_value(injection)) # <<<<<<<<<<<<<< * positional_args.extend(args) * */ - __pyx_t_2 = __pyx_f_19dependency_injector_9providers___get_value(((struct __pyx_obj_19dependency_injector_9providers_Injection *)__pyx_v_injection)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 195, __pyx_L1_error) + __pyx_t_2 = __pyx_f_19dependency_injector_9providers___get_value(((struct __pyx_obj_19dependency_injector_9providers_Injection *)__pyx_v_injection)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_positional_args, __pyx_t_2); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(0, 195, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_positional_args, __pyx_t_2); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(0, 199, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } - /* "dependency_injector/providers.pxd":196 + /* "dependency_injector/providers.pxd":200 * injection = inj_args[index] * positional_args.append(__get_value(injection)) * positional_args.extend(args) # <<<<<<<<<<<<<< * * return tuple(positional_args) */ - __pyx_t_5 = __Pyx_PyList_Extend(__pyx_v_positional_args, __pyx_v_args); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(0, 196, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyList_Extend(__pyx_v_positional_args, __pyx_v_args); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(0, 200, __pyx_L1_error) - /* "dependency_injector/providers.pxd":198 + /* "dependency_injector/providers.pxd":202 * positional_args.extend(args) * * return tuple(positional_args) # <<<<<<<<<<<<<< @@ -21952,13 +22292,13 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = PyList_AsTuple(__pyx_v_positional_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 198, __pyx_L1_error) + __pyx_t_2 = PyList_AsTuple(__pyx_v_positional_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 202, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pxd":182 + /* "dependency_injector/providers.pxd":186 * @cython.boundscheck(False) * @cython.wraparound(False) * cdef inline tuple __provide_positional_args(tuple args, # <<<<<<<<<<<<<< @@ -21979,7 +22319,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid return __pyx_r; } -/* "dependency_injector/providers.pxd":203 +/* "dependency_injector/providers.pxd":207 * @cython.boundscheck(False) * @cython.wraparound(False) * cdef inline dict __provide_keyword_args(dict kwargs, # <<<<<<<<<<<<<< @@ -22001,7 +22341,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid int __pyx_t_6; __Pyx_RefNannySetupContext("__provide_keyword_args", 0); - /* "dependency_injector/providers.pxd":210 + /* "dependency_injector/providers.pxd":214 * cdef NamedInjection kw_injection * * if len(kwargs) == 0: # <<<<<<<<<<<<<< @@ -22010,13 +22350,13 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid */ if (unlikely(__pyx_v_kwargs == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 210, __pyx_L1_error) + __PYX_ERR(0, 214, __pyx_L1_error) } - __pyx_t_1 = PyDict_Size(__pyx_v_kwargs); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(0, 210, __pyx_L1_error) + __pyx_t_1 = PyDict_Size(__pyx_v_kwargs); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(0, 214, __pyx_L1_error) __pyx_t_2 = ((__pyx_t_1 == 0) != 0); if (__pyx_t_2) { - /* "dependency_injector/providers.pxd":211 + /* "dependency_injector/providers.pxd":215 * * if len(kwargs) == 0: * for index in range(inj_kwargs_len): # <<<<<<<<<<<<<< @@ -22027,7 +22367,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { __pyx_v_index = __pyx_t_4; - /* "dependency_injector/providers.pxd":212 + /* "dependency_injector/providers.pxd":216 * if len(kwargs) == 0: * for index in range(inj_kwargs_len): * kw_injection = inj_kwargs[index] # <<<<<<<<<<<<<< @@ -22036,43 +22376,43 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid */ if (unlikely(__pyx_v_inj_kwargs == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 212, __pyx_L1_error) + __PYX_ERR(0, 216, __pyx_L1_error) } __pyx_t_5 = PyTuple_GET_ITEM(__pyx_v_inj_kwargs, __pyx_v_index); __Pyx_INCREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_kw_injection, ((struct __pyx_obj_19dependency_injector_9providers_NamedInjection *)__pyx_t_5)); __pyx_t_5 = 0; - /* "dependency_injector/providers.pxd":213 + /* "dependency_injector/providers.pxd":217 * for index in range(inj_kwargs_len): * kw_injection = inj_kwargs[index] * name = __get_name(kw_injection) # <<<<<<<<<<<<<< * kwargs[name] = __get_value(kw_injection) * else: */ - __pyx_t_5 = __pyx_f_19dependency_injector_9providers___get_name(__pyx_v_kw_injection); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 213, __pyx_L1_error) + __pyx_t_5 = __pyx_f_19dependency_injector_9providers___get_name(__pyx_v_kw_injection); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 217, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_5); __pyx_t_5 = 0; - /* "dependency_injector/providers.pxd":214 + /* "dependency_injector/providers.pxd":218 * kw_injection = inj_kwargs[index] * name = __get_name(kw_injection) * kwargs[name] = __get_value(kw_injection) # <<<<<<<<<<<<<< * else: * for index in range(inj_kwargs_len): */ - __pyx_t_5 = __pyx_f_19dependency_injector_9providers___get_value(((struct __pyx_obj_19dependency_injector_9providers_Injection *)__pyx_v_kw_injection)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 214, __pyx_L1_error) + __pyx_t_5 = __pyx_f_19dependency_injector_9providers___get_value(((struct __pyx_obj_19dependency_injector_9providers_Injection *)__pyx_v_kw_injection)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (unlikely(__pyx_v_kwargs == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 214, __pyx_L1_error) + __PYX_ERR(0, 218, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__pyx_v_kwargs, __pyx_v_name, __pyx_t_5) < 0)) __PYX_ERR(0, 214, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_kwargs, __pyx_v_name, __pyx_t_5) < 0)) __PYX_ERR(0, 218, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } - /* "dependency_injector/providers.pxd":210 + /* "dependency_injector/providers.pxd":214 * cdef NamedInjection kw_injection * * if len(kwargs) == 0: # <<<<<<<<<<<<<< @@ -22082,7 +22422,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid goto __pyx_L3; } - /* "dependency_injector/providers.pxd":216 + /* "dependency_injector/providers.pxd":220 * kwargs[name] = __get_value(kw_injection) * else: * for index in range(inj_kwargs_len): # <<<<<<<<<<<<<< @@ -22094,7 +22434,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { __pyx_v_index = __pyx_t_4; - /* "dependency_injector/providers.pxd":217 + /* "dependency_injector/providers.pxd":221 * else: * for index in range(inj_kwargs_len): * kw_injection = inj_kwargs[index] # <<<<<<<<<<<<<< @@ -22103,26 +22443,26 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid */ if (unlikely(__pyx_v_inj_kwargs == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 217, __pyx_L1_error) + __PYX_ERR(0, 221, __pyx_L1_error) } __pyx_t_5 = PyTuple_GET_ITEM(__pyx_v_inj_kwargs, __pyx_v_index); __Pyx_INCREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_kw_injection, ((struct __pyx_obj_19dependency_injector_9providers_NamedInjection *)__pyx_t_5)); __pyx_t_5 = 0; - /* "dependency_injector/providers.pxd":218 + /* "dependency_injector/providers.pxd":222 * for index in range(inj_kwargs_len): * kw_injection = inj_kwargs[index] * name = __get_name(kw_injection) # <<<<<<<<<<<<<< * if name not in kwargs: * kwargs[name] = __get_value(kw_injection) */ - __pyx_t_5 = __pyx_f_19dependency_injector_9providers___get_name(__pyx_v_kw_injection); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 218, __pyx_L1_error) + __pyx_t_5 = __pyx_f_19dependency_injector_9providers___get_name(__pyx_v_kw_injection); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 222, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_5); __pyx_t_5 = 0; - /* "dependency_injector/providers.pxd":219 + /* "dependency_injector/providers.pxd":223 * kw_injection = inj_kwargs[index] * name = __get_name(kw_injection) * if name not in kwargs: # <<<<<<<<<<<<<< @@ -22131,29 +22471,29 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid */ if (unlikely(__pyx_v_kwargs == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 219, __pyx_L1_error) + __PYX_ERR(0, 223, __pyx_L1_error) } - __pyx_t_2 = (__Pyx_PyDict_ContainsTF(__pyx_v_name, __pyx_v_kwargs, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 219, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PyDict_ContainsTF(__pyx_v_name, __pyx_v_kwargs, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 223, __pyx_L1_error) __pyx_t_6 = (__pyx_t_2 != 0); if (__pyx_t_6) { - /* "dependency_injector/providers.pxd":220 + /* "dependency_injector/providers.pxd":224 * name = __get_name(kw_injection) * if name not in kwargs: * kwargs[name] = __get_value(kw_injection) # <<<<<<<<<<<<<< * * return kwargs */ - __pyx_t_5 = __pyx_f_19dependency_injector_9providers___get_value(((struct __pyx_obj_19dependency_injector_9providers_Injection *)__pyx_v_kw_injection)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 220, __pyx_L1_error) + __pyx_t_5 = __pyx_f_19dependency_injector_9providers___get_value(((struct __pyx_obj_19dependency_injector_9providers_Injection *)__pyx_v_kw_injection)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (unlikely(__pyx_v_kwargs == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 220, __pyx_L1_error) + __PYX_ERR(0, 224, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__pyx_v_kwargs, __pyx_v_name, __pyx_t_5) < 0)) __PYX_ERR(0, 220, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_kwargs, __pyx_v_name, __pyx_t_5) < 0)) __PYX_ERR(0, 224, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "dependency_injector/providers.pxd":219 + /* "dependency_injector/providers.pxd":223 * kw_injection = inj_kwargs[index] * name = __get_name(kw_injection) * if name not in kwargs: # <<<<<<<<<<<<<< @@ -22165,7 +22505,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid } __pyx_L3:; - /* "dependency_injector/providers.pxd":222 + /* "dependency_injector/providers.pxd":226 * kwargs[name] = __get_value(kw_injection) * * return kwargs # <<<<<<<<<<<<<< @@ -22177,7 +22517,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid __pyx_r = __pyx_v_kwargs; goto __pyx_L0; - /* "dependency_injector/providers.pxd":203 + /* "dependency_injector/providers.pxd":207 * @cython.boundscheck(False) * @cython.wraparound(False) * cdef inline dict __provide_keyword_args(dict kwargs, # <<<<<<<<<<<<<< @@ -22198,7 +22538,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid return __pyx_r; } -/* "dependency_injector/providers.pxd":227 +/* "dependency_injector/providers.pxd":231 * @cython.boundscheck(False) * @cython.wraparound(False) * cdef inline object __inject_attributes(object instance, # <<<<<<<<<<<<<< @@ -22218,7 +22558,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___inject int __pyx_t_5; __Pyx_RefNannySetupContext("__inject_attributes", 0); - /* "dependency_injector/providers.pxd":231 + /* "dependency_injector/providers.pxd":235 * int attributes_len): * cdef NamedInjection attr_injection * for index in range(attributes_len): # <<<<<<<<<<<<<< @@ -22229,7 +22569,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___inject for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_index = __pyx_t_2; - /* "dependency_injector/providers.pxd":232 + /* "dependency_injector/providers.pxd":236 * cdef NamedInjection attr_injection * for index in range(attributes_len): * attr_injection = attributes[index] # <<<<<<<<<<<<<< @@ -22238,46 +22578,46 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___inject */ if (unlikely(__pyx_v_attributes == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 232, __pyx_L1_error) + __PYX_ERR(0, 236, __pyx_L1_error) } __pyx_t_3 = PyTuple_GET_ITEM(__pyx_v_attributes, __pyx_v_index); __Pyx_INCREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_attr_injection, ((struct __pyx_obj_19dependency_injector_9providers_NamedInjection *)__pyx_t_3)); __pyx_t_3 = 0; - /* "dependency_injector/providers.pxd":234 + /* "dependency_injector/providers.pxd":238 * attr_injection = attributes[index] * setattr(instance, * __get_name(attr_injection), # <<<<<<<<<<<<<< * __get_value(attr_injection)) * */ - __pyx_t_3 = __pyx_f_19dependency_injector_9providers___get_name(__pyx_v_attr_injection); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 234, __pyx_L1_error) + __pyx_t_3 = __pyx_f_19dependency_injector_9providers___get_name(__pyx_v_attr_injection); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - /* "dependency_injector/providers.pxd":235 + /* "dependency_injector/providers.pxd":239 * setattr(instance, * __get_name(attr_injection), * __get_value(attr_injection)) # <<<<<<<<<<<<<< * * */ - __pyx_t_4 = __pyx_f_19dependency_injector_9providers___get_value(((struct __pyx_obj_19dependency_injector_9providers_Injection *)__pyx_v_attr_injection)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 235, __pyx_L1_error) + __pyx_t_4 = __pyx_f_19dependency_injector_9providers___get_value(((struct __pyx_obj_19dependency_injector_9providers_Injection *)__pyx_v_attr_injection)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 239, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - /* "dependency_injector/providers.pxd":233 + /* "dependency_injector/providers.pxd":237 * for index in range(attributes_len): * attr_injection = attributes[index] * setattr(instance, # <<<<<<<<<<<<<< * __get_name(attr_injection), * __get_value(attr_injection)) */ - __pyx_t_5 = PyObject_SetAttr(__pyx_v_instance, __pyx_t_3, __pyx_t_4); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(0, 233, __pyx_L1_error) + __pyx_t_5 = PyObject_SetAttr(__pyx_v_instance, __pyx_t_3, __pyx_t_4); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(0, 237, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } - /* "dependency_injector/providers.pxd":227 + /* "dependency_injector/providers.pxd":231 * @cython.boundscheck(False) * @cython.wraparound(False) * cdef inline object __inject_attributes(object instance, # <<<<<<<<<<<<<< @@ -22300,7 +22640,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___inject return __pyx_r; } -/* "dependency_injector/providers.pxd":238 +/* "dependency_injector/providers.pxd":242 * * * cdef inline object __callable_call(Callable self, tuple args, dict kwargs): # <<<<<<<<<<<<<< @@ -22317,7 +22657,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___callab PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__callable_call", 0); - /* "dependency_injector/providers.pxd":243 + /* "dependency_injector/providers.pxd":247 * * positional_args = __provide_positional_args(args, * self.__args, # <<<<<<<<<<<<<< @@ -22327,20 +22667,20 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___callab __pyx_t_1 = __pyx_v_self->__pyx___args; __Pyx_INCREF(__pyx_t_1); - /* "dependency_injector/providers.pxd":242 + /* "dependency_injector/providers.pxd":246 * cdef dict keyword_args * * positional_args = __provide_positional_args(args, # <<<<<<<<<<<<<< * self.__args, * self.__args_len) */ - __pyx_t_2 = __pyx_f_19dependency_injector_9providers___provide_positional_args(__pyx_v_args, ((PyObject*)__pyx_t_1), __pyx_v_self->__pyx___args_len); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 242, __pyx_L1_error) + __pyx_t_2 = __pyx_f_19dependency_injector_9providers___provide_positional_args(__pyx_v_args, ((PyObject*)__pyx_t_1), __pyx_v_self->__pyx___args_len); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 246, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_positional_args = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pxd":246 + /* "dependency_injector/providers.pxd":250 * self.__args_len) * keyword_args = __provide_keyword_args(kwargs, * self.__kwargs, # <<<<<<<<<<<<<< @@ -22350,20 +22690,20 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___callab __pyx_t_2 = __pyx_v_self->__pyx___kwargs; __Pyx_INCREF(__pyx_t_2); - /* "dependency_injector/providers.pxd":245 + /* "dependency_injector/providers.pxd":249 * self.__args, * self.__args_len) * keyword_args = __provide_keyword_args(kwargs, # <<<<<<<<<<<<<< * self.__kwargs, * self.__kwargs_len) */ - __pyx_t_1 = __pyx_f_19dependency_injector_9providers___provide_keyword_args(__pyx_v_kwargs, ((PyObject*)__pyx_t_2), __pyx_v_self->__pyx___kwargs_len); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 245, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers___provide_keyword_args(__pyx_v_kwargs, ((PyObject*)__pyx_t_2), __pyx_v_self->__pyx___kwargs_len); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 249, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_keyword_args = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pxd":249 + /* "dependency_injector/providers.pxd":253 * self.__kwargs_len) * * return self.__provides(*positional_args, **keyword_args) # <<<<<<<<<<<<<< @@ -22373,19 +22713,19 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___callab __Pyx_XDECREF(__pyx_r); if (unlikely(__pyx_v_positional_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 249, __pyx_L1_error) + __PYX_ERR(0, 253, __pyx_L1_error) } if (unlikely(__pyx_v_keyword_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); - __PYX_ERR(0, 249, __pyx_L1_error) + __PYX_ERR(0, 253, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_v_self->__pyx___provides, __pyx_v_positional_args, __pyx_v_keyword_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 249, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_v_self->__pyx___provides, __pyx_v_positional_args, __pyx_v_keyword_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 253, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pxd":238 + /* "dependency_injector/providers.pxd":242 * * * cdef inline object __callable_call(Callable self, tuple args, dict kwargs): # <<<<<<<<<<<<<< @@ -22407,7 +22747,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___callab return __pyx_r; } -/* "dependency_injector/providers.pxd":252 +/* "dependency_injector/providers.pxd":256 * * * cdef inline object __factory_call(Factory self, tuple args, dict kwargs): # <<<<<<<<<<<<<< @@ -22424,7 +22764,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___factor int __pyx_t_3; __Pyx_RefNannySetupContext("__factory_call", 0); - /* "dependency_injector/providers.pxd":255 + /* "dependency_injector/providers.pxd":259 * cdef object instance * * instance = __callable_call(self.__instantiator, args, kwargs) # <<<<<<<<<<<<<< @@ -22433,13 +22773,13 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___factor */ __pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx___instantiator); __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = __pyx_f_19dependency_injector_9providers___callable_call(((struct __pyx_obj_19dependency_injector_9providers_Callable *)__pyx_t_1), __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 255, __pyx_L1_error) + __pyx_t_2 = __pyx_f_19dependency_injector_9providers___callable_call(((struct __pyx_obj_19dependency_injector_9providers_Callable *)__pyx_t_1), __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 259, __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.pxd":257 + /* "dependency_injector/providers.pxd":261 * instance = __callable_call(self.__instantiator, args, kwargs) * * if self.__attributes_len > 0: # <<<<<<<<<<<<<< @@ -22449,7 +22789,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___factor __pyx_t_3 = ((__pyx_v_self->__pyx___attributes_len > 0) != 0); if (__pyx_t_3) { - /* "dependency_injector/providers.pxd":259 + /* "dependency_injector/providers.pxd":263 * if self.__attributes_len > 0: * __inject_attributes(instance, * self.__attributes, # <<<<<<<<<<<<<< @@ -22459,19 +22799,19 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___factor __pyx_t_2 = __pyx_v_self->__pyx___attributes; __Pyx_INCREF(__pyx_t_2); - /* "dependency_injector/providers.pxd":258 + /* "dependency_injector/providers.pxd":262 * * if self.__attributes_len > 0: * __inject_attributes(instance, # <<<<<<<<<<<<<< * self.__attributes, * self.__attributes_len) */ - __pyx_t_1 = __pyx_f_19dependency_injector_9providers___inject_attributes(__pyx_v_instance, ((PyObject*)__pyx_t_2), __pyx_v_self->__pyx___attributes_len); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 258, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers___inject_attributes(__pyx_v_instance, ((PyObject*)__pyx_t_2), __pyx_v_self->__pyx___attributes_len); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 262, __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.pxd":257 + /* "dependency_injector/providers.pxd":261 * instance = __callable_call(self.__instantiator, args, kwargs) * * if self.__attributes_len > 0: # <<<<<<<<<<<<<< @@ -22480,7 +22820,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___factor */ } - /* "dependency_injector/providers.pxd":262 + /* "dependency_injector/providers.pxd":266 * self.__attributes_len) * * return instance # <<<<<<<<<<<<<< @@ -22490,7 +22830,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___factor __pyx_r = __pyx_v_instance; goto __pyx_L0; - /* "dependency_injector/providers.pxd":252 + /* "dependency_injector/providers.pxd":256 * * * cdef inline object __factory_call(Factory self, tuple args, dict kwargs): # <<<<<<<<<<<<<< @@ -23876,6 +24216,90 @@ static PyTypeObject __pyx_type_19dependency_injector_9providers_AbstractFactory 0, /*tp_finalize*/ #endif }; +static struct __pyx_vtabstruct_19dependency_injector_9providers_FactoryDelegate __pyx_vtable_19dependency_injector_9providers_FactoryDelegate; + +static PyObject *__pyx_tp_new_19dependency_injector_9providers_FactoryDelegate(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_19dependency_injector_9providers_FactoryDelegate *p; + PyObject *o = __pyx_tp_new_19dependency_injector_9providers_Delegate(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_19dependency_injector_9providers_FactoryDelegate *)o); + p->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_19dependency_injector_9providers_Provider*)__pyx_vtabptr_19dependency_injector_9providers_FactoryDelegate; + return o; +} + +static PyMethodDef __pyx_methods_19dependency_injector_9providers_FactoryDelegate[] = { + {0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type_19dependency_injector_9providers_FactoryDelegate = { + PyVarObject_HEAD_INIT(0, 0) + "dependency_injector.providers.FactoryDelegate", /*tp_name*/ + sizeof(struct __pyx_obj_19dependency_injector_9providers_FactoryDelegate), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_19dependency_injector_9providers_Object, /*tp_dealloc*/ + 0, /*tp_print*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ + #endif + #if PY_MAJOR_VERSION >= 3 + 0, /*tp_as_async*/ + #endif + #if CYTHON_COMPILING_IN_PYPY + __pyx_pw_19dependency_injector_9providers_6Object_7__repr__, /*tp_repr*/ + #else + 0, /*tp_repr*/ + #endif + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + #if CYTHON_COMPILING_IN_PYPY + __pyx_pw_19dependency_injector_9providers_8Provider_3__call__, /*tp_call*/ + #else + 0, /*tp_call*/ + #endif + #if CYTHON_COMPILING_IN_PYPY + __pyx_pw_19dependency_injector_9providers_6Object_5__str__, /*tp_str*/ + #else + 0, /*tp_str*/ + #endif + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + "Factory delegate injects delegating factory \"as is\".\n\n .. py:attribute:: provides\n\n Value that have to be provided.\n\n :type: object\n ", /*tp_doc*/ + __pyx_tp_traverse_19dependency_injector_9providers_Object, /*tp_traverse*/ + __pyx_tp_clear_19dependency_injector_9providers_Object, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_19dependency_injector_9providers_FactoryDelegate, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + __pyx_pw_19dependency_injector_9providers_15FactoryDelegate_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_19dependency_injector_9providers_FactoryDelegate, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif +}; static struct __pyx_vtabstruct_19dependency_injector_9providers_BaseSingleton __pyx_vtable_19dependency_injector_9providers_BaseSingleton; static PyObject *__pyx_tp_new_19dependency_injector_9providers_BaseSingleton(PyTypeObject *t, PyObject *a, PyObject *k) { @@ -25044,6 +25468,7 @@ static struct PyModuleDef __pyx_moduledef = { static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_kp_s_0_can_provide_only_1_instances, __pyx_k_0_can_provide_only_1_instances, sizeof(__pyx_k_0_can_provide_only_1_instances), 0, 0, 1, 0}, + {&__pyx_kp_s_0_can_wrap_only_1_providers, __pyx_k_0_can_wrap_only_1_providers, sizeof(__pyx_k_0_can_wrap_only_1_providers), 0, 0, 1, 0}, {&__pyx_kp_s_0_is_not_an, __pyx_k_0_is_not_an, sizeof(__pyx_k_0_is_not_an), 0, 0, 1, 0}, {&__pyx_kp_s_0_must_be_overridden_before_cal, __pyx_k_0_must_be_overridden_before_cal, sizeof(__pyx_k_0_must_be_overridden_before_cal), 0, 0, 1, 0}, {&__pyx_kp_s_0_must_be_overridden_only_by_1, __pyx_k_0_must_be_overridden_only_by_1, sizeof(__pyx_k_0_must_be_overridden_only_by_1), 0, 0, 1, 0}, @@ -25087,6 +25512,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_enter, __pyx_k_enter, sizeof(__pyx_k_enter), 0, 0, 1, 1}, {&__pyx_n_s_errors, __pyx_k_errors, sizeof(__pyx_k_errors), 0, 0, 1, 1}, {&__pyx_n_s_exit, __pyx_k_exit, sizeof(__pyx_k_exit), 0, 0, 1, 1}, + {&__pyx_n_s_factory, __pyx_k_factory, sizeof(__pyx_k_factory), 0, 0, 1, 1}, {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1}, {&__pyx_n_s_get, __pyx_k_get, sizeof(__pyx_k_get), 0, 0, 1, 1}, {&__pyx_n_s_get_child_name, __pyx_k_get_child_name, sizeof(__pyx_k_get_child_name), 0, 0, 1, 1}, @@ -25142,13 +25568,13 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {0, 0, 0, 0, 0, 0, 0} }; static int __Pyx_InitCachedBuiltins(void) { - __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 193, __pyx_L1_error) + __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 197, __pyx_L1_error) __pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_n_s_super); if (!__pyx_builtin_super) __PYX_ERR(1, 88, __pyx_L1_error) __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(1, 101, __pyx_L1_error) __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(1, 179, __pyx_L1_error) __pyx_builtin_NotImplementedError = __Pyx_GetBuiltinName(__pyx_n_s_NotImplementedError); if (!__pyx_builtin_NotImplementedError) __PYX_ERR(1, 205, __pyx_L1_error) __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s_AttributeError); if (!__pyx_builtin_AttributeError) __PYX_ERR(1, 713, __pyx_L1_error) - __pyx_builtin_hex = __Pyx_GetBuiltinName(__pyx_n_s_hex); if (!__pyx_builtin_hex) __PYX_ERR(1, 1665, __pyx_L1_error) + __pyx_builtin_hex = __Pyx_GetBuiltinName(__pyx_n_s_hex); if (!__pyx_builtin_hex) __PYX_ERR(1, 1688, __pyx_L1_error) return 0; __pyx_L1_error:; return -1; @@ -25238,14 +25664,14 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__11); __Pyx_GIVEREF(__pyx_tuple__11); - /* "dependency_injector/providers.pyx":1359 + /* "dependency_injector/providers.pyx":1382 * cpdef object _provide(self, tuple args, dict kwargs): * """Return single instance.""" * with self.__storage_lock: # <<<<<<<<<<<<<< * if self.__storage is None: * self.__storage = __factory_call(self.__instantiator, */ - __pyx_tuple__12 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(1, 1359, __pyx_L1_error) + __pyx_tuple__12 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(1, 1382, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__12); __Pyx_GIVEREF(__pyx_tuple__12); __Pyx_RefNannyFinishContext(); @@ -25681,14 +26107,32 @@ PyMODINIT_FUNC PyInit_providers(void) if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_AbstractFactory.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_AbstractFactory) < 0) __PYX_ERR(1, 1029, __pyx_L1_error) if (PyObject_SetAttrString(__pyx_m, "AbstractFactory", (PyObject *)&__pyx_type_19dependency_injector_9providers_AbstractFactory) < 0) __PYX_ERR(1, 1029, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_AbstractFactory = &__pyx_type_19dependency_injector_9providers_AbstractFactory; + __pyx_vtabptr_19dependency_injector_9providers_FactoryDelegate = &__pyx_vtable_19dependency_injector_9providers_FactoryDelegate; + __pyx_vtable_19dependency_injector_9providers_FactoryDelegate.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_Delegate; + __pyx_type_19dependency_injector_9providers_FactoryDelegate.tp_base = __pyx_ptype_19dependency_injector_9providers_Delegate; + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_FactoryDelegate) < 0) __PYX_ERR(1, 1070, __pyx_L1_error) + __pyx_type_19dependency_injector_9providers_FactoryDelegate.tp_print = 0; + #if CYTHON_COMPILING_IN_CPYTHON + { + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_FactoryDelegate, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 1070, __pyx_L1_error) + if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { + __pyx_wrapperbase_19dependency_injector_9providers_15FactoryDelegate___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; + __pyx_wrapperbase_19dependency_injector_9providers_15FactoryDelegate___init__.doc = __pyx_doc_19dependency_injector_9providers_15FactoryDelegate___init__; + ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_19dependency_injector_9providers_15FactoryDelegate___init__; + } + } + #endif + if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_FactoryDelegate.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_FactoryDelegate) < 0) __PYX_ERR(1, 1070, __pyx_L1_error) + if (PyObject_SetAttrString(__pyx_m, "FactoryDelegate", (PyObject *)&__pyx_type_19dependency_injector_9providers_FactoryDelegate) < 0) __PYX_ERR(1, 1070, __pyx_L1_error) + __pyx_ptype_19dependency_injector_9providers_FactoryDelegate = &__pyx_type_19dependency_injector_9providers_FactoryDelegate; __pyx_vtabptr_19dependency_injector_9providers_BaseSingleton = &__pyx_vtable_19dependency_injector_9providers_BaseSingleton; __pyx_vtable_19dependency_injector_9providers_BaseSingleton.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_Provider; __pyx_type_19dependency_injector_9providers_BaseSingleton.tp_base = __pyx_ptype_19dependency_injector_9providers_Provider; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_BaseSingleton) < 0) __PYX_ERR(1, 1069, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_BaseSingleton) < 0) __PYX_ERR(1, 1092, __pyx_L1_error) __pyx_type_19dependency_injector_9providers_BaseSingleton.tp_print = 0; #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_BaseSingleton, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 1069, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_BaseSingleton, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 1092, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_19dependency_injector_9providers_13BaseSingleton___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_19dependency_injector_9providers_13BaseSingleton___init__.doc = __pyx_doc_19dependency_injector_9providers_13BaseSingleton___init__; @@ -25698,7 +26142,7 @@ PyMODINIT_FUNC PyInit_providers(void) #endif #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_BaseSingleton, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(1, 1069, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_BaseSingleton, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(1, 1092, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_19dependency_injector_9providers_13BaseSingleton_2__str__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_19dependency_injector_9providers_13BaseSingleton_2__str__.doc = __pyx_doc_19dependency_injector_9providers_13BaseSingleton_2__str__; @@ -25706,18 +26150,18 @@ PyMODINIT_FUNC PyInit_providers(void) } } #endif - if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_BaseSingleton.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_BaseSingleton) < 0) __PYX_ERR(1, 1069, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "BaseSingleton", (PyObject *)&__pyx_type_19dependency_injector_9providers_BaseSingleton) < 0) __PYX_ERR(1, 1069, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_BaseSingleton.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_BaseSingleton) < 0) __PYX_ERR(1, 1092, __pyx_L1_error) + if (PyObject_SetAttrString(__pyx_m, "BaseSingleton", (PyObject *)&__pyx_type_19dependency_injector_9providers_BaseSingleton) < 0) __PYX_ERR(1, 1092, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_BaseSingleton = &__pyx_type_19dependency_injector_9providers_BaseSingleton; __pyx_vtabptr_19dependency_injector_9providers_Singleton = &__pyx_vtable_19dependency_injector_9providers_Singleton; __pyx_vtable_19dependency_injector_9providers_Singleton.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_BaseSingleton; __pyx_vtable_19dependency_injector_9providers_Singleton.__pyx_base.__pyx_base._provide = (PyObject *(*)(struct __pyx_obj_19dependency_injector_9providers_Provider *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_19dependency_injector_9providers_9Singleton__provide; __pyx_type_19dependency_injector_9providers_Singleton.tp_base = __pyx_ptype_19dependency_injector_9providers_BaseSingleton; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_Singleton) < 0) __PYX_ERR(1, 1243, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_Singleton) < 0) __PYX_ERR(1, 1266, __pyx_L1_error) __pyx_type_19dependency_injector_9providers_Singleton.tp_print = 0; #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Singleton, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 1243, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_Singleton, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 1266, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_19dependency_injector_9providers_9Singleton___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_19dependency_injector_9providers_9Singleton___init__.doc = __pyx_doc_19dependency_injector_9providers_9Singleton___init__; @@ -25725,26 +26169,26 @@ PyMODINIT_FUNC PyInit_providers(void) } } #endif - if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_Singleton.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_Singleton) < 0) __PYX_ERR(1, 1243, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "Singleton", (PyObject *)&__pyx_type_19dependency_injector_9providers_Singleton) < 0) __PYX_ERR(1, 1243, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_Singleton.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_Singleton) < 0) __PYX_ERR(1, 1266, __pyx_L1_error) + if (PyObject_SetAttrString(__pyx_m, "Singleton", (PyObject *)&__pyx_type_19dependency_injector_9providers_Singleton) < 0) __PYX_ERR(1, 1266, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_Singleton = &__pyx_type_19dependency_injector_9providers_Singleton; __pyx_vtabptr_19dependency_injector_9providers_DelegatedSingleton = &__pyx_vtable_19dependency_injector_9providers_DelegatedSingleton; __pyx_vtable_19dependency_injector_9providers_DelegatedSingleton.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_Singleton; __pyx_type_19dependency_injector_9providers_DelegatedSingleton.tp_base = __pyx_ptype_19dependency_injector_9providers_Singleton; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_DelegatedSingleton) < 0) __PYX_ERR(1, 1304, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_DelegatedSingleton) < 0) __PYX_ERR(1, 1327, __pyx_L1_error) __pyx_type_19dependency_injector_9providers_DelegatedSingleton.tp_print = 0; - if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_DelegatedSingleton.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_DelegatedSingleton) < 0) __PYX_ERR(1, 1304, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "DelegatedSingleton", (PyObject *)&__pyx_type_19dependency_injector_9providers_DelegatedSingleton) < 0) __PYX_ERR(1, 1304, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_DelegatedSingleton.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_DelegatedSingleton) < 0) __PYX_ERR(1, 1327, __pyx_L1_error) + if (PyObject_SetAttrString(__pyx_m, "DelegatedSingleton", (PyObject *)&__pyx_type_19dependency_injector_9providers_DelegatedSingleton) < 0) __PYX_ERR(1, 1327, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_DelegatedSingleton = &__pyx_type_19dependency_injector_9providers_DelegatedSingleton; __pyx_vtabptr_19dependency_injector_9providers_ThreadSafeSingleton = &__pyx_vtable_19dependency_injector_9providers_ThreadSafeSingleton; __pyx_vtable_19dependency_injector_9providers_ThreadSafeSingleton.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_BaseSingleton; __pyx_vtable_19dependency_injector_9providers_ThreadSafeSingleton.__pyx_base.__pyx_base._provide = (PyObject *(*)(struct __pyx_obj_19dependency_injector_9providers_Provider *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_19dependency_injector_9providers_19ThreadSafeSingleton__provide; __pyx_type_19dependency_injector_9providers_ThreadSafeSingleton.tp_base = __pyx_ptype_19dependency_injector_9providers_BaseSingleton; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_ThreadSafeSingleton) < 0) __PYX_ERR(1, 1325, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_ThreadSafeSingleton) < 0) __PYX_ERR(1, 1348, __pyx_L1_error) __pyx_type_19dependency_injector_9providers_ThreadSafeSingleton.tp_print = 0; #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_ThreadSafeSingleton, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 1325, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_ThreadSafeSingleton, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 1348, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_19dependency_injector_9providers_19ThreadSafeSingleton___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_19dependency_injector_9providers_19ThreadSafeSingleton___init__.doc = __pyx_doc_19dependency_injector_9providers_19ThreadSafeSingleton___init__; @@ -25752,26 +26196,26 @@ PyMODINIT_FUNC PyInit_providers(void) } } #endif - if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_ThreadSafeSingleton.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_ThreadSafeSingleton) < 0) __PYX_ERR(1, 1325, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "ThreadSafeSingleton", (PyObject *)&__pyx_type_19dependency_injector_9providers_ThreadSafeSingleton) < 0) __PYX_ERR(1, 1325, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_ThreadSafeSingleton.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_ThreadSafeSingleton) < 0) __PYX_ERR(1, 1348, __pyx_L1_error) + if (PyObject_SetAttrString(__pyx_m, "ThreadSafeSingleton", (PyObject *)&__pyx_type_19dependency_injector_9providers_ThreadSafeSingleton) < 0) __PYX_ERR(1, 1348, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_ThreadSafeSingleton = &__pyx_type_19dependency_injector_9providers_ThreadSafeSingleton; __pyx_vtabptr_19dependency_injector_9providers_DelegatedThreadSafeSingleton = &__pyx_vtable_19dependency_injector_9providers_DelegatedThreadSafeSingleton; __pyx_vtable_19dependency_injector_9providers_DelegatedThreadSafeSingleton.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_ThreadSafeSingleton; __pyx_type_19dependency_injector_9providers_DelegatedThreadSafeSingleton.tp_base = __pyx_ptype_19dependency_injector_9providers_ThreadSafeSingleton; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_DelegatedThreadSafeSingleton) < 0) __PYX_ERR(1, 1366, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_DelegatedThreadSafeSingleton) < 0) __PYX_ERR(1, 1389, __pyx_L1_error) __pyx_type_19dependency_injector_9providers_DelegatedThreadSafeSingleton.tp_print = 0; - if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_DelegatedThreadSafeSingleton.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_DelegatedThreadSafeSingleton) < 0) __PYX_ERR(1, 1366, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "DelegatedThreadSafeSingleton", (PyObject *)&__pyx_type_19dependency_injector_9providers_DelegatedThreadSafeSingleton) < 0) __PYX_ERR(1, 1366, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_DelegatedThreadSafeSingleton.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_DelegatedThreadSafeSingleton) < 0) __PYX_ERR(1, 1389, __pyx_L1_error) + if (PyObject_SetAttrString(__pyx_m, "DelegatedThreadSafeSingleton", (PyObject *)&__pyx_type_19dependency_injector_9providers_DelegatedThreadSafeSingleton) < 0) __PYX_ERR(1, 1389, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_DelegatedThreadSafeSingleton = &__pyx_type_19dependency_injector_9providers_DelegatedThreadSafeSingleton; __pyx_vtabptr_19dependency_injector_9providers_ThreadLocalSingleton = &__pyx_vtable_19dependency_injector_9providers_ThreadLocalSingleton; __pyx_vtable_19dependency_injector_9providers_ThreadLocalSingleton.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_BaseSingleton; __pyx_vtable_19dependency_injector_9providers_ThreadLocalSingleton.__pyx_base.__pyx_base._provide = (PyObject *(*)(struct __pyx_obj_19dependency_injector_9providers_Provider *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_19dependency_injector_9providers_20ThreadLocalSingleton__provide; __pyx_type_19dependency_injector_9providers_ThreadLocalSingleton.tp_base = __pyx_ptype_19dependency_injector_9providers_BaseSingleton; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_ThreadLocalSingleton) < 0) __PYX_ERR(1, 1387, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_ThreadLocalSingleton) < 0) __PYX_ERR(1, 1410, __pyx_L1_error) __pyx_type_19dependency_injector_9providers_ThreadLocalSingleton.tp_print = 0; #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_ThreadLocalSingleton, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 1387, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_ThreadLocalSingleton, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 1410, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_19dependency_injector_9providers_20ThreadLocalSingleton___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_19dependency_injector_9providers_20ThreadLocalSingleton___init__.doc = __pyx_doc_19dependency_injector_9providers_20ThreadLocalSingleton___init__; @@ -25779,25 +26223,25 @@ PyMODINIT_FUNC PyInit_providers(void) } } #endif - if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_ThreadLocalSingleton.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_ThreadLocalSingleton) < 0) __PYX_ERR(1, 1387, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "ThreadLocalSingleton", (PyObject *)&__pyx_type_19dependency_injector_9providers_ThreadLocalSingleton) < 0) __PYX_ERR(1, 1387, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_ThreadLocalSingleton.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_ThreadLocalSingleton) < 0) __PYX_ERR(1, 1410, __pyx_L1_error) + if (PyObject_SetAttrString(__pyx_m, "ThreadLocalSingleton", (PyObject *)&__pyx_type_19dependency_injector_9providers_ThreadLocalSingleton) < 0) __PYX_ERR(1, 1410, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_ThreadLocalSingleton = &__pyx_type_19dependency_injector_9providers_ThreadLocalSingleton; __pyx_vtabptr_19dependency_injector_9providers_DelegatedThreadLocalSingleton = &__pyx_vtable_19dependency_injector_9providers_DelegatedThreadLocalSingleton; __pyx_vtable_19dependency_injector_9providers_DelegatedThreadLocalSingleton.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_ThreadLocalSingleton; __pyx_type_19dependency_injector_9providers_DelegatedThreadLocalSingleton.tp_base = __pyx_ptype_19dependency_injector_9providers_ThreadLocalSingleton; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_DelegatedThreadLocalSingleton) < 0) __PYX_ERR(1, 1440, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_DelegatedThreadLocalSingleton) < 0) __PYX_ERR(1, 1463, __pyx_L1_error) __pyx_type_19dependency_injector_9providers_DelegatedThreadLocalSingleton.tp_print = 0; - if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_DelegatedThreadLocalSingleton.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_DelegatedThreadLocalSingleton) < 0) __PYX_ERR(1, 1440, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "DelegatedThreadLocalSingleton", (PyObject *)&__pyx_type_19dependency_injector_9providers_DelegatedThreadLocalSingleton) < 0) __PYX_ERR(1, 1440, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_DelegatedThreadLocalSingleton.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_DelegatedThreadLocalSingleton) < 0) __PYX_ERR(1, 1463, __pyx_L1_error) + if (PyObject_SetAttrString(__pyx_m, "DelegatedThreadLocalSingleton", (PyObject *)&__pyx_type_19dependency_injector_9providers_DelegatedThreadLocalSingleton) < 0) __PYX_ERR(1, 1463, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_DelegatedThreadLocalSingleton = &__pyx_type_19dependency_injector_9providers_DelegatedThreadLocalSingleton; __pyx_vtabptr_19dependency_injector_9providers_AbstractSingleton = &__pyx_vtable_19dependency_injector_9providers_AbstractSingleton; __pyx_vtable_19dependency_injector_9providers_AbstractSingleton.__pyx_base = *__pyx_vtabptr_19dependency_injector_9providers_BaseSingleton; __pyx_type_19dependency_injector_9providers_AbstractSingleton.tp_base = __pyx_ptype_19dependency_injector_9providers_BaseSingleton; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_AbstractSingleton) < 0) __PYX_ERR(1, 1461, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_AbstractSingleton) < 0) __PYX_ERR(1, 1484, __pyx_L1_error) __pyx_type_19dependency_injector_9providers_AbstractSingleton.tp_print = 0; #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_AbstractSingleton, "__call__"); if (unlikely(!wrapper)) __PYX_ERR(1, 1461, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_AbstractSingleton, "__call__"); if (unlikely(!wrapper)) __PYX_ERR(1, 1484, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_19dependency_injector_9providers_17AbstractSingleton___call__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_19dependency_injector_9providers_17AbstractSingleton___call__.doc = __pyx_doc_19dependency_injector_9providers_17AbstractSingleton___call__; @@ -25805,19 +26249,19 @@ PyMODINIT_FUNC PyInit_providers(void) } } #endif - if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_AbstractSingleton.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_AbstractSingleton) < 0) __PYX_ERR(1, 1461, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "AbstractSingleton", (PyObject *)&__pyx_type_19dependency_injector_9providers_AbstractSingleton) < 0) __PYX_ERR(1, 1461, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_19dependency_injector_9providers_AbstractSingleton.tp_dict, __pyx_vtabptr_19dependency_injector_9providers_AbstractSingleton) < 0) __PYX_ERR(1, 1484, __pyx_L1_error) + if (PyObject_SetAttrString(__pyx_m, "AbstractSingleton", (PyObject *)&__pyx_type_19dependency_injector_9providers_AbstractSingleton) < 0) __PYX_ERR(1, 1484, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_AbstractSingleton = &__pyx_type_19dependency_injector_9providers_AbstractSingleton; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_Injection) < 0) __PYX_ERR(1, 1506, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_Injection) < 0) __PYX_ERR(1, 1529, __pyx_L1_error) __pyx_type_19dependency_injector_9providers_Injection.tp_print = 0; - if (PyObject_SetAttrString(__pyx_m, "Injection", (PyObject *)&__pyx_type_19dependency_injector_9providers_Injection) < 0) __PYX_ERR(1, 1506, __pyx_L1_error) + if (PyObject_SetAttrString(__pyx_m, "Injection", (PyObject *)&__pyx_type_19dependency_injector_9providers_Injection) < 0) __PYX_ERR(1, 1529, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_Injection = &__pyx_type_19dependency_injector_9providers_Injection; __pyx_type_19dependency_injector_9providers_PositionalInjection.tp_base = __pyx_ptype_19dependency_injector_9providers_Injection; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_PositionalInjection) < 0) __PYX_ERR(1, 1510, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_PositionalInjection) < 0) __PYX_ERR(1, 1533, __pyx_L1_error) __pyx_type_19dependency_injector_9providers_PositionalInjection.tp_print = 0; #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_PositionalInjection, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 1510, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_PositionalInjection, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 1533, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_19dependency_injector_9providers_19PositionalInjection___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_19dependency_injector_9providers_19PositionalInjection___init__.doc = __pyx_doc_19dependency_injector_9providers_19PositionalInjection___init__; @@ -25825,14 +26269,14 @@ PyMODINIT_FUNC PyInit_providers(void) } } #endif - if (PyObject_SetAttrString(__pyx_m, "PositionalInjection", (PyObject *)&__pyx_type_19dependency_injector_9providers_PositionalInjection) < 0) __PYX_ERR(1, 1510, __pyx_L1_error) + if (PyObject_SetAttrString(__pyx_m, "PositionalInjection", (PyObject *)&__pyx_type_19dependency_injector_9providers_PositionalInjection) < 0) __PYX_ERR(1, 1533, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_PositionalInjection = &__pyx_type_19dependency_injector_9providers_PositionalInjection; __pyx_type_19dependency_injector_9providers_NamedInjection.tp_base = __pyx_ptype_19dependency_injector_9providers_Injection; - if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_NamedInjection) < 0) __PYX_ERR(1, 1538, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_NamedInjection) < 0) __PYX_ERR(1, 1561, __pyx_L1_error) __pyx_type_19dependency_injector_9providers_NamedInjection.tp_print = 0; #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_NamedInjection, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 1538, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_19dependency_injector_9providers_NamedInjection, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 1561, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_19dependency_injector_9providers_14NamedInjection___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_19dependency_injector_9providers_14NamedInjection___init__.doc = __pyx_doc_19dependency_injector_9providers_14NamedInjection___init__; @@ -25840,7 +26284,7 @@ PyMODINIT_FUNC PyInit_providers(void) } } #endif - if (PyObject_SetAttrString(__pyx_m, "NamedInjection", (PyObject *)&__pyx_type_19dependency_injector_9providers_NamedInjection) < 0) __PYX_ERR(1, 1538, __pyx_L1_error) + if (PyObject_SetAttrString(__pyx_m, "NamedInjection", (PyObject *)&__pyx_type_19dependency_injector_9providers_NamedInjection) < 0) __PYX_ERR(1, 1561, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_NamedInjection = &__pyx_type_19dependency_injector_9providers_NamedInjection; /*--- Type import code ---*/ /*--- Variable import code ---*/ @@ -26102,36 +26546,36 @@ PyMODINIT_FUNC PyInit_providers(void) if (PyDict_SetItem((PyObject *)__pyx_ptype_19dependency_injector_9providers_DelegatedFactory->tp_dict, __pyx_n_s_IS_DELEGATED, Py_True) < 0) __PYX_ERR(1, 1026, __pyx_L1_error) PyType_Modified(__pyx_ptype_19dependency_injector_9providers_DelegatedFactory); - /* "dependency_injector/providers.pyx":1072 + /* "dependency_injector/providers.pyx":1095 * """Base class of singleton providers.""" * * provided_type = None # <<<<<<<<<<<<<< * * def __init__(self, provides, *args, **kwargs): */ - if (PyDict_SetItem((PyObject *)__pyx_ptype_19dependency_injector_9providers_BaseSingleton->tp_dict, __pyx_n_s_provided_type, Py_None) < 0) __PYX_ERR(1, 1072, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_19dependency_injector_9providers_BaseSingleton->tp_dict, __pyx_n_s_provided_type, Py_None) < 0) __PYX_ERR(1, 1095, __pyx_L1_error) PyType_Modified(__pyx_ptype_19dependency_injector_9providers_BaseSingleton); - /* "dependency_injector/providers.pyx":1322 + /* "dependency_injector/providers.pyx":1345 * """ * * __IS_DELEGATED__ = True # <<<<<<<<<<<<<< * * */ - if (PyDict_SetItem((PyObject *)__pyx_ptype_19dependency_injector_9providers_DelegatedSingleton->tp_dict, __pyx_n_s_IS_DELEGATED, Py_True) < 0) __PYX_ERR(1, 1322, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_19dependency_injector_9providers_DelegatedSingleton->tp_dict, __pyx_n_s_IS_DELEGATED, Py_True) < 0) __PYX_ERR(1, 1345, __pyx_L1_error) PyType_Modified(__pyx_ptype_19dependency_injector_9providers_DelegatedSingleton); - /* "dependency_injector/providers.pyx":1328 + /* "dependency_injector/providers.pyx":1351 * """Thread-safe singleton provider.""" * * storage_lock = threading.RLock() # <<<<<<<<<<<<<< * """Storage reentrant lock. * */ - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_threading); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1328, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_threading); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1351, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_RLock); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1328, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_RLock); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1351, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -26145,35 +26589,35 @@ PyMODINIT_FUNC PyInit_providers(void) } } if (__pyx_t_4) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1328, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1351, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1328, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1351, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (PyDict_SetItem((PyObject *)__pyx_ptype_19dependency_injector_9providers_ThreadSafeSingleton->tp_dict, __pyx_n_s_storage_lock, __pyx_t_1) < 0) __PYX_ERR(1, 1328, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_19dependency_injector_9providers_ThreadSafeSingleton->tp_dict, __pyx_n_s_storage_lock, __pyx_t_1) < 0) __PYX_ERR(1, 1351, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_19dependency_injector_9providers_ThreadSafeSingleton); - /* "dependency_injector/providers.pyx":1384 + /* "dependency_injector/providers.pyx":1407 * """ * * __IS_DELEGATED__ = True # <<<<<<<<<<<<<< * * */ - if (PyDict_SetItem((PyObject *)__pyx_ptype_19dependency_injector_9providers_DelegatedThreadSafeSingleton->tp_dict, __pyx_n_s_IS_DELEGATED, Py_True) < 0) __PYX_ERR(1, 1384, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_19dependency_injector_9providers_DelegatedThreadSafeSingleton->tp_dict, __pyx_n_s_IS_DELEGATED, Py_True) < 0) __PYX_ERR(1, 1407, __pyx_L1_error) PyType_Modified(__pyx_ptype_19dependency_injector_9providers_DelegatedThreadSafeSingleton); - /* "dependency_injector/providers.pyx":1458 + /* "dependency_injector/providers.pyx":1481 * """ * * __IS_DELEGATED__ = True # <<<<<<<<<<<<<< * * */ - if (PyDict_SetItem((PyObject *)__pyx_ptype_19dependency_injector_9providers_DelegatedThreadLocalSingleton->tp_dict, __pyx_n_s_IS_DELEGATED, Py_True) < 0) __PYX_ERR(1, 1458, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_19dependency_injector_9providers_DelegatedThreadLocalSingleton->tp_dict, __pyx_n_s_IS_DELEGATED, Py_True) < 0) __PYX_ERR(1, 1481, __pyx_L1_error) PyType_Modified(__pyx_ptype_19dependency_injector_9providers_DelegatedThreadLocalSingleton); /* "dependency_injector/providers.pyx":1 @@ -26186,7 +26630,7 @@ PyMODINIT_FUNC PyInit_providers(void) if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pxd":252 + /* "dependency_injector/providers.pxd":256 * * * cdef inline object __factory_call(Factory self, tuple args, dict kwargs): # <<<<<<<<<<<<<< diff --git a/src/dependency_injector/providers.pxd b/src/dependency_injector/providers.pxd index c460dc27..51f1bcd4 100644 --- a/src/dependency_injector/providers.pxd +++ b/src/dependency_injector/providers.pxd @@ -85,6 +85,10 @@ cdef class AbstractFactory(Factory): cpdef object _provide(self, tuple args, dict kwargs) +cdef class FactoryDelegate(Delegate): + pass + + # Singleton providers cdef class BaseSingleton(Provider): cdef Factory __instantiator diff --git a/src/dependency_injector/providers.pyx b/src/dependency_injector/providers.pyx index 350fd574..c82ada32 100644 --- a/src/dependency_injector/providers.pyx +++ b/src/dependency_injector/providers.pyx @@ -1066,6 +1066,29 @@ cdef class AbstractFactory(Factory): raise NotImplementedError('Abstract provider forward providing logic ' 'to overriding provider') + +cdef class FactoryDelegate(Delegate): + """Factory delegate injects delegating factory "as is". + + .. py:attribute:: provides + + Value that have to be provided. + + :type: object + """ + + def __init__(self, factory): + """Initializer. + + :param provides: Value that have to be provided. + :type provides: object + """ + if isinstance(factory, Factory) is False: + raise Error('{0} can wrap only {1} providers'.format( + self.__class__, Factory)) + super(Delegate, self).__init__(factory) + + cdef class BaseSingleton(Provider): """Base class of singleton providers.""" diff --git a/tests/unit/providers/test_factories.py b/tests/unit/providers/test_factories.py index bb463176..68cd64e9 100644 --- a/tests/unit/providers/test_factories.py +++ b/tests/unit/providers/test_factories.py @@ -399,3 +399,18 @@ class AbstractFactoryTests(unittest.TestCase): 'AbstractFactory({0}) at {1}>'.format( repr(Example), hex(id(provider)))) + + +class FactoryDelegateTests(unittest.TestCase): + + def setUp(self): + self.delegated = providers.Factory(object) + self.delegate = providers.FactoryDelegate(self.delegated) + + def test_is_delegate(self): + self.assertIsInstance(self.delegate, providers.Delegate) + + def test_init_with_not_factory(self): + self.assertRaises(errors.Error, + providers.FactoryDelegate, + providers.Object(object())) From 5c4dc0f98a714e0f2b1dbab0b4539874b00ffede Mon Sep 17 00:00:00 2001 From: Roman Mogilatov Date: Sun, 9 Jul 2017 23:17:39 +0300 Subject: [PATCH 7/7] Update changelog --- docs/main/changelog.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/main/changelog.rst b/docs/main/changelog.rst index 8c024d16..b2332d3e 100644 --- a/docs/main/changelog.rst +++ b/docs/main/changelog.rst @@ -7,6 +7,10 @@ that were made in every particular version. From version 0.7.6 *Dependency Injector* framework strictly follows `Semantic versioning`_ +Development +----------- +- Add ``FactoryDelegate`` provider. + 3.5.0 ----- - Add functionality for initializing ``Configuration`` provider with default