diff --git a/src/dependency_injector/providers.c b/src/dependency_injector/providers.c index 1bdd1df4..e9e25481 100644 --- a/src/dependency_injector/providers.c +++ b/src/dependency_injector/providers.c @@ -17970,7 +17970,7 @@ static int __pyx_pf_19dependency_injector_9providers_21DependenciesContainer___i * self.__providers = dependencies * * for provider in dependencies.items(): # <<<<<<<<<<<<<< - * if isinstance(provider, (Dependency, DependenciesContainer)): + * if isinstance(provider, (Dependency, DependenciesContainer, Container)): * provider.set_parent(self) */ __pyx_t_1 = __Pyx_PyDict_Items(__pyx_v_dependencies); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 834, __pyx_L1_error) @@ -18021,7 +18021,7 @@ static int __pyx_pf_19dependency_injector_9providers_21DependenciesContainer___i /* "dependency_injector/providers.pyx":835 * * for provider in dependencies.items(): - * if isinstance(provider, (Dependency, DependenciesContainer)): # <<<<<<<<<<<<<< + * if isinstance(provider, (Dependency, DependenciesContainer, Container)): # <<<<<<<<<<<<<< * provider.set_parent(self) * */ @@ -18034,14 +18034,21 @@ static int __pyx_pf_19dependency_injector_9providers_21DependenciesContainer___i } __pyx_t_7 = __Pyx_TypeCheck(__pyx_v_provider, __pyx_ptype_19dependency_injector_9providers_DependenciesContainer); __pyx_t_6 = (__pyx_t_7 != 0); - __pyx_t_5 = __pyx_t_6; + if (!__pyx_t_6) { + } else { + __pyx_t_5 = __pyx_t_6; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_6 = __Pyx_TypeCheck(__pyx_v_provider, __pyx_ptype_19dependency_injector_9providers_Container); + __pyx_t_7 = (__pyx_t_6 != 0); + __pyx_t_5 = __pyx_t_7; __pyx_L6_bool_binop_done:; - __pyx_t_6 = (__pyx_t_5 != 0); - if (__pyx_t_6) { + __pyx_t_7 = (__pyx_t_5 != 0); + if (__pyx_t_7) { /* "dependency_injector/providers.pyx":836 * for provider in dependencies.items(): - * if isinstance(provider, (Dependency, DependenciesContainer)): + * if isinstance(provider, (Dependency, DependenciesContainer, Container)): * provider.set_parent(self) # <<<<<<<<<<<<<< * * self.__parent = None @@ -18068,7 +18075,7 @@ static int __pyx_pf_19dependency_injector_9providers_21DependenciesContainer___i /* "dependency_injector/providers.pyx":835 * * for provider in dependencies.items(): - * if isinstance(provider, (Dependency, DependenciesContainer)): # <<<<<<<<<<<<<< + * if isinstance(provider, (Dependency, DependenciesContainer, Container)): # <<<<<<<<<<<<<< * provider.set_parent(self) * */ @@ -18078,7 +18085,7 @@ static int __pyx_pf_19dependency_injector_9providers_21DependenciesContainer___i * self.__providers = dependencies * * for provider in dependencies.items(): # <<<<<<<<<<<<<< - * if isinstance(provider, (Dependency, DependenciesContainer)): + * if isinstance(provider, (Dependency, DependenciesContainer, Container)): * provider.set_parent(self) */ } diff --git a/src/dependency_injector/providers.pyx b/src/dependency_injector/providers.pyx index ca4bcd4f..ea694aaf 100644 --- a/src/dependency_injector/providers.pyx +++ b/src/dependency_injector/providers.pyx @@ -832,7 +832,7 @@ cdef class DependenciesContainer(Object): self.__providers = dependencies for provider in dependencies.items(): - if isinstance(provider, (Dependency, DependenciesContainer)): + if isinstance(provider, (Dependency, DependenciesContainer, Container)): provider.set_parent(self) self.__parent = None