diff --git a/docs/main/changelog.rst b/docs/main/changelog.rst index d6761ae4..9fecc808 100644 --- a/docs/main/changelog.rst +++ b/docs/main/changelog.rst @@ -7,6 +7,12 @@ that were made in every particular version. From version 0.7.6 *Dependency Injector* framework strictly follows `Semantic versioning`_ +4.39.1 +------ +- Fix bug `#574 `_: + "``@inject`` breaks ``inspect.iscoroutinefunction``". Thanks to + `@burritoatspoton (Rafał Burczyński) `_ for reporting the issue. + 4.39.0 ------ - Optimize injections and wiring from x1.5 to x7 times depending on the use case. diff --git a/src/dependency_injector/__init__.py b/src/dependency_injector/__init__.py index 749bec21..c8795911 100644 --- a/src/dependency_injector/__init__.py +++ b/src/dependency_injector/__init__.py @@ -1,6 +1,6 @@ """Top-level package.""" -__version__ = "4.39.0" +__version__ = "4.39.1" """Version number. :type: str diff --git a/src/dependency_injector/_cwiring.c b/src/dependency_injector/_cwiring.c index bb1458b8..bd25ad84 100644 --- a/src/dependency_injector/_cwiring.c +++ b/src/dependency_injector/_cwiring.c @@ -824,15 +824,757 @@ static const char *__pyx_filename; static const char *__pyx_f[] = { "src/dependency_injector/_cwiring.pyx", + "src/dependency_injector/providers.pxd", + "stringsource", }; /*--- Type declarations ---*/ +struct __pyx_obj_19dependency_injector_9providers_Provider; +struct __pyx_obj_19dependency_injector_9providers_Object; +struct __pyx_obj_19dependency_injector_9providers_Self; +struct __pyx_obj_19dependency_injector_9providers_Delegate; +struct __pyx_obj_19dependency_injector_9providers_Aggregate; +struct __pyx_obj_19dependency_injector_9providers_Dependency; +struct __pyx_obj_19dependency_injector_9providers_ExternalDependency; +struct __pyx_obj_19dependency_injector_9providers_DependenciesContainer; +struct __pyx_obj_19dependency_injector_9providers_Callable; +struct __pyx_obj_19dependency_injector_9providers_DelegatedCallable; +struct __pyx_obj_19dependency_injector_9providers_AbstractCallable; +struct __pyx_obj_19dependency_injector_9providers_CallableDelegate; +struct __pyx_obj_19dependency_injector_9providers_Coroutine; +struct __pyx_obj_19dependency_injector_9providers_DelegatedCoroutine; +struct __pyx_obj_19dependency_injector_9providers_AbstractCoroutine; +struct __pyx_obj_19dependency_injector_9providers_CoroutineDelegate; +struct __pyx_obj_19dependency_injector_9providers_ConfigurationOption; +struct __pyx_obj_19dependency_injector_9providers_TypedConfigurationOption; +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_FactoryAggregate; +struct __pyx_obj_19dependency_injector_9providers_BaseSingleton; +struct __pyx_obj_19dependency_injector_9providers_Singleton; +struct __pyx_obj_19dependency_injector_9providers_DelegatedSingleton; +struct __pyx_obj_19dependency_injector_9providers_ThreadSafeSingleton; +struct __pyx_obj_19dependency_injector_9providers_DelegatedThreadSafeSingleton; +struct __pyx_obj_19dependency_injector_9providers_ThreadLocalSingleton; +struct __pyx_obj_19dependency_injector_9providers_ContextLocalSingleton; +struct __pyx_obj_19dependency_injector_9providers_DelegatedThreadLocalSingleton; +struct __pyx_obj_19dependency_injector_9providers_AbstractSingleton; +struct __pyx_obj_19dependency_injector_9providers_SingletonDelegate; +struct __pyx_obj_19dependency_injector_9providers_List; +struct __pyx_obj_19dependency_injector_9providers_Dict; +struct __pyx_obj_19dependency_injector_9providers_Resource; +struct __pyx_obj_19dependency_injector_9providers_Container; +struct __pyx_obj_19dependency_injector_9providers_Selector; +struct __pyx_obj_19dependency_injector_9providers_ProvidedInstance; +struct __pyx_obj_19dependency_injector_9providers_AttributeGetter; +struct __pyx_obj_19dependency_injector_9providers_ItemGetter; +struct __pyx_obj_19dependency_injector_9providers_MethodCaller; +struct __pyx_obj_19dependency_injector_9providers_Injection; +struct __pyx_obj_19dependency_injector_9providers_PositionalInjection; +struct __pyx_obj_19dependency_injector_9providers_NamedInjection; +struct __pyx_obj_19dependency_injector_9providers_OverridingContext; +struct __pyx_obj_19dependency_injector_9providers_BaseSingletonResetContext; +struct __pyx_obj_19dependency_injector_9providers_SingletonResetContext; +struct __pyx_obj_19dependency_injector_9providers_SingletonFullResetContext; struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct___get_sync_patched; -struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_1__get_async_patched; -struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_2__patched; -struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_3_genexpr; +struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_1__async_inject; +struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_2_genexpr; +struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____object____object____object___to_py; +struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____object___to_py; +struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____object____object___to_py; +struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object____object____object___to_py; +struct __pyx_opt_args_19dependency_injector_9providers_deepcopy; -/* "dependency_injector/_cwiring.pyx":13 +/* "providers.pxd":353 + * + * + * cpdef object deepcopy(object instance, dict memo=*) # <<<<<<<<<<<<<< + * + * + */ +struct __pyx_opt_args_19dependency_injector_9providers_deepcopy { + int __pyx_n; + PyObject *memo; +}; + +/* "providers.pxd":22 + * + * # Base providers + * cdef class Provider(object): # <<<<<<<<<<<<<< + * cdef tuple __overridden + * cdef Provider __last_overriding + */ +struct __pyx_obj_19dependency_injector_9providers_Provider { + PyObject_HEAD + struct __pyx_vtabstruct_19dependency_injector_9providers_Provider *__pyx_vtab; + PyObject *__pyx___overridden; + struct __pyx_obj_19dependency_injector_9providers_Provider *__pyx___last_overriding; + PyObject *__pyx___overrides; + int __pyx___async_mode; +}; + + +/* "providers.pxd":36 + * + * + * cdef class Object(Provider): # <<<<<<<<<<<<<< + * cdef object __provides + * + */ +struct __pyx_obj_19dependency_injector_9providers_Object { + struct __pyx_obj_19dependency_injector_9providers_Provider __pyx_base; + PyObject *__pyx___provides; +}; + + +/* "providers.pxd":42 + * + * + * cdef class Self(Provider): # <<<<<<<<<<<<<< + * cdef object __container + * cdef tuple __alt_names + */ +struct __pyx_obj_19dependency_injector_9providers_Self { + struct __pyx_obj_19dependency_injector_9providers_Provider __pyx_base; + PyObject *__pyx___container; + PyObject *__pyx___alt_names; +}; + + +/* "providers.pxd":47 + * + * + * cdef class Delegate(Provider): # <<<<<<<<<<<<<< + * cdef object __provides + * + */ +struct __pyx_obj_19dependency_injector_9providers_Delegate { + struct __pyx_obj_19dependency_injector_9providers_Provider __pyx_base; + PyObject *__pyx___provides; +}; + + +/* "providers.pxd":53 + * + * + * cdef class Aggregate(Provider): # <<<<<<<<<<<<<< + * cdef dict __providers + * + */ +struct __pyx_obj_19dependency_injector_9providers_Aggregate { + struct __pyx_obj_19dependency_injector_9providers_Provider __pyx_base; + PyObject *__pyx___providers; +}; + + +/* "providers.pxd":59 + * + * + * cdef class Dependency(Provider): # <<<<<<<<<<<<<< + * cdef object __instance_of + * cdef object __default + */ +struct __pyx_obj_19dependency_injector_9providers_Dependency { + struct __pyx_obj_19dependency_injector_9providers_Provider __pyx_base; + PyObject *__pyx___instance_of; + PyObject *__pyx___default; + PyObject *__pyx___parent; +}; + + +/* "providers.pxd":65 + * + * + * cdef class ExternalDependency(Dependency): # <<<<<<<<<<<<<< + * pass + * + */ +struct __pyx_obj_19dependency_injector_9providers_ExternalDependency { + struct __pyx_obj_19dependency_injector_9providers_Dependency __pyx_base; +}; + + +/* "providers.pxd":69 + * + * + * cdef class DependenciesContainer(Object): # <<<<<<<<<<<<<< + * cdef dict __providers + * cdef object __parent + */ +struct __pyx_obj_19dependency_injector_9providers_DependenciesContainer { + struct __pyx_obj_19dependency_injector_9providers_Object __pyx_base; + PyObject *__pyx___providers; + PyObject *__pyx___parent; +}; + + +/* "providers.pxd":77 + * + * # Callable providers + * cdef class Callable(Provider): # <<<<<<<<<<<<<< + * cdef object __provides + * + */ +struct __pyx_obj_19dependency_injector_9providers_Callable { + struct __pyx_obj_19dependency_injector_9providers_Provider __pyx_base; + PyObject *__pyx___provides; + PyObject *__pyx___args; + int __pyx___args_len; + PyObject *__pyx___kwargs; + int __pyx___kwargs_len; +}; + + +/* "providers.pxd":89 + * + * + * cdef class DelegatedCallable(Callable): # <<<<<<<<<<<<<< + * pass + * + */ +struct __pyx_obj_19dependency_injector_9providers_DelegatedCallable { + struct __pyx_obj_19dependency_injector_9providers_Callable __pyx_base; +}; + + +/* "providers.pxd":93 + * + * + * cdef class AbstractCallable(Callable): # <<<<<<<<<<<<<< + * cpdef object _provide(self, tuple args, dict kwargs) + * + */ +struct __pyx_obj_19dependency_injector_9providers_AbstractCallable { + struct __pyx_obj_19dependency_injector_9providers_Callable __pyx_base; +}; + + +/* "providers.pxd":97 + * + * + * cdef class CallableDelegate(Delegate): # <<<<<<<<<<<<<< + * pass + * + */ +struct __pyx_obj_19dependency_injector_9providers_CallableDelegate { + struct __pyx_obj_19dependency_injector_9providers_Delegate __pyx_base; +}; + + +/* "providers.pxd":102 + * + * # Coroutine providers + * cdef class Coroutine(Callable): # <<<<<<<<<<<<<< + * pass + * + */ +struct __pyx_obj_19dependency_injector_9providers_Coroutine { + struct __pyx_obj_19dependency_injector_9providers_Callable __pyx_base; +}; + + +/* "providers.pxd":106 + * + * + * cdef class DelegatedCoroutine(Coroutine): # <<<<<<<<<<<<<< + * pass + * + */ +struct __pyx_obj_19dependency_injector_9providers_DelegatedCoroutine { + struct __pyx_obj_19dependency_injector_9providers_Coroutine __pyx_base; +}; + + +/* "providers.pxd":110 + * + * + * cdef class AbstractCoroutine(Coroutine): # <<<<<<<<<<<<<< + * cpdef object _provide(self, tuple args, dict kwargs) + * + */ +struct __pyx_obj_19dependency_injector_9providers_AbstractCoroutine { + struct __pyx_obj_19dependency_injector_9providers_Coroutine __pyx_base; +}; + + +/* "providers.pxd":114 + * + * + * cdef class CoroutineDelegate(Delegate): # <<<<<<<<<<<<<< + * pass + * + */ +struct __pyx_obj_19dependency_injector_9providers_CoroutineDelegate { + struct __pyx_obj_19dependency_injector_9providers_Delegate __pyx_base; +}; + + +/* "providers.pxd":119 + * + * # Configuration providers + * cdef class ConfigurationOption(Provider): # <<<<<<<<<<<<<< + * cdef tuple __name + * cdef Configuration __root + */ +struct __pyx_obj_19dependency_injector_9providers_ConfigurationOption { + struct __pyx_obj_19dependency_injector_9providers_Provider __pyx_base; + PyObject *__pyx___name; + struct __pyx_obj_19dependency_injector_9providers_Configuration *__pyx___root; + PyObject *__pyx___children; + int __pyx___required; + PyObject *__pyx___cache; +}; + + +/* "providers.pxd":127 + * + * + * cdef class TypedConfigurationOption(Callable): # <<<<<<<<<<<<<< + * pass + * + */ +struct __pyx_obj_19dependency_injector_9providers_TypedConfigurationOption { + struct __pyx_obj_19dependency_injector_9providers_Callable __pyx_base; +}; + + +/* "providers.pxd":131 + * + * + * cdef class Configuration(Object): # <<<<<<<<<<<<<< + * cdef str __name + * cdef bint __strict + */ +struct __pyx_obj_19dependency_injector_9providers_Configuration { + struct __pyx_obj_19dependency_injector_9providers_Object __pyx_base; + PyObject *__pyx___name; + int __pyx___strict; + PyObject *__pyx___children; + PyObject *__pyx___yaml_files; + PyObject *__pyx___ini_files; + PyObject *__pyx___pydantic_settings; + PyObject *__weakref__; +}; + + +/* "providers.pxd":142 + * + * # Factory providers + * cdef class Factory(Provider): # <<<<<<<<<<<<<< + * cdef Callable __instantiator + * + */ +struct __pyx_obj_19dependency_injector_9providers_Factory { + struct __pyx_obj_19dependency_injector_9providers_Provider __pyx_base; + struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx___instantiator; + PyObject *__pyx___attributes; + int __pyx___attributes_len; +}; + + +/* "providers.pxd":151 + * + * + * cdef class DelegatedFactory(Factory): # <<<<<<<<<<<<<< + * pass + * + */ +struct __pyx_obj_19dependency_injector_9providers_DelegatedFactory { + struct __pyx_obj_19dependency_injector_9providers_Factory __pyx_base; +}; + + +/* "providers.pxd":155 + * + * + * cdef class AbstractFactory(Factory): # <<<<<<<<<<<<<< + * cpdef object _provide(self, tuple args, dict kwargs) + * + */ +struct __pyx_obj_19dependency_injector_9providers_AbstractFactory { + struct __pyx_obj_19dependency_injector_9providers_Factory __pyx_base; +}; + + +/* "providers.pxd":159 + * + * + * cdef class FactoryDelegate(Delegate): # <<<<<<<<<<<<<< + * pass + * + */ +struct __pyx_obj_19dependency_injector_9providers_FactoryDelegate { + struct __pyx_obj_19dependency_injector_9providers_Delegate __pyx_base; +}; + + +/* "providers.pxd":163 + * + * + * cdef class FactoryAggregate(Aggregate): # <<<<<<<<<<<<<< + * pass + * + */ +struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate { + struct __pyx_obj_19dependency_injector_9providers_Aggregate __pyx_base; +}; + + +/* "providers.pxd":168 + * + * # Singleton providers + * cdef class BaseSingleton(Provider): # <<<<<<<<<<<<<< + * cdef Factory __instantiator + * cdef object __storage + */ +struct __pyx_obj_19dependency_injector_9providers_BaseSingleton { + struct __pyx_obj_19dependency_injector_9providers_Provider __pyx_base; + struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx___instantiator; + PyObject *__pyx___storage; +}; + + +/* "providers.pxd":173 + * + * + * cdef class Singleton(BaseSingleton): # <<<<<<<<<<<<<< + * + * cpdef object _provide(self, tuple args, dict kwargs) + */ +struct __pyx_obj_19dependency_injector_9providers_Singleton { + struct __pyx_obj_19dependency_injector_9providers_BaseSingleton __pyx_base; +}; + + +/* "providers.pxd":178 + * + * + * cdef class DelegatedSingleton(Singleton): # <<<<<<<<<<<<<< + * pass + * + */ +struct __pyx_obj_19dependency_injector_9providers_DelegatedSingleton { + struct __pyx_obj_19dependency_injector_9providers_Singleton __pyx_base; +}; + + +/* "providers.pxd":182 + * + * + * cdef class ThreadSafeSingleton(BaseSingleton): # <<<<<<<<<<<<<< + * cdef object __storage_lock + * + */ +struct __pyx_obj_19dependency_injector_9providers_ThreadSafeSingleton { + struct __pyx_obj_19dependency_injector_9providers_BaseSingleton __pyx_base; + PyObject *__pyx___storage_lock; +}; + + +/* "providers.pxd":188 + * + * + * cdef class DelegatedThreadSafeSingleton(ThreadSafeSingleton): # <<<<<<<<<<<<<< + * pass + * + */ +struct __pyx_obj_19dependency_injector_9providers_DelegatedThreadSafeSingleton { + struct __pyx_obj_19dependency_injector_9providers_ThreadSafeSingleton __pyx_base; +}; + + +/* "providers.pxd":192 + * + * + * cdef class ThreadLocalSingleton(BaseSingleton): # <<<<<<<<<<<<<< + * + * cpdef object _provide(self, tuple args, dict kwargs) + */ +struct __pyx_obj_19dependency_injector_9providers_ThreadLocalSingleton { + struct __pyx_obj_19dependency_injector_9providers_BaseSingleton __pyx_base; +}; + + +/* "providers.pxd":197 + * + * + * cdef class ContextLocalSingleton(BaseSingleton): # <<<<<<<<<<<<<< + * + * cpdef object _provide(self, tuple args, dict kwargs) + */ +struct __pyx_obj_19dependency_injector_9providers_ContextLocalSingleton { + struct __pyx_obj_19dependency_injector_9providers_BaseSingleton __pyx_base; +}; + + +/* "providers.pxd":202 + * + * + * cdef class DelegatedThreadLocalSingleton(ThreadLocalSingleton): # <<<<<<<<<<<<<< + * pass + * + */ +struct __pyx_obj_19dependency_injector_9providers_DelegatedThreadLocalSingleton { + struct __pyx_obj_19dependency_injector_9providers_ThreadLocalSingleton __pyx_base; +}; + + +/* "providers.pxd":206 + * + * + * cdef class AbstractSingleton(BaseSingleton): # <<<<<<<<<<<<<< + * pass + * + */ +struct __pyx_obj_19dependency_injector_9providers_AbstractSingleton { + struct __pyx_obj_19dependency_injector_9providers_BaseSingleton __pyx_base; +}; + + +/* "providers.pxd":210 + * + * + * cdef class SingletonDelegate(Delegate): # <<<<<<<<<<<<<< + * pass + * + */ +struct __pyx_obj_19dependency_injector_9providers_SingletonDelegate { + struct __pyx_obj_19dependency_injector_9providers_Delegate __pyx_base; +}; + + +/* "providers.pxd":216 + * # Miscellaneous providers + * + * cdef class List(Provider): # <<<<<<<<<<<<<< + * cdef tuple __args + * cdef int __args_len + */ +struct __pyx_obj_19dependency_injector_9providers_List { + struct __pyx_obj_19dependency_injector_9providers_Provider __pyx_base; + PyObject *__pyx___args; + int __pyx___args_len; +}; + + +/* "providers.pxd":223 + * + * + * cdef class Dict(Provider): # <<<<<<<<<<<<<< + * cdef tuple __kwargs + * cdef int __kwargs_len + */ +struct __pyx_obj_19dependency_injector_9providers_Dict { + struct __pyx_obj_19dependency_injector_9providers_Provider __pyx_base; + PyObject *__pyx___kwargs; + int __pyx___kwargs_len; +}; + + +/* "providers.pxd":230 + * + * + * cdef class Resource(Provider): # <<<<<<<<<<<<<< + * cdef object __provides + * cdef bint __initialized + */ +struct __pyx_obj_19dependency_injector_9providers_Resource { + struct __pyx_obj_19dependency_injector_9providers_Provider __pyx_base; + PyObject *__pyx___provides; + int __pyx___initialized; + PyObject *__pyx___shutdowner; + PyObject *__pyx___resource; + PyObject *__pyx___args; + int __pyx___args_len; + PyObject *__pyx___kwargs; + int __pyx___kwargs_len; +}; + + +/* "providers.pxd":245 + * + * + * cdef class Container(Provider): # <<<<<<<<<<<<<< + * cdef object __container_cls + * cdef dict __overriding_providers + */ +struct __pyx_obj_19dependency_injector_9providers_Container { + struct __pyx_obj_19dependency_injector_9providers_Provider __pyx_base; + PyObject *__pyx___container_cls; + PyObject *__pyx___overriding_providers; + PyObject *__pyx___container; + PyObject *__pyx___parent; +}; + + +/* "providers.pxd":254 + * + * + * cdef class Selector(Provider): # <<<<<<<<<<<<<< + * cdef object __selector + * cdef dict __providers + */ +struct __pyx_obj_19dependency_injector_9providers_Selector { + struct __pyx_obj_19dependency_injector_9providers_Provider __pyx_base; + PyObject *__pyx___selector; + PyObject *__pyx___providers; +}; + + +/* "providers.pxd":262 + * # Provided instance + * + * cdef class ProvidedInstance(Provider): # <<<<<<<<<<<<<< + * cdef object __provides + * + */ +struct __pyx_obj_19dependency_injector_9providers_ProvidedInstance { + struct __pyx_obj_19dependency_injector_9providers_Provider __pyx_base; + PyObject *__pyx___provides; +}; + + +/* "providers.pxd":268 + * + * + * cdef class AttributeGetter(Provider): # <<<<<<<<<<<<<< + * cdef object __provides + * cdef object __name + */ +struct __pyx_obj_19dependency_injector_9providers_AttributeGetter { + struct __pyx_obj_19dependency_injector_9providers_Provider __pyx_base; + PyObject *__pyx___provides; + PyObject *__pyx___name; +}; + + +/* "providers.pxd":275 + * + * + * cdef class ItemGetter(Provider): # <<<<<<<<<<<<<< + * cdef object __provides + * cdef object __name + */ +struct __pyx_obj_19dependency_injector_9providers_ItemGetter { + struct __pyx_obj_19dependency_injector_9providers_Provider __pyx_base; + PyObject *__pyx___provides; + PyObject *__pyx___name; +}; + + +/* "providers.pxd":282 + * + * + * cdef class MethodCaller(Provider): # <<<<<<<<<<<<<< + * cdef object __provides + * cdef tuple __args + */ +struct __pyx_obj_19dependency_injector_9providers_MethodCaller { + struct __pyx_obj_19dependency_injector_9providers_Provider __pyx_base; + PyObject *__pyx___provides; + PyObject *__pyx___args; + int __pyx___args_len; + PyObject *__pyx___kwargs; + int __pyx___kwargs_len; +}; + + +/* "providers.pxd":293 + * + * # Injections + * cdef class Injection(object): # <<<<<<<<<<<<<< + * cdef object __value + * cdef int __is_provider + */ +struct __pyx_obj_19dependency_injector_9providers_Injection { + PyObject_HEAD + PyObject *__pyx___value; + int __pyx___is_provider; + int __pyx___is_delegated; + int __pyx___call; +}; + + +/* "providers.pxd":300 + * + * + * cdef class PositionalInjection(Injection): # <<<<<<<<<<<<<< + * pass + * + */ +struct __pyx_obj_19dependency_injector_9providers_PositionalInjection { + struct __pyx_obj_19dependency_injector_9providers_Injection __pyx_base; +}; + + +/* "providers.pxd":304 + * + * + * cdef class NamedInjection(Injection): # <<<<<<<<<<<<<< + * cdef object __name + * + */ +struct __pyx_obj_19dependency_injector_9providers_NamedInjection { + struct __pyx_obj_19dependency_injector_9providers_Injection __pyx_base; + PyObject *__pyx___name; +}; + + +/* "providers.pxd":315 + * + * # Utils + * cdef class OverridingContext(object): # <<<<<<<<<<<<<< + * cdef Provider __overridden + * cdef Provider __overriding + */ +struct __pyx_obj_19dependency_injector_9providers_OverridingContext { + PyObject_HEAD + struct __pyx_obj_19dependency_injector_9providers_Provider *__pyx___overridden; + struct __pyx_obj_19dependency_injector_9providers_Provider *__pyx___overriding; +}; + + +/* "providers.pxd":320 + * + * + * cdef class BaseSingletonResetContext(object): # <<<<<<<<<<<<<< + * cdef object __singleton + * + */ +struct __pyx_obj_19dependency_injector_9providers_BaseSingletonResetContext { + PyObject_HEAD + PyObject *__pyx___singleton; +}; + + +/* "providers.pxd":324 + * + * + * cdef class SingletonResetContext(BaseSingletonResetContext): # <<<<<<<<<<<<<< + * pass + * + */ +struct __pyx_obj_19dependency_injector_9providers_SingletonResetContext { + struct __pyx_obj_19dependency_injector_9providers_BaseSingletonResetContext __pyx_base; +}; + + +/* "providers.pxd":328 + * + * + * cdef class SingletonFullResetContext(BaseSingletonResetContext): # <<<<<<<<<<<<<< + * pass + * + */ +struct __pyx_obj_19dependency_injector_9providers_SingletonFullResetContext { + struct __pyx_obj_19dependency_injector_9providers_BaseSingletonResetContext __pyx_base; +}; + + +/* "dependency_injector/_cwiring.pyx":15 * * * def _get_sync_patched(fn): # <<<<<<<<<<<<<< @@ -846,38 +1588,27 @@ struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct___get_sync_p }; -/* "dependency_injector/_cwiring.pyx":38 +/* "dependency_injector/_cwiring.pyx":42 * * - * def _get_async_patched(fn): # <<<<<<<<<<<<<< - * @functools.wraps(fn) - * async def _patched(*args, **kwargs): + * async def _async_inject(object fn, tuple args, dict kwargs, dict injections, dict closings): # <<<<<<<<<<<<<< + * cdef object result + * cdef dict to_inject */ -struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_1__get_async_patched { +struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_1__async_inject { PyObject_HEAD - PyObject *__pyx_v__patched; - PyObject *__pyx_v_fn; -}; - - -/* "dependency_injector/_cwiring.pyx":40 - * def _get_async_patched(fn): - * @functools.wraps(fn) - * async def _patched(*args, **kwargs): # <<<<<<<<<<<<<< - * cdef object result - * cdef dict to_inject - */ -struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_2__patched { - PyObject_HEAD - struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_1__get_async_patched *__pyx_outer_scope; PyObject *__pyx_v__; + PyObject *__pyx_v_arg_key; PyObject *__pyx_v_args; PyObject *__pyx_v_async_to_inject; + PyObject *__pyx_v_closings; + PyObject *__pyx_v_fn; PyObject *__pyx_v_genexpr; PyObject *__pyx_v_injection; + PyObject *__pyx_v_injections; PyObject *__pyx_v_kwargs; PyObject *__pyx_v_provide; - PyObject *__pyx_v_provider; + struct __pyx_obj_19dependency_injector_9providers_Provider *__pyx_v_provider; PyObject *__pyx_v_result; PyObject *__pyx_v_shutdown; PyObject *__pyx_v_to_close_await; @@ -886,16 +1617,16 @@ struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_2__patched { }; -/* "dependency_injector/_cwiring.pyx":56 +/* "dependency_injector/_cwiring.pyx":62 * - * if to_inject_await: - * async_to_inject = await asyncio.gather(*(provide for _, provide in to_inject_await)) # <<<<<<<<<<<<<< - * for provide, (injection, _) in zip(async_to_inject, to_inject_await): - * to_inject[injection] = provide + * if to_inject_await: + * async_to_inject = await asyncio.gather(*(provide for _, provide in to_inject_await)) # <<<<<<<<<<<<<< + * for provide, (injection, _) in zip(async_to_inject, to_inject_await): + * to_inject[injection] = provide */ -struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_3_genexpr { +struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_2_genexpr { PyObject_HEAD - struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_2__patched *__pyx_outer_scope; + struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_1__async_inject *__pyx_outer_scope; PyObject *__pyx_v__; PyObject *__pyx_v_provide; PyObject *__pyx_t_0; @@ -903,6 +1634,642 @@ struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_3_genexpr { }; +/* "cfunc.to_py":64 + * + * @cname("__Pyx_CFunc_void____object____object____object____object___to_py") + * cdef object __Pyx_CFunc_void____object____object____object____object___to_py(void (*f)(object, object, object, object) except *): # <<<<<<<<<<<<<< + * def wrap(object future_result, object args, object future_args_kwargs, object future): + * """wrap(future_result, args, future_args_kwargs, future) -> 'void'""" + */ +struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____object____object____object___to_py { + PyObject_HEAD + void (*__pyx_v_f)(PyObject *, PyObject *, PyObject *, PyObject *); +}; + +struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____object___to_py { + PyObject_HEAD + void (*__pyx_v_f)(PyObject *, PyObject *); +}; + +struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____object____object___to_py { + PyObject_HEAD + void (*__pyx_v_f)(PyObject *, PyObject *, PyObject *); +}; + +struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object____object____object___to_py { + PyObject_HEAD + PyObject *(*__pyx_v_f)(PyObject *, PyObject *); +}; + + + +/* "providers.pxd":22 + * + * # Base providers + * cdef class Provider(object): # <<<<<<<<<<<<<< + * cdef tuple __overridden + * cdef Provider __last_overriding + */ + +struct __pyx_vtabstruct_19dependency_injector_9providers_Provider { + int (*is_async_mode_enabled)(struct __pyx_obj_19dependency_injector_9providers_Provider *, int __pyx_skip_dispatch); + int (*is_async_mode_disabled)(struct __pyx_obj_19dependency_injector_9providers_Provider *, int __pyx_skip_dispatch); + int (*is_async_mode_undefined)(struct __pyx_obj_19dependency_injector_9providers_Provider *, int __pyx_skip_dispatch); + PyObject *(*_provide)(struct __pyx_obj_19dependency_injector_9providers_Provider *, PyObject *, PyObject *, int __pyx_skip_dispatch); + void (*_copy_overridings)(struct __pyx_obj_19dependency_injector_9providers_Provider *, struct __pyx_obj_19dependency_injector_9providers_Provider *, PyObject *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_19dependency_injector_9providers_Provider *__pyx_vtabptr_19dependency_injector_9providers_Provider; + + +/* "providers.pxd":36 + * + * + * cdef class Object(Provider): # <<<<<<<<<<<<<< + * cdef object __provides + * + */ + +struct __pyx_vtabstruct_19dependency_injector_9providers_Object { + struct __pyx_vtabstruct_19dependency_injector_9providers_Provider __pyx_base; +}; +static struct __pyx_vtabstruct_19dependency_injector_9providers_Object *__pyx_vtabptr_19dependency_injector_9providers_Object; + + +/* "providers.pxd":42 + * + * + * cdef class Self(Provider): # <<<<<<<<<<<<<< + * cdef object __container + * cdef tuple __alt_names + */ + +struct __pyx_vtabstruct_19dependency_injector_9providers_Self { + struct __pyx_vtabstruct_19dependency_injector_9providers_Provider __pyx_base; +}; +static struct __pyx_vtabstruct_19dependency_injector_9providers_Self *__pyx_vtabptr_19dependency_injector_9providers_Self; + + +/* "providers.pxd":47 + * + * + * cdef class Delegate(Provider): # <<<<<<<<<<<<<< + * cdef object __provides + * + */ + +struct __pyx_vtabstruct_19dependency_injector_9providers_Delegate { + struct __pyx_vtabstruct_19dependency_injector_9providers_Provider __pyx_base; +}; +static struct __pyx_vtabstruct_19dependency_injector_9providers_Delegate *__pyx_vtabptr_19dependency_injector_9providers_Delegate; + + +/* "providers.pxd":53 + * + * + * cdef class Aggregate(Provider): # <<<<<<<<<<<<<< + * cdef dict __providers + * + */ + +struct __pyx_vtabstruct_19dependency_injector_9providers_Aggregate { + struct __pyx_vtabstruct_19dependency_injector_9providers_Provider __pyx_base; + struct __pyx_obj_19dependency_injector_9providers_Provider *(*__pyx___get_provider)(struct __pyx_obj_19dependency_injector_9providers_Aggregate *, PyObject *); +}; +static struct __pyx_vtabstruct_19dependency_injector_9providers_Aggregate *__pyx_vtabptr_19dependency_injector_9providers_Aggregate; + + +/* "providers.pxd":59 + * + * + * cdef class Dependency(Provider): # <<<<<<<<<<<<<< + * cdef object __instance_of + * cdef object __default + */ + +struct __pyx_vtabstruct_19dependency_injector_9providers_Dependency { + struct __pyx_vtabstruct_19dependency_injector_9providers_Provider __pyx_base; +}; +static struct __pyx_vtabstruct_19dependency_injector_9providers_Dependency *__pyx_vtabptr_19dependency_injector_9providers_Dependency; + + +/* "providers.pxd":65 + * + * + * cdef class ExternalDependency(Dependency): # <<<<<<<<<<<<<< + * pass + * + */ + +struct __pyx_vtabstruct_19dependency_injector_9providers_ExternalDependency { + struct __pyx_vtabstruct_19dependency_injector_9providers_Dependency __pyx_base; +}; +static struct __pyx_vtabstruct_19dependency_injector_9providers_ExternalDependency *__pyx_vtabptr_19dependency_injector_9providers_ExternalDependency; + + +/* "providers.pxd":69 + * + * + * cdef class DependenciesContainer(Object): # <<<<<<<<<<<<<< + * cdef dict __providers + * cdef object __parent + */ + +struct __pyx_vtabstruct_19dependency_injector_9providers_DependenciesContainer { + struct __pyx_vtabstruct_19dependency_injector_9providers_Object __pyx_base; + PyObject *(*_override_providers)(struct __pyx_obj_19dependency_injector_9providers_DependenciesContainer *, PyObject *, int __pyx_skip_dispatch); +}; +static struct __pyx_vtabstruct_19dependency_injector_9providers_DependenciesContainer *__pyx_vtabptr_19dependency_injector_9providers_DependenciesContainer; + + +/* "providers.pxd":77 + * + * # Callable providers + * cdef class Callable(Provider): # <<<<<<<<<<<<<< + * cdef object __provides + * + */ + +struct __pyx_vtabstruct_19dependency_injector_9providers_Callable { + struct __pyx_vtabstruct_19dependency_injector_9providers_Provider __pyx_base; +}; +static struct __pyx_vtabstruct_19dependency_injector_9providers_Callable *__pyx_vtabptr_19dependency_injector_9providers_Callable; + + +/* "providers.pxd":89 + * + * + * cdef class DelegatedCallable(Callable): # <<<<<<<<<<<<<< + * pass + * + */ + +struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedCallable { + struct __pyx_vtabstruct_19dependency_injector_9providers_Callable __pyx_base; +}; +static struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedCallable *__pyx_vtabptr_19dependency_injector_9providers_DelegatedCallable; + + +/* "providers.pxd":93 + * + * + * cdef class AbstractCallable(Callable): # <<<<<<<<<<<<<< + * cpdef object _provide(self, tuple args, dict kwargs) + * + */ + +struct __pyx_vtabstruct_19dependency_injector_9providers_AbstractCallable { + struct __pyx_vtabstruct_19dependency_injector_9providers_Callable __pyx_base; +}; +static struct __pyx_vtabstruct_19dependency_injector_9providers_AbstractCallable *__pyx_vtabptr_19dependency_injector_9providers_AbstractCallable; + + +/* "providers.pxd":97 + * + * + * cdef class CallableDelegate(Delegate): # <<<<<<<<<<<<<< + * pass + * + */ + +struct __pyx_vtabstruct_19dependency_injector_9providers_CallableDelegate { + struct __pyx_vtabstruct_19dependency_injector_9providers_Delegate __pyx_base; +}; +static struct __pyx_vtabstruct_19dependency_injector_9providers_CallableDelegate *__pyx_vtabptr_19dependency_injector_9providers_CallableDelegate; + + +/* "providers.pxd":102 + * + * # Coroutine providers + * cdef class Coroutine(Callable): # <<<<<<<<<<<<<< + * pass + * + */ + +struct __pyx_vtabstruct_19dependency_injector_9providers_Coroutine { + struct __pyx_vtabstruct_19dependency_injector_9providers_Callable __pyx_base; +}; +static struct __pyx_vtabstruct_19dependency_injector_9providers_Coroutine *__pyx_vtabptr_19dependency_injector_9providers_Coroutine; + + +/* "providers.pxd":106 + * + * + * cdef class DelegatedCoroutine(Coroutine): # <<<<<<<<<<<<<< + * pass + * + */ + +struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedCoroutine { + struct __pyx_vtabstruct_19dependency_injector_9providers_Coroutine __pyx_base; +}; +static struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedCoroutine *__pyx_vtabptr_19dependency_injector_9providers_DelegatedCoroutine; + + +/* "providers.pxd":110 + * + * + * cdef class AbstractCoroutine(Coroutine): # <<<<<<<<<<<<<< + * cpdef object _provide(self, tuple args, dict kwargs) + * + */ + +struct __pyx_vtabstruct_19dependency_injector_9providers_AbstractCoroutine { + struct __pyx_vtabstruct_19dependency_injector_9providers_Coroutine __pyx_base; +}; +static struct __pyx_vtabstruct_19dependency_injector_9providers_AbstractCoroutine *__pyx_vtabptr_19dependency_injector_9providers_AbstractCoroutine; + + +/* "providers.pxd":114 + * + * + * cdef class CoroutineDelegate(Delegate): # <<<<<<<<<<<<<< + * pass + * + */ + +struct __pyx_vtabstruct_19dependency_injector_9providers_CoroutineDelegate { + struct __pyx_vtabstruct_19dependency_injector_9providers_Delegate __pyx_base; +}; +static struct __pyx_vtabstruct_19dependency_injector_9providers_CoroutineDelegate *__pyx_vtabptr_19dependency_injector_9providers_CoroutineDelegate; + + +/* "providers.pxd":119 + * + * # Configuration providers + * cdef class ConfigurationOption(Provider): # <<<<<<<<<<<<<< + * cdef tuple __name + * cdef Configuration __root + */ + +struct __pyx_vtabstruct_19dependency_injector_9providers_ConfigurationOption { + struct __pyx_vtabstruct_19dependency_injector_9providers_Provider __pyx_base; +}; +static struct __pyx_vtabstruct_19dependency_injector_9providers_ConfigurationOption *__pyx_vtabptr_19dependency_injector_9providers_ConfigurationOption; + + +/* "providers.pxd":127 + * + * + * cdef class TypedConfigurationOption(Callable): # <<<<<<<<<<<<<< + * pass + * + */ + +struct __pyx_vtabstruct_19dependency_injector_9providers_TypedConfigurationOption { + struct __pyx_vtabstruct_19dependency_injector_9providers_Callable __pyx_base; +}; +static struct __pyx_vtabstruct_19dependency_injector_9providers_TypedConfigurationOption *__pyx_vtabptr_19dependency_injector_9providers_TypedConfigurationOption; + + +/* "providers.pxd":131 + * + * + * cdef class Configuration(Object): # <<<<<<<<<<<<<< + * cdef str __name + * cdef bint __strict + */ + +struct __pyx_vtabstruct_19dependency_injector_9providers_Configuration { + struct __pyx_vtabstruct_19dependency_injector_9providers_Object __pyx_base; +}; +static struct __pyx_vtabstruct_19dependency_injector_9providers_Configuration *__pyx_vtabptr_19dependency_injector_9providers_Configuration; + + +/* "providers.pxd":142 + * + * # Factory providers + * cdef class Factory(Provider): # <<<<<<<<<<<<<< + * cdef Callable __instantiator + * + */ + +struct __pyx_vtabstruct_19dependency_injector_9providers_Factory { + struct __pyx_vtabstruct_19dependency_injector_9providers_Provider __pyx_base; +}; +static struct __pyx_vtabstruct_19dependency_injector_9providers_Factory *__pyx_vtabptr_19dependency_injector_9providers_Factory; + + +/* "providers.pxd":151 + * + * + * cdef class DelegatedFactory(Factory): # <<<<<<<<<<<<<< + * pass + * + */ + +struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedFactory { + struct __pyx_vtabstruct_19dependency_injector_9providers_Factory __pyx_base; +}; +static struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedFactory *__pyx_vtabptr_19dependency_injector_9providers_DelegatedFactory; + + +/* "providers.pxd":155 + * + * + * cdef class AbstractFactory(Factory): # <<<<<<<<<<<<<< + * cpdef object _provide(self, tuple args, dict kwargs) + * + */ + +struct __pyx_vtabstruct_19dependency_injector_9providers_AbstractFactory { + struct __pyx_vtabstruct_19dependency_injector_9providers_Factory __pyx_base; +}; +static struct __pyx_vtabstruct_19dependency_injector_9providers_AbstractFactory *__pyx_vtabptr_19dependency_injector_9providers_AbstractFactory; + + +/* "providers.pxd":159 + * + * + * 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":163 + * + * + * cdef class FactoryAggregate(Aggregate): # <<<<<<<<<<<<<< + * pass + * + */ + +struct __pyx_vtabstruct_19dependency_injector_9providers_FactoryAggregate { + struct __pyx_vtabstruct_19dependency_injector_9providers_Aggregate __pyx_base; +}; +static struct __pyx_vtabstruct_19dependency_injector_9providers_FactoryAggregate *__pyx_vtabptr_19dependency_injector_9providers_FactoryAggregate; + + +/* "providers.pxd":168 + * + * # Singleton providers + * cdef class BaseSingleton(Provider): # <<<<<<<<<<<<<< + * cdef Factory __instantiator + * cdef object __storage + */ + +struct __pyx_vtabstruct_19dependency_injector_9providers_BaseSingleton { + struct __pyx_vtabstruct_19dependency_injector_9providers_Provider __pyx_base; +}; +static struct __pyx_vtabstruct_19dependency_injector_9providers_BaseSingleton *__pyx_vtabptr_19dependency_injector_9providers_BaseSingleton; + + +/* "providers.pxd":173 + * + * + * cdef class Singleton(BaseSingleton): # <<<<<<<<<<<<<< + * + * cpdef object _provide(self, tuple args, dict kwargs) + */ + +struct __pyx_vtabstruct_19dependency_injector_9providers_Singleton { + struct __pyx_vtabstruct_19dependency_injector_9providers_BaseSingleton __pyx_base; +}; +static struct __pyx_vtabstruct_19dependency_injector_9providers_Singleton *__pyx_vtabptr_19dependency_injector_9providers_Singleton; + + +/* "providers.pxd":178 + * + * + * cdef class DelegatedSingleton(Singleton): # <<<<<<<<<<<<<< + * pass + * + */ + +struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedSingleton { + struct __pyx_vtabstruct_19dependency_injector_9providers_Singleton __pyx_base; +}; +static struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedSingleton *__pyx_vtabptr_19dependency_injector_9providers_DelegatedSingleton; + + +/* "providers.pxd":182 + * + * + * cdef class ThreadSafeSingleton(BaseSingleton): # <<<<<<<<<<<<<< + * cdef object __storage_lock + * + */ + +struct __pyx_vtabstruct_19dependency_injector_9providers_ThreadSafeSingleton { + struct __pyx_vtabstruct_19dependency_injector_9providers_BaseSingleton __pyx_base; +}; +static struct __pyx_vtabstruct_19dependency_injector_9providers_ThreadSafeSingleton *__pyx_vtabptr_19dependency_injector_9providers_ThreadSafeSingleton; + + +/* "providers.pxd":188 + * + * + * cdef class DelegatedThreadSafeSingleton(ThreadSafeSingleton): # <<<<<<<<<<<<<< + * pass + * + */ + +struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedThreadSafeSingleton { + struct __pyx_vtabstruct_19dependency_injector_9providers_ThreadSafeSingleton __pyx_base; +}; +static struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedThreadSafeSingleton *__pyx_vtabptr_19dependency_injector_9providers_DelegatedThreadSafeSingleton; + + +/* "providers.pxd":192 + * + * + * cdef class ThreadLocalSingleton(BaseSingleton): # <<<<<<<<<<<<<< + * + * cpdef object _provide(self, tuple args, dict kwargs) + */ + +struct __pyx_vtabstruct_19dependency_injector_9providers_ThreadLocalSingleton { + struct __pyx_vtabstruct_19dependency_injector_9providers_BaseSingleton __pyx_base; +}; +static struct __pyx_vtabstruct_19dependency_injector_9providers_ThreadLocalSingleton *__pyx_vtabptr_19dependency_injector_9providers_ThreadLocalSingleton; + + +/* "providers.pxd":197 + * + * + * cdef class ContextLocalSingleton(BaseSingleton): # <<<<<<<<<<<<<< + * + * cpdef object _provide(self, tuple args, dict kwargs) + */ + +struct __pyx_vtabstruct_19dependency_injector_9providers_ContextLocalSingleton { + struct __pyx_vtabstruct_19dependency_injector_9providers_BaseSingleton __pyx_base; +}; +static struct __pyx_vtabstruct_19dependency_injector_9providers_ContextLocalSingleton *__pyx_vtabptr_19dependency_injector_9providers_ContextLocalSingleton; + + +/* "providers.pxd":202 + * + * + * cdef class DelegatedThreadLocalSingleton(ThreadLocalSingleton): # <<<<<<<<<<<<<< + * pass + * + */ + +struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedThreadLocalSingleton { + struct __pyx_vtabstruct_19dependency_injector_9providers_ThreadLocalSingleton __pyx_base; +}; +static struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedThreadLocalSingleton *__pyx_vtabptr_19dependency_injector_9providers_DelegatedThreadLocalSingleton; + + +/* "providers.pxd":206 + * + * + * cdef class AbstractSingleton(BaseSingleton): # <<<<<<<<<<<<<< + * pass + * + */ + +struct __pyx_vtabstruct_19dependency_injector_9providers_AbstractSingleton { + struct __pyx_vtabstruct_19dependency_injector_9providers_BaseSingleton __pyx_base; +}; +static struct __pyx_vtabstruct_19dependency_injector_9providers_AbstractSingleton *__pyx_vtabptr_19dependency_injector_9providers_AbstractSingleton; + + +/* "providers.pxd":210 + * + * + * cdef class SingletonDelegate(Delegate): # <<<<<<<<<<<<<< + * pass + * + */ + +struct __pyx_vtabstruct_19dependency_injector_9providers_SingletonDelegate { + struct __pyx_vtabstruct_19dependency_injector_9providers_Delegate __pyx_base; +}; +static struct __pyx_vtabstruct_19dependency_injector_9providers_SingletonDelegate *__pyx_vtabptr_19dependency_injector_9providers_SingletonDelegate; + + +/* "providers.pxd":216 + * # Miscellaneous providers + * + * cdef class List(Provider): # <<<<<<<<<<<<<< + * cdef tuple __args + * cdef int __args_len + */ + +struct __pyx_vtabstruct_19dependency_injector_9providers_List { + struct __pyx_vtabstruct_19dependency_injector_9providers_Provider __pyx_base; +}; +static struct __pyx_vtabstruct_19dependency_injector_9providers_List *__pyx_vtabptr_19dependency_injector_9providers_List; + + +/* "providers.pxd":223 + * + * + * cdef class Dict(Provider): # <<<<<<<<<<<<<< + * cdef tuple __kwargs + * cdef int __kwargs_len + */ + +struct __pyx_vtabstruct_19dependency_injector_9providers_Dict { + struct __pyx_vtabstruct_19dependency_injector_9providers_Provider __pyx_base; +}; +static struct __pyx_vtabstruct_19dependency_injector_9providers_Dict *__pyx_vtabptr_19dependency_injector_9providers_Dict; + + +/* "providers.pxd":230 + * + * + * cdef class Resource(Provider): # <<<<<<<<<<<<<< + * cdef object __provides + * cdef bint __initialized + */ + +struct __pyx_vtabstruct_19dependency_injector_9providers_Resource { + struct __pyx_vtabstruct_19dependency_injector_9providers_Provider __pyx_base; +}; +static struct __pyx_vtabstruct_19dependency_injector_9providers_Resource *__pyx_vtabptr_19dependency_injector_9providers_Resource; + + +/* "providers.pxd":245 + * + * + * cdef class Container(Provider): # <<<<<<<<<<<<<< + * cdef object __container_cls + * cdef dict __overriding_providers + */ + +struct __pyx_vtabstruct_19dependency_injector_9providers_Container { + struct __pyx_vtabstruct_19dependency_injector_9providers_Provider __pyx_base; +}; +static struct __pyx_vtabstruct_19dependency_injector_9providers_Container *__pyx_vtabptr_19dependency_injector_9providers_Container; + + +/* "providers.pxd":254 + * + * + * cdef class Selector(Provider): # <<<<<<<<<<<<<< + * cdef object __selector + * cdef dict __providers + */ + +struct __pyx_vtabstruct_19dependency_injector_9providers_Selector { + struct __pyx_vtabstruct_19dependency_injector_9providers_Provider __pyx_base; +}; +static struct __pyx_vtabstruct_19dependency_injector_9providers_Selector *__pyx_vtabptr_19dependency_injector_9providers_Selector; + + +/* "providers.pxd":262 + * # Provided instance + * + * cdef class ProvidedInstance(Provider): # <<<<<<<<<<<<<< + * cdef object __provides + * + */ + +struct __pyx_vtabstruct_19dependency_injector_9providers_ProvidedInstance { + struct __pyx_vtabstruct_19dependency_injector_9providers_Provider __pyx_base; +}; +static struct __pyx_vtabstruct_19dependency_injector_9providers_ProvidedInstance *__pyx_vtabptr_19dependency_injector_9providers_ProvidedInstance; + + +/* "providers.pxd":268 + * + * + * cdef class AttributeGetter(Provider): # <<<<<<<<<<<<<< + * cdef object __provides + * cdef object __name + */ + +struct __pyx_vtabstruct_19dependency_injector_9providers_AttributeGetter { + struct __pyx_vtabstruct_19dependency_injector_9providers_Provider __pyx_base; +}; +static struct __pyx_vtabstruct_19dependency_injector_9providers_AttributeGetter *__pyx_vtabptr_19dependency_injector_9providers_AttributeGetter; + + +/* "providers.pxd":275 + * + * + * cdef class ItemGetter(Provider): # <<<<<<<<<<<<<< + * cdef object __provides + * cdef object __name + */ + +struct __pyx_vtabstruct_19dependency_injector_9providers_ItemGetter { + struct __pyx_vtabstruct_19dependency_injector_9providers_Provider __pyx_base; +}; +static struct __pyx_vtabstruct_19dependency_injector_9providers_ItemGetter *__pyx_vtabptr_19dependency_injector_9providers_ItemGetter; + + +/* "providers.pxd":282 + * + * + * cdef class MethodCaller(Provider): # <<<<<<<<<<<<<< + * cdef object __provides + * cdef tuple __args + */ + +struct __pyx_vtabstruct_19dependency_injector_9providers_MethodCaller { + struct __pyx_vtabstruct_19dependency_injector_9providers_Provider __pyx_base; +}; +static struct __pyx_vtabstruct_19dependency_injector_9providers_MethodCaller *__pyx_vtabptr_19dependency_injector_9providers_MethodCaller; + /* --- Runtime support code (head) --- */ /* Refnanny.proto */ #ifndef CYTHON_REFNANNY @@ -1047,6 +2414,9 @@ static CYTHON_INLINE int __Pyx_IterFinish(void); /* UnpackItemEndCheck.proto */ static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); +/* ExtTypeTest.proto */ +static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); + /* PyDictContains.proto */ static CYTHON_INLINE int __Pyx_PyDict_ContainsTF(PyObject* item, PyObject* dict, int eq) { int result = PyDict_Contains(dict, item); @@ -1177,6 +2547,56 @@ static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, PyObject *module, PyObject *globals, PyObject* code); +/* RaiseArgTupleInvalid.proto */ +static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, + Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); + +/* RaiseDoubleKeywords.proto */ +static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); + +/* ParseKeywords.proto */ +static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\ + PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\ + const char* function_name); + +/* ArgTypeTest.proto */ +#define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\ + ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\ + __Pyx__ArgTypeTest(obj, type, name, exact)) +static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact); + +/* py_dict_items.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d); + +/* UnpackUnboundCMethod.proto */ +typedef struct { + PyObject *type; + PyObject **method_name; + PyCFunction func; + PyObject *method; + int flag; +} __Pyx_CachedCFunction; + +/* CallUnboundCMethod0.proto */ +static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self); +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_CallUnboundCMethod0(cfunc, self)\ + (likely((cfunc)->func) ?\ + (likely((cfunc)->flag == METH_NOARGS) ? (*((cfunc)->func))(self, NULL) :\ + (PY_VERSION_HEX >= 0x030600B1 && likely((cfunc)->flag == METH_FASTCALL) ?\ + (PY_VERSION_HEX >= 0x030700A0 ?\ + (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)(cfunc)->func)(self, &__pyx_empty_tuple, 0) :\ + (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, &__pyx_empty_tuple, 0, NULL)) :\ + (PY_VERSION_HEX >= 0x030700A0 && (cfunc)->flag == (METH_FASTCALL | METH_KEYWORDS) ?\ + (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, &__pyx_empty_tuple, 0, NULL) :\ + (likely((cfunc)->flag == (METH_VARARGS | METH_KEYWORDS)) ? ((*(PyCFunctionWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, __pyx_empty_tuple, NULL)) :\ + ((cfunc)->flag == METH_VARARGS ? (*((cfunc)->func))(self, __pyx_empty_tuple) :\ + __Pyx__CallUnboundCMethod0(cfunc, self)))))) :\ + __Pyx__CallUnboundCMethod0(cfunc, self)) +#else +#define __Pyx_CallUnboundCMethod0(cfunc, self) __Pyx__CallUnboundCMethod0(cfunc, self) +#endif + /* ListAppend.proto */ #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) { @@ -1367,23 +2787,109 @@ static CYTHON_INLINE PyObject* __Pyx_Coroutine_Yield_From(__pyx_CoroutineObject if (value == Py_None) PyErr_SetNone(PyExc_StopIteration); else __Pyx__ReturnWithStopIteration(value) static void __Pyx__ReturnWithStopIteration(PyObject* value); -/* PyObjectSetAttrStr.proto */ -#if CYTHON_USE_TYPE_SLOTS -#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o, n, NULL) -static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value); -#else -#define __Pyx_PyObject_DelAttrStr(o,n) PyObject_DelAttr(o,n) -#define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v) -#endif - /* WriteUnraisableException.proto */ static void __Pyx_WriteUnraisable(const char *name, int clineno, int lineno, const char *filename, int full_traceback, int nogil); +/* PySequenceContains.proto */ +static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) { + int result = PySequence_Contains(seq, item); + return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); +} + +/* SliceObject.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice( + PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop, + PyObject** py_start, PyObject** py_stop, PyObject** py_slice, + int has_cstart, int has_cstop, int wraparound); + +/* PyIntBinop.proto */ +#if !CYTHON_COMPILING_IN_PYPY +static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check); +#else +#define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace, zerodivision_check)\ + (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2)) +#endif + +/* ListExtend.proto */ +static CYTHON_INLINE int __Pyx_PyList_Extend(PyObject* L, PyObject* v) { +#if CYTHON_COMPILING_IN_CPYTHON + PyObject* none = _PyList_Extend((PyListObject*)L, v); + if (unlikely(!none)) + return -1; + Py_DECREF(none); + return 0; +#else + return PyList_SetSlice(L, PY_SSIZE_T_MAX, PY_SSIZE_T_MAX, v); +#endif +} + +/* RaiseNoneIterError.proto */ +static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); + +/* ListCompAppend.proto */ +#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS +static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) { + PyListObject* L = (PyListObject*) list; + Py_ssize_t len = Py_SIZE(list); + if (likely(L->allocated > len)) { + Py_INCREF(x); + PyList_SET_ITEM(list, len, x); + __Pyx_SET_SIZE(list, len + 1); + return 0; + } + return PyList_Append(list, x); +} +#else +#define __Pyx_ListComp_Append(L,x) PyList_Append(L,x) +#endif + +/* PyErrExceptionMatches.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err) +static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err); +#else +#define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err) +#endif + +/* GetException.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb) +static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#else +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); +#endif + +/* GetAttr.proto */ +static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *); + +/* HasAttr.proto */ +static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *); + +/* pyfrozenset_new.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyFrozenSet_New(PyObject* it); + +/* PySetContains.proto */ +static CYTHON_INLINE int __Pyx_PySet_ContainsTF(PyObject* key, PyObject* set, int eq); + /* IncludeStringH.proto */ #include +/* TypeImport.proto */ +#ifndef __PYX_HAVE_RT_ImportType_proto +#define __PYX_HAVE_RT_ImportType_proto +enum __Pyx_ImportType_CheckSize { + __Pyx_ImportType_CheckSize_Error = 0, + __Pyx_ImportType_CheckSize_Warn = 1, + __Pyx_ImportType_CheckSize_Ignore = 2 +}; +static PyTypeObject *__Pyx_ImportType(PyObject* module, const char *module_name, const char *class_name, size_t size, enum __Pyx_ImportType_CheckSize check_size); +#endif + +/* GetVTable.proto */ +static void* __Pyx_GetVtable(PyObject *dict); + /* Import.proto */ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); @@ -1427,15 +2933,18 @@ static void __Pyx_AddTraceback(const char *funcname, int c_line, #define __Pyx_HAS_GCC_DIAGNOSTIC #endif +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); + +/* CIntFromPy.proto */ +static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); + /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); /* CIntFromPy.proto */ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); -/* CIntFromPy.proto */ -static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); - /* FastTypeChecks.proto */ #if CYTHON_COMPILING_IN_CPYTHON #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) @@ -1461,52 +2970,160 @@ static int __pyx_Generator_init(void); /* CheckBinaryVersion.proto */ static int __Pyx_check_binary_version(void); +/* VoidPtrImport.proto */ +static int __Pyx_ImportVoidPtr(PyObject *module, const char *name, void **p, const char *sig); + /* InitStrings.proto */ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); +/* Module declarations from 'cython' */ + +/* Module declarations from 'dependency_injector.providers' */ +static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_Provider = 0; +static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_Object = 0; +static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_Self = 0; +static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_Delegate = 0; +static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_Aggregate = 0; +static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_Dependency = 0; +static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_ExternalDependency = 0; +static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_DependenciesContainer = 0; +static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_Callable = 0; +static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_DelegatedCallable = 0; +static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_AbstractCallable = 0; +static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_CallableDelegate = 0; +static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_Coroutine = 0; +static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_DelegatedCoroutine = 0; +static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_AbstractCoroutine = 0; +static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_CoroutineDelegate = 0; +static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_ConfigurationOption = 0; +static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_TypedConfigurationOption = 0; +static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_Configuration = 0; +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_FactoryAggregate = 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; +static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_ThreadSafeSingleton = 0; +static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_DelegatedThreadSafeSingleton = 0; +static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_ThreadLocalSingleton = 0; +static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_ContextLocalSingleton = 0; +static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_DelegatedThreadLocalSingleton = 0; +static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_AbstractSingleton = 0; +static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_SingletonDelegate = 0; +static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_List = 0; +static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_Dict = 0; +static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_Resource = 0; +static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_Container = 0; +static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_Selector = 0; +static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_ProvidedInstance = 0; +static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_AttributeGetter = 0; +static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_ItemGetter = 0; +static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_MethodCaller = 0; +static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_Injection = 0; +static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_PositionalInjection = 0; +static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_NamedInjection = 0; +static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_OverridingContext = 0; +static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_BaseSingletonResetContext = 0; +static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_SingletonResetContext = 0; +static PyTypeObject *__pyx_ptype_19dependency_injector_9providers_SingletonFullResetContext = 0; +static int *__pyx_vp_19dependency_injector_9providers_ASYNC_MODE_UNDEFINED = 0; +#define __pyx_v_19dependency_injector_9providers_ASYNC_MODE_UNDEFINED (*__pyx_vp_19dependency_injector_9providers_ASYNC_MODE_UNDEFINED) +static int *__pyx_vp_19dependency_injector_9providers_ASYNC_MODE_ENABLED = 0; +#define __pyx_v_19dependency_injector_9providers_ASYNC_MODE_ENABLED (*__pyx_vp_19dependency_injector_9providers_ASYNC_MODE_ENABLED) +static int *__pyx_vp_19dependency_injector_9providers_ASYNC_MODE_DISABLED = 0; +#define __pyx_v_19dependency_injector_9providers_ASYNC_MODE_DISABLED (*__pyx_vp_19dependency_injector_9providers_ASYNC_MODE_DISABLED) +static PyObject **__pyx_vp_19dependency_injector_9providers___iscoroutine_typecache = 0; +#define __pyx_v_19dependency_injector_9providers___iscoroutine_typecache (*__pyx_vp_19dependency_injector_9providers___iscoroutine_typecache) +static PyObject **__pyx_vp_19dependency_injector_9providers___COROUTINE_TYPES = 0; +#define __pyx_v_19dependency_injector_9providers___COROUTINE_TYPES (*__pyx_vp_19dependency_injector_9providers___COROUTINE_TYPES) +static PyObject **__pyx_vp_19dependency_injector_9providers_CLASS_TYPES = 0; +#define __pyx_v_19dependency_injector_9providers_CLASS_TYPES (*__pyx_vp_19dependency_injector_9providers_CLASS_TYPES) +static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___get_name(struct __pyx_obj_19dependency_injector_9providers_NamedInjection *); /*proto*/ +static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___get_value(struct __pyx_obj_19dependency_injector_9providers_Injection *); /*proto*/ +static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___get_value_kwargs(struct __pyx_obj_19dependency_injector_9providers_Injection *, PyObject *); /*proto*/ +static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___separate_prefixed_kwargs(PyObject *); /*proto*/ +static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provide_positional_args(PyObject *, PyObject *, int, int); /*proto*/ +static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provide_keyword_args(PyObject *, PyObject *, int, int); /*proto*/ +static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___combine_future_injections(PyObject *, PyObject *); /*proto*/ +static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_prepare_args_kwargs_callback(PyObject *, PyObject *, PyObject *, PyObject *); /*proto*/ +static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provide_attributes(PyObject *, int); /*proto*/ +static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___async_inject_attributes(PyObject *, PyObject *); /*proto*/ +static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_inject_attributes_callback(PyObject *, PyObject *); /*proto*/ +static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___inject_attributes(PyObject *, PyObject *); /*proto*/ +static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___call(PyObject *, PyObject *, PyObject *, int, PyObject *, PyObject *, int, int); /*proto*/ +static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_call_callback(PyObject *, PyObject *, PyObject *); /*proto*/ +static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___async_result_callback(PyObject *, PyObject *); /*proto*/ +static CYTHON_INLINE int __pyx_f_19dependency_injector_9providers___is_future_or_coroutine(PyObject *); /*proto*/ +static CYTHON_INLINE int __pyx_f_19dependency_injector_9providers___isfuture(PyObject *); /*proto*/ +static CYTHON_INLINE int __pyx_f_19dependency_injector_9providers___iscoroutine(PyObject *); /*proto*/ +static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___future_result(PyObject *); /*proto*/ + /* Module declarations from 'dependency_injector._cwiring' */ static PyTypeObject *__pyx_ptype_19dependency_injector_8_cwiring___pyx_scope_struct___get_sync_patched = 0; -static PyTypeObject *__pyx_ptype_19dependency_injector_8_cwiring___pyx_scope_struct_1__get_async_patched = 0; -static PyTypeObject *__pyx_ptype_19dependency_injector_8_cwiring___pyx_scope_struct_2__patched = 0; -static PyTypeObject *__pyx_ptype_19dependency_injector_8_cwiring___pyx_scope_struct_3_genexpr = 0; +static PyTypeObject *__pyx_ptype_19dependency_injector_8_cwiring___pyx_scope_struct_1__async_inject = 0; +static PyTypeObject *__pyx_ptype_19dependency_injector_8_cwiring___pyx_scope_struct_2_genexpr = 0; +static PyTypeObject *__pyx_ptype___pyx_scope_struct____Pyx_CFunc_void____object____object____object____object___to_py = 0; +static PyTypeObject *__pyx_ptype___pyx_scope_struct____Pyx_CFunc_void____object____object___to_py = 0; +static PyTypeObject *__pyx_ptype___pyx_scope_struct____Pyx_CFunc_void____object____object____object___to_py = 0; +static PyTypeObject *__pyx_ptype___pyx_scope_struct____Pyx_CFunc_object____object____object___to_py = 0; static int __pyx_f_19dependency_injector_8_cwiring__isawaitable(PyObject *); /*proto*/ +static PyObject *__Pyx_CFunc_void____object____object____object____object___to_py(void (*)(PyObject *, PyObject *, PyObject *, PyObject *)); /*proto*/ +static PyObject *__Pyx_CFunc_void____object____object___to_py(void (*)(PyObject *, PyObject *)); /*proto*/ +static PyObject *__Pyx_CFunc_void____object____object____object___to_py(void (*)(PyObject *, PyObject *, PyObject *)); /*proto*/ +static PyObject *__Pyx_CFunc_object____object____object___to_py(PyObject *(*)(PyObject *, PyObject *)); /*proto*/ #define __Pyx_MODULE_NAME "dependency_injector._cwiring" extern int __pyx_module_is_main_dependency_injector___cwiring; int __pyx_module_is_main_dependency_injector___cwiring = 0; /* Implementation of 'dependency_injector._cwiring' */ static PyObject *__pyx_builtin_zip; -static const char __pyx_k__3[] = "_"; -static const char __pyx_k__6[] = ""; +static PyObject *__pyx_builtin_ImportError; +static PyObject *__pyx_builtin_range; +static const char __pyx_k__4[] = "__"; static const char __pyx_k_fn[] = "fn"; +static const char __pyx_k__13[] = ""; +static const char __pyx_k__16[] = "_"; static const char __pyx_k_abc[] = "abc"; static const char __pyx_k_zip[] = "zip"; static const char __pyx_k_args[] = "args"; +static const char __pyx_k_call[] = "call"; static const char __pyx_k_main[] = "__main__"; static const char __pyx_k_name[] = "__name__"; static const char __pyx_k_send[] = "send"; static const char __pyx_k_test[] = "__test__"; +static const char __pyx_k_wrap[] = "wrap"; static const char __pyx_k_await[] = "__await__"; +static const char __pyx_k_class[] = "__class__"; static const char __pyx_k_close[] = "close"; +static const char __pyx_k_index[] = "index"; static const char __pyx_k_items[] = "items"; +static const char __pyx_k_range[] = "range"; static const char __pyx_k_throw[] = "throw"; static const char __pyx_k_types[] = "types"; static const char __pyx_k_wraps[] = "wraps"; +static const char __pyx_k_Future[] = "Future"; static const char __pyx_k_Marker[] = "_Marker"; +static const char __pyx_k_future[] = "future"; static const char __pyx_k_gather[] = "gather"; static const char __pyx_k_import[] = "__import__"; static const char __pyx_k_kwargs[] = "kwargs"; static const char __pyx_k_result[] = "result"; static const char __pyx_k_wiring[] = "wiring"; +static const char __pyx_k_arg_key[] = "arg_key"; static const char __pyx_k_asyncio[] = "asyncio"; static const char __pyx_k_closing[] = "__closing__"; static const char __pyx_k_genexpr[] = "genexpr"; static const char __pyx_k_gi_code[] = "gi_code"; static const char __pyx_k_inspect[] = "inspect"; +static const char __pyx_k_partial[] = "partial"; static const char __pyx_k_patched[] = "_patched"; static const char __pyx_k_provide[] = "provide"; static const char __pyx_k_Resource[] = "Resource"; +static const char __pyx_k_closings[] = "closings"; static const char __pyx_k_co_flags[] = "co_flags"; static const char __pyx_k_provider[] = "provider"; static const char __pyx_k_shutdown[] = "shutdown"; @@ -1515,78 +3132,114 @@ static const char __pyx_k_functools[] = "functools"; static const char __pyx_k_injection[] = "injection"; static const char __pyx_k_providers[] = "providers"; static const char __pyx_k_to_inject[] = "to_inject"; -static const char __pyx_k_coroutines[] = "coroutines"; static const char __pyx_k_injections[] = "__injections__"; +static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__"; +static const char __pyx_k_set_result[] = "set_result"; +static const char __pyx_k_ImportError[] = "ImportError"; +static const char __pyx_k_cfunc_to_py[] = "cfunc.to_py"; static const char __pyx_k_collections[] = "collections"; -static const char __pyx_k_is_coroutine[] = "_is_coroutine"; +static const char __pyx_k_async_inject[] = "_async_inject"; +static const char __pyx_k_injections_2[] = "injections"; +static const char __pyx_k_stringsource[] = "stringsource"; static const char __pyx_k_CoroutineType[] = "CoroutineType"; static const char __pyx_k_GeneratorType[] = "GeneratorType"; static const char __pyx_k_asyncio_tasks[] = "asyncio.tasks"; +static const char __pyx_k_ensure_future[] = "ensure_future"; +static const char __pyx_k_future_result[] = "future_result"; +static const char __pyx_k_set_exception[] = "set_exception"; static const char __pyx_k_to_close_await[] = "to_close_await"; static const char __pyx_k_async_to_inject[] = "async_to_inject"; static const char __pyx_k_collections_abc[] = "collections.abc"; static const char __pyx_k_to_inject_await[] = "to_inject_await"; static const char __pyx_k_get_sync_patched[] = "_get_sync_patched"; -static const char __pyx_k_get_async_patched[] = "_get_async_patched"; +static const char __pyx_k_add_done_callback[] = "add_done_callback"; static const char __pyx_k_asyncio_coroutines[] = "asyncio.coroutines"; static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; +static const char __pyx_k_future_args_kwargs[] = "future_args_kwargs"; static const char __pyx_k_CO_ITERABLE_COROUTINE[] = "CO_ITERABLE_COROUTINE"; +static const char __pyx_k_asyncio_future_blocking[] = "_asyncio_future_blocking"; +static const char __pyx_k_Pyx_CFunc_object____object[] = "__Pyx_CFunc_object____object____object___to_py..wrap"; static const char __pyx_k_Wiring_optimizations_module[] = "Wiring optimizations module."; +static const char __pyx_k_async_inject_locals_genexpr[] = "_async_inject..genexpr"; static const char __pyx_k_dependency_injector__cwiring[] = "dependency_injector._cwiring"; -static const char __pyx_k_get_async_patched_locals__patch[] = "_get_async_patched.._patched..genexpr"; +static const char __pyx_k_Pyx_CFunc_void____object____ob[] = "__Pyx_CFunc_void____object____object____object____object___to_py..wrap"; static const char __pyx_k_get_sync_patched_locals__patche[] = "_get_sync_patched.._patched"; +static const char __pyx_k_Pyx_CFunc_void____object____ob_2[] = "__Pyx_CFunc_void____object____object___to_py..wrap"; +static const char __pyx_k_Pyx_CFunc_void____object____ob_3[] = "__Pyx_CFunc_void____object____object____object___to_py..wrap"; static const char __pyx_k_src_dependency_injector__cwiring[] = "src/dependency_injector/_cwiring.pyx"; -static const char __pyx_k_get_async_patched_locals__patch_2[] = "_get_async_patched.._patched"; static PyObject *__pyx_n_s_Awaitable; static PyObject *__pyx_n_s_CO_ITERABLE_COROUTINE; static PyObject *__pyx_n_s_CoroutineType; +static PyObject *__pyx_n_s_Future; static PyObject *__pyx_n_s_GeneratorType; +static PyObject *__pyx_n_s_ImportError; static PyObject *__pyx_n_s_Marker; +static PyObject *__pyx_n_s_Pyx_CFunc_object____object; +static PyObject *__pyx_n_s_Pyx_CFunc_void____object____ob; +static PyObject *__pyx_n_s_Pyx_CFunc_void____object____ob_2; +static PyObject *__pyx_n_s_Pyx_CFunc_void____object____ob_3; static PyObject *__pyx_n_s_Resource; -static PyObject *__pyx_n_s__3; -static PyObject *__pyx_n_s__6; +static PyObject *__pyx_n_s__13; +static PyObject *__pyx_n_s__16; +static PyObject *__pyx_n_s__4; static PyObject *__pyx_n_s_abc; +static PyObject *__pyx_n_s_add_done_callback; +static PyObject *__pyx_n_s_arg_key; static PyObject *__pyx_n_s_args; +static PyObject *__pyx_n_s_async_inject; +static PyObject *__pyx_n_s_async_inject_locals_genexpr; static PyObject *__pyx_n_s_async_to_inject; static PyObject *__pyx_n_s_asyncio; static PyObject *__pyx_n_s_asyncio_coroutines; +static PyObject *__pyx_n_s_asyncio_future_blocking; static PyObject *__pyx_n_s_asyncio_tasks; static PyObject *__pyx_n_s_await; +static PyObject *__pyx_n_s_call; +static PyObject *__pyx_n_s_cfunc_to_py; +static PyObject *__pyx_n_s_class; static PyObject *__pyx_n_s_cline_in_traceback; static PyObject *__pyx_n_s_close; static PyObject *__pyx_n_s_closing; +static PyObject *__pyx_n_s_closings; static PyObject *__pyx_n_s_co_flags; static PyObject *__pyx_n_s_collections; static PyObject *__pyx_n_s_collections_abc; -static PyObject *__pyx_n_s_coroutines; static PyObject *__pyx_n_s_dependency_injector__cwiring; +static PyObject *__pyx_n_s_ensure_future; static PyObject *__pyx_n_s_fn; static PyObject *__pyx_n_s_functools; +static PyObject *__pyx_n_s_future; +static PyObject *__pyx_n_s_future_args_kwargs; +static PyObject *__pyx_n_s_future_result; static PyObject *__pyx_n_s_gather; static PyObject *__pyx_n_s_genexpr; -static PyObject *__pyx_n_s_get_async_patched; -static PyObject *__pyx_n_s_get_async_patched_locals__patch; -static PyObject *__pyx_n_s_get_async_patched_locals__patch_2; static PyObject *__pyx_n_s_get_sync_patched; static PyObject *__pyx_n_s_get_sync_patched_locals__patche; static PyObject *__pyx_n_s_gi_code; static PyObject *__pyx_n_s_import; +static PyObject *__pyx_n_s_index; static PyObject *__pyx_n_s_injection; static PyObject *__pyx_n_s_injections; +static PyObject *__pyx_n_s_injections_2; static PyObject *__pyx_n_s_inspect; -static PyObject *__pyx_n_s_is_coroutine; static PyObject *__pyx_n_s_items; static PyObject *__pyx_n_s_kwargs; static PyObject *__pyx_n_s_main; static PyObject *__pyx_n_s_name; +static PyObject *__pyx_n_s_partial; static PyObject *__pyx_n_s_patched; static PyObject *__pyx_n_s_provide; static PyObject *__pyx_n_s_provider; static PyObject *__pyx_n_s_providers; +static PyObject *__pyx_n_s_pyx_vtable; +static PyObject *__pyx_n_s_range; static PyObject *__pyx_n_s_result; static PyObject *__pyx_n_s_send; +static PyObject *__pyx_n_s_set_exception; +static PyObject *__pyx_n_s_set_result; static PyObject *__pyx_n_s_shutdown; static PyObject *__pyx_kp_s_src_dependency_injector__cwiring; +static PyObject *__pyx_kp_s_stringsource; static PyObject *__pyx_n_s_test; static PyObject *__pyx_n_s_throw; static PyObject *__pyx_n_s_to_close_await; @@ -1594,28 +3247,43 @@ static PyObject *__pyx_n_s_to_inject; static PyObject *__pyx_n_s_to_inject_await; static PyObject *__pyx_n_s_types; static PyObject *__pyx_n_s_wiring; +static PyObject *__pyx_n_s_wrap; static PyObject *__pyx_n_s_wraps; static PyObject *__pyx_n_s_zip; static PyObject *__pyx_pf_19dependency_injector_8_cwiring_17_get_sync_patched__patched(PyObject *__pyx_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */ static PyObject *__pyx_pf_19dependency_injector_8_cwiring__get_sync_patched(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_fn); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_8_cwiring_18_get_async_patched_8_patched_genexpr(PyObject *__pyx_self); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_8_cwiring_18_get_async_patched__patched(PyObject *__pyx_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */ -static PyObject *__pyx_pf_19dependency_injector_8_cwiring_2_get_async_patched(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_fn); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_8_cwiring_13_async_inject_genexpr(PyObject *__pyx_self); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_8_cwiring_2_async_inject(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_fn, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs, PyObject *__pyx_v_injections, PyObject *__pyx_v_closings); /* proto */ +static PyObject *__pyx_pf_11cfunc_dot_to_py_64__Pyx_CFunc_void____object____object____object____object___to_py_wrap(PyObject *__pyx_self, PyObject *__pyx_v_future_result, PyObject *__pyx_v_args, PyObject *__pyx_v_future_args_kwargs, PyObject *__pyx_v_future); /* proto */ +static PyObject *__pyx_pf_11cfunc_dot_to_py_44__Pyx_CFunc_void____object____object___to_py_wrap(PyObject *__pyx_self, PyObject *__pyx_v_future_result, PyObject *__pyx_v_future); /* proto */ +static PyObject *__pyx_pf_11cfunc_dot_to_py_54__Pyx_CFunc_void____object____object____object___to_py_wrap(PyObject *__pyx_self, PyObject *__pyx_v_future_result, PyObject *__pyx_v_call, PyObject *__pyx_v_future); /* proto */ +static PyObject *__pyx_pf_11cfunc_dot_to_py_46__Pyx_CFunc_object____object____object___to_py_wrap(PyObject *__pyx_self, PyObject *__pyx_v_future_result, PyObject *__pyx_v_future); /* proto */ static PyObject *__pyx_tp_new_19dependency_injector_8_cwiring___pyx_scope_struct___get_sync_patched(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_19dependency_injector_8_cwiring___pyx_scope_struct_1__get_async_patched(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_19dependency_injector_8_cwiring___pyx_scope_struct_2__patched(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_19dependency_injector_8_cwiring___pyx_scope_struct_3_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_19dependency_injector_8_cwiring___pyx_scope_struct_1__async_inject(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_19dependency_injector_8_cwiring___pyx_scope_struct_2_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new___pyx_scope_struct____Pyx_CFunc_void____object____object____object____object___to_py(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new___pyx_scope_struct____Pyx_CFunc_void____object____object___to_py(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new___pyx_scope_struct____Pyx_CFunc_void____object____object____object___to_py(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new___pyx_scope_struct____Pyx_CFunc_object____object____object___to_py(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_items = {0, &__pyx_n_s_items, 0, 0, 0}; +static PyObject *__pyx_int_2; static PyObject *__pyx_tuple_; -static PyObject *__pyx_tuple__4; +static PyObject *__pyx_tuple__5; static PyObject *__pyx_tuple__7; static PyObject *__pyx_tuple__9; +static PyObject *__pyx_tuple__11; +static PyObject *__pyx_tuple__14; +static PyObject *__pyx_tuple__17; static PyObject *__pyx_codeobj__2; -static PyObject *__pyx_codeobj__5; +static PyObject *__pyx_codeobj__3; +static PyObject *__pyx_codeobj__6; static PyObject *__pyx_codeobj__8; static PyObject *__pyx_codeobj__10; +static PyObject *__pyx_codeobj__12; +static PyObject *__pyx_codeobj__15; /* Late includes */ -/* "dependency_injector/_cwiring.pyx":13 +/* "dependency_injector/_cwiring.pyx":15 * * * def _get_sync_patched(fn): # <<<<<<<<<<<<<< @@ -1637,7 +3305,7 @@ static PyObject *__pyx_pw_19dependency_injector_8_cwiring_1_get_sync_patched(PyO return __pyx_r; } -/* "dependency_injector/_cwiring.pyx":15 +/* "dependency_injector/_cwiring.pyx":17 * def _get_sync_patched(fn): * @functools.wraps(fn) * def _patched(*args, **kwargs): # <<<<<<<<<<<<<< @@ -1673,8 +3341,8 @@ static PyObject *__pyx_pf_19dependency_injector_8_cwiring_17_get_sync_patched__p struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct___get_sync_patched *__pyx_outer_scope; PyObject *__pyx_v_result = 0; PyObject *__pyx_v_to_inject = 0; - PyObject *__pyx_v_injection = NULL; - PyObject *__pyx_v_provider = NULL; + PyObject *__pyx_v_arg_key = 0; + struct __pyx_obj_19dependency_injector_9providers_Provider *__pyx_v_provider = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -1695,29 +3363,29 @@ static PyObject *__pyx_pf_19dependency_injector_8_cwiring_17_get_sync_patched__p __pyx_outer_scope = (struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct___get_sync_patched *) __Pyx_CyFunction_GetClosure(__pyx_self); __pyx_cur_scope = __pyx_outer_scope; - /* "dependency_injector/_cwiring.pyx":19 - * cdef dict to_inject + /* "dependency_injector/_cwiring.pyx":23 + * cdef Provider provider * * to_inject = kwargs.copy() # <<<<<<<<<<<<<< - * for injection, provider in _patched.__injections__.items(): - * if injection not in kwargs or isinstance(kwargs[injection], _Marker): + * for arg_key, provider in _patched.__injections__.items(): + * if arg_key not in kwargs or isinstance(kwargs[arg_key], _Marker): */ - __pyx_t_1 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19, __pyx_L1_error) + __pyx_t_1 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_to_inject = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/_cwiring.pyx":20 + /* "dependency_injector/_cwiring.pyx":24 * * to_inject = kwargs.copy() - * for injection, provider in _patched.__injections__.items(): # <<<<<<<<<<<<<< - * if injection not in kwargs or isinstance(kwargs[injection], _Marker): - * to_inject[injection] = provider() + * for arg_key, provider in _patched.__injections__.items(): # <<<<<<<<<<<<<< + * if arg_key not in kwargs or isinstance(kwargs[arg_key], _Marker): + * to_inject[arg_key] = provider() */ - if (unlikely(!__pyx_cur_scope->__pyx_v__patched)) { __Pyx_RaiseClosureNameError("_patched"); __PYX_ERR(0, 20, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v__patched, __pyx_n_s_injections); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 20, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_v__patched)) { __Pyx_RaiseClosureNameError("_patched"); __PYX_ERR(0, 24, __pyx_L1_error) } + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v__patched, __pyx_n_s_injections); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 24, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_items); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_items); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -1732,16 +3400,16 @@ static PyObject *__pyx_pf_19dependency_injector_8_cwiring_17_get_sync_patched__p } __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 20, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 24, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20, __pyx_L1_error) + __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 20, __pyx_L1_error) + __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 24, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -1749,17 +3417,17 @@ static PyObject *__pyx_pf_19dependency_injector_8_cwiring_17_get_sync_patched__p if (likely(PyList_CheckExact(__pyx_t_3))) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 20, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 24, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 20, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 24, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 20, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 24, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 20, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 24, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -1769,7 +3437,7 @@ static PyObject *__pyx_pf_19dependency_injector_8_cwiring_17_get_sync_patched__p PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 20, __pyx_L1_error) + else __PYX_ERR(0, 24, __pyx_L1_error) } break; } @@ -1781,7 +3449,7 @@ static PyObject *__pyx_pf_19dependency_injector_8_cwiring_17_get_sync_patched__p if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 20, __pyx_L1_error) + __PYX_ERR(0, 24, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -1794,15 +3462,15 @@ static PyObject *__pyx_pf_19dependency_injector_8_cwiring_17_get_sync_patched__p __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_6); #else - __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 20, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 24, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 20, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 24, __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(0, 20, __pyx_L1_error) + __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 24, __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; @@ -1810,7 +3478,7 @@ static PyObject *__pyx_pf_19dependency_injector_8_cwiring_17_get_sync_patched__p __Pyx_GOTREF(__pyx_t_2); 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(0, 20, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 24, __pyx_L1_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L6_unpacking_done; @@ -1818,33 +3486,34 @@ static PyObject *__pyx_pf_19dependency_injector_8_cwiring_17_get_sync_patched__p __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 20, __pyx_L1_error) + __PYX_ERR(0, 24, __pyx_L1_error) __pyx_L6_unpacking_done:; } - __Pyx_XDECREF_SET(__pyx_v_injection, __pyx_t_2); + if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(0, 24, __pyx_L1_error) + __Pyx_XDECREF_SET(__pyx_v_arg_key, __pyx_t_2); __pyx_t_2 = 0; - __Pyx_XDECREF_SET(__pyx_v_provider, __pyx_t_6); + __Pyx_XDECREF_SET(__pyx_v_provider, ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_t_6)); __pyx_t_6 = 0; - /* "dependency_injector/_cwiring.pyx":21 + /* "dependency_injector/_cwiring.pyx":25 * to_inject = kwargs.copy() - * for injection, provider in _patched.__injections__.items(): - * if injection not in kwargs or isinstance(kwargs[injection], _Marker): # <<<<<<<<<<<<<< - * to_inject[injection] = provider() + * for arg_key, provider in _patched.__injections__.items(): + * if arg_key not in kwargs or isinstance(kwargs[arg_key], _Marker): # <<<<<<<<<<<<<< + * to_inject[arg_key] = provider() * */ - __pyx_t_10 = (__Pyx_PyDict_ContainsTF(__pyx_v_injection, __pyx_v_kwargs, Py_NE)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 21, __pyx_L1_error) + __pyx_t_10 = (__Pyx_PyDict_ContainsTF(__pyx_v_arg_key, __pyx_v_kwargs, Py_NE)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 25, __pyx_L1_error) __pyx_t_11 = (__pyx_t_10 != 0); if (!__pyx_t_11) { } else { __pyx_t_9 = __pyx_t_11; goto __pyx_L8_bool_binop_done; } - __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_v_injection); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 21, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_v_arg_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 25, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_Marker); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 21, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_Marker); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 25, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_11 = PyObject_IsInstance(__pyx_t_1, __pyx_t_6); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 21, __pyx_L1_error) + __pyx_t_11 = PyObject_IsInstance(__pyx_t_1, __pyx_t_6); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 25, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_10 = (__pyx_t_11 != 0); @@ -1852,15 +3521,15 @@ static PyObject *__pyx_pf_19dependency_injector_8_cwiring_17_get_sync_patched__p __pyx_L8_bool_binop_done:; if (__pyx_t_9) { - /* "dependency_injector/_cwiring.pyx":22 - * for injection, provider in _patched.__injections__.items(): - * if injection not in kwargs or isinstance(kwargs[injection], _Marker): - * to_inject[injection] = provider() # <<<<<<<<<<<<<< + /* "dependency_injector/_cwiring.pyx":26 + * for arg_key, provider in _patched.__injections__.items(): + * if arg_key not in kwargs or isinstance(kwargs[arg_key], _Marker): + * to_inject[arg_key] = provider() # <<<<<<<<<<<<<< * * result = fn(*args, **to_inject) */ - __Pyx_INCREF(__pyx_v_provider); - __pyx_t_1 = __pyx_v_provider; __pyx_t_2 = NULL; + __Pyx_INCREF(((PyObject *)__pyx_v_provider)); + __pyx_t_1 = ((PyObject *)__pyx_v_provider); __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_2)) { @@ -1872,80 +3541,80 @@ static PyObject *__pyx_pf_19dependency_injector_8_cwiring_17_get_sync_patched__p } __pyx_t_6 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 22, __pyx_L1_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 26, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_v_to_inject == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 22, __pyx_L1_error) + __PYX_ERR(0, 26, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__pyx_v_to_inject, __pyx_v_injection, __pyx_t_6) < 0)) __PYX_ERR(0, 22, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_to_inject, __pyx_v_arg_key, __pyx_t_6) < 0)) __PYX_ERR(0, 26, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "dependency_injector/_cwiring.pyx":21 + /* "dependency_injector/_cwiring.pyx":25 * to_inject = kwargs.copy() - * for injection, provider in _patched.__injections__.items(): - * if injection not in kwargs or isinstance(kwargs[injection], _Marker): # <<<<<<<<<<<<<< - * to_inject[injection] = provider() + * for arg_key, provider in _patched.__injections__.items(): + * if arg_key not in kwargs or isinstance(kwargs[arg_key], _Marker): # <<<<<<<<<<<<<< + * to_inject[arg_key] = provider() * */ } - /* "dependency_injector/_cwiring.pyx":20 + /* "dependency_injector/_cwiring.pyx":24 * * to_inject = kwargs.copy() - * for injection, provider in _patched.__injections__.items(): # <<<<<<<<<<<<<< - * if injection not in kwargs or isinstance(kwargs[injection], _Marker): - * to_inject[injection] = provider() + * for arg_key, provider in _patched.__injections__.items(): # <<<<<<<<<<<<<< + * if arg_key not in kwargs or isinstance(kwargs[arg_key], _Marker): + * to_inject[arg_key] = provider() */ } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/_cwiring.pyx":24 - * to_inject[injection] = provider() + /* "dependency_injector/_cwiring.pyx":28 + * to_inject[arg_key] = provider() * * result = fn(*args, **to_inject) # <<<<<<<<<<<<<< * * if _patched.__closing__: */ - if (unlikely(!__pyx_cur_scope->__pyx_v_fn)) { __Pyx_RaiseClosureNameError("fn"); __PYX_ERR(0, 24, __pyx_L1_error) } + if (unlikely(!__pyx_cur_scope->__pyx_v_fn)) { __Pyx_RaiseClosureNameError("fn"); __PYX_ERR(0, 28, __pyx_L1_error) } if (unlikely(__pyx_v_to_inject == Py_None)) { PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); - __PYX_ERR(0, 24, __pyx_L1_error) + __PYX_ERR(0, 28, __pyx_L1_error) } - __pyx_t_3 = PyDict_Copy(__pyx_v_to_inject); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24, __pyx_L1_error) + __pyx_t_3 = PyDict_Copy(__pyx_v_to_inject); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_v_fn, __pyx_v_args, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 24, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_v_fn, __pyx_v_args, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 28, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_result = __pyx_t_6; __pyx_t_6 = 0; - /* "dependency_injector/_cwiring.pyx":26 + /* "dependency_injector/_cwiring.pyx":30 * result = fn(*args, **to_inject) * * if _patched.__closing__: # <<<<<<<<<<<<<< - * for injection, provider in _patched.__closing__.items(): - * if injection in kwargs and not isinstance(kwargs[injection], _Marker): + * for arg_key, provider in _patched.__closing__.items(): + * if arg_key in kwargs and not isinstance(kwargs[arg_key], _Marker): */ - if (unlikely(!__pyx_cur_scope->__pyx_v__patched)) { __Pyx_RaiseClosureNameError("_patched"); __PYX_ERR(0, 26, __pyx_L1_error) } - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v__patched, __pyx_n_s_closing); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 26, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_v__patched)) { __Pyx_RaiseClosureNameError("_patched"); __PYX_ERR(0, 30, __pyx_L1_error) } + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v__patched, __pyx_n_s_closing); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 30, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 26, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 30, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_9) { - /* "dependency_injector/_cwiring.pyx":27 + /* "dependency_injector/_cwiring.pyx":31 * * if _patched.__closing__: - * for injection, provider in _patched.__closing__.items(): # <<<<<<<<<<<<<< - * if injection in kwargs and not isinstance(kwargs[injection], _Marker): + * for arg_key, provider in _patched.__closing__.items(): # <<<<<<<<<<<<<< + * if arg_key in kwargs and not isinstance(kwargs[arg_key], _Marker): * continue */ - if (unlikely(!__pyx_cur_scope->__pyx_v__patched)) { __Pyx_RaiseClosureNameError("_patched"); __PYX_ERR(0, 27, __pyx_L1_error) } - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v__patched, __pyx_n_s_closing); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_v__patched)) { __Pyx_RaiseClosureNameError("_patched"); __PYX_ERR(0, 31, __pyx_L1_error) } + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v__patched, __pyx_n_s_closing); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_items); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_items); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 31, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -1960,16 +3629,16 @@ static PyObject *__pyx_pf_19dependency_injector_8_cwiring_17_get_sync_patched__p } __pyx_t_6 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 27, __pyx_L1_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 31, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) { __pyx_t_1 = __pyx_t_6; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27, __pyx_L1_error) + __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 31, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27, __pyx_L1_error) + __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 31, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; for (;;) { @@ -1977,17 +3646,17 @@ static PyObject *__pyx_pf_19dependency_injector_8_cwiring_17_get_sync_patched__p if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 27, __pyx_L1_error) + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 31, __pyx_L1_error) #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 27, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 31, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif } else { if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 27, __pyx_L1_error) + __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 31, __pyx_L1_error) #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 27, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 31, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif } @@ -1997,7 +3666,7 @@ static PyObject *__pyx_pf_19dependency_injector_8_cwiring_17_get_sync_patched__p PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 27, __pyx_L1_error) + else __PYX_ERR(0, 31, __pyx_L1_error) } break; } @@ -2009,7 +3678,7 @@ static PyObject *__pyx_pf_19dependency_injector_8_cwiring_17_get_sync_patched__p if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 27, __pyx_L1_error) + __PYX_ERR(0, 31, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -2022,15 +3691,15 @@ static PyObject *__pyx_pf_19dependency_injector_8_cwiring_17_get_sync_patched__p __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); #else - __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 27, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 31, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { Py_ssize_t index = -1; - __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 27, __pyx_L1_error) + __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 31, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext; @@ -2038,7 +3707,7 @@ static PyObject *__pyx_pf_19dependency_injector_8_cwiring_17_get_sync_patched__p __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_2 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_2)) goto __pyx_L13_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 27, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 31, __pyx_L1_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L14_unpacking_done; @@ -2046,33 +3715,34 @@ static PyObject *__pyx_pf_19dependency_injector_8_cwiring_17_get_sync_patched__p __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 27, __pyx_L1_error) + __PYX_ERR(0, 31, __pyx_L1_error) __pyx_L14_unpacking_done:; } - __Pyx_XDECREF_SET(__pyx_v_injection, __pyx_t_3); + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(0, 31, __pyx_L1_error) + __Pyx_XDECREF_SET(__pyx_v_arg_key, __pyx_t_3); __pyx_t_3 = 0; - __Pyx_XDECREF_SET(__pyx_v_provider, __pyx_t_2); + __Pyx_XDECREF_SET(__pyx_v_provider, ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_t_2)); __pyx_t_2 = 0; - /* "dependency_injector/_cwiring.pyx":28 + /* "dependency_injector/_cwiring.pyx":32 * if _patched.__closing__: - * for injection, provider in _patched.__closing__.items(): - * if injection in kwargs and not isinstance(kwargs[injection], _Marker): # <<<<<<<<<<<<<< + * for arg_key, provider in _patched.__closing__.items(): + * if arg_key in kwargs and not isinstance(kwargs[arg_key], _Marker): # <<<<<<<<<<<<<< * continue * if not isinstance(provider, providers.Resource): */ - __pyx_t_10 = (__Pyx_PyDict_ContainsTF(__pyx_v_injection, __pyx_v_kwargs, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 28, __pyx_L1_error) + __pyx_t_10 = (__Pyx_PyDict_ContainsTF(__pyx_v_arg_key, __pyx_v_kwargs, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 32, __pyx_L1_error) __pyx_t_11 = (__pyx_t_10 != 0); if (__pyx_t_11) { } else { __pyx_t_9 = __pyx_t_11; goto __pyx_L16_bool_binop_done; } - __pyx_t_6 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_v_injection); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 28, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_v_arg_key); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 32, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Marker); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 28, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Marker); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 32, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_11 = PyObject_IsInstance(__pyx_t_6, __pyx_t_2); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 28, __pyx_L1_error) + __pyx_t_11 = PyObject_IsInstance(__pyx_t_6, __pyx_t_2); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 32, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_10 = ((!(__pyx_t_11 != 0)) != 0); @@ -2080,42 +3750,42 @@ static PyObject *__pyx_pf_19dependency_injector_8_cwiring_17_get_sync_patched__p __pyx_L16_bool_binop_done:; if (__pyx_t_9) { - /* "dependency_injector/_cwiring.pyx":29 - * for injection, provider in _patched.__closing__.items(): - * if injection in kwargs and not isinstance(kwargs[injection], _Marker): + /* "dependency_injector/_cwiring.pyx":33 + * for arg_key, provider in _patched.__closing__.items(): + * if arg_key in kwargs and not isinstance(kwargs[arg_key], _Marker): * continue # <<<<<<<<<<<<<< * if not isinstance(provider, providers.Resource): * continue */ goto __pyx_L11_continue; - /* "dependency_injector/_cwiring.pyx":28 + /* "dependency_injector/_cwiring.pyx":32 * if _patched.__closing__: - * for injection, provider in _patched.__closing__.items(): - * if injection in kwargs and not isinstance(kwargs[injection], _Marker): # <<<<<<<<<<<<<< + * for arg_key, provider in _patched.__closing__.items(): + * if arg_key in kwargs and not isinstance(kwargs[arg_key], _Marker): # <<<<<<<<<<<<<< * continue * if not isinstance(provider, providers.Resource): */ } - /* "dependency_injector/_cwiring.pyx":30 - * if injection in kwargs and not isinstance(kwargs[injection], _Marker): + /* "dependency_injector/_cwiring.pyx":34 + * if arg_key in kwargs and not isinstance(kwargs[arg_key], _Marker): * continue * if not isinstance(provider, providers.Resource): # <<<<<<<<<<<<<< * continue * provider.shutdown() */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_providers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 30, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_providers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 34, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Resource); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 30, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Resource); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 34, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_9 = PyObject_IsInstance(__pyx_v_provider, __pyx_t_6); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 30, __pyx_L1_error) + __pyx_t_9 = PyObject_IsInstance(((PyObject *)__pyx_v_provider), __pyx_t_6); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 34, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_10 = ((!(__pyx_t_9 != 0)) != 0); if (__pyx_t_10) { - /* "dependency_injector/_cwiring.pyx":31 + /* "dependency_injector/_cwiring.pyx":35 * continue * if not isinstance(provider, providers.Resource): * continue # <<<<<<<<<<<<<< @@ -2124,8 +3794,8 @@ static PyObject *__pyx_pf_19dependency_injector_8_cwiring_17_get_sync_patched__p */ goto __pyx_L11_continue; - /* "dependency_injector/_cwiring.pyx":30 - * if injection in kwargs and not isinstance(kwargs[injection], _Marker): + /* "dependency_injector/_cwiring.pyx":34 + * if arg_key in kwargs and not isinstance(kwargs[arg_key], _Marker): * continue * if not isinstance(provider, providers.Resource): # <<<<<<<<<<<<<< * continue @@ -2133,14 +3803,14 @@ static PyObject *__pyx_pf_19dependency_injector_8_cwiring_17_get_sync_patched__p */ } - /* "dependency_injector/_cwiring.pyx":32 + /* "dependency_injector/_cwiring.pyx":36 * if not isinstance(provider, providers.Resource): * continue * provider.shutdown() # <<<<<<<<<<<<<< * * return result */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_provider, __pyx_n_s_shutdown); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 32, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_provider), __pyx_n_s_shutdown); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 36, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -2154,32 +3824,32 @@ static PyObject *__pyx_pf_19dependency_injector_8_cwiring_17_get_sync_patched__p } __pyx_t_6 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 32, __pyx_L1_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 36, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "dependency_injector/_cwiring.pyx":27 + /* "dependency_injector/_cwiring.pyx":31 * * if _patched.__closing__: - * for injection, provider in _patched.__closing__.items(): # <<<<<<<<<<<<<< - * if injection in kwargs and not isinstance(kwargs[injection], _Marker): + * for arg_key, provider in _patched.__closing__.items(): # <<<<<<<<<<<<<< + * if arg_key in kwargs and not isinstance(kwargs[arg_key], _Marker): * continue */ __pyx_L11_continue:; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/_cwiring.pyx":26 + /* "dependency_injector/_cwiring.pyx":30 * result = fn(*args, **to_inject) * * if _patched.__closing__: # <<<<<<<<<<<<<< - * for injection, provider in _patched.__closing__.items(): - * if injection in kwargs and not isinstance(kwargs[injection], _Marker): + * for arg_key, provider in _patched.__closing__.items(): + * if arg_key in kwargs and not isinstance(kwargs[arg_key], _Marker): */ } - /* "dependency_injector/_cwiring.pyx":34 + /* "dependency_injector/_cwiring.pyx":38 * provider.shutdown() * * return result # <<<<<<<<<<<<<< @@ -2191,7 +3861,7 @@ static PyObject *__pyx_pf_19dependency_injector_8_cwiring_17_get_sync_patched__p __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "dependency_injector/_cwiring.pyx":15 + /* "dependency_injector/_cwiring.pyx":17 * def _get_sync_patched(fn): * @functools.wraps(fn) * def _patched(*args, **kwargs): # <<<<<<<<<<<<<< @@ -2211,14 +3881,14 @@ static PyObject *__pyx_pf_19dependency_injector_8_cwiring_17_get_sync_patched__p __pyx_L0:; __Pyx_XDECREF(__pyx_v_result); __Pyx_XDECREF(__pyx_v_to_inject); - __Pyx_XDECREF(__pyx_v_injection); - __Pyx_XDECREF(__pyx_v_provider); + __Pyx_XDECREF(__pyx_v_arg_key); + __Pyx_XDECREF((PyObject *)__pyx_v_provider); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "dependency_injector/_cwiring.pyx":13 +/* "dependency_injector/_cwiring.pyx":15 * * * def _get_sync_patched(fn): # <<<<<<<<<<<<<< @@ -2242,7 +3912,7 @@ static PyObject *__pyx_pf_19dependency_injector_8_cwiring__get_sync_patched(CYTH if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct___get_sync_patched *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 13, __pyx_L1_error) + __PYX_ERR(0, 15, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } @@ -2250,16 +3920,16 @@ static PyObject *__pyx_pf_19dependency_injector_8_cwiring__get_sync_patched(CYTH __Pyx_INCREF(__pyx_cur_scope->__pyx_v_fn); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_fn); - /* "dependency_injector/_cwiring.pyx":14 + /* "dependency_injector/_cwiring.pyx":16 * * def _get_sync_patched(fn): * @functools.wraps(fn) # <<<<<<<<<<<<<< * def _patched(*args, **kwargs): * cdef object result */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_functools); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_functools); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 16, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_wraps); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 14, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_wraps); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 16, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -2274,18 +3944,18 @@ static PyObject *__pyx_pf_19dependency_injector_8_cwiring__get_sync_patched(CYTH } __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_cur_scope->__pyx_v_fn) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_cur_scope->__pyx_v_fn); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 14, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 16, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "dependency_injector/_cwiring.pyx":15 + /* "dependency_injector/_cwiring.pyx":17 * def _get_sync_patched(fn): * @functools.wraps(fn) * def _patched(*args, **kwargs): # <<<<<<<<<<<<<< * cdef object result * cdef dict to_inject */ - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_8_cwiring_17_get_sync_patched_1_patched, 0, __pyx_n_s_get_sync_patched_locals__patche, ((PyObject*)__pyx_cur_scope), __pyx_n_s_dependency_injector__cwiring, __pyx_d, ((PyObject *)__pyx_codeobj__2)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 15, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_8_cwiring_17_get_sync_patched_1_patched, 0, __pyx_n_s_get_sync_patched_locals__patche, ((PyObject*)__pyx_cur_scope), __pyx_n_s_dependency_injector__cwiring, __pyx_d, ((PyObject *)__pyx_codeobj__2)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -2300,14 +3970,14 @@ static PyObject *__pyx_pf_19dependency_injector_8_cwiring__get_sync_patched(CYTH __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 16, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_v__patched = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/_cwiring.pyx":35 + /* "dependency_injector/_cwiring.pyx":39 * * return result * return _patched # <<<<<<<<<<<<<< @@ -2319,7 +3989,7 @@ static PyObject *__pyx_pf_19dependency_injector_8_cwiring__get_sync_patched(CYTH __pyx_r = __pyx_cur_scope->__pyx_v__patched; goto __pyx_L0; - /* "dependency_injector/_cwiring.pyx":13 + /* "dependency_injector/_cwiring.pyx":15 * * * def _get_sync_patched(fn): # <<<<<<<<<<<<<< @@ -2341,91 +4011,152 @@ static PyObject *__pyx_pf_19dependency_injector_8_cwiring__get_sync_patched(CYTH __Pyx_RefNannyFinishContext(); return __pyx_r; } +static PyObject *__pyx_gb_19dependency_injector_8_cwiring_4generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "dependency_injector/_cwiring.pyx":38 +/* "dependency_injector/_cwiring.pyx":42 * * - * def _get_async_patched(fn): # <<<<<<<<<<<<<< - * @functools.wraps(fn) - * async def _patched(*args, **kwargs): + * async def _async_inject(object fn, tuple args, dict kwargs, dict injections, dict closings): # <<<<<<<<<<<<<< + * cdef object result + * cdef dict to_inject */ /* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_8_cwiring_3_get_async_patched(PyObject *__pyx_self, PyObject *__pyx_v_fn); /*proto*/ -static PyMethodDef __pyx_mdef_19dependency_injector_8_cwiring_3_get_async_patched = {"_get_async_patched", (PyCFunction)__pyx_pw_19dependency_injector_8_cwiring_3_get_async_patched, METH_O, 0}; -static PyObject *__pyx_pw_19dependency_injector_8_cwiring_3_get_async_patched(PyObject *__pyx_self, PyObject *__pyx_v_fn) { - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("_get_async_patched (wrapper)", 0); - __pyx_r = __pyx_pf_19dependency_injector_8_cwiring_2_get_async_patched(__pyx_self, ((PyObject *)__pyx_v_fn)); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} -static PyObject *__pyx_gb_19dependency_injector_8_cwiring_18_get_async_patched_2generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ - -/* "dependency_injector/_cwiring.pyx":40 - * def _get_async_patched(fn): - * @functools.wraps(fn) - * async def _patched(*args, **kwargs): # <<<<<<<<<<<<<< - * cdef object result - * cdef dict to_inject - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_8_cwiring_18_get_async_patched_1_patched(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_19dependency_injector_8_cwiring_18_get_async_patched_1_patched = {"_patched", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_8_cwiring_18_get_async_patched_1_patched, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_19dependency_injector_8_cwiring_18_get_async_patched_1_patched(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_8_cwiring_3_async_inject(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_19dependency_injector_8_cwiring_3_async_inject = {"_async_inject", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_8_cwiring_3_async_inject, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_19dependency_injector_8_cwiring_3_async_inject(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_fn = 0; PyObject *__pyx_v_args = 0; PyObject *__pyx_v_kwargs = 0; + PyObject *__pyx_v_injections = 0; + PyObject *__pyx_v_closings = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("_patched (wrapper)", 0); - if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "_patched", 1))) return NULL; - __pyx_v_kwargs = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL; - __Pyx_GOTREF(__pyx_v_kwargs); - __Pyx_INCREF(__pyx_args); - __pyx_v_args = __pyx_args; - __pyx_r = __pyx_pf_19dependency_injector_8_cwiring_18_get_async_patched__patched(__pyx_self, __pyx_v_args, __pyx_v_kwargs); + __Pyx_RefNannySetupContext("_async_inject (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_fn,&__pyx_n_s_args,&__pyx_n_s_kwargs,&__pyx_n_s_injections_2,&__pyx_n_s_closings,0}; + PyObject* values[5] = {0,0,0,0,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 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + CYTHON_FALLTHROUGH; + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fn)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_args)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("_async_inject", 1, 5, 5, 1); __PYX_ERR(0, 42, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_kwargs)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("_async_inject", 1, 5, 5, 2); __PYX_ERR(0, 42, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 3: + if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_injections_2)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("_async_inject", 1, 5, 5, 3); __PYX_ERR(0, 42, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 4: + if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_closings)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("_async_inject", 1, 5, 5, 4); __PYX_ERR(0, 42, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_async_inject") < 0)) __PYX_ERR(0, 42, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 5) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + } + __pyx_v_fn = values[0]; + __pyx_v_args = ((PyObject*)values[1]); + __pyx_v_kwargs = ((PyObject*)values[2]); + __pyx_v_injections = ((PyObject*)values[3]); + __pyx_v_closings = ((PyObject*)values[4]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("_async_inject", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 42, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("dependency_injector._cwiring._async_inject", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(0, 42, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(0, 42, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_injections), (&PyDict_Type), 1, "injections", 1))) __PYX_ERR(0, 42, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_closings), (&PyDict_Type), 1, "closings", 1))) __PYX_ERR(0, 42, __pyx_L1_error) + __pyx_r = __pyx_pf_19dependency_injector_8_cwiring_2_async_inject(__pyx_self, __pyx_v_fn, __pyx_v_args, __pyx_v_kwargs, __pyx_v_injections, __pyx_v_closings); /* function exit code */ - __Pyx_XDECREF(__pyx_v_args); - __Pyx_XDECREF(__pyx_v_kwargs); + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_gb_19dependency_injector_8_cwiring_18_get_async_patched_8_patched_2generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ +static PyObject *__pyx_gb_19dependency_injector_8_cwiring_13_async_inject_2generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "dependency_injector/_cwiring.pyx":56 +/* "dependency_injector/_cwiring.pyx":62 * - * if to_inject_await: - * async_to_inject = await asyncio.gather(*(provide for _, provide in to_inject_await)) # <<<<<<<<<<<<<< - * for provide, (injection, _) in zip(async_to_inject, to_inject_await): - * to_inject[injection] = provide + * if to_inject_await: + * async_to_inject = await asyncio.gather(*(provide for _, provide in to_inject_await)) # <<<<<<<<<<<<<< + * for provide, (injection, _) in zip(async_to_inject, to_inject_await): + * to_inject[injection] = provide */ -static PyObject *__pyx_pf_19dependency_injector_8_cwiring_18_get_async_patched_8_patched_genexpr(PyObject *__pyx_self) { - struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_3_genexpr *__pyx_cur_scope; +static PyObject *__pyx_pf_19dependency_injector_8_cwiring_13_async_inject_genexpr(PyObject *__pyx_self) { + struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_2_genexpr *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("genexpr", 0); - __pyx_cur_scope = (struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_3_genexpr *)__pyx_tp_new_19dependency_injector_8_cwiring___pyx_scope_struct_3_genexpr(__pyx_ptype_19dependency_injector_8_cwiring___pyx_scope_struct_3_genexpr, __pyx_empty_tuple, NULL); + __pyx_cur_scope = (struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_2_genexpr *)__pyx_tp_new_19dependency_injector_8_cwiring___pyx_scope_struct_2_genexpr(__pyx_ptype_19dependency_injector_8_cwiring___pyx_scope_struct_2_genexpr, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { - __pyx_cur_scope = ((struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_3_genexpr *)Py_None); + __pyx_cur_scope = ((struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_2_genexpr *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 56, __pyx_L1_error) + __PYX_ERR(0, 62, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } - __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_2__patched *) __pyx_self; + __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_1__async_inject *) __pyx_self; __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope)); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_19dependency_injector_8_cwiring_18_get_async_patched_8_patched_2generator1, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_get_async_patched_locals__patch, __pyx_n_s_dependency_injector__cwiring); if (unlikely(!gen)) __PYX_ERR(0, 56, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_19dependency_injector_8_cwiring_13_async_inject_2generator1, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_async_inject_locals_genexpr, __pyx_n_s_dependency_injector__cwiring); if (unlikely(!gen)) __PYX_ERR(0, 62, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -2433,7 +4164,7 @@ static PyObject *__pyx_pf_19dependency_injector_8_cwiring_18_get_async_patched_8 /* function exit code */ __pyx_L1_error:; - __Pyx_AddTraceback("dependency_injector._cwiring._get_async_patched._patched.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("dependency_injector._cwiring._async_inject.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); __Pyx_XGIVEREF(__pyx_r); @@ -2441,9 +4172,9 @@ static PyObject *__pyx_pf_19dependency_injector_8_cwiring_18_get_async_patched_8 return __pyx_r; } -static PyObject *__pyx_gb_19dependency_injector_8_cwiring_18_get_async_patched_8_patched_2generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */ +static PyObject *__pyx_gb_19dependency_injector_8_cwiring_13_async_inject_2generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */ { - struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_3_genexpr *__pyx_cur_scope = ((struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_3_genexpr *)__pyx_generator->closure); + struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_2_genexpr *__pyx_cur_scope = ((struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_2_genexpr *)__pyx_generator->closure); PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; @@ -2465,19 +4196,19 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_18_get_async_patched_8 return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 56, __pyx_L1_error) - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_to_inject_await)) { __Pyx_RaiseClosureNameError("to_inject_await"); __PYX_ERR(0, 56, __pyx_L1_error) } + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 62, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_to_inject_await)) { __Pyx_RaiseClosureNameError("to_inject_await"); __PYX_ERR(0, 62, __pyx_L1_error) } if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_to_inject_await == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 56, __pyx_L1_error) + __PYX_ERR(0, 62, __pyx_L1_error) } __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_to_inject_await; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; for (;;) { if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 56, __pyx_L1_error) + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 62, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 56, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 62, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) { @@ -2486,7 +4217,7 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_18_get_async_patched_8 if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 56, __pyx_L1_error) + __PYX_ERR(0, 62, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -2499,15 +4230,15 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_18_get_async_patched_8 __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); #else - __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 56, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 62, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 56, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 62, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { Py_ssize_t index = -1; - __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 56, __pyx_L1_error) + __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 62, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext; @@ -2515,7 +4246,7 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_18_get_async_patched_8 __Pyx_GOTREF(__pyx_t_4); index = 1; __pyx_t_5 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_5)) goto __pyx_L6_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(0, 56, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(0, 62, __pyx_L1_error) __pyx_t_7 = NULL; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L7_unpacking_done; @@ -2523,7 +4254,7 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_18_get_async_patched_8 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 56, __pyx_L1_error) + __PYX_ERR(0, 62, __pyx_L1_error) __pyx_L7_unpacking_done:; } __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v__); @@ -2550,7 +4281,7 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_18_get_async_patched_8 __pyx_cur_scope->__pyx_t_0 = 0; __Pyx_XGOTREF(__pyx_t_1); __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 56, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 62, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); @@ -2576,42 +4307,48 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_18_get_async_patched_8 return __pyx_r; } -/* "dependency_injector/_cwiring.pyx":40 - * def _get_async_patched(fn): - * @functools.wraps(fn) - * async def _patched(*args, **kwargs): # <<<<<<<<<<<<<< - * cdef object result - * cdef dict to_inject +/* "dependency_injector/_cwiring.pyx":42 + * + * + * async def _async_inject(object fn, tuple args, dict kwargs, dict injections, dict closings): # <<<<<<<<<<<<<< + * cdef object result + * cdef dict to_inject */ -static PyObject *__pyx_pf_19dependency_injector_8_cwiring_18_get_async_patched__patched(PyObject *__pyx_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { - struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_2__patched *__pyx_cur_scope; - PyObject *__pyx_gb_19dependency_injector_8_cwiring_18_get_async_patched_8_patched_2generator1 = 0; +static PyObject *__pyx_pf_19dependency_injector_8_cwiring_2_async_inject(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_fn, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs, PyObject *__pyx_v_injections, PyObject *__pyx_v_closings) { + struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_1__async_inject *__pyx_cur_scope; + PyObject *__pyx_gb_19dependency_injector_8_cwiring_13_async_inject_2generator1 = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("_patched", 0); - __pyx_cur_scope = (struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_2__patched *)__pyx_tp_new_19dependency_injector_8_cwiring___pyx_scope_struct_2__patched(__pyx_ptype_19dependency_injector_8_cwiring___pyx_scope_struct_2__patched, __pyx_empty_tuple, NULL); + __Pyx_RefNannySetupContext("_async_inject", 0); + __pyx_cur_scope = (struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_1__async_inject *)__pyx_tp_new_19dependency_injector_8_cwiring___pyx_scope_struct_1__async_inject(__pyx_ptype_19dependency_injector_8_cwiring___pyx_scope_struct_1__async_inject, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { - __pyx_cur_scope = ((struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_2__patched *)Py_None); + __pyx_cur_scope = ((struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_1__async_inject *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 40, __pyx_L1_error) + __PYX_ERR(0, 42, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } - __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_1__get_async_patched *) __Pyx_CyFunction_GetClosure(__pyx_self); - __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope)); - __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope); + __pyx_cur_scope->__pyx_v_fn = __pyx_v_fn; + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_fn); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_fn); __pyx_cur_scope->__pyx_v_args = __pyx_v_args; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_args); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_args); __pyx_cur_scope->__pyx_v_kwargs = __pyx_v_kwargs; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_kwargs); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_kwargs); + __pyx_cur_scope->__pyx_v_injections = __pyx_v_injections; + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_injections); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_injections); + __pyx_cur_scope->__pyx_v_closings = __pyx_v_closings; + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_closings); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_closings); { - __pyx_CoroutineObject *gen = __Pyx_Coroutine_New((__pyx_coroutine_body_t) __pyx_gb_19dependency_injector_8_cwiring_18_get_async_patched_2generator, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_patched, __pyx_n_s_get_async_patched_locals__patch_2, __pyx_n_s_dependency_injector__cwiring); if (unlikely(!gen)) __PYX_ERR(0, 40, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Coroutine_New((__pyx_coroutine_body_t) __pyx_gb_19dependency_injector_8_cwiring_4generator, __pyx_codeobj__3, (PyObject *) __pyx_cur_scope, __pyx_n_s_async_inject, __pyx_n_s_async_inject, __pyx_n_s_dependency_injector__cwiring); if (unlikely(!gen)) __PYX_ERR(0, 42, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -2619,24 +4356,24 @@ static PyObject *__pyx_pf_19dependency_injector_8_cwiring_18_get_async_patched__ /* function exit code */ __pyx_L1_error:; - __Pyx_AddTraceback("dependency_injector._cwiring._get_async_patched._patched", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("dependency_injector._cwiring._async_inject", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; - __Pyx_XDECREF(__pyx_gb_19dependency_injector_8_cwiring_18_get_async_patched_8_patched_2generator1); + __Pyx_XDECREF(__pyx_gb_19dependency_injector_8_cwiring_13_async_inject_2generator1); __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_gb_19dependency_injector_8_cwiring_18_get_async_patched_2generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */ +static PyObject *__pyx_gb_19dependency_injector_8_cwiring_4generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */ { - struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_2__patched *__pyx_cur_scope = ((struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_2__patched *)__pyx_generator->closure); + struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_1__async_inject *__pyx_cur_scope = ((struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_1__async_inject *)__pyx_generator->closure); PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; - Py_ssize_t __pyx_t_4; - PyObject *(*__pyx_t_5)(PyObject *); + Py_ssize_t __pyx_t_3; + PyObject *(*__pyx_t_4)(PyObject *); + PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *(*__pyx_t_8)(PyObject *); @@ -2650,7 +4387,7 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_18_get_async_patched_2 const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("_patched", 0); + __Pyx_RefNannySetupContext("_async_inject", 0); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L13_resume_from_await; @@ -2661,110 +4398,99 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_18_get_async_patched_2 return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 40, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 42, __pyx_L1_error) - /* "dependency_injector/_cwiring.pyx":43 - * cdef object result - * cdef dict to_inject - * cdef list to_inject_await = [] # <<<<<<<<<<<<<< - * cdef list to_close_await = [] - * + /* "dependency_injector/_cwiring.pyx":45 + * cdef object result + * cdef dict to_inject + * cdef list to_inject_await = [] # <<<<<<<<<<<<<< + * cdef list to_close_await = [] + * cdef object arg_key */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 43, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_v_to_inject_await = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/_cwiring.pyx":44 - * cdef dict to_inject - * cdef list to_inject_await = [] - * cdef list to_close_await = [] # <<<<<<<<<<<<<< - * - * to_inject = kwargs.copy() + /* "dependency_injector/_cwiring.pyx":46 + * cdef dict to_inject + * cdef list to_inject_await = [] + * cdef list to_close_await = [] # <<<<<<<<<<<<<< + * cdef object arg_key + * cdef Provider provider */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 44, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 46, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_v_to_close_await = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/_cwiring.pyx":46 - * cdef list to_close_await = [] + /* "dependency_injector/_cwiring.pyx":50 + * cdef Provider provider * - * to_inject = kwargs.copy() # <<<<<<<<<<<<<< - * for injection, provider in _patched.__injections__.items(): - * if injection not in kwargs or isinstance(kwargs[injection], _Marker): + * to_inject = kwargs.copy() # <<<<<<<<<<<<<< + * for arg_key, provider in injections.items(): + * if arg_key not in kwargs or isinstance(kwargs[arg_key], _Marker): */ - __pyx_t_1 = PyDict_Copy(__pyx_cur_scope->__pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 46, __pyx_L1_error) + if (unlikely(__pyx_cur_scope->__pyx_v_kwargs == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "copy"); + __PYX_ERR(0, 50, __pyx_L1_error) + } + __pyx_t_1 = PyDict_Copy(__pyx_cur_scope->__pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 50, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_v_to_inject = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/_cwiring.pyx":47 + /* "dependency_injector/_cwiring.pyx":51 * - * to_inject = kwargs.copy() - * for injection, provider in _patched.__injections__.items(): # <<<<<<<<<<<<<< - * if injection not in kwargs or isinstance(kwargs[injection], _Marker): - * provide = provider() + * to_inject = kwargs.copy() + * for arg_key, provider in injections.items(): # <<<<<<<<<<<<<< + * if arg_key not in kwargs or isinstance(kwargs[arg_key], _Marker): + * provide = provider() */ - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v__patched)) { __Pyx_RaiseClosureNameError("_patched"); __PYX_ERR(0, 47, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v__patched, __pyx_n_s_injections); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 47, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_items); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 47, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { - __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); - if (likely(__pyx_t_2)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); - __Pyx_INCREF(__pyx_t_2); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_3, function); - } + if (unlikely(__pyx_cur_scope->__pyx_v_injections == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); + __PYX_ERR(0, 51, __pyx_L1_error) } - __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 47, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_Items(__pyx_cur_scope->__pyx_v_injections); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 51, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { - __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0; - __pyx_t_5 = NULL; + __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; + __pyx_t_4 = NULL; } else { - __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 47, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 47, __pyx_L1_error) + __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 51, __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(0, 51, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { - if (likely(!__pyx_t_5)) { - if (likely(PyList_CheckExact(__pyx_t_3))) { - if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break; + if (likely(!__pyx_t_4)) { + 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_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 47, __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(0, 51, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 47, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 51, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { - if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break; + 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_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 47, __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(0, 51, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 47, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 51, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } } else { - __pyx_t_1 = __pyx_t_5(__pyx_t_3); + __pyx_t_1 = __pyx_t_4(__pyx_t_2); if (unlikely(!__pyx_t_1)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 47, __pyx_L1_error) + else __PYX_ERR(0, 51, __pyx_L1_error) } break; } @@ -2776,36 +4502,36 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_18_get_async_patched_2 if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 47, __pyx_L1_error) + __PYX_ERR(0, 51, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { - __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); } else { - __pyx_t_2 = PyList_GET_ITEM(sequence, 0); + __pyx_t_5 = PyList_GET_ITEM(sequence, 0); __pyx_t_6 = PyList_GET_ITEM(sequence, 1); } - __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); #else - __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 47, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 47, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 51, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 51, __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(0, 47, __pyx_L1_error) + __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 51, __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; - index = 0; __pyx_t_2 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_2)) goto __pyx_L6_unpacking_failed; - __Pyx_GOTREF(__pyx_t_2); + index = 0; __pyx_t_5 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_5)) goto __pyx_L6_unpacking_failed; + __Pyx_GOTREF(__pyx_t_5); index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L6_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 47, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 51, __pyx_L1_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L7_unpacking_done; @@ -2813,37 +4539,46 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_18_get_async_patched_2 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 47, __pyx_L1_error) + __PYX_ERR(0, 51, __pyx_L1_error) __pyx_L7_unpacking_done:; } - __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_injection); - __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_injection, __pyx_t_2); - __Pyx_GIVEREF(__pyx_t_2); - __pyx_t_2 = 0; - __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_provider); - __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_provider, __pyx_t_6); + if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(0, 51, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_arg_key); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_arg_key, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + __pyx_t_5 = 0; + __Pyx_XGOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_provider)); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_provider, ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_t_6)); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; - /* "dependency_injector/_cwiring.pyx":48 - * to_inject = kwargs.copy() - * for injection, provider in _patched.__injections__.items(): - * if injection not in kwargs or isinstance(kwargs[injection], _Marker): # <<<<<<<<<<<<<< - * provide = provider() - * if _isawaitable(provide): + /* "dependency_injector/_cwiring.pyx":52 + * to_inject = kwargs.copy() + * for arg_key, provider in injections.items(): + * if arg_key not in kwargs or isinstance(kwargs[arg_key], _Marker): # <<<<<<<<<<<<<< + * provide = provider() + * if provider.is_async_mode_enabled(): */ - __pyx_t_10 = (__Pyx_PyDict_ContainsTF(__pyx_cur_scope->__pyx_v_injection, __pyx_cur_scope->__pyx_v_kwargs, Py_NE)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 48, __pyx_L1_error) + if (unlikely(__pyx_cur_scope->__pyx_v_kwargs == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); + __PYX_ERR(0, 52, __pyx_L1_error) + } + __pyx_t_10 = (__Pyx_PyDict_ContainsTF(__pyx_cur_scope->__pyx_v_arg_key, __pyx_cur_scope->__pyx_v_kwargs, Py_NE)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 52, __pyx_L1_error) __pyx_t_11 = (__pyx_t_10 != 0); if (!__pyx_t_11) { } else { __pyx_t_9 = __pyx_t_11; goto __pyx_L9_bool_binop_done; } - __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_cur_scope->__pyx_v_kwargs, __pyx_cur_scope->__pyx_v_injection); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 48, __pyx_L1_error) + if (unlikely(__pyx_cur_scope->__pyx_v_kwargs == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 52, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_cur_scope->__pyx_v_kwargs, __pyx_cur_scope->__pyx_v_arg_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 52, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_Marker); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 48, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_Marker); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 52, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_11 = PyObject_IsInstance(__pyx_t_1, __pyx_t_6); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 48, __pyx_L1_error) + __pyx_t_11 = PyObject_IsInstance(__pyx_t_1, __pyx_t_6); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 52, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_10 = (__pyx_t_11 != 0); @@ -2851,27 +4586,27 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_18_get_async_patched_2 __pyx_L9_bool_binop_done:; if (__pyx_t_9) { - /* "dependency_injector/_cwiring.pyx":49 - * for injection, provider in _patched.__injections__.items(): - * if injection not in kwargs or isinstance(kwargs[injection], _Marker): - * provide = provider() # <<<<<<<<<<<<<< - * if _isawaitable(provide): - * to_inject_await.append((injection, provide)) + /* "dependency_injector/_cwiring.pyx":53 + * for arg_key, provider in injections.items(): + * if arg_key not in kwargs or isinstance(kwargs[arg_key], _Marker): + * provide = provider() # <<<<<<<<<<<<<< + * if provider.is_async_mode_enabled(): + * to_inject_await.append((arg_key, provide)) */ - __Pyx_INCREF(__pyx_cur_scope->__pyx_v_provider); - __pyx_t_1 = __pyx_cur_scope->__pyx_v_provider; __pyx_t_2 = NULL; + __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_provider)); + __pyx_t_1 = ((PyObject *)__pyx_cur_scope->__pyx_v_provider); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { - __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1); - if (likely(__pyx_t_2)) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); - __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } - __pyx_t_6 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 49, __pyx_L1_error) + __pyx_t_6 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 53, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_provide); @@ -2879,112 +4614,150 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_18_get_async_patched_2 __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; - /* "dependency_injector/_cwiring.pyx":50 - * if injection not in kwargs or isinstance(kwargs[injection], _Marker): - * provide = provider() - * if _isawaitable(provide): # <<<<<<<<<<<<<< - * to_inject_await.append((injection, provide)) - * else: + /* "dependency_injector/_cwiring.pyx":54 + * if arg_key not in kwargs or isinstance(kwargs[arg_key], _Marker): + * provide = provider() + * if provider.is_async_mode_enabled(): # <<<<<<<<<<<<<< + * to_inject_await.append((arg_key, provide)) + * elif _isawaitable(provide): */ - __pyx_t_9 = (__pyx_f_19dependency_injector_8_cwiring__isawaitable(__pyx_cur_scope->__pyx_v_provide) != 0); + __pyx_t_9 = (((struct __pyx_vtabstruct_19dependency_injector_9providers_Provider *)__pyx_cur_scope->__pyx_v_provider->__pyx_vtab)->is_async_mode_enabled(__pyx_cur_scope->__pyx_v_provider, 0) != 0); if (__pyx_t_9) { - /* "dependency_injector/_cwiring.pyx":51 - * provide = provider() - * if _isawaitable(provide): - * to_inject_await.append((injection, provide)) # <<<<<<<<<<<<<< - * else: - * to_inject[injection] = provide + /* "dependency_injector/_cwiring.pyx":55 + * provide = provider() + * if provider.is_async_mode_enabled(): + * to_inject_await.append((arg_key, provide)) # <<<<<<<<<<<<<< + * elif _isawaitable(provide): + * to_inject_await.append((arg_key, provide)) */ - __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 51, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 55, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __Pyx_INCREF(__pyx_cur_scope->__pyx_v_injection); - __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_injection); - PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_cur_scope->__pyx_v_injection); + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_arg_key); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_arg_key); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_cur_scope->__pyx_v_arg_key); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_provide); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_provide); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_cur_scope->__pyx_v_provide); - __pyx_t_12 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_to_inject_await, __pyx_t_6); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 51, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_to_inject_await, __pyx_t_6); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 55, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "dependency_injector/_cwiring.pyx":50 - * if injection not in kwargs or isinstance(kwargs[injection], _Marker): - * provide = provider() - * if _isawaitable(provide): # <<<<<<<<<<<<<< - * to_inject_await.append((injection, provide)) - * else: + /* "dependency_injector/_cwiring.pyx":54 + * if arg_key not in kwargs or isinstance(kwargs[arg_key], _Marker): + * provide = provider() + * if provider.is_async_mode_enabled(): # <<<<<<<<<<<<<< + * to_inject_await.append((arg_key, provide)) + * elif _isawaitable(provide): */ goto __pyx_L11; } - /* "dependency_injector/_cwiring.pyx":53 - * to_inject_await.append((injection, provide)) - * else: - * to_inject[injection] = provide # <<<<<<<<<<<<<< + /* "dependency_injector/_cwiring.pyx":56 + * if provider.is_async_mode_enabled(): + * to_inject_await.append((arg_key, provide)) + * elif _isawaitable(provide): # <<<<<<<<<<<<<< + * to_inject_await.append((arg_key, provide)) + * else: + */ + __pyx_t_9 = (__pyx_f_19dependency_injector_8_cwiring__isawaitable(__pyx_cur_scope->__pyx_v_provide) != 0); + if (__pyx_t_9) { + + /* "dependency_injector/_cwiring.pyx":57 + * to_inject_await.append((arg_key, provide)) + * elif _isawaitable(provide): + * to_inject_await.append((arg_key, provide)) # <<<<<<<<<<<<<< + * else: + * to_inject[arg_key] = provide + */ + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 57, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_arg_key); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_arg_key); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_cur_scope->__pyx_v_arg_key); + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_provide); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_provide); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_cur_scope->__pyx_v_provide); + __pyx_t_12 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_to_inject_await, __pyx_t_6); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 57, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "dependency_injector/_cwiring.pyx":56 + * if provider.is_async_mode_enabled(): + * to_inject_await.append((arg_key, provide)) + * elif _isawaitable(provide): # <<<<<<<<<<<<<< + * to_inject_await.append((arg_key, provide)) + * else: + */ + goto __pyx_L11; + } + + /* "dependency_injector/_cwiring.pyx":59 + * to_inject_await.append((arg_key, provide)) + * else: + * to_inject[arg_key] = provide # <<<<<<<<<<<<<< * - * if to_inject_await: + * if to_inject_await: */ /*else*/ { if (unlikely(__pyx_cur_scope->__pyx_v_to_inject == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 53, __pyx_L1_error) + __PYX_ERR(0, 59, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__pyx_cur_scope->__pyx_v_to_inject, __pyx_cur_scope->__pyx_v_injection, __pyx_cur_scope->__pyx_v_provide) < 0)) __PYX_ERR(0, 53, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_cur_scope->__pyx_v_to_inject, __pyx_cur_scope->__pyx_v_arg_key, __pyx_cur_scope->__pyx_v_provide) < 0)) __PYX_ERR(0, 59, __pyx_L1_error) } __pyx_L11:; - /* "dependency_injector/_cwiring.pyx":48 - * to_inject = kwargs.copy() - * for injection, provider in _patched.__injections__.items(): - * if injection not in kwargs or isinstance(kwargs[injection], _Marker): # <<<<<<<<<<<<<< - * provide = provider() - * if _isawaitable(provide): + /* "dependency_injector/_cwiring.pyx":52 + * to_inject = kwargs.copy() + * for arg_key, provider in injections.items(): + * if arg_key not in kwargs or isinstance(kwargs[arg_key], _Marker): # <<<<<<<<<<<<<< + * provide = provider() + * if provider.is_async_mode_enabled(): */ } - /* "dependency_injector/_cwiring.pyx":47 + /* "dependency_injector/_cwiring.pyx":51 * - * to_inject = kwargs.copy() - * for injection, provider in _patched.__injections__.items(): # <<<<<<<<<<<<<< - * if injection not in kwargs or isinstance(kwargs[injection], _Marker): - * provide = provider() + * to_inject = kwargs.copy() + * for arg_key, provider in injections.items(): # <<<<<<<<<<<<<< + * if arg_key not in kwargs or isinstance(kwargs[arg_key], _Marker): + * provide = provider() */ } - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/_cwiring.pyx":55 - * to_inject[injection] = provide + /* "dependency_injector/_cwiring.pyx":61 + * to_inject[arg_key] = provide * - * if to_inject_await: # <<<<<<<<<<<<<< - * async_to_inject = await asyncio.gather(*(provide for _, provide in to_inject_await)) - * for provide, (injection, _) in zip(async_to_inject, to_inject_await): + * if to_inject_await: # <<<<<<<<<<<<<< + * async_to_inject = await asyncio.gather(*(provide for _, provide in to_inject_await)) + * for provide, (injection, _) in zip(async_to_inject, to_inject_await): */ __pyx_t_9 = (PyList_GET_SIZE(__pyx_cur_scope->__pyx_v_to_inject_await) != 0); if (__pyx_t_9) { - /* "dependency_injector/_cwiring.pyx":56 + /* "dependency_injector/_cwiring.pyx":62 * - * if to_inject_await: - * async_to_inject = await asyncio.gather(*(provide for _, provide in to_inject_await)) # <<<<<<<<<<<<<< - * for provide, (injection, _) in zip(async_to_inject, to_inject_await): - * to_inject[injection] = provide + * if to_inject_await: + * async_to_inject = await asyncio.gather(*(provide for _, provide in to_inject_await)) # <<<<<<<<<<<<<< + * for provide, (injection, _) in zip(async_to_inject, to_inject_await): + * to_inject[injection] = provide */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 56, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_gather); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 56, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 62, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_gather); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 62, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __pyx_pf_19dependency_injector_8_cwiring_18_get_async_patched_8_patched_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 56, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_PySequence_Tuple(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 56, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __pyx_pf_19dependency_injector_8_cwiring_13_async_inject_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 62, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PySequence_Tuple(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 62, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 56, __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_6, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 62, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_t_3); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XGOTREF(__pyx_r); if (likely(__pyx_r)) { __Pyx_XGIVEREF(__pyx_r); @@ -2994,323 +4767,65 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_18_get_async_patched_2 __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L13_resume_from_await:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 56, __pyx_L1_error) - __pyx_t_3 = __pyx_sent_value; __Pyx_INCREF(__pyx_t_3); + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 62, __pyx_L1_error) + __pyx_t_2 = __pyx_sent_value; __Pyx_INCREF(__pyx_t_2); } else { - __pyx_t_3 = NULL; - if (__Pyx_PyGen_FetchStopIterationValue(&__pyx_t_3) < 0) __PYX_ERR(0, 56, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = NULL; + if (__Pyx_PyGen_FetchStopIterationValue(&__pyx_t_2) < 0) __PYX_ERR(0, 62, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); } - __Pyx_GIVEREF(__pyx_t_3); - __pyx_cur_scope->__pyx_v_async_to_inject = __pyx_t_3; - __pyx_t_3 = 0; - - /* "dependency_injector/_cwiring.pyx":57 - * if to_inject_await: - * async_to_inject = await asyncio.gather(*(provide for _, provide in to_inject_await)) - * for provide, (injection, _) in zip(async_to_inject, to_inject_await): # <<<<<<<<<<<<<< - * to_inject[injection] = provide - * - */ - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 57, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_INCREF(__pyx_cur_scope->__pyx_v_async_to_inject); - __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_async_to_inject); - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_cur_scope->__pyx_v_async_to_inject); - __Pyx_INCREF(__pyx_cur_scope->__pyx_v_to_inject_await); - __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_to_inject_await); - PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_cur_scope->__pyx_v_to_inject_await); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 57, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { - __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0; - __pyx_t_5 = NULL; - } else { - __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 57, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 57, __pyx_L1_error) - } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - for (;;) { - if (likely(!__pyx_t_5)) { - if (likely(PyList_CheckExact(__pyx_t_3))) { - if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break; - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 57, __pyx_L1_error) - #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 57, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - #endif - } else { - if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break; - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 57, __pyx_L1_error) - #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 57, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - #endif - } - } else { - __pyx_t_1 = __pyx_t_5(__pyx_t_3); - if (unlikely(!__pyx_t_1)) { - PyObject* exc_type = PyErr_Occurred(); - if (exc_type) { - if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 57, __pyx_L1_error) - } - break; - } - __Pyx_GOTREF(__pyx_t_1); - } - if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { - PyObject* sequence = __pyx_t_1; - Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); - if (unlikely(size != 2)) { - if (size > 2) __Pyx_RaiseTooManyValuesError(2); - else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 57, __pyx_L1_error) - } - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - if (likely(PyTuple_CheckExact(sequence))) { - __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); - __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); - } else { - __pyx_t_6 = PyList_GET_ITEM(sequence, 0); - __pyx_t_2 = PyList_GET_ITEM(sequence, 1); - } - __Pyx_INCREF(__pyx_t_6); - __Pyx_INCREF(__pyx_t_2); - #else - __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 57, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 57, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - #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(0, 57, __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; - index = 0; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L16_unpacking_failed; - __Pyx_GOTREF(__pyx_t_6); - index = 1; __pyx_t_2 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_2)) goto __pyx_L16_unpacking_failed; - __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 57, __pyx_L1_error) - __pyx_t_8 = NULL; - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - goto __pyx_L17_unpacking_done; - __pyx_L16_unpacking_failed:; - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_8 = NULL; - if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 57, __pyx_L1_error) - __pyx_L17_unpacking_done:; - } - __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_provide); - __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_provide, __pyx_t_6); - __Pyx_GIVEREF(__pyx_t_6); - __pyx_t_6 = 0; - if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { - PyObject* sequence = __pyx_t_2; - Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); - if (unlikely(size != 2)) { - if (size > 2) __Pyx_RaiseTooManyValuesError(2); - else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 57, __pyx_L1_error) - } - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - if (likely(PyTuple_CheckExact(sequence))) { - __pyx_t_7 = PyTuple_GET_ITEM(sequence, 0); - __pyx_t_13 = PyTuple_GET_ITEM(sequence, 1); - } else { - __pyx_t_7 = PyList_GET_ITEM(sequence, 0); - __pyx_t_13 = PyList_GET_ITEM(sequence, 1); - } - __Pyx_INCREF(__pyx_t_7); - __Pyx_INCREF(__pyx_t_13); - #else - __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 57, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_13 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 57, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_13); - #endif - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - } else { - Py_ssize_t index = -1; - __pyx_t_14 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 57, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_14); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_8 = Py_TYPE(__pyx_t_14)->tp_iternext; - index = 0; __pyx_t_7 = __pyx_t_8(__pyx_t_14); if (unlikely(!__pyx_t_7)) goto __pyx_L18_unpacking_failed; - __Pyx_GOTREF(__pyx_t_7); - index = 1; __pyx_t_13 = __pyx_t_8(__pyx_t_14); if (unlikely(!__pyx_t_13)) goto __pyx_L18_unpacking_failed; - __Pyx_GOTREF(__pyx_t_13); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_14), 2) < 0) __PYX_ERR(0, 57, __pyx_L1_error) - __pyx_t_8 = NULL; - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - goto __pyx_L19_unpacking_done; - __pyx_L18_unpacking_failed:; - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - __pyx_t_8 = NULL; - if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 57, __pyx_L1_error) - __pyx_L19_unpacking_done:; - } - __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_injection); - __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_injection, __pyx_t_7); - __Pyx_GIVEREF(__pyx_t_7); - __pyx_t_7 = 0; - __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v__); - __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v__, __pyx_t_13); - __Pyx_GIVEREF(__pyx_t_13); - __pyx_t_13 = 0; - - /* "dependency_injector/_cwiring.pyx":58 - * async_to_inject = await asyncio.gather(*(provide for _, provide in to_inject_await)) - * for provide, (injection, _) in zip(async_to_inject, to_inject_await): - * to_inject[injection] = provide # <<<<<<<<<<<<<< - * - * result = await fn(*args, **to_inject) - */ - if (unlikely(__pyx_cur_scope->__pyx_v_to_inject == Py_None)) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 58, __pyx_L1_error) - } - if (unlikely(PyDict_SetItem(__pyx_cur_scope->__pyx_v_to_inject, __pyx_cur_scope->__pyx_v_injection, __pyx_cur_scope->__pyx_v_provide) < 0)) __PYX_ERR(0, 58, __pyx_L1_error) - - /* "dependency_injector/_cwiring.pyx":57 - * if to_inject_await: - * async_to_inject = await asyncio.gather(*(provide for _, provide in to_inject_await)) - * for provide, (injection, _) in zip(async_to_inject, to_inject_await): # <<<<<<<<<<<<<< - * to_inject[injection] = provide - * - */ - } - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "dependency_injector/_cwiring.pyx":55 - * to_inject[injection] = provide - * - * if to_inject_await: # <<<<<<<<<<<<<< - * async_to_inject = await asyncio.gather(*(provide for _, provide in to_inject_await)) - * for provide, (injection, _) in zip(async_to_inject, to_inject_await): - */ - } - - /* "dependency_injector/_cwiring.pyx":60 - * to_inject[injection] = provide - * - * result = await fn(*args, **to_inject) # <<<<<<<<<<<<<< - * - * if _patched.__closing__: - */ - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_fn)) { __Pyx_RaiseClosureNameError("fn"); __PYX_ERR(0, 60, __pyx_L1_error) } - if (unlikely(__pyx_cur_scope->__pyx_v_to_inject == Py_None)) { - PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); - __PYX_ERR(0, 60, __pyx_L1_error) - } - __pyx_t_3 = PyDict_Copy(__pyx_cur_scope->__pyx_v_to_inject); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 60, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_fn, __pyx_cur_scope->__pyx_v_args, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 60, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_t_1); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_XGOTREF(__pyx_r); - if (likely(__pyx_r)) { - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - __Pyx_Coroutine_ResetAndClearException(__pyx_generator); - /* return from generator, awaiting value */ - __pyx_generator->resume_label = 2; - return __pyx_r; - __pyx_L20_resume_from_await:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 60, __pyx_L1_error) - __pyx_t_1 = __pyx_sent_value; __Pyx_INCREF(__pyx_t_1); - } else { - __pyx_t_1 = NULL; - if (__Pyx_PyGen_FetchStopIterationValue(&__pyx_t_1) < 0) __PYX_ERR(0, 60, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - } - __Pyx_GIVEREF(__pyx_t_1); - __pyx_cur_scope->__pyx_v_result = __pyx_t_1; - __pyx_t_1 = 0; - - /* "dependency_injector/_cwiring.pyx":62 - * result = await fn(*args, **to_inject) - * - * if _patched.__closing__: # <<<<<<<<<<<<<< - * for injection, provider in _patched.__closing__.items(): - * if injection in kwargs \ - */ - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v__patched)) { __Pyx_RaiseClosureNameError("_patched"); __PYX_ERR(0, 62, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v__patched, __pyx_n_s_closing); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 62, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 62, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (__pyx_t_9) { + __Pyx_GIVEREF(__pyx_t_2); + __pyx_cur_scope->__pyx_v_async_to_inject = __pyx_t_2; + __pyx_t_2 = 0; /* "dependency_injector/_cwiring.pyx":63 + * if to_inject_await: + * async_to_inject = await asyncio.gather(*(provide for _, provide in to_inject_await)) + * for provide, (injection, _) in zip(async_to_inject, to_inject_await): # <<<<<<<<<<<<<< + * to_inject[injection] = provide * - * if _patched.__closing__: - * for injection, provider in _patched.__closing__.items(): # <<<<<<<<<<<<<< - * if injection in kwargs \ - * and isinstance(kwargs[injection], _Marker): */ - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v__patched)) { __Pyx_RaiseClosureNameError("_patched"); __PYX_ERR(0, 63, __pyx_L1_error) } - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v__patched, __pyx_n_s_closing); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 63, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_items); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 63, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 63, __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); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_2, function); - } - } - __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 63, __pyx_L1_error) + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_async_to_inject); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_async_to_inject); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_cur_scope->__pyx_v_async_to_inject); + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_to_inject_await); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_to_inject_await); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_cur_scope->__pyx_v_to_inject_await); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 63, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; 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_4 = 0; - __pyx_t_5 = NULL; + __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; + __pyx_t_4 = NULL; } else { - __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 63, __pyx_L1_error) + __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 63, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 63, __pyx_L1_error) + __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 63, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { - if (likely(!__pyx_t_5)) { + if (likely(!__pyx_t_4)) { if (likely(PyList_CheckExact(__pyx_t_2))) { - if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break; + 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_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 63, __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(0, 63, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 63, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 63, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { - if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break; + 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_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 63, __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(0, 63, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 63, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 63, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } } else { - __pyx_t_1 = __pyx_t_5(__pyx_t_2); + __pyx_t_1 = __pyx_t_4(__pyx_t_2); if (unlikely(!__pyx_t_1)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { @@ -3331,32 +4846,274 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_18_get_async_patched_2 } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { - __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); + } else { + __pyx_t_6 = PyList_GET_ITEM(sequence, 0); + __pyx_t_5 = PyList_GET_ITEM(sequence, 1); + } + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(__pyx_t_5); + #else + __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 63, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 63, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #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(0, 63, __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; + index = 0; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L16_unpacking_failed; + __Pyx_GOTREF(__pyx_t_6); + index = 1; __pyx_t_5 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_5)) goto __pyx_L16_unpacking_failed; + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 63, __pyx_L1_error) + __pyx_t_8 = NULL; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + goto __pyx_L17_unpacking_done; + __pyx_L16_unpacking_failed:; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_8 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 63, __pyx_L1_error) + __pyx_L17_unpacking_done:; + } + __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_provide); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_provide, __pyx_t_6); + __Pyx_GIVEREF(__pyx_t_6); + __pyx_t_6 = 0; + if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) { + PyObject* sequence = __pyx_t_5; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 63, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_7 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_13 = PyTuple_GET_ITEM(sequence, 1); + } else { + __pyx_t_7 = PyList_GET_ITEM(sequence, 0); + __pyx_t_13 = PyList_GET_ITEM(sequence, 1); + } + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(__pyx_t_13); + #else + __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 63, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_13 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 63, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + #endif + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_14 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 63, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_8 = Py_TYPE(__pyx_t_14)->tp_iternext; + index = 0; __pyx_t_7 = __pyx_t_8(__pyx_t_14); if (unlikely(!__pyx_t_7)) goto __pyx_L18_unpacking_failed; + __Pyx_GOTREF(__pyx_t_7); + index = 1; __pyx_t_13 = __pyx_t_8(__pyx_t_14); if (unlikely(!__pyx_t_13)) goto __pyx_L18_unpacking_failed; + __Pyx_GOTREF(__pyx_t_13); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_14), 2) < 0) __PYX_ERR(0, 63, __pyx_L1_error) + __pyx_t_8 = NULL; + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + goto __pyx_L19_unpacking_done; + __pyx_L18_unpacking_failed:; + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __pyx_t_8 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 63, __pyx_L1_error) + __pyx_L19_unpacking_done:; + } + __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_injection); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_injection, __pyx_t_7); + __Pyx_GIVEREF(__pyx_t_7); + __pyx_t_7 = 0; + __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v__); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v__, __pyx_t_13); + __Pyx_GIVEREF(__pyx_t_13); + __pyx_t_13 = 0; + + /* "dependency_injector/_cwiring.pyx":64 + * async_to_inject = await asyncio.gather(*(provide for _, provide in to_inject_await)) + * for provide, (injection, _) in zip(async_to_inject, to_inject_await): + * to_inject[injection] = provide # <<<<<<<<<<<<<< + * + * result = await fn(*args, **to_inject) + */ + if (unlikely(__pyx_cur_scope->__pyx_v_to_inject == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 64, __pyx_L1_error) + } + if (unlikely(PyDict_SetItem(__pyx_cur_scope->__pyx_v_to_inject, __pyx_cur_scope->__pyx_v_injection, __pyx_cur_scope->__pyx_v_provide) < 0)) __PYX_ERR(0, 64, __pyx_L1_error) + + /* "dependency_injector/_cwiring.pyx":63 + * if to_inject_await: + * async_to_inject = await asyncio.gather(*(provide for _, provide in to_inject_await)) + * for provide, (injection, _) in zip(async_to_inject, to_inject_await): # <<<<<<<<<<<<<< + * to_inject[injection] = provide + * + */ + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "dependency_injector/_cwiring.pyx":61 + * to_inject[arg_key] = provide + * + * if to_inject_await: # <<<<<<<<<<<<<< + * async_to_inject = await asyncio.gather(*(provide for _, provide in to_inject_await)) + * for provide, (injection, _) in zip(async_to_inject, to_inject_await): + */ + } + + /* "dependency_injector/_cwiring.pyx":66 + * to_inject[injection] = provide + * + * result = await fn(*args, **to_inject) # <<<<<<<<<<<<<< + * + * if closings: + */ + if (unlikely(__pyx_cur_scope->__pyx_v_args == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); + __PYX_ERR(0, 66, __pyx_L1_error) + } + if (unlikely(__pyx_cur_scope->__pyx_v_to_inject == Py_None)) { + PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); + __PYX_ERR(0, 66, __pyx_L1_error) + } + __pyx_t_2 = PyDict_Copy(__pyx_cur_scope->__pyx_v_to_inject); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 66, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_v_fn, __pyx_cur_scope->__pyx_v_args, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 66, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XGOTREF(__pyx_r); + if (likely(__pyx_r)) { + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + /* return from generator, awaiting value */ + __pyx_generator->resume_label = 2; + return __pyx_r; + __pyx_L20_resume_from_await:; + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 66, __pyx_L1_error) + __pyx_t_1 = __pyx_sent_value; __Pyx_INCREF(__pyx_t_1); + } else { + __pyx_t_1 = NULL; + if (__Pyx_PyGen_FetchStopIterationValue(&__pyx_t_1) < 0) __PYX_ERR(0, 66, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_GIVEREF(__pyx_t_1); + __pyx_cur_scope->__pyx_v_result = __pyx_t_1; + __pyx_t_1 = 0; + + /* "dependency_injector/_cwiring.pyx":68 + * result = await fn(*args, **to_inject) + * + * if closings: # <<<<<<<<<<<<<< + * for arg_key, provider in closings.items(): + * if arg_key in kwargs and isinstance(kwargs[arg_key], _Marker): + */ + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_closings); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 68, __pyx_L1_error) + if (__pyx_t_9) { + + /* "dependency_injector/_cwiring.pyx":69 + * + * if closings: + * for arg_key, provider in closings.items(): # <<<<<<<<<<<<<< + * if arg_key in kwargs and isinstance(kwargs[arg_key], _Marker): + * continue + */ + if (unlikely(__pyx_cur_scope->__pyx_v_closings == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); + __PYX_ERR(0, 69, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_PyDict_Items(__pyx_cur_scope->__pyx_v_closings); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 69, __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(0, 69, __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(0, 69, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + for (;;) { + if (likely(!__pyx_t_4)) { + 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(0, 69, __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(0, 69, __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(0, 69, __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(0, 69, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + #endif + } + } else { + __pyx_t_1 = __pyx_t_4(__pyx_t_2); + if (unlikely(!__pyx_t_1)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(0, 69, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_1); + } + if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { + PyObject* sequence = __pyx_t_1; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 69, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); } else { - __pyx_t_3 = PyList_GET_ITEM(sequence, 0); + __pyx_t_5 = PyList_GET_ITEM(sequence, 0); __pyx_t_6 = PyList_GET_ITEM(sequence, 1); } - __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); #else - __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 63, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 63, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 69, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 69, __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_13 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 63, __pyx_L1_error) + __pyx_t_13 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 69, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_8 = Py_TYPE(__pyx_t_13)->tp_iternext; - index = 0; __pyx_t_3 = __pyx_t_8(__pyx_t_13); if (unlikely(!__pyx_t_3)) goto __pyx_L24_unpacking_failed; - __Pyx_GOTREF(__pyx_t_3); + index = 0; __pyx_t_5 = __pyx_t_8(__pyx_t_13); if (unlikely(!__pyx_t_5)) goto __pyx_L24_unpacking_failed; + __Pyx_GOTREF(__pyx_t_5); index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_13); if (unlikely(!__pyx_t_6)) goto __pyx_L24_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_13), 2) < 0) __PYX_ERR(0, 63, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_13), 2) < 0) __PYX_ERR(0, 69, __pyx_L1_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L25_unpacking_done; @@ -3364,135 +5121,128 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_18_get_async_patched_2 __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 63, __pyx_L1_error) + __PYX_ERR(0, 69, __pyx_L1_error) __pyx_L25_unpacking_done:; } - __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_injection); - __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_injection, __pyx_t_3); - __Pyx_GIVEREF(__pyx_t_3); - __pyx_t_3 = 0; - __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_provider); - __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_provider, __pyx_t_6); + if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(0, 69, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_arg_key); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_arg_key, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + __pyx_t_5 = 0; + __Pyx_XGOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_provider)); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_provider, ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_t_6)); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; - /* "dependency_injector/_cwiring.pyx":64 - * if _patched.__closing__: - * for injection, provider in _patched.__closing__.items(): - * if injection in kwargs \ # <<<<<<<<<<<<<< - * and isinstance(kwargs[injection], _Marker): - * continue + /* "dependency_injector/_cwiring.pyx":70 + * if closings: + * for arg_key, provider in closings.items(): + * if arg_key in kwargs and isinstance(kwargs[arg_key], _Marker): # <<<<<<<<<<<<<< + * continue + * if not isinstance(provider, providers.Resource): */ - __pyx_t_10 = (__Pyx_PyDict_ContainsTF(__pyx_cur_scope->__pyx_v_injection, __pyx_cur_scope->__pyx_v_kwargs, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 64, __pyx_L1_error) + if (unlikely(__pyx_cur_scope->__pyx_v_kwargs == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); + __PYX_ERR(0, 70, __pyx_L1_error) + } + __pyx_t_10 = (__Pyx_PyDict_ContainsTF(__pyx_cur_scope->__pyx_v_arg_key, __pyx_cur_scope->__pyx_v_kwargs, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 70, __pyx_L1_error) __pyx_t_11 = (__pyx_t_10 != 0); if (__pyx_t_11) { } else { __pyx_t_9 = __pyx_t_11; goto __pyx_L27_bool_binop_done; } - - /* "dependency_injector/_cwiring.pyx":65 - * for injection, provider in _patched.__closing__.items(): - * if injection in kwargs \ - * and isinstance(kwargs[injection], _Marker): # <<<<<<<<<<<<<< - * continue - * if not isinstance(provider, providers.Resource): - */ - __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_cur_scope->__pyx_v_kwargs, __pyx_cur_scope->__pyx_v_injection); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 65, __pyx_L1_error) + if (unlikely(__pyx_cur_scope->__pyx_v_kwargs == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 70, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_cur_scope->__pyx_v_kwargs, __pyx_cur_scope->__pyx_v_arg_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 70, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_Marker); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 65, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_Marker); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 70, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_11 = PyObject_IsInstance(__pyx_t_1, __pyx_t_6); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 65, __pyx_L1_error) + __pyx_t_11 = PyObject_IsInstance(__pyx_t_1, __pyx_t_6); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 70, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_10 = (__pyx_t_11 != 0); __pyx_t_9 = __pyx_t_10; __pyx_L27_bool_binop_done:; - - /* "dependency_injector/_cwiring.pyx":64 - * if _patched.__closing__: - * for injection, provider in _patched.__closing__.items(): - * if injection in kwargs \ # <<<<<<<<<<<<<< - * and isinstance(kwargs[injection], _Marker): - * continue - */ if (__pyx_t_9) { - /* "dependency_injector/_cwiring.pyx":66 - * if injection in kwargs \ - * and isinstance(kwargs[injection], _Marker): - * continue # <<<<<<<<<<<<<< - * if not isinstance(provider, providers.Resource): - * continue + /* "dependency_injector/_cwiring.pyx":71 + * for arg_key, provider in closings.items(): + * if arg_key in kwargs and isinstance(kwargs[arg_key], _Marker): + * continue # <<<<<<<<<<<<<< + * if not isinstance(provider, providers.Resource): + * continue */ goto __pyx_L22_continue; - /* "dependency_injector/_cwiring.pyx":64 - * if _patched.__closing__: - * for injection, provider in _patched.__closing__.items(): - * if injection in kwargs \ # <<<<<<<<<<<<<< - * and isinstance(kwargs[injection], _Marker): - * continue + /* "dependency_injector/_cwiring.pyx":70 + * if closings: + * for arg_key, provider in closings.items(): + * if arg_key in kwargs and isinstance(kwargs[arg_key], _Marker): # <<<<<<<<<<<<<< + * continue + * if not isinstance(provider, providers.Resource): */ } - /* "dependency_injector/_cwiring.pyx":67 - * and isinstance(kwargs[injection], _Marker): - * continue - * if not isinstance(provider, providers.Resource): # <<<<<<<<<<<<<< - * continue - * shutdown = provider.shutdown() + /* "dependency_injector/_cwiring.pyx":72 + * if arg_key in kwargs and isinstance(kwargs[arg_key], _Marker): + * continue + * if not isinstance(provider, providers.Resource): # <<<<<<<<<<<<<< + * continue + * shutdown = provider.shutdown() */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_providers); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 67, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_providers); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 72, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_Resource); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 67, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_Resource); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 72, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_9 = PyObject_IsInstance(__pyx_cur_scope->__pyx_v_provider, __pyx_t_1); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 67, __pyx_L1_error) + __pyx_t_9 = PyObject_IsInstance(((PyObject *)__pyx_cur_scope->__pyx_v_provider), __pyx_t_1); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 72, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_10 = ((!(__pyx_t_9 != 0)) != 0); if (__pyx_t_10) { - /* "dependency_injector/_cwiring.pyx":68 - * continue - * if not isinstance(provider, providers.Resource): - * continue # <<<<<<<<<<<<<< - * shutdown = provider.shutdown() - * if _isawaitable(shutdown): + /* "dependency_injector/_cwiring.pyx":73 + * continue + * if not isinstance(provider, providers.Resource): + * continue # <<<<<<<<<<<<<< + * shutdown = provider.shutdown() + * if _isawaitable(shutdown): */ goto __pyx_L22_continue; - /* "dependency_injector/_cwiring.pyx":67 - * and isinstance(kwargs[injection], _Marker): - * continue - * if not isinstance(provider, providers.Resource): # <<<<<<<<<<<<<< - * continue - * shutdown = provider.shutdown() + /* "dependency_injector/_cwiring.pyx":72 + * if arg_key in kwargs and isinstance(kwargs[arg_key], _Marker): + * continue + * if not isinstance(provider, providers.Resource): # <<<<<<<<<<<<<< + * continue + * shutdown = provider.shutdown() */ } - /* "dependency_injector/_cwiring.pyx":69 - * if not isinstance(provider, providers.Resource): - * continue - * shutdown = provider.shutdown() # <<<<<<<<<<<<<< - * if _isawaitable(shutdown): - * to_close_await.append(shutdown) + /* "dependency_injector/_cwiring.pyx":74 + * if not isinstance(provider, providers.Resource): + * continue + * shutdown = provider.shutdown() # <<<<<<<<<<<<<< + * if _isawaitable(shutdown): + * to_close_await.append(shutdown) */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_provider, __pyx_n_s_shutdown); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 69, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_provider), __pyx_n_s_shutdown); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_3 = NULL; + __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { - __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6); - if (likely(__pyx_t_3)) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); - __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); } } - __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_6); - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 69, __pyx_L1_error) + __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_shutdown); @@ -3500,60 +5250,60 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_18_get_async_patched_2 __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/_cwiring.pyx":70 - * continue - * shutdown = provider.shutdown() - * if _isawaitable(shutdown): # <<<<<<<<<<<<<< - * to_close_await.append(shutdown) + /* "dependency_injector/_cwiring.pyx":75 + * continue + * shutdown = provider.shutdown() + * if _isawaitable(shutdown): # <<<<<<<<<<<<<< + * to_close_await.append(shutdown) * */ __pyx_t_10 = (__pyx_f_19dependency_injector_8_cwiring__isawaitable(__pyx_cur_scope->__pyx_v_shutdown) != 0); if (__pyx_t_10) { - /* "dependency_injector/_cwiring.pyx":71 - * shutdown = provider.shutdown() - * if _isawaitable(shutdown): - * to_close_await.append(shutdown) # <<<<<<<<<<<<<< + /* "dependency_injector/_cwiring.pyx":76 + * shutdown = provider.shutdown() + * if _isawaitable(shutdown): + * to_close_await.append(shutdown) # <<<<<<<<<<<<<< * - * await asyncio.gather(*to_close_await) + * await asyncio.gather(*to_close_await) */ - __pyx_t_12 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_to_close_await, __pyx_cur_scope->__pyx_v_shutdown); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 71, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_to_close_await, __pyx_cur_scope->__pyx_v_shutdown); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 76, __pyx_L1_error) - /* "dependency_injector/_cwiring.pyx":70 - * continue - * shutdown = provider.shutdown() - * if _isawaitable(shutdown): # <<<<<<<<<<<<<< - * to_close_await.append(shutdown) + /* "dependency_injector/_cwiring.pyx":75 + * continue + * shutdown = provider.shutdown() + * if _isawaitable(shutdown): # <<<<<<<<<<<<<< + * to_close_await.append(shutdown) * */ } - /* "dependency_injector/_cwiring.pyx":63 + /* "dependency_injector/_cwiring.pyx":69 * - * if _patched.__closing__: - * for injection, provider in _patched.__closing__.items(): # <<<<<<<<<<<<<< - * if injection in kwargs \ - * and isinstance(kwargs[injection], _Marker): + * if closings: + * for arg_key, provider in closings.items(): # <<<<<<<<<<<<<< + * if arg_key in kwargs and isinstance(kwargs[arg_key], _Marker): + * continue */ __pyx_L22_continue:; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/_cwiring.pyx":73 - * to_close_await.append(shutdown) + /* "dependency_injector/_cwiring.pyx":78 + * to_close_await.append(shutdown) * - * await asyncio.gather(*to_close_await) # <<<<<<<<<<<<<< + * await asyncio.gather(*to_close_await) # <<<<<<<<<<<<<< * - * return result + * return result */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 73, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 78, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_gather); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_gather); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 78, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PySequence_Tuple(__pyx_cur_scope->__pyx_v_to_close_await); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_2 = PySequence_Tuple(__pyx_cur_scope->__pyx_v_to_close_await); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 78, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 78, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -3568,54 +5318,54 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_18_get_async_patched_2 __pyx_generator->resume_label = 3; return __pyx_r; __pyx_L31_resume_from_await:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 73, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 78, __pyx_L1_error) } else { PyObject* exc_type = __Pyx_PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || (exc_type != PyExc_GeneratorExit && __Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))) PyErr_Clear(); - else __PYX_ERR(0, 73, __pyx_L1_error) + else __PYX_ERR(0, 78, __pyx_L1_error) } } - /* "dependency_injector/_cwiring.pyx":62 - * result = await fn(*args, **to_inject) + /* "dependency_injector/_cwiring.pyx":68 + * result = await fn(*args, **to_inject) * - * if _patched.__closing__: # <<<<<<<<<<<<<< - * for injection, provider in _patched.__closing__.items(): - * if injection in kwargs \ + * if closings: # <<<<<<<<<<<<<< + * for arg_key, provider in closings.items(): + * if arg_key in kwargs and isinstance(kwargs[arg_key], _Marker): */ } - /* "dependency_injector/_cwiring.pyx":75 - * await asyncio.gather(*to_close_await) + /* "dependency_injector/_cwiring.pyx":80 + * await asyncio.gather(*to_close_await) + * + * return result # <<<<<<<<<<<<<< * - * return result # <<<<<<<<<<<<<< * - * # Hotfix for iscoroutinefunction() for Cython < 3.0.0; can be removed after migration to Cython 3.0.0+ */ __Pyx_XDECREF(__pyx_r); __pyx_r = NULL; __Pyx_ReturnWithStopIteration(__pyx_cur_scope->__pyx_v_result); goto __pyx_L0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - /* "dependency_injector/_cwiring.pyx":40 - * def _get_async_patched(fn): - * @functools.wraps(fn) - * async def _patched(*args, **kwargs): # <<<<<<<<<<<<<< - * cdef object result - * cdef dict to_inject + /* "dependency_injector/_cwiring.pyx":42 + * + * + * async def _async_inject(object fn, tuple args, dict kwargs, dict injections, dict closings): # <<<<<<<<<<<<<< + * cdef object result + * cdef dict to_inject */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_13); __Pyx_XDECREF(__pyx_t_14); - __Pyx_AddTraceback("_patched", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("_async_inject", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XDECREF(__pyx_r); __pyx_r = 0; #if !CYTHON_USE_EXC_INFO_STACK @@ -3627,150 +5377,6 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_18_get_async_patched_2 return __pyx_r; } -/* "dependency_injector/_cwiring.pyx":38 - * - * - * def _get_async_patched(fn): # <<<<<<<<<<<<<< - * @functools.wraps(fn) - * async def _patched(*args, **kwargs): - */ - -static PyObject *__pyx_pf_19dependency_injector_8_cwiring_2_get_async_patched(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_fn) { - struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_1__get_async_patched *__pyx_cur_scope; - PyObject *__pyx_gb_19dependency_injector_8_cwiring_18_get_async_patched_2generator = 0; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("_get_async_patched", 0); - __pyx_cur_scope = (struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_1__get_async_patched *)__pyx_tp_new_19dependency_injector_8_cwiring___pyx_scope_struct_1__get_async_patched(__pyx_ptype_19dependency_injector_8_cwiring___pyx_scope_struct_1__get_async_patched, __pyx_empty_tuple, NULL); - if (unlikely(!__pyx_cur_scope)) { - __pyx_cur_scope = ((struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_1__get_async_patched *)Py_None); - __Pyx_INCREF(Py_None); - __PYX_ERR(0, 38, __pyx_L1_error) - } else { - __Pyx_GOTREF(__pyx_cur_scope); - } - __pyx_cur_scope->__pyx_v_fn = __pyx_v_fn; - __Pyx_INCREF(__pyx_cur_scope->__pyx_v_fn); - __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_fn); - - /* "dependency_injector/_cwiring.pyx":39 - * - * def _get_async_patched(fn): - * @functools.wraps(fn) # <<<<<<<<<<<<<< - * async def _patched(*args, **kwargs): - * cdef object result - */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_functools); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 39, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_wraps); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 39, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = NULL; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_3)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_3); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_4, function); - } - } - __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_cur_scope->__pyx_v_fn) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_cur_scope->__pyx_v_fn); - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 39, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - - /* "dependency_injector/_cwiring.pyx":40 - * def _get_async_patched(fn): - * @functools.wraps(fn) - * async def _patched(*args, **kwargs): # <<<<<<<<<<<<<< - * cdef object result - * cdef dict to_inject - */ - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_19dependency_injector_8_cwiring_18_get_async_patched_1_patched, 0, __pyx_n_s_get_async_patched_locals__patch_2, ((PyObject*)__pyx_cur_scope), __pyx_n_s_dependency_injector__cwiring, __pyx_d, ((PyObject *)__pyx_codeobj__5)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 40, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = NULL; - if (CYTHON_UNPACK_METHODS && unlikely(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); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_2, function); - } - } - __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 39, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_GIVEREF(__pyx_t_1); - __pyx_cur_scope->__pyx_v__patched = __pyx_t_1; - __pyx_t_1 = 0; - - /* "dependency_injector/_cwiring.pyx":78 - * - * # Hotfix for iscoroutinefunction() for Cython < 3.0.0; can be removed after migration to Cython 3.0.0+ - * _patched._is_coroutine = asyncio.coroutines._is_coroutine # <<<<<<<<<<<<<< - * - * return _patched - */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 78, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_coroutines); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 78, __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_is_coroutine); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 78, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (__Pyx_PyObject_SetAttrStr(__pyx_cur_scope->__pyx_v__patched, __pyx_n_s_is_coroutine, __pyx_t_1) < 0) __PYX_ERR(0, 78, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "dependency_injector/_cwiring.pyx":80 - * _patched._is_coroutine = asyncio.coroutines._is_coroutine - * - * return _patched # <<<<<<<<<<<<<< - * - * - */ - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_cur_scope->__pyx_v__patched); - __pyx_r = __pyx_cur_scope->__pyx_v__patched; - goto __pyx_L0; - - /* "dependency_injector/_cwiring.pyx":38 - * - * - * def _get_async_patched(fn): # <<<<<<<<<<<<<< - * @functools.wraps(fn) - * async def _patched(*args, **kwargs): - */ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); - __Pyx_AddTraceback("dependency_injector._cwiring._get_async_patched", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XDECREF(__pyx_gb_19dependency_injector_8_cwiring_18_get_async_patched_2generator); - __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - /* "dependency_injector/_cwiring.pyx":83 * * @@ -3904,6 +5510,5818 @@ static int __pyx_f_19dependency_injector_8_cwiring__isawaitable(PyObject *__pyx_ return __pyx_r; } +/* "providers.pxd":357 + * + * # Inline helper functions + * cdef inline object __get_name(NamedInjection self): # <<<<<<<<<<<<<< + * return self.__name + * + */ + +static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___get_name(struct __pyx_obj_19dependency_injector_9providers_NamedInjection *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get_name", 0); + + /* "providers.pxd":358 + * # Inline helper functions + * cdef inline object __get_name(NamedInjection self): + * return self.__name # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->__pyx___name); + __pyx_r = __pyx_v_self->__pyx___name; + goto __pyx_L0; + + /* "providers.pxd":357 + * + * # Inline helper functions + * cdef inline object __get_name(NamedInjection self): # <<<<<<<<<<<<<< + * return self.__name + * + */ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "providers.pxd":361 + * + * + * cdef inline object __get_value(Injection self): # <<<<<<<<<<<<<< + * if self.__call == 0: + * return self.__value + */ + +static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___get_value(struct __pyx_obj_19dependency_injector_9providers_Injection *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get_value", 0); + + /* "providers.pxd":362 + * + * cdef inline object __get_value(Injection self): + * if self.__call == 0: # <<<<<<<<<<<<<< + * return self.__value + * return self.__value() + */ + __pyx_t_1 = ((__pyx_v_self->__pyx___call == 0) != 0); + if (__pyx_t_1) { + + /* "providers.pxd":363 + * cdef inline object __get_value(Injection self): + * if self.__call == 0: + * return self.__value # <<<<<<<<<<<<<< + * return self.__value() + * + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->__pyx___value); + __pyx_r = __pyx_v_self->__pyx___value; + goto __pyx_L0; + + /* "providers.pxd":362 + * + * cdef inline object __get_value(Injection self): + * if self.__call == 0: # <<<<<<<<<<<<<< + * return self.__value + * return self.__value() + */ + } + + /* "providers.pxd":364 + * if self.__call == 0: + * return self.__value + * return self.__value() # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->__pyx___value); + __pyx_t_3 = __pyx_v_self->__pyx___value; __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 364, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "providers.pxd":361 + * + * + * cdef inline object __get_value(Injection self): # <<<<<<<<<<<<<< + * if self.__call == 0: + * return self.__value + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("dependency_injector.providers.__get_value", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "providers.pxd":367 + * + * + * cdef inline object __get_value_kwargs(Injection self, dict kwargs): # <<<<<<<<<<<<<< + * if self.__call == 0: + * return self.__value + */ + +static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___get_value_kwargs(struct __pyx_obj_19dependency_injector_9providers_Injection *__pyx_v_self, PyObject *__pyx_v_kwargs) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get_value_kwargs", 0); + + /* "providers.pxd":368 + * + * cdef inline object __get_value_kwargs(Injection self, dict kwargs): + * if self.__call == 0: # <<<<<<<<<<<<<< + * return self.__value + * return self.__value(**kwargs) + */ + __pyx_t_1 = ((__pyx_v_self->__pyx___call == 0) != 0); + if (__pyx_t_1) { + + /* "providers.pxd":369 + * cdef inline object __get_value_kwargs(Injection self, dict kwargs): + * if self.__call == 0: + * return self.__value # <<<<<<<<<<<<<< + * return self.__value(**kwargs) + * + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->__pyx___value); + __pyx_r = __pyx_v_self->__pyx___value; + goto __pyx_L0; + + /* "providers.pxd":368 + * + * cdef inline object __get_value_kwargs(Injection self, dict kwargs): + * if self.__call == 0: # <<<<<<<<<<<<<< + * return self.__value + * return self.__value(**kwargs) + */ + } + + /* "providers.pxd":370 + * if self.__call == 0: + * return self.__value + * return self.__value(**kwargs) # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + if (unlikely(__pyx_v_kwargs == Py_None)) { + PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); + __PYX_ERR(1, 370, __pyx_L1_error) + } + __pyx_t_2 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 370, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_v_self->__pyx___value, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 370, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "providers.pxd":367 + * + * + * cdef inline object __get_value_kwargs(Injection self, dict kwargs): # <<<<<<<<<<<<<< + * if self.__call == 0: + * return self.__value + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("dependency_injector.providers.__get_value_kwargs", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "providers.pxd":373 + * + * + * cdef inline tuple __separate_prefixed_kwargs(dict kwargs): # <<<<<<<<<<<<<< + * cdef dict plain_kwargs = {} + * cdef dict prefixed_kwargs = {} + */ + +static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___separate_prefixed_kwargs(PyObject *__pyx_v_kwargs) { + PyObject *__pyx_v_plain_kwargs = 0; + PyObject *__pyx_v_prefixed_kwargs = 0; + PyObject *__pyx_v_key = NULL; + PyObject *__pyx_v_value = NULL; + PyObject *__pyx_v_index = NULL; + PyObject *__pyx_v_prefix = NULL; + PyObject *__pyx_v_name = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + Py_ssize_t __pyx_t_3; + PyObject *(*__pyx_t_4)(PyObject *); + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *(*__pyx_t_8)(PyObject *); + int __pyx_t_9; + int __pyx_t_10; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__separate_prefixed_kwargs", 0); + + /* "providers.pxd":374 + * + * cdef inline tuple __separate_prefixed_kwargs(dict kwargs): + * cdef dict plain_kwargs = {} # <<<<<<<<<<<<<< + * cdef dict prefixed_kwargs = {} + * + */ + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 374, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_plain_kwargs = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "providers.pxd":375 + * cdef inline tuple __separate_prefixed_kwargs(dict kwargs): + * cdef dict plain_kwargs = {} + * cdef dict prefixed_kwargs = {} # <<<<<<<<<<<<<< + * + * for key, value in kwargs.items(): + */ + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 375, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_prefixed_kwargs = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "providers.pxd":377 + * cdef dict prefixed_kwargs = {} + * + * for key, value in kwargs.items(): # <<<<<<<<<<<<<< + * if "__" not in key: + * plain_kwargs[key] = value + */ + if (unlikely(__pyx_v_kwargs == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); + __PYX_ERR(1, 377, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_PyDict_Items(__pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 377, __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, 377, __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, 377, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + for (;;) { + if (likely(!__pyx_t_4)) { + 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, 377, __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, 377, __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, 377, __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, 377, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + #endif + } + } else { + __pyx_t_1 = __pyx_t_4(__pyx_t_2); + if (unlikely(!__pyx_t_1)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(1, 377, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_1); + } + if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { + PyObject* sequence = __pyx_t_1; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(1, 377, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); + } else { + __pyx_t_5 = PyList_GET_ITEM(sequence, 0); + __pyx_t_6 = PyList_GET_ITEM(sequence, 1); + } + __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, 377, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 377, __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, 377, __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; + index = 0; __pyx_t_5 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_5)) goto __pyx_L5_unpacking_failed; + __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, 377, __pyx_L1_error) + __pyx_t_8 = NULL; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + goto __pyx_L6_unpacking_done; + __pyx_L5_unpacking_failed:; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_8 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(1, 377, __pyx_L1_error) + __pyx_L6_unpacking_done:; + } + __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_5); + __pyx_t_5 = 0; + __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_6); + __pyx_t_6 = 0; + + /* "providers.pxd":378 + * + * for key, value in kwargs.items(): + * if "__" not in key: # <<<<<<<<<<<<<< + * plain_kwargs[key] = value + * continue + */ + __pyx_t_9 = (__Pyx_PySequence_ContainsTF(__pyx_n_s__4, __pyx_v_key, Py_NE)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(1, 378, __pyx_L1_error) + __pyx_t_10 = (__pyx_t_9 != 0); + if (__pyx_t_10) { + + /* "providers.pxd":379 + * for key, value in kwargs.items(): + * if "__" not in key: + * plain_kwargs[key] = value # <<<<<<<<<<<<<< + * continue + * + */ + if (unlikely(PyDict_SetItem(__pyx_v_plain_kwargs, __pyx_v_key, __pyx_v_value) < 0)) __PYX_ERR(1, 379, __pyx_L1_error) + + /* "providers.pxd":380 + * if "__" not in key: + * plain_kwargs[key] = value + * continue # <<<<<<<<<<<<<< + * + * index = key.index("__") + */ + goto __pyx_L3_continue; + + /* "providers.pxd":378 + * + * for key, value in kwargs.items(): + * if "__" not in key: # <<<<<<<<<<<<<< + * plain_kwargs[key] = value + * continue + */ + } + + /* "providers.pxd":382 + * continue + * + * index = key.index("__") # <<<<<<<<<<<<<< + * prefix, name = key[:index], key[index+2:] + * + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_key, __pyx_n_s_index); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 382, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_5, __pyx_n_s__4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_n_s__4); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 382, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF_SET(__pyx_v_index, __pyx_t_1); + __pyx_t_1 = 0; + + /* "providers.pxd":383 + * + * index = key.index("__") + * prefix, name = key[:index], key[index+2:] # <<<<<<<<<<<<<< + * + * if prefix not in prefixed_kwargs: + */ + __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_key, 0, 0, NULL, &__pyx_v_index, NULL, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 383, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_v_index, __pyx_int_2, 2, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 383, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_v_key, 0, 0, &__pyx_t_6, NULL, NULL, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 383, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF_SET(__pyx_v_prefix, __pyx_t_1); + __pyx_t_1 = 0; + __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_5); + __pyx_t_5 = 0; + + /* "providers.pxd":385 + * prefix, name = key[:index], key[index+2:] + * + * if prefix not in prefixed_kwargs: # <<<<<<<<<<<<<< + * prefixed_kwargs[prefix] = {} + * prefixed_kwargs[prefix][name] = value + */ + __pyx_t_10 = (__Pyx_PyDict_ContainsTF(__pyx_v_prefix, __pyx_v_prefixed_kwargs, Py_NE)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(1, 385, __pyx_L1_error) + __pyx_t_9 = (__pyx_t_10 != 0); + if (__pyx_t_9) { + + /* "providers.pxd":386 + * + * if prefix not in prefixed_kwargs: + * prefixed_kwargs[prefix] = {} # <<<<<<<<<<<<<< + * prefixed_kwargs[prefix][name] = value + * + */ + __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 386, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (unlikely(PyDict_SetItem(__pyx_v_prefixed_kwargs, __pyx_v_prefix, __pyx_t_5) < 0)) __PYX_ERR(1, 386, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "providers.pxd":385 + * prefix, name = key[:index], key[index+2:] + * + * if prefix not in prefixed_kwargs: # <<<<<<<<<<<<<< + * prefixed_kwargs[prefix] = {} + * prefixed_kwargs[prefix][name] = value + */ + } + + /* "providers.pxd":387 + * if prefix not in prefixed_kwargs: + * prefixed_kwargs[prefix] = {} + * prefixed_kwargs[prefix][name] = value # <<<<<<<<<<<<<< + * + * return plain_kwargs, prefixed_kwargs + */ + __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_prefixed_kwargs, __pyx_v_prefix); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 387, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (unlikely(PyObject_SetItem(__pyx_t_5, __pyx_v_name, __pyx_v_value) < 0)) __PYX_ERR(1, 387, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "providers.pxd":377 + * cdef dict prefixed_kwargs = {} + * + * for key, value in kwargs.items(): # <<<<<<<<<<<<<< + * if "__" not in key: + * plain_kwargs[key] = value + */ + __pyx_L3_continue:; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "providers.pxd":389 + * prefixed_kwargs[prefix][name] = value + * + * return plain_kwargs, prefixed_kwargs # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 389, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_plain_kwargs); + __Pyx_GIVEREF(__pyx_v_plain_kwargs); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_plain_kwargs); + __Pyx_INCREF(__pyx_v_prefixed_kwargs); + __Pyx_GIVEREF(__pyx_v_prefixed_kwargs); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_prefixed_kwargs); + __pyx_r = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "providers.pxd":373 + * + * + * cdef inline tuple __separate_prefixed_kwargs(dict kwargs): # <<<<<<<<<<<<<< + * cdef dict plain_kwargs = {} + * cdef dict prefixed_kwargs = {} + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("dependency_injector.providers.__separate_prefixed_kwargs", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_plain_kwargs); + __Pyx_XDECREF(__pyx_v_prefixed_kwargs); + __Pyx_XDECREF(__pyx_v_key); + __Pyx_XDECREF(__pyx_v_value); + __Pyx_XDECREF(__pyx_v_index); + __Pyx_XDECREF(__pyx_v_prefix); + __Pyx_XDECREF(__pyx_v_name); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "providers.pxd":394 + * @cython.boundscheck(False) + * @cython.wraparound(False) + * cdef inline object __provide_positional_args( # <<<<<<<<<<<<<< + * tuple args, + * tuple inj_args, + */ + +static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provide_positional_args(PyObject *__pyx_v_args, PyObject *__pyx_v_inj_args, int __pyx_v_inj_args_len, int __pyx_v_async_mode) { + int __pyx_v_index; + PyObject *__pyx_v_positional_args = 0; + PyObject *__pyx_v_future_args = 0; + struct __pyx_obj_19dependency_injector_9providers_PositionalInjection *__pyx_v_injection = 0; + PyObject *__pyx_v_value = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + int __pyx_t_4; + int __pyx_t_5; + int __pyx_t_6; + int __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__provide_positional_args", 0); + + /* "providers.pxd":401 + * ): + * cdef int index + * cdef list positional_args = [] # <<<<<<<<<<<<<< + * cdef list future_args = [] + * cdef PositionalInjection injection + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 401, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_positional_args = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "providers.pxd":402 + * cdef int index + * cdef list positional_args = [] + * cdef list future_args = [] # <<<<<<<<<<<<<< + * cdef PositionalInjection injection + * cdef object value + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 402, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_future_args = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "providers.pxd":406 + * cdef object value + * + * if inj_args_len == 0: # <<<<<<<<<<<<<< + * return args + * + */ + __pyx_t_2 = ((__pyx_v_inj_args_len == 0) != 0); + if (__pyx_t_2) { + + /* "providers.pxd":407 + * + * if inj_args_len == 0: + * return args # <<<<<<<<<<<<<< + * + * for index in range(inj_args_len): + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_args); + __pyx_r = __pyx_v_args; + goto __pyx_L0; + + /* "providers.pxd":406 + * cdef object value + * + * if inj_args_len == 0: # <<<<<<<<<<<<<< + * return args + * + */ + } + + /* "providers.pxd":409 + * return args + * + * for index in range(inj_args_len): # <<<<<<<<<<<<<< + * injection = inj_args[index] + * value = __get_value(injection) + */ + __pyx_t_3 = __pyx_v_inj_args_len; + __pyx_t_4 = __pyx_t_3; + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { + __pyx_v_index = __pyx_t_5; + + /* "providers.pxd":410 + * + * for index in range(inj_args_len): + * injection = inj_args[index] # <<<<<<<<<<<<<< + * value = __get_value(injection) + * positional_args.append(value) + */ + if (unlikely(__pyx_v_inj_args == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(1, 410, __pyx_L1_error) + } + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_v_inj_args, __pyx_v_index); + __Pyx_INCREF(__pyx_t_1); + __Pyx_XDECREF_SET(__pyx_v_injection, ((struct __pyx_obj_19dependency_injector_9providers_PositionalInjection *)__pyx_t_1)); + __pyx_t_1 = 0; + + /* "providers.pxd":411 + * for index in range(inj_args_len): + * injection = inj_args[index] + * value = __get_value(injection) # <<<<<<<<<<<<<< + * positional_args.append(value) + * + */ + __pyx_t_1 = __pyx_f_19dependency_injector_9providers___get_value(((struct __pyx_obj_19dependency_injector_9providers_Injection *)__pyx_v_injection)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 411, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_1); + __pyx_t_1 = 0; + + /* "providers.pxd":412 + * injection = inj_args[index] + * value = __get_value(injection) + * positional_args.append(value) # <<<<<<<<<<<<<< + * + * if async_mode != ASYNC_MODE_DISABLED and __is_future_or_coroutine(value): + */ + __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_positional_args, __pyx_v_value); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 412, __pyx_L1_error) + + /* "providers.pxd":414 + * positional_args.append(value) + * + * if async_mode != ASYNC_MODE_DISABLED and __is_future_or_coroutine(value): # <<<<<<<<<<<<<< + * future_args.append((index, value)) + * + */ + __pyx_t_7 = ((__pyx_v_async_mode != __pyx_v_19dependency_injector_9providers_ASYNC_MODE_DISABLED) != 0); + if (__pyx_t_7) { + } else { + __pyx_t_2 = __pyx_t_7; + goto __pyx_L7_bool_binop_done; + } + __pyx_t_7 = (__pyx_f_19dependency_injector_9providers___is_future_or_coroutine(__pyx_v_value) != 0); + __pyx_t_2 = __pyx_t_7; + __pyx_L7_bool_binop_done:; + if (__pyx_t_2) { + + /* "providers.pxd":415 + * + * if async_mode != ASYNC_MODE_DISABLED and __is_future_or_coroutine(value): + * future_args.append((index, value)) # <<<<<<<<<<<<<< + * + * positional_args.extend(args) + */ + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 415, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 415, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1); + __Pyx_INCREF(__pyx_v_value); + __Pyx_GIVEREF(__pyx_v_value); + PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_value); + __pyx_t_1 = 0; + __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_future_args, __pyx_t_8); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 415, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "providers.pxd":414 + * positional_args.append(value) + * + * if async_mode != ASYNC_MODE_DISABLED and __is_future_or_coroutine(value): # <<<<<<<<<<<<<< + * future_args.append((index, value)) + * + */ + } + } + + /* "providers.pxd":417 + * future_args.append((index, value)) + * + * positional_args.extend(args) # <<<<<<<<<<<<<< + * + * if future_args: + */ + __pyx_t_6 = __Pyx_PyList_Extend(__pyx_v_positional_args, __pyx_v_args); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 417, __pyx_L1_error) + + /* "providers.pxd":419 + * positional_args.extend(args) + * + * if future_args: # <<<<<<<<<<<<<< + * return __combine_future_injections(positional_args, future_args) + * + */ + __pyx_t_2 = (PyList_GET_SIZE(__pyx_v_future_args) != 0); + if (__pyx_t_2) { + + /* "providers.pxd":420 + * + * if future_args: + * return __combine_future_injections(positional_args, future_args) # <<<<<<<<<<<<<< + * + * return positional_args + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_8 = __pyx_f_19dependency_injector_9providers___combine_future_injections(__pyx_v_positional_args, __pyx_v_future_args); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 420, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_r = __pyx_t_8; + __pyx_t_8 = 0; + goto __pyx_L0; + + /* "providers.pxd":419 + * positional_args.extend(args) + * + * if future_args: # <<<<<<<<<<<<<< + * return __combine_future_injections(positional_args, future_args) + * + */ + } + + /* "providers.pxd":422 + * return __combine_future_injections(positional_args, future_args) + * + * return positional_args # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_positional_args); + __pyx_r = __pyx_v_positional_args; + goto __pyx_L0; + + /* "providers.pxd":394 + * @cython.boundscheck(False) + * @cython.wraparound(False) + * cdef inline object __provide_positional_args( # <<<<<<<<<<<<<< + * tuple args, + * tuple inj_args, + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("dependency_injector.providers.__provide_positional_args", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_positional_args); + __Pyx_XDECREF(__pyx_v_future_args); + __Pyx_XDECREF((PyObject *)__pyx_v_injection); + __Pyx_XDECREF(__pyx_v_value); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "providers.pxd":427 + * @cython.boundscheck(False) + * @cython.wraparound(False) + * cdef inline object __provide_keyword_args( # <<<<<<<<<<<<<< + * dict kwargs, + * tuple inj_kwargs, + */ + +static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provide_keyword_args(PyObject *__pyx_v_kwargs, PyObject *__pyx_v_inj_kwargs, int __pyx_v_inj_kwargs_len, int __pyx_v_async_mode) { + int __pyx_v_index; + PyObject *__pyx_v_name = 0; + PyObject *__pyx_v_value = 0; + PyObject *__pyx_v_prefixed = 0; + PyObject *__pyx_v_future_kwargs = 0; + struct __pyx_obj_19dependency_injector_9providers_NamedInjection *__pyx_v_kw_injection = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + Py_ssize_t __pyx_t_2; + int __pyx_t_3; + int __pyx_t_4; + int __pyx_t_5; + int __pyx_t_6; + int __pyx_t_7; + int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__provide_keyword_args", 0); + __Pyx_INCREF(__pyx_v_kwargs); + + /* "providers.pxd":436 + * cdef object name + * cdef object value + * cdef dict prefixed = {} # <<<<<<<<<<<<<< + * cdef list future_kwargs = [] + * cdef NamedInjection kw_injection + */ + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 436, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_prefixed = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "providers.pxd":437 + * cdef object value + * cdef dict prefixed = {} + * cdef list future_kwargs = [] # <<<<<<<<<<<<<< + * cdef NamedInjection kw_injection + * + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 437, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_future_kwargs = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "providers.pxd":440 + * cdef NamedInjection kw_injection + * + * if len(kwargs) == 0: # <<<<<<<<<<<<<< + * for index in range(inj_kwargs_len): + * kw_injection = inj_kwargs[index] + */ + if (unlikely(__pyx_v_kwargs == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(1, 440, __pyx_L1_error) + } + __pyx_t_2 = PyDict_Size(__pyx_v_kwargs); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 440, __pyx_L1_error) + __pyx_t_3 = ((__pyx_t_2 == 0) != 0); + if (__pyx_t_3) { + + /* "providers.pxd":441 + * + * if len(kwargs) == 0: + * for index in range(inj_kwargs_len): # <<<<<<<<<<<<<< + * kw_injection = inj_kwargs[index] + * name = __get_name(kw_injection) + */ + __pyx_t_4 = __pyx_v_inj_kwargs_len; + __pyx_t_5 = __pyx_t_4; + for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { + __pyx_v_index = __pyx_t_6; + + /* "providers.pxd":442 + * if len(kwargs) == 0: + * for index in range(inj_kwargs_len): + * kw_injection = inj_kwargs[index] # <<<<<<<<<<<<<< + * name = __get_name(kw_injection) + * value = __get_value(kw_injection) + */ + if (unlikely(__pyx_v_inj_kwargs == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(1, 442, __pyx_L1_error) + } + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_v_inj_kwargs, __pyx_v_index); + __Pyx_INCREF(__pyx_t_1); + __Pyx_XDECREF_SET(__pyx_v_kw_injection, ((struct __pyx_obj_19dependency_injector_9providers_NamedInjection *)__pyx_t_1)); + __pyx_t_1 = 0; + + /* "providers.pxd":443 + * for index in range(inj_kwargs_len): + * kw_injection = inj_kwargs[index] + * name = __get_name(kw_injection) # <<<<<<<<<<<<<< + * value = __get_value(kw_injection) + * kwargs[name] = value + */ + __pyx_t_1 = __pyx_f_19dependency_injector_9providers___get_name(__pyx_v_kw_injection); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 443, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_1); + __pyx_t_1 = 0; + + /* "providers.pxd":444 + * kw_injection = inj_kwargs[index] + * name = __get_name(kw_injection) + * value = __get_value(kw_injection) # <<<<<<<<<<<<<< + * kwargs[name] = value + * if async_mode != ASYNC_MODE_DISABLED and __is_future_or_coroutine(value): + */ + __pyx_t_1 = __pyx_f_19dependency_injector_9providers___get_value(((struct __pyx_obj_19dependency_injector_9providers_Injection *)__pyx_v_kw_injection)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 444, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_1); + __pyx_t_1 = 0; + + /* "providers.pxd":445 + * name = __get_name(kw_injection) + * value = __get_value(kw_injection) + * kwargs[name] = value # <<<<<<<<<<<<<< + * if async_mode != ASYNC_MODE_DISABLED and __is_future_or_coroutine(value): + * future_kwargs.append((name, value)) + */ + if (unlikely(__pyx_v_kwargs == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(1, 445, __pyx_L1_error) + } + if (unlikely(PyDict_SetItem(__pyx_v_kwargs, __pyx_v_name, __pyx_v_value) < 0)) __PYX_ERR(1, 445, __pyx_L1_error) + + /* "providers.pxd":446 + * value = __get_value(kw_injection) + * kwargs[name] = value + * if async_mode != ASYNC_MODE_DISABLED and __is_future_or_coroutine(value): # <<<<<<<<<<<<<< + * future_kwargs.append((name, value)) + * else: + */ + __pyx_t_7 = ((__pyx_v_async_mode != __pyx_v_19dependency_injector_9providers_ASYNC_MODE_DISABLED) != 0); + if (__pyx_t_7) { + } else { + __pyx_t_3 = __pyx_t_7; + goto __pyx_L7_bool_binop_done; + } + __pyx_t_7 = (__pyx_f_19dependency_injector_9providers___is_future_or_coroutine(__pyx_v_value) != 0); + __pyx_t_3 = __pyx_t_7; + __pyx_L7_bool_binop_done:; + if (__pyx_t_3) { + + /* "providers.pxd":447 + * kwargs[name] = value + * if async_mode != ASYNC_MODE_DISABLED and __is_future_or_coroutine(value): + * future_kwargs.append((name, value)) # <<<<<<<<<<<<<< + * else: + * kwargs, prefixed = __separate_prefixed_kwargs(kwargs) + */ + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 447, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_name); + __Pyx_GIVEREF(__pyx_v_name); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_name); + __Pyx_INCREF(__pyx_v_value); + __Pyx_GIVEREF(__pyx_v_value); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_value); + __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_future_kwargs, __pyx_t_1); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(1, 447, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "providers.pxd":446 + * value = __get_value(kw_injection) + * kwargs[name] = value + * if async_mode != ASYNC_MODE_DISABLED and __is_future_or_coroutine(value): # <<<<<<<<<<<<<< + * future_kwargs.append((name, value)) + * else: + */ + } + } + + /* "providers.pxd":440 + * cdef NamedInjection kw_injection + * + * if len(kwargs) == 0: # <<<<<<<<<<<<<< + * for index in range(inj_kwargs_len): + * kw_injection = inj_kwargs[index] + */ + goto __pyx_L3; + } + + /* "providers.pxd":449 + * future_kwargs.append((name, value)) + * else: + * kwargs, prefixed = __separate_prefixed_kwargs(kwargs) # <<<<<<<<<<<<<< + * + * + */ + /*else*/ { + __pyx_t_1 = __pyx_f_19dependency_injector_9providers___separate_prefixed_kwargs(__pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 449, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (likely(__pyx_t_1 != Py_None)) { + PyObject* sequence = __pyx_t_1; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(1, 449, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_9 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_10 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(__pyx_t_10); + #else + __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 449, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 449, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } else { + __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(1, 449, __pyx_L1_error) + } + if (!(likely(PyDict_CheckExact(__pyx_t_9))||((__pyx_t_9) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_9)->tp_name), 0))) __PYX_ERR(1, 449, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_t_10))||((__pyx_t_10) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_10)->tp_name), 0))) __PYX_ERR(1, 449, __pyx_L1_error) + __Pyx_DECREF_SET(__pyx_v_kwargs, ((PyObject*)__pyx_t_9)); + __pyx_t_9 = 0; + __Pyx_DECREF_SET(__pyx_v_prefixed, ((PyObject*)__pyx_t_10)); + __pyx_t_10 = 0; + + /* "providers.pxd":452 + * + * + * for index in range(inj_kwargs_len): # <<<<<<<<<<<<<< + * kw_injection = inj_kwargs[index] + * name = __get_name(kw_injection) + */ + __pyx_t_4 = __pyx_v_inj_kwargs_len; + __pyx_t_5 = __pyx_t_4; + for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { + __pyx_v_index = __pyx_t_6; + + /* "providers.pxd":453 + * + * for index in range(inj_kwargs_len): + * kw_injection = inj_kwargs[index] # <<<<<<<<<<<<<< + * name = __get_name(kw_injection) + * + */ + if (unlikely(__pyx_v_inj_kwargs == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(1, 453, __pyx_L1_error) + } + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_v_inj_kwargs, __pyx_v_index); + __Pyx_INCREF(__pyx_t_1); + __Pyx_XDECREF_SET(__pyx_v_kw_injection, ((struct __pyx_obj_19dependency_injector_9providers_NamedInjection *)__pyx_t_1)); + __pyx_t_1 = 0; + + /* "providers.pxd":454 + * for index in range(inj_kwargs_len): + * kw_injection = inj_kwargs[index] + * name = __get_name(kw_injection) # <<<<<<<<<<<<<< + * + * if name in kwargs: + */ + __pyx_t_1 = __pyx_f_19dependency_injector_9providers___get_name(__pyx_v_kw_injection); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 454, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_1); + __pyx_t_1 = 0; + + /* "providers.pxd":456 + * name = __get_name(kw_injection) + * + * if name in kwargs: # <<<<<<<<<<<<<< + * continue + * + */ + if (unlikely(__pyx_v_kwargs == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); + __PYX_ERR(1, 456, __pyx_L1_error) + } + __pyx_t_3 = (__Pyx_PyDict_ContainsTF(__pyx_v_name, __pyx_v_kwargs, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 456, __pyx_L1_error) + __pyx_t_7 = (__pyx_t_3 != 0); + if (__pyx_t_7) { + + /* "providers.pxd":457 + * + * if name in kwargs: + * continue # <<<<<<<<<<<<<< + * + * if name in prefixed: + */ + goto __pyx_L9_continue; + + /* "providers.pxd":456 + * name = __get_name(kw_injection) + * + * if name in kwargs: # <<<<<<<<<<<<<< + * continue + * + */ + } + + /* "providers.pxd":459 + * continue + * + * if name in prefixed: # <<<<<<<<<<<<<< + * value = __get_value_kwargs(kw_injection, prefixed[name]) + * else: + */ + if (unlikely(__pyx_v_prefixed == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); + __PYX_ERR(1, 459, __pyx_L1_error) + } + __pyx_t_7 = (__Pyx_PyDict_ContainsTF(__pyx_v_name, __pyx_v_prefixed, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(1, 459, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_7 != 0); + if (__pyx_t_3) { + + /* "providers.pxd":460 + * + * if name in prefixed: + * value = __get_value_kwargs(kw_injection, prefixed[name]) # <<<<<<<<<<<<<< + * else: + * value = __get_value(kw_injection) + */ + if (unlikely(__pyx_v_prefixed == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(1, 460, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_prefixed, __pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 460, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(1, 460, __pyx_L1_error) + __pyx_t_10 = __pyx_f_19dependency_injector_9providers___get_value_kwargs(((struct __pyx_obj_19dependency_injector_9providers_Injection *)__pyx_v_kw_injection), ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 460, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_10); + __pyx_t_10 = 0; + + /* "providers.pxd":459 + * continue + * + * if name in prefixed: # <<<<<<<<<<<<<< + * value = __get_value_kwargs(kw_injection, prefixed[name]) + * else: + */ + goto __pyx_L12; + } + + /* "providers.pxd":462 + * value = __get_value_kwargs(kw_injection, prefixed[name]) + * else: + * value = __get_value(kw_injection) # <<<<<<<<<<<<<< + * + * kwargs[name] = value + */ + /*else*/ { + __pyx_t_10 = __pyx_f_19dependency_injector_9providers___get_value(((struct __pyx_obj_19dependency_injector_9providers_Injection *)__pyx_v_kw_injection)); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 462, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_10); + __pyx_t_10 = 0; + } + __pyx_L12:; + + /* "providers.pxd":464 + * value = __get_value(kw_injection) + * + * kwargs[name] = value # <<<<<<<<<<<<<< + * if async_mode != ASYNC_MODE_DISABLED and __is_future_or_coroutine(value): + * future_kwargs.append((name, value)) + */ + if (unlikely(__pyx_v_kwargs == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(1, 464, __pyx_L1_error) + } + if (unlikely(PyDict_SetItem(__pyx_v_kwargs, __pyx_v_name, __pyx_v_value) < 0)) __PYX_ERR(1, 464, __pyx_L1_error) + + /* "providers.pxd":465 + * + * kwargs[name] = value + * if async_mode != ASYNC_MODE_DISABLED and __is_future_or_coroutine(value): # <<<<<<<<<<<<<< + * future_kwargs.append((name, value)) + * + */ + __pyx_t_7 = ((__pyx_v_async_mode != __pyx_v_19dependency_injector_9providers_ASYNC_MODE_DISABLED) != 0); + if (__pyx_t_7) { + } else { + __pyx_t_3 = __pyx_t_7; + goto __pyx_L14_bool_binop_done; + } + __pyx_t_7 = (__pyx_f_19dependency_injector_9providers___is_future_or_coroutine(__pyx_v_value) != 0); + __pyx_t_3 = __pyx_t_7; + __pyx_L14_bool_binop_done:; + if (__pyx_t_3) { + + /* "providers.pxd":466 + * kwargs[name] = value + * if async_mode != ASYNC_MODE_DISABLED and __is_future_or_coroutine(value): + * future_kwargs.append((name, value)) # <<<<<<<<<<<<<< + * + * if future_kwargs: + */ + __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 466, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_INCREF(__pyx_v_name); + __Pyx_GIVEREF(__pyx_v_name); + PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_name); + __Pyx_INCREF(__pyx_v_value); + __Pyx_GIVEREF(__pyx_v_value); + PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_v_value); + __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_future_kwargs, __pyx_t_10); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(1, 466, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "providers.pxd":465 + * + * kwargs[name] = value + * if async_mode != ASYNC_MODE_DISABLED and __is_future_or_coroutine(value): # <<<<<<<<<<<<<< + * future_kwargs.append((name, value)) + * + */ + } + __pyx_L9_continue:; + } + } + __pyx_L3:; + + /* "providers.pxd":468 + * future_kwargs.append((name, value)) + * + * if future_kwargs: # <<<<<<<<<<<<<< + * return __combine_future_injections(kwargs, future_kwargs) + * + */ + __pyx_t_3 = (PyList_GET_SIZE(__pyx_v_future_kwargs) != 0); + if (__pyx_t_3) { + + /* "providers.pxd":469 + * + * if future_kwargs: + * return __combine_future_injections(kwargs, future_kwargs) # <<<<<<<<<<<<<< + * + * return kwargs + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_10 = __pyx_f_19dependency_injector_9providers___combine_future_injections(__pyx_v_kwargs, __pyx_v_future_kwargs); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 469, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_r = __pyx_t_10; + __pyx_t_10 = 0; + goto __pyx_L0; + + /* "providers.pxd":468 + * future_kwargs.append((name, value)) + * + * if future_kwargs: # <<<<<<<<<<<<<< + * return __combine_future_injections(kwargs, future_kwargs) + * + */ + } + + /* "providers.pxd":471 + * return __combine_future_injections(kwargs, future_kwargs) + * + * return kwargs # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_kwargs); + __pyx_r = __pyx_v_kwargs; + goto __pyx_L0; + + /* "providers.pxd":427 + * @cython.boundscheck(False) + * @cython.wraparound(False) + * cdef inline object __provide_keyword_args( # <<<<<<<<<<<<<< + * dict kwargs, + * tuple inj_kwargs, + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_AddTraceback("dependency_injector.providers.__provide_keyword_args", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_name); + __Pyx_XDECREF(__pyx_v_value); + __Pyx_XDECREF(__pyx_v_prefixed); + __Pyx_XDECREF(__pyx_v_future_kwargs); + __Pyx_XDECREF((PyObject *)__pyx_v_kw_injection); + __Pyx_XDECREF(__pyx_v_kwargs); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "providers.pxd":474 + * + * + * cdef inline object __combine_future_injections(object injections, list future_injections): # <<<<<<<<<<<<<< + * future_result = asyncio.Future() + * + */ + +static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___combine_future_injections(PyObject *__pyx_v_injections, PyObject *__pyx_v_future_injections) { + PyObject *__pyx_v_future_result = NULL; + PyObject *__pyx_v_injections_ready = NULL; + CYTHON_UNUSED PyObject *__pyx_v__ = NULL; + PyObject *__pyx_v_value = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + Py_ssize_t __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *(*__pyx_t_9)(PyObject *); + int __pyx_t_10; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__combine_future_injections", 0); + + /* "providers.pxd":475 + * + * cdef inline object __combine_future_injections(object injections, list future_injections): + * future_result = asyncio.Future() # <<<<<<<<<<<<<< + * + * injections_ready = asyncio.gather(*[value for _, value in future_injections]) + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 475, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Future); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 475, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 475, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_future_result = __pyx_t_1; + __pyx_t_1 = 0; + + /* "providers.pxd":477 + * future_result = asyncio.Future() + * + * injections_ready = asyncio.gather(*[value for _, value in future_injections]) # <<<<<<<<<<<<<< + * injections_ready.add_done_callback( + * functools.partial( + */ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 477, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_gather); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 477, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 477, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (unlikely(__pyx_v_future_injections == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); + __PYX_ERR(1, 477, __pyx_L1_error) + } + __pyx_t_2 = __pyx_v_future_injections; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; + for (;;) { + if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_5); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 477, __pyx_L1_error) + #else + __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 477, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #endif + if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) { + PyObject* sequence = __pyx_t_5; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(1, 477, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); + } else { + __pyx_t_6 = PyList_GET_ITEM(sequence, 0); + __pyx_t_7 = PyList_GET_ITEM(sequence, 1); + } + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + #else + __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 477, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 477, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + #endif + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_8 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 477, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext; + index = 0; __pyx_t_6 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed; + __Pyx_GOTREF(__pyx_t_6); + index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L5_unpacking_failed; + __Pyx_GOTREF(__pyx_t_7); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(1, 477, __pyx_L1_error) + __pyx_t_9 = NULL; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + goto __pyx_L6_unpacking_done; + __pyx_L5_unpacking_failed:; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_9 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(1, 477, __pyx_L1_error) + __pyx_L6_unpacking_done:; + } + __Pyx_XDECREF_SET(__pyx_v__, __pyx_t_6); + __pyx_t_6 = 0; + __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_7); + __pyx_t_7 = 0; + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_v_value))) __PYX_ERR(1, 477, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PySequence_Tuple(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 477, __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_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 477, __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_v_injections_ready = __pyx_t_1; + __pyx_t_1 = 0; + + /* "providers.pxd":478 + * + * injections_ready = asyncio.gather(*[value for _, value in future_injections]) + * injections_ready.add_done_callback( # <<<<<<<<<<<<<< + * functools.partial( + * __async_prepare_args_kwargs_callback, + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_injections_ready, __pyx_n_s_add_done_callback); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 478, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "providers.pxd":479 + * injections_ready = asyncio.gather(*[value for _, value in future_injections]) + * injections_ready.add_done_callback( + * functools.partial( # <<<<<<<<<<<<<< + * __async_prepare_args_kwargs_callback, + * future_result, + */ + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_functools); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 479, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_partial); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 479, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "providers.pxd":480 + * injections_ready.add_done_callback( + * functools.partial( + * __async_prepare_args_kwargs_callback, # <<<<<<<<<<<<<< + * future_result, + * injections, + */ + __pyx_t_5 = __Pyx_CFunc_void____object____object____object____object___to_py(__pyx_f_19dependency_injector_9providers___async_prepare_args_kwargs_callback); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 480, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + + /* "providers.pxd":483 + * future_result, + * injections, + * future_injections, # <<<<<<<<<<<<<< + * ), + * ) + */ + __pyx_t_6 = NULL; + __pyx_t_10 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + __pyx_t_10 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_7)) { + PyObject *__pyx_temp[5] = {__pyx_t_6, __pyx_t_5, __pyx_v_future_result, __pyx_v_injections, __pyx_v_future_injections}; + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_10, 4+__pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 479, __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_7)) { + PyObject *__pyx_temp[5] = {__pyx_t_6, __pyx_t_5, __pyx_v_future_result, __pyx_v_injections, __pyx_v_future_injections}; + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_10, 4+__pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 479, __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(4+__pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 479, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__pyx_t_6) { + __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+__pyx_t_10, __pyx_t_5); + __Pyx_INCREF(__pyx_v_future_result); + __Pyx_GIVEREF(__pyx_v_future_result); + PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_10, __pyx_v_future_result); + __Pyx_INCREF(__pyx_v_injections); + __Pyx_GIVEREF(__pyx_v_injections); + PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_10, __pyx_v_injections); + __Pyx_INCREF(__pyx_v_future_injections); + __Pyx_GIVEREF(__pyx_v_future_injections); + PyTuple_SET_ITEM(__pyx_t_8, 3+__pyx_t_10, __pyx_v_future_injections); + __pyx_t_5 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 479, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_7, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 478, __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":486 + * ), + * ) + * asyncio.ensure_future(injections_ready) # <<<<<<<<<<<<<< + * + * return future_result + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 486, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ensure_future); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 486, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_injections_ready) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_injections_ready); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 486, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "providers.pxd":488 + * asyncio.ensure_future(injections_ready) + * + * return future_result # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_future_result); + __pyx_r = __pyx_v_future_result; + goto __pyx_L0; + + /* "providers.pxd":474 + * + * + * cdef inline object __combine_future_injections(object injections, list future_injections): # <<<<<<<<<<<<<< + * future_result = asyncio.Future() + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("dependency_injector.providers.__combine_future_injections", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_future_result); + __Pyx_XDECREF(__pyx_v_injections_ready); + __Pyx_XDECREF(__pyx_v__); + __Pyx_XDECREF(__pyx_v_value); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "providers.pxd":491 + * + * + * cdef inline void __async_prepare_args_kwargs_callback( # <<<<<<<<<<<<<< + * object future_result, + * object args, + */ + +static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_prepare_args_kwargs_callback(PyObject *__pyx_v_future_result, PyObject *__pyx_v_args, PyObject *__pyx_v_future_args_kwargs, PyObject *__pyx_v_future) { + PyObject *__pyx_v_result = NULL; + PyObject *__pyx_v_value = NULL; + PyObject *__pyx_v_key = NULL; + CYTHON_UNUSED PyObject *__pyx_v__ = NULL; + PyObject *__pyx_v_exception = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + Py_ssize_t __pyx_t_7; + PyObject *(*__pyx_t_8)(PyObject *); + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + PyObject *(*__pyx_t_11)(PyObject *); + PyObject *__pyx_t_12 = NULL; + PyObject *__pyx_t_13 = NULL; + int __pyx_t_14; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__async_prepare_args_kwargs_callback", 0); + + /* "providers.pxd":497 + * object future, + * ): + * try: # <<<<<<<<<<<<<< + * result = future.result() + * for value, (key, _) in zip(result, future_args_kwargs): + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_3); + /*try:*/ { + + /* "providers.pxd":498 + * ): + * try: + * result = future.result() # <<<<<<<<<<<<<< + * for value, (key, _) in zip(result, future_args_kwargs): + * args[key] = value + */ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_future, __pyx_n_s_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 498, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + } + } + __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 498, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_result = __pyx_t_4; + __pyx_t_4 = 0; + + /* "providers.pxd":499 + * try: + * result = future.result() + * for value, (key, _) in zip(result, future_args_kwargs): # <<<<<<<<<<<<<< + * args[key] = value + * except Exception as exception: + */ + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 499, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_v_result); + __Pyx_GIVEREF(__pyx_v_result); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_result); + __Pyx_INCREF(__pyx_v_future_args_kwargs); + __Pyx_GIVEREF(__pyx_v_future_args_kwargs); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_future_args_kwargs); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 499, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) { + __pyx_t_4 = __pyx_t_5; __Pyx_INCREF(__pyx_t_4); __pyx_t_7 = 0; + __pyx_t_8 = NULL; + } else { + __pyx_t_7 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 499, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 499, __pyx_L3_error) + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + for (;;) { + if (likely(!__pyx_t_8)) { + if (likely(PyList_CheckExact(__pyx_t_4))) { + if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_4)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_5 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_7); __Pyx_INCREF(__pyx_t_5); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(1, 499, __pyx_L3_error) + #else + __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 499, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_5); + #endif + } else { + if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_4)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_7); __Pyx_INCREF(__pyx_t_5); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(1, 499, __pyx_L3_error) + #else + __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 499, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_5); + #endif + } + } else { + __pyx_t_5 = __pyx_t_8(__pyx_t_4); + if (unlikely(!__pyx_t_5)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(1, 499, __pyx_L3_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_5); + } + if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) { + PyObject* sequence = __pyx_t_5; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(1, 499, __pyx_L3_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_9 = PyTuple_GET_ITEM(sequence, 1); + } else { + __pyx_t_6 = PyList_GET_ITEM(sequence, 0); + __pyx_t_9 = PyList_GET_ITEM(sequence, 1); + } + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(__pyx_t_9); + #else + __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 499, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 499, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_9); + #endif + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_10 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 499, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_11 = Py_TYPE(__pyx_t_10)->tp_iternext; + index = 0; __pyx_t_6 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_6)) goto __pyx_L11_unpacking_failed; + __Pyx_GOTREF(__pyx_t_6); + index = 1; __pyx_t_9 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_9)) goto __pyx_L11_unpacking_failed; + __Pyx_GOTREF(__pyx_t_9); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 2) < 0) __PYX_ERR(1, 499, __pyx_L3_error) + __pyx_t_11 = NULL; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + goto __pyx_L12_unpacking_done; + __pyx_L11_unpacking_failed:; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_11 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(1, 499, __pyx_L3_error) + __pyx_L12_unpacking_done:; + } + __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_6); + __pyx_t_6 = 0; + if ((likely(PyTuple_CheckExact(__pyx_t_9))) || (PyList_CheckExact(__pyx_t_9))) { + PyObject* sequence = __pyx_t_9; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(1, 499, __pyx_L3_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_10 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_12 = PyTuple_GET_ITEM(sequence, 1); + } else { + __pyx_t_10 = PyList_GET_ITEM(sequence, 0); + __pyx_t_12 = PyList_GET_ITEM(sequence, 1); + } + __Pyx_INCREF(__pyx_t_10); + __Pyx_INCREF(__pyx_t_12); + #else + __pyx_t_10 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 499, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_12 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 499, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_12); + #endif + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_13 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 499, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_13); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_11 = Py_TYPE(__pyx_t_13)->tp_iternext; + index = 0; __pyx_t_10 = __pyx_t_11(__pyx_t_13); if (unlikely(!__pyx_t_10)) goto __pyx_L13_unpacking_failed; + __Pyx_GOTREF(__pyx_t_10); + index = 1; __pyx_t_12 = __pyx_t_11(__pyx_t_13); if (unlikely(!__pyx_t_12)) goto __pyx_L13_unpacking_failed; + __Pyx_GOTREF(__pyx_t_12); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_13), 2) < 0) __PYX_ERR(1, 499, __pyx_L3_error) + __pyx_t_11 = NULL; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + goto __pyx_L14_unpacking_done; + __pyx_L13_unpacking_failed:; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_t_11 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(1, 499, __pyx_L3_error) + __pyx_L14_unpacking_done:; + } + __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_10); + __pyx_t_10 = 0; + __Pyx_XDECREF_SET(__pyx_v__, __pyx_t_12); + __pyx_t_12 = 0; + + /* "providers.pxd":500 + * result = future.result() + * for value, (key, _) in zip(result, future_args_kwargs): + * args[key] = value # <<<<<<<<<<<<<< + * except Exception as exception: + * future_result.set_exception(exception) + */ + if (unlikely(PyObject_SetItem(__pyx_v_args, __pyx_v_key, __pyx_v_value) < 0)) __PYX_ERR(1, 500, __pyx_L3_error) + + /* "providers.pxd":499 + * try: + * result = future.result() + * for value, (key, _) in zip(result, future_args_kwargs): # <<<<<<<<<<<<<< + * args[key] = value + * except Exception as exception: + */ + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "providers.pxd":497 + * object future, + * ): + * try: # <<<<<<<<<<<<<< + * result = future.result() + * for value, (key, _) in zip(result, future_args_kwargs): + */ + } + + /* "providers.pxd":504 + * future_result.set_exception(exception) + * else: + * future_result.set_result(args) # <<<<<<<<<<<<<< + * + * + */ + /*else:*/ { + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_future_result, __pyx_n_s_set_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 504, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_9 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_9)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + } + } + __pyx_t_4 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_9, __pyx_v_args) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_args); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 504, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L8_try_end; + __pyx_L3_error:; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "providers.pxd":501 + * for value, (key, _) in zip(result, future_args_kwargs): + * args[key] = value + * except Exception as exception: # <<<<<<<<<<<<<< + * future_result.set_exception(exception) + * else: + */ + __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); + if (__pyx_t_14) { + __Pyx_AddTraceback("dependency_injector.providers.__async_prepare_args_kwargs_callback", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_9) < 0) __PYX_ERR(1, 501, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GOTREF(__pyx_t_9); + __Pyx_INCREF(__pyx_t_5); + __pyx_v_exception = __pyx_t_5; + + /* "providers.pxd":502 + * args[key] = value + * except Exception as exception: + * future_result.set_exception(exception) # <<<<<<<<<<<<<< + * else: + * future_result.set_result(args) + */ + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_future_result, __pyx_n_s_set_exception); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 502, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_10 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) { + __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_12); + if (likely(__pyx_t_10)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12); + __Pyx_INCREF(__pyx_t_10); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_12, function); + } + } + __pyx_t_6 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_12, __pyx_t_10, __pyx_v_exception) : __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_v_exception); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 502, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + goto __pyx_L4_exception_handled; + } + goto __pyx_L5_except_error; + __pyx_L5_except_error:; + + /* "providers.pxd":497 + * object future, + * ): + * try: # <<<<<<<<<<<<<< + * result = future.result() + * for value, (key, _) in zip(result, future_args_kwargs): + */ + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + goto __pyx_L1_error; + __pyx_L4_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + __pyx_L8_try_end:; + } + + /* "providers.pxd":491 + * + * + * cdef inline void __async_prepare_args_kwargs_callback( # <<<<<<<<<<<<<< + * object future_result, + * object args, + */ + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_12); + __Pyx_XDECREF(__pyx_t_13); + __Pyx_WriteUnraisable("dependency_injector.providers.__async_prepare_args_kwargs_callback", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_result); + __Pyx_XDECREF(__pyx_v_value); + __Pyx_XDECREF(__pyx_v_key); + __Pyx_XDECREF(__pyx_v__); + __Pyx_XDECREF(__pyx_v_exception); + __Pyx_RefNannyFinishContext(); +} + +/* "providers.pxd":509 + * @cython.boundscheck(False) + * @cython.wraparound(False) + * cdef inline object __provide_attributes(tuple attributes, int attributes_len): # <<<<<<<<<<<<<< + * cdef NamedInjection attr_injection + * cdef dict attribute_injections = {} + */ + +static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provide_attributes(PyObject *__pyx_v_attributes, int __pyx_v_attributes_len) { + struct __pyx_obj_19dependency_injector_9providers_NamedInjection *__pyx_v_attr_injection = 0; + PyObject *__pyx_v_attribute_injections = 0; + PyObject *__pyx_v_future_attributes = 0; + int __pyx_v_index; + PyObject *__pyx_v_name = NULL; + PyObject *__pyx_v_value = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + int __pyx_t_4; + int __pyx_t_5; + int __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__provide_attributes", 0); + + /* "providers.pxd":511 + * cdef inline object __provide_attributes(tuple attributes, int attributes_len): + * cdef NamedInjection attr_injection + * cdef dict attribute_injections = {} # <<<<<<<<<<<<<< + * cdef list future_attributes = [] + * + */ + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 511, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_attribute_injections = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "providers.pxd":512 + * cdef NamedInjection attr_injection + * cdef dict attribute_injections = {} + * cdef list future_attributes = [] # <<<<<<<<<<<<<< + * + * for index in range(attributes_len): + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 512, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_future_attributes = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "providers.pxd":514 + * cdef list future_attributes = [] + * + * for index in range(attributes_len): # <<<<<<<<<<<<<< + * attr_injection = attributes[index] + * name = __get_name(attr_injection) + */ + __pyx_t_2 = __pyx_v_attributes_len; + __pyx_t_3 = __pyx_t_2; + for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { + __pyx_v_index = __pyx_t_4; + + /* "providers.pxd":515 + * + * for index in range(attributes_len): + * attr_injection = attributes[index] # <<<<<<<<<<<<<< + * name = __get_name(attr_injection) + * value = __get_value(attr_injection) + */ + if (unlikely(__pyx_v_attributes == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(1, 515, __pyx_L1_error) + } + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_v_attributes, __pyx_v_index); + __Pyx_INCREF(__pyx_t_1); + __Pyx_XDECREF_SET(__pyx_v_attr_injection, ((struct __pyx_obj_19dependency_injector_9providers_NamedInjection *)__pyx_t_1)); + __pyx_t_1 = 0; + + /* "providers.pxd":516 + * for index in range(attributes_len): + * attr_injection = attributes[index] + * name = __get_name(attr_injection) # <<<<<<<<<<<<<< + * value = __get_value(attr_injection) + * attribute_injections[name] = value + */ + __pyx_t_1 = __pyx_f_19dependency_injector_9providers___get_name(__pyx_v_attr_injection); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 516, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_1); + __pyx_t_1 = 0; + + /* "providers.pxd":517 + * attr_injection = attributes[index] + * name = __get_name(attr_injection) + * value = __get_value(attr_injection) # <<<<<<<<<<<<<< + * attribute_injections[name] = value + * if __is_future_or_coroutine(value): + */ + __pyx_t_1 = __pyx_f_19dependency_injector_9providers___get_value(((struct __pyx_obj_19dependency_injector_9providers_Injection *)__pyx_v_attr_injection)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 517, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_1); + __pyx_t_1 = 0; + + /* "providers.pxd":518 + * name = __get_name(attr_injection) + * value = __get_value(attr_injection) + * attribute_injections[name] = value # <<<<<<<<<<<<<< + * if __is_future_or_coroutine(value): + * future_attributes.append((name, value)) + */ + if (unlikely(PyDict_SetItem(__pyx_v_attribute_injections, __pyx_v_name, __pyx_v_value) < 0)) __PYX_ERR(1, 518, __pyx_L1_error) + + /* "providers.pxd":519 + * value = __get_value(attr_injection) + * attribute_injections[name] = value + * if __is_future_or_coroutine(value): # <<<<<<<<<<<<<< + * future_attributes.append((name, value)) + * + */ + __pyx_t_5 = (__pyx_f_19dependency_injector_9providers___is_future_or_coroutine(__pyx_v_value) != 0); + if (__pyx_t_5) { + + /* "providers.pxd":520 + * attribute_injections[name] = value + * if __is_future_or_coroutine(value): + * future_attributes.append((name, value)) # <<<<<<<<<<<<<< + * + * if future_attributes: + */ + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 520, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_name); + __Pyx_GIVEREF(__pyx_v_name); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_name); + __Pyx_INCREF(__pyx_v_value); + __Pyx_GIVEREF(__pyx_v_value); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_value); + __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_future_attributes, __pyx_t_1); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 520, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "providers.pxd":519 + * value = __get_value(attr_injection) + * attribute_injections[name] = value + * if __is_future_or_coroutine(value): # <<<<<<<<<<<<<< + * future_attributes.append((name, value)) + * + */ + } + } + + /* "providers.pxd":522 + * future_attributes.append((name, value)) + * + * if future_attributes: # <<<<<<<<<<<<<< + * return __combine_future_injections(attribute_injections, future_attributes) + * + */ + __pyx_t_5 = (PyList_GET_SIZE(__pyx_v_future_attributes) != 0); + if (__pyx_t_5) { + + /* "providers.pxd":523 + * + * if future_attributes: + * return __combine_future_injections(attribute_injections, future_attributes) # <<<<<<<<<<<<<< + * + * return attribute_injections + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_19dependency_injector_9providers___combine_future_injections(__pyx_v_attribute_injections, __pyx_v_future_attributes); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 523, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "providers.pxd":522 + * future_attributes.append((name, value)) + * + * if future_attributes: # <<<<<<<<<<<<<< + * return __combine_future_injections(attribute_injections, future_attributes) + * + */ + } + + /* "providers.pxd":525 + * return __combine_future_injections(attribute_injections, future_attributes) + * + * return attribute_injections # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_attribute_injections); + __pyx_r = __pyx_v_attribute_injections; + goto __pyx_L0; + + /* "providers.pxd":509 + * @cython.boundscheck(False) + * @cython.wraparound(False) + * cdef inline object __provide_attributes(tuple attributes, int attributes_len): # <<<<<<<<<<<<<< + * cdef NamedInjection attr_injection + * cdef dict attribute_injections = {} + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("dependency_injector.providers.__provide_attributes", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_attr_injection); + __Pyx_XDECREF(__pyx_v_attribute_injections); + __Pyx_XDECREF(__pyx_v_future_attributes); + __Pyx_XDECREF(__pyx_v_name); + __Pyx_XDECREF(__pyx_v_value); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "providers.pxd":528 + * + * + * cdef inline object __async_inject_attributes(future_instance, future_attributes): # <<<<<<<<<<<<<< + * future_result = asyncio.Future() + * + */ + +static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___async_inject_attributes(PyObject *__pyx_v_future_instance, PyObject *__pyx_v_future_attributes) { + PyObject *__pyx_v_future_result = NULL; + PyObject *__pyx_v_attributes_ready = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__async_inject_attributes", 0); + + /* "providers.pxd":529 + * + * cdef inline object __async_inject_attributes(future_instance, future_attributes): + * future_result = asyncio.Future() # <<<<<<<<<<<<<< + * + * attributes_ready = asyncio.gather(future_instance, future_attributes) + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 529, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Future); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 529, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 529, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_future_result = __pyx_t_1; + __pyx_t_1 = 0; + + /* "providers.pxd":531 + * future_result = asyncio.Future() + * + * attributes_ready = asyncio.gather(future_instance, future_attributes) # <<<<<<<<<<<<<< + * attributes_ready.add_done_callback( + * functools.partial( + */ + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 531, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_gather); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 531, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = NULL; + __pyx_t_4 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(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); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_4 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_future_instance, __pyx_v_future_attributes}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 531, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_future_instance, __pyx_v_future_attributes}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 531, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 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, 531, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__pyx_t_3) { + __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; + } + __Pyx_INCREF(__pyx_v_future_instance); + __Pyx_GIVEREF(__pyx_v_future_instance); + PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_future_instance); + __Pyx_INCREF(__pyx_v_future_attributes); + __Pyx_GIVEREF(__pyx_v_future_attributes); + PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_future_attributes); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 531, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_attributes_ready = __pyx_t_1; + __pyx_t_1 = 0; + + /* "providers.pxd":532 + * + * attributes_ready = asyncio.gather(future_instance, future_attributes) + * attributes_ready.add_done_callback( # <<<<<<<<<<<<<< + * functools.partial( + * __async_inject_attributes_callback, + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_attributes_ready, __pyx_n_s_add_done_callback); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 532, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "providers.pxd":533 + * attributes_ready = asyncio.gather(future_instance, future_attributes) + * attributes_ready.add_done_callback( + * functools.partial( # <<<<<<<<<<<<<< + * __async_inject_attributes_callback, + * future_result, + */ + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_functools); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 533, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_partial); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 533, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "providers.pxd":534 + * attributes_ready.add_done_callback( + * functools.partial( + * __async_inject_attributes_callback, # <<<<<<<<<<<<<< + * future_result, + * ), + */ + __pyx_t_3 = __Pyx_CFunc_void____object____object___to_py(__pyx_f_19dependency_injector_9providers___async_inject_attributes_callback); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 534, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + + /* "providers.pxd":535 + * functools.partial( + * __async_inject_attributes_callback, + * future_result, # <<<<<<<<<<<<<< + * ), + * ) + */ + __pyx_t_7 = NULL; + __pyx_t_4 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_4 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_3, __pyx_v_future_result}; + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 533, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_3, __pyx_v_future_result}; + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 533, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } else + #endif + { + __pyx_t_8 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 533, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__pyx_t_7) { + __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL; + } + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_4, __pyx_t_3); + __Pyx_INCREF(__pyx_v_future_result); + __Pyx_GIVEREF(__pyx_v_future_result); + PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_4, __pyx_v_future_result); + __pyx_t_3 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 533, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 532, __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":538 + * ), + * ) + * asyncio.ensure_future(attributes_ready) # <<<<<<<<<<<<<< + * + * return future_result + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 538, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ensure_future); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 538, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + } + } + __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_2, __pyx_v_attributes_ready) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_attributes_ready); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 538, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "providers.pxd":540 + * asyncio.ensure_future(attributes_ready) + * + * return future_result # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_future_result); + __pyx_r = __pyx_v_future_result; + goto __pyx_L0; + + /* "providers.pxd":528 + * + * + * cdef inline object __async_inject_attributes(future_instance, future_attributes): # <<<<<<<<<<<<<< + * future_result = asyncio.Future() + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("dependency_injector.providers.__async_inject_attributes", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_future_result); + __Pyx_XDECREF(__pyx_v_attributes_ready); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "providers.pxd":543 + * + * + * cdef inline void __async_inject_attributes_callback(object future_result, object future): # <<<<<<<<<<<<<< + * try: + * instance, attributes = future.result() + */ + +static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_inject_attributes_callback(PyObject *__pyx_v_future_result, PyObject *__pyx_v_future) { + PyObject *__pyx_v_instance = NULL; + PyObject *__pyx_v_attributes = NULL; + PyObject *__pyx_v_name = NULL; + PyObject *__pyx_v_value = NULL; + PyObject *__pyx_v_exception = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + 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)(PyObject *); + Py_ssize_t __pyx_t_9; + PyObject *(*__pyx_t_10)(PyObject *); + PyObject *__pyx_t_11 = NULL; + int __pyx_t_12; + int __pyx_t_13; + PyObject *__pyx_t_14 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__async_inject_attributes_callback", 0); + + /* "providers.pxd":544 + * + * cdef inline void __async_inject_attributes_callback(object future_result, object future): + * try: # <<<<<<<<<<<<<< + * instance, attributes = future.result() + * + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_3); + /*try:*/ { + + /* "providers.pxd":545 + * cdef inline void __async_inject_attributes_callback(object future_result, object future): + * try: + * instance, attributes = future.result() # <<<<<<<<<<<<<< + * + * for name, value in attributes.items(): + */ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_future, __pyx_n_s_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 545, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + } + } + __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 545, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) { + PyObject* sequence = __pyx_t_4; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(1, 545, __pyx_L3_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); + } else { + __pyx_t_5 = PyList_GET_ITEM(sequence, 0); + __pyx_t_6 = PyList_GET_ITEM(sequence, 1); + } + __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, 545, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 545, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_6); + #endif + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 545, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext; + index = 0; __pyx_t_5 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_5)) goto __pyx_L9_unpacking_failed; + __Pyx_GOTREF(__pyx_t_5); + index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L9_unpacking_failed; + __Pyx_GOTREF(__pyx_t_6); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(1, 545, __pyx_L3_error) + __pyx_t_8 = NULL; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + goto __pyx_L10_unpacking_done; + __pyx_L9_unpacking_failed:; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_8 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(1, 545, __pyx_L3_error) + __pyx_L10_unpacking_done:; + } + __pyx_v_instance = __pyx_t_5; + __pyx_t_5 = 0; + __pyx_v_attributes = __pyx_t_6; + __pyx_t_6 = 0; + + /* "providers.pxd":547 + * instance, attributes = future.result() + * + * for name, value in attributes.items(): # <<<<<<<<<<<<<< + * setattr(instance, name, value) + * except Exception as exception: + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_attributes, __pyx_n_s_items); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 547, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 547, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { + __pyx_t_6 = __pyx_t_4; __Pyx_INCREF(__pyx_t_6); __pyx_t_9 = 0; + __pyx_t_10 = NULL; + } else { + __pyx_t_9 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 547, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_10 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 547, __pyx_L3_error) + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + for (;;) { + if (likely(!__pyx_t_10)) { + if (likely(PyList_CheckExact(__pyx_t_6))) { + if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_6)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(1, 547, __pyx_L3_error) + #else + __pyx_t_4 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 547, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_4); + #endif + } else { + if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_6)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(1, 547, __pyx_L3_error) + #else + __pyx_t_4 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 547, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_4); + #endif + } + } else { + __pyx_t_4 = __pyx_t_10(__pyx_t_6); + if (unlikely(!__pyx_t_4)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(1, 547, __pyx_L3_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_4); + } + if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) { + PyObject* sequence = __pyx_t_4; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(1, 547, __pyx_L3_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); + } else { + __pyx_t_5 = PyList_GET_ITEM(sequence, 0); + __pyx_t_7 = PyList_GET_ITEM(sequence, 1); + } + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(__pyx_t_7); + #else + __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 547, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 547, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_7); + #endif + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_11 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 547, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_8 = Py_TYPE(__pyx_t_11)->tp_iternext; + index = 0; __pyx_t_5 = __pyx_t_8(__pyx_t_11); if (unlikely(!__pyx_t_5)) goto __pyx_L13_unpacking_failed; + __Pyx_GOTREF(__pyx_t_5); + index = 1; __pyx_t_7 = __pyx_t_8(__pyx_t_11); if (unlikely(!__pyx_t_7)) goto __pyx_L13_unpacking_failed; + __Pyx_GOTREF(__pyx_t_7); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_11), 2) < 0) __PYX_ERR(1, 547, __pyx_L3_error) + __pyx_t_8 = NULL; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + goto __pyx_L14_unpacking_done; + __pyx_L13_unpacking_failed:; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_8 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(1, 547, __pyx_L3_error) + __pyx_L14_unpacking_done:; + } + __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_5); + __pyx_t_5 = 0; + __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_7); + __pyx_t_7 = 0; + + /* "providers.pxd":548 + * + * for name, value in attributes.items(): + * setattr(instance, name, value) # <<<<<<<<<<<<<< + * except Exception as exception: + * future_result.set_exception(exception) + */ + __pyx_t_12 = PyObject_SetAttr(__pyx_v_instance, __pyx_v_name, __pyx_v_value); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(1, 548, __pyx_L3_error) + + /* "providers.pxd":547 + * instance, attributes = future.result() + * + * for name, value in attributes.items(): # <<<<<<<<<<<<<< + * setattr(instance, name, value) + * except Exception as exception: + */ + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "providers.pxd":544 + * + * cdef inline void __async_inject_attributes_callback(object future_result, object future): + * try: # <<<<<<<<<<<<<< + * instance, attributes = future.result() + * + */ + } + + /* "providers.pxd":552 + * future_result.set_exception(exception) + * else: + * future_result.set_result(instance) # <<<<<<<<<<<<<< + * + * + */ + /*else:*/ { + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_future_result, __pyx_n_s_set_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 552, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_6 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, __pyx_v_instance) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_instance); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 552, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L8_try_end; + __pyx_L3_error:; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "providers.pxd":549 + * for name, value in attributes.items(): + * setattr(instance, name, value) + * except Exception as exception: # <<<<<<<<<<<<<< + * future_result.set_exception(exception) + * else: + */ + __pyx_t_13 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); + if (__pyx_t_13) { + __Pyx_AddTraceback("dependency_injector.providers.__async_inject_attributes_callback", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_4, &__pyx_t_7) < 0) __PYX_ERR(1, 549, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GOTREF(__pyx_t_7); + __Pyx_INCREF(__pyx_t_4); + __pyx_v_exception = __pyx_t_4; + + /* "providers.pxd":550 + * setattr(instance, name, value) + * except Exception as exception: + * future_result.set_exception(exception) # <<<<<<<<<<<<<< + * else: + * future_result.set_result(instance) + */ + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_future_result, __pyx_n_s_set_exception); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 550, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_14 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) { + __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_11); + if (likely(__pyx_t_14)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11); + __Pyx_INCREF(__pyx_t_14); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_11, function); + } + } + __pyx_t_5 = (__pyx_t_14) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_14, __pyx_v_exception) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_v_exception); + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 550, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + goto __pyx_L4_exception_handled; + } + goto __pyx_L5_except_error; + __pyx_L5_except_error:; + + /* "providers.pxd":544 + * + * cdef inline void __async_inject_attributes_callback(object future_result, object future): + * try: # <<<<<<<<<<<<<< + * instance, attributes = future.result() + * + */ + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + goto __pyx_L1_error; + __pyx_L4_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + __pyx_L8_try_end:; + } + + /* "providers.pxd":543 + * + * + * cdef inline void __async_inject_attributes_callback(object future_result, object future): # <<<<<<<<<<<<<< + * try: + * instance, attributes = future.result() + */ + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_XDECREF(__pyx_t_14); + __Pyx_WriteUnraisable("dependency_injector.providers.__async_inject_attributes_callback", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_instance); + __Pyx_XDECREF(__pyx_v_attributes); + __Pyx_XDECREF(__pyx_v_name); + __Pyx_XDECREF(__pyx_v_value); + __Pyx_XDECREF(__pyx_v_exception); + __Pyx_RefNannyFinishContext(); +} + +/* "providers.pxd":555 + * + * + * cdef inline void __inject_attributes(object instance, dict attributes): # <<<<<<<<<<<<<< + * for name, value in attributes.items(): + * setattr(instance, name, value) + */ + +static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___inject_attributes(PyObject *__pyx_v_instance, PyObject *__pyx_v_attributes) { + PyObject *__pyx_v_name = NULL; + PyObject *__pyx_v_value = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + Py_ssize_t __pyx_t_3; + PyObject *(*__pyx_t_4)(PyObject *); + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *(*__pyx_t_8)(PyObject *); + int __pyx_t_9; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__inject_attributes", 0); + + /* "providers.pxd":556 + * + * cdef inline void __inject_attributes(object instance, dict attributes): + * for name, value in attributes.items(): # <<<<<<<<<<<<<< + * setattr(instance, name, value) + * + */ + if (unlikely(__pyx_v_attributes == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); + __PYX_ERR(1, 556, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_PyDict_Items(__pyx_v_attributes); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 556, __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, 556, __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, 556, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + for (;;) { + if (likely(!__pyx_t_4)) { + 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, 556, __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, 556, __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, 556, __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, 556, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + #endif + } + } else { + __pyx_t_1 = __pyx_t_4(__pyx_t_2); + if (unlikely(!__pyx_t_1)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(1, 556, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_1); + } + if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { + PyObject* sequence = __pyx_t_1; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(1, 556, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); + } else { + __pyx_t_5 = PyList_GET_ITEM(sequence, 0); + __pyx_t_6 = PyList_GET_ITEM(sequence, 1); + } + __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, 556, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 556, __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, 556, __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; + index = 0; __pyx_t_5 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_5)) goto __pyx_L5_unpacking_failed; + __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, 556, __pyx_L1_error) + __pyx_t_8 = NULL; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + goto __pyx_L6_unpacking_done; + __pyx_L5_unpacking_failed:; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_8 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(1, 556, __pyx_L1_error) + __pyx_L6_unpacking_done:; + } + __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_5); + __pyx_t_5 = 0; + __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_6); + __pyx_t_6 = 0; + + /* "providers.pxd":557 + * cdef inline void __inject_attributes(object instance, dict attributes): + * for name, value in attributes.items(): + * setattr(instance, name, value) # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_9 = PyObject_SetAttr(__pyx_v_instance, __pyx_v_name, __pyx_v_value); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 557, __pyx_L1_error) + + /* "providers.pxd":556 + * + * cdef inline void __inject_attributes(object instance, dict attributes): + * for name, value in attributes.items(): # <<<<<<<<<<<<<< + * setattr(instance, name, value) + * + */ + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "providers.pxd":555 + * + * + * cdef inline void __inject_attributes(object instance, dict attributes): # <<<<<<<<<<<<<< + * for name, value in attributes.items(): + * setattr(instance, name, value) + */ + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_WriteUnraisable("dependency_injector.providers.__inject_attributes", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_name); + __Pyx_XDECREF(__pyx_v_value); + __Pyx_RefNannyFinishContext(); +} + +/* "providers.pxd":560 + * + * + * cdef inline object __call( # <<<<<<<<<<<<<< + * object call, + * tuple context_args, + */ + +static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___call(PyObject *__pyx_v_call, PyObject *__pyx_v_context_args, PyObject *__pyx_v_injection_args, int __pyx_v_injection_args_len, PyObject *__pyx_v_context_kwargs, PyObject *__pyx_v_injection_kwargs, int __pyx_v_injection_kwargs_len, int __pyx_v_async_mode) { + PyObject *__pyx_v_args = 0; + PyObject *__pyx_v_kwargs = 0; + int __pyx_v_is_future_args; + int __pyx_v_is_future_kwargs; + PyObject *__pyx_v_future_args = NULL; + PyObject *__pyx_v_future_kwargs = NULL; + PyObject *__pyx_v_future_result = NULL; + PyObject *__pyx_v_args_kwargs_ready = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; + int __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__call", 0); + + /* "providers.pxd":570 + * int async_mode, + * ): + * cdef object args = __provide_positional_args( # <<<<<<<<<<<<<< + * context_args, + * injection_args, + */ + __pyx_t_1 = __pyx_f_19dependency_injector_9providers___provide_positional_args(__pyx_v_context_args, __pyx_v_injection_args, __pyx_v_injection_args_len, __pyx_v_async_mode); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 570, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_args = __pyx_t_1; + __pyx_t_1 = 0; + + /* "providers.pxd":576 + * async_mode, + * ) + * cdef object kwargs = __provide_keyword_args( # <<<<<<<<<<<<<< + * context_kwargs, + * injection_kwargs, + */ + __pyx_t_1 = __pyx_f_19dependency_injector_9providers___provide_keyword_args(__pyx_v_context_kwargs, __pyx_v_injection_kwargs, __pyx_v_injection_kwargs_len, __pyx_v_async_mode); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 576, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_kwargs = __pyx_t_1; + __pyx_t_1 = 0; + + /* "providers.pxd":583 + * ) + * + * if async_mode == ASYNC_MODE_DISABLED: # <<<<<<<<<<<<<< + * return call(*args, **kwargs) + * + */ + __pyx_t_2 = ((__pyx_v_async_mode == __pyx_v_19dependency_injector_9providers_ASYNC_MODE_DISABLED) != 0); + if (__pyx_t_2) { + + /* "providers.pxd":584 + * + * if async_mode == ASYNC_MODE_DISABLED: + * return call(*args, **kwargs) # <<<<<<<<<<<<<< + * + * cdef bint is_future_args = __is_future_or_coroutine(args) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PySequence_Tuple(__pyx_v_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 584, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (unlikely(__pyx_v_kwargs == Py_None)) { + PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); + __PYX_ERR(1, 584, __pyx_L1_error) + } + if (likely(PyDict_CheckExact(__pyx_v_kwargs))) { + __pyx_t_3 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 584, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } else { + __pyx_t_3 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_v_kwargs, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 584, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_v_call, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 584, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "providers.pxd":583 + * ) + * + * if async_mode == ASYNC_MODE_DISABLED: # <<<<<<<<<<<<<< + * return call(*args, **kwargs) + * + */ + } + + /* "providers.pxd":586 + * return call(*args, **kwargs) + * + * cdef bint is_future_args = __is_future_or_coroutine(args) # <<<<<<<<<<<<<< + * cdef bint is_future_kwargs = __is_future_or_coroutine(kwargs) + * + */ + __pyx_v_is_future_args = __pyx_f_19dependency_injector_9providers___is_future_or_coroutine(__pyx_v_args); + + /* "providers.pxd":587 + * + * cdef bint is_future_args = __is_future_or_coroutine(args) + * cdef bint is_future_kwargs = __is_future_or_coroutine(kwargs) # <<<<<<<<<<<<<< + * + * if is_future_args or is_future_kwargs: + */ + __pyx_v_is_future_kwargs = __pyx_f_19dependency_injector_9providers___is_future_or_coroutine(__pyx_v_kwargs); + + /* "providers.pxd":589 + * cdef bint is_future_kwargs = __is_future_or_coroutine(kwargs) + * + * if is_future_args or is_future_kwargs: # <<<<<<<<<<<<<< + * future_args = args if is_future_args else __future_result(args) + * future_kwargs = kwargs if is_future_kwargs else __future_result(kwargs) + */ + __pyx_t_5 = (__pyx_v_is_future_args != 0); + if (!__pyx_t_5) { + } else { + __pyx_t_2 = __pyx_t_5; + goto __pyx_L5_bool_binop_done; + } + __pyx_t_5 = (__pyx_v_is_future_kwargs != 0); + __pyx_t_2 = __pyx_t_5; + __pyx_L5_bool_binop_done:; + if (__pyx_t_2) { + + /* "providers.pxd":590 + * + * if is_future_args or is_future_kwargs: + * future_args = args if is_future_args else __future_result(args) # <<<<<<<<<<<<<< + * future_kwargs = kwargs if is_future_kwargs else __future_result(kwargs) + * + */ + if ((__pyx_v_is_future_args != 0)) { + __Pyx_INCREF(__pyx_v_args); + __pyx_t_4 = __pyx_v_args; + } else { + __pyx_t_3 = __pyx_f_19dependency_injector_9providers___future_result(__pyx_v_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 590, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __pyx_t_3; + __pyx_t_3 = 0; + } + __pyx_v_future_args = __pyx_t_4; + __pyx_t_4 = 0; + + /* "providers.pxd":591 + * if is_future_args or is_future_kwargs: + * future_args = args if is_future_args else __future_result(args) + * future_kwargs = kwargs if is_future_kwargs else __future_result(kwargs) # <<<<<<<<<<<<<< + * + * future_result = asyncio.Future() + */ + if ((__pyx_v_is_future_kwargs != 0)) { + __Pyx_INCREF(__pyx_v_kwargs); + __pyx_t_4 = __pyx_v_kwargs; + } else { + __pyx_t_3 = __pyx_f_19dependency_injector_9providers___future_result(__pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 591, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __pyx_t_3; + __pyx_t_3 = 0; + } + __pyx_v_future_kwargs = __pyx_t_4; + __pyx_t_4 = 0; + + /* "providers.pxd":593 + * future_kwargs = kwargs if is_future_kwargs else __future_result(kwargs) + * + * future_result = asyncio.Future() # <<<<<<<<<<<<<< + * + * args_kwargs_ready = asyncio.gather(future_args, future_kwargs) + */ + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 593, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_Future); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 593, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_1, function); + } + } + __pyx_t_4 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 593, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_future_result = __pyx_t_4; + __pyx_t_4 = 0; + + /* "providers.pxd":595 + * future_result = asyncio.Future() + * + * args_kwargs_ready = asyncio.gather(future_args, future_kwargs) # <<<<<<<<<<<<<< + * args_kwargs_ready.add_done_callback( + * functools.partial( + */ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 595, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_gather); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 595, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = NULL; + __pyx_t_6 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_1)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_6 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_3)) { + PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_future_args, __pyx_v_future_kwargs}; + __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 595, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_GOTREF(__pyx_t_4); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { + PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_future_args, __pyx_v_future_kwargs}; + __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 595, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_GOTREF(__pyx_t_4); + } else + #endif + { + __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 595, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (__pyx_t_1) { + __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1); __pyx_t_1 = NULL; + } + __Pyx_INCREF(__pyx_v_future_args); + __Pyx_GIVEREF(__pyx_v_future_args); + PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_future_args); + __Pyx_INCREF(__pyx_v_future_kwargs); + __Pyx_GIVEREF(__pyx_v_future_kwargs); + PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_future_kwargs); + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 595, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_args_kwargs_ready = __pyx_t_4; + __pyx_t_4 = 0; + + /* "providers.pxd":596 + * + * args_kwargs_ready = asyncio.gather(future_args, future_kwargs) + * args_kwargs_ready.add_done_callback( # <<<<<<<<<<<<<< + * functools.partial( + * __async_call_callback, + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_args_kwargs_ready, __pyx_n_s_add_done_callback); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 596, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + + /* "providers.pxd":597 + * args_kwargs_ready = asyncio.gather(future_args, future_kwargs) + * args_kwargs_ready.add_done_callback( + * functools.partial( # <<<<<<<<<<<<<< + * __async_call_callback, + * future_result, + */ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_functools); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 597, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_partial); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 597, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "providers.pxd":598 + * args_kwargs_ready.add_done_callback( + * functools.partial( + * __async_call_callback, # <<<<<<<<<<<<<< + * future_result, + * call, + */ + __pyx_t_1 = __Pyx_CFunc_void____object____object____object___to_py(__pyx_f_19dependency_injector_9providers___async_call_callback); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 598, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + + /* "providers.pxd":600 + * __async_call_callback, + * future_result, + * call, # <<<<<<<<<<<<<< + * ), + * ) + */ + __pyx_t_9 = NULL; + __pyx_t_6 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_9)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + __pyx_t_6 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_8)) { + PyObject *__pyx_temp[4] = {__pyx_t_9, __pyx_t_1, __pyx_v_future_result, __pyx_v_call}; + __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 597, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) { + PyObject *__pyx_temp[4] = {__pyx_t_9, __pyx_t_1, __pyx_v_future_result, __pyx_v_call}; + __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 597, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } else + #endif + { + __pyx_t_10 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 597, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (__pyx_t_9) { + __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __pyx_t_9 = NULL; + } + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_6, __pyx_t_1); + __Pyx_INCREF(__pyx_v_future_result); + __Pyx_GIVEREF(__pyx_v_future_result); + PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_6, __pyx_v_future_result); + __Pyx_INCREF(__pyx_v_call); + __Pyx_GIVEREF(__pyx_v_call); + PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_6, __pyx_v_call); + __pyx_t_1 = 0; + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_10, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 597, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + } + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_4 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 596, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "providers.pxd":603 + * ), + * ) + * asyncio.ensure_future(args_kwargs_ready) # <<<<<<<<<<<<<< + * + * return future_result + */ + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 603, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_ensure_future); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 603, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + } + } + __pyx_t_4 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_3, __pyx_v_args_kwargs_ready) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_args_kwargs_ready); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 603, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "providers.pxd":605 + * asyncio.ensure_future(args_kwargs_ready) + * + * return future_result # <<<<<<<<<<<<<< + * + * return call(*args, **kwargs) + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_future_result); + __pyx_r = __pyx_v_future_result; + goto __pyx_L0; + + /* "providers.pxd":589 + * cdef bint is_future_kwargs = __is_future_or_coroutine(kwargs) + * + * if is_future_args or is_future_kwargs: # <<<<<<<<<<<<<< + * future_args = args if is_future_args else __future_result(args) + * future_kwargs = kwargs if is_future_kwargs else __future_result(kwargs) + */ + } + + /* "providers.pxd":607 + * return future_result + * + * return call(*args, **kwargs) # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_v_args); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 607, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (unlikely(__pyx_v_kwargs == Py_None)) { + PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); + __PYX_ERR(1, 607, __pyx_L1_error) + } + if (likely(PyDict_CheckExact(__pyx_v_kwargs))) { + __pyx_t_7 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 607, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + } else { + __pyx_t_7 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_v_kwargs, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 607, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + } + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_v_call, __pyx_t_4, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 607, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "providers.pxd":560 + * + * + * cdef inline object __call( # <<<<<<<<<<<<<< + * object call, + * tuple context_args, + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_AddTraceback("dependency_injector.providers.__call", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_args); + __Pyx_XDECREF(__pyx_v_kwargs); + __Pyx_XDECREF(__pyx_v_future_args); + __Pyx_XDECREF(__pyx_v_future_kwargs); + __Pyx_XDECREF(__pyx_v_future_result); + __Pyx_XDECREF(__pyx_v_args_kwargs_ready); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "providers.pxd":610 + * + * + * cdef inline void __async_call_callback(object future_result, object call, object future): # <<<<<<<<<<<<<< + * try: + * args, kwargs = future.result() + */ + +static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_call_callback(PyObject *__pyx_v_future_result, PyObject *__pyx_v_call, PyObject *__pyx_v_future) { + PyObject *__pyx_v_args = NULL; + PyObject *__pyx_v_kwargs = NULL; + PyObject *__pyx_v_result = NULL; + PyObject *__pyx_v_exception = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + 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)(PyObject *); + int __pyx_t_9; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + int __pyx_t_12; + PyObject *__pyx_t_13 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__async_call_callback", 0); + + /* "providers.pxd":611 + * + * cdef inline void __async_call_callback(object future_result, object call, object future): + * try: # <<<<<<<<<<<<<< + * args, kwargs = future.result() + * result = call(*args, **kwargs) + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_3); + /*try:*/ { + + /* "providers.pxd":612 + * cdef inline void __async_call_callback(object future_result, object call, object future): + * try: + * args, kwargs = future.result() # <<<<<<<<<<<<<< + * result = call(*args, **kwargs) + * except Exception as exception: + */ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_future, __pyx_n_s_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 612, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + } + } + __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 612, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) { + PyObject* sequence = __pyx_t_4; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(1, 612, __pyx_L3_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); + } else { + __pyx_t_5 = PyList_GET_ITEM(sequence, 0); + __pyx_t_6 = PyList_GET_ITEM(sequence, 1); + } + __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, 612, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 612, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_6); + #endif + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 612, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext; + index = 0; __pyx_t_5 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_5)) goto __pyx_L9_unpacking_failed; + __Pyx_GOTREF(__pyx_t_5); + index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L9_unpacking_failed; + __Pyx_GOTREF(__pyx_t_6); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(1, 612, __pyx_L3_error) + __pyx_t_8 = NULL; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + goto __pyx_L10_unpacking_done; + __pyx_L9_unpacking_failed:; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_8 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(1, 612, __pyx_L3_error) + __pyx_L10_unpacking_done:; + } + __pyx_v_args = __pyx_t_5; + __pyx_t_5 = 0; + __pyx_v_kwargs = __pyx_t_6; + __pyx_t_6 = 0; + + /* "providers.pxd":613 + * try: + * args, kwargs = future.result() + * result = call(*args, **kwargs) # <<<<<<<<<<<<<< + * except Exception as exception: + * future_result.set_exception(exception) + */ + __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_v_args); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 613, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_4); + if (unlikely(__pyx_v_kwargs == Py_None)) { + PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); + __PYX_ERR(1, 613, __pyx_L3_error) + } + if (likely(PyDict_CheckExact(__pyx_v_kwargs))) { + __pyx_t_6 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 613, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_6); + } else { + __pyx_t_6 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_v_kwargs, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 613, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_6); + } + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_v_call, __pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 613, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v_result = __pyx_t_5; + __pyx_t_5 = 0; + + /* "providers.pxd":611 + * + * cdef inline void __async_call_callback(object future_result, object call, object future): + * try: # <<<<<<<<<<<<<< + * args, kwargs = future.result() + * result = call(*args, **kwargs) + */ + } + + /* "providers.pxd":617 + * future_result.set_exception(exception) + * else: + * if __is_future_or_coroutine(result): # <<<<<<<<<<<<<< + * result = asyncio.ensure_future(result) + * result.add_done_callback(functools.partial(__async_result_callback, future_result)) + */ + /*else:*/ { + __pyx_t_9 = (__pyx_f_19dependency_injector_9providers___is_future_or_coroutine(__pyx_v_result) != 0); + if (__pyx_t_9) { + + /* "providers.pxd":618 + * else: + * if __is_future_or_coroutine(result): + * result = asyncio.ensure_future(result) # <<<<<<<<<<<<<< + * result.add_done_callback(functools.partial(__async_result_callback, future_result)) + * return + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 618, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_ensure_future); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 618, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_4); + __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); + } + } + __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_v_result) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_result); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 618, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_5); + __pyx_t_5 = 0; + + /* "providers.pxd":619 + * if __is_future_or_coroutine(result): + * result = asyncio.ensure_future(result) + * result.add_done_callback(functools.partial(__async_result_callback, future_result)) # <<<<<<<<<<<<<< + * return + * future_result.set_result(result) + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s_add_done_callback); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 619, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_functools); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 619, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_partial); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 619, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_CFunc_object____object____object___to_py(__pyx_f_19dependency_injector_9providers___async_result_callback); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 619, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_11 = NULL; + __pyx_t_12 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) { + __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_10); + if (likely(__pyx_t_11)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); + __Pyx_INCREF(__pyx_t_11); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_10, function); + __pyx_t_12 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_10)) { + PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_t_7, __pyx_v_future_result}; + __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 619, __pyx_L5_except_error) + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) { + PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_t_7, __pyx_v_future_result}; + __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 619, __pyx_L5_except_error) + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } else + #endif + { + __pyx_t_13 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 619, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_13); + if (__pyx_t_11) { + __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_11); __pyx_t_11 = NULL; + } + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_13, 0+__pyx_t_12, __pyx_t_7); + __Pyx_INCREF(__pyx_v_future_result); + __Pyx_GIVEREF(__pyx_v_future_result); + PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_12, __pyx_v_future_result); + __pyx_t_7 = 0; + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_13, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 619, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + } + __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); + } + } + __pyx_t_5 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_10, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 619, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "providers.pxd":620 + * result = asyncio.ensure_future(result) + * result.add_done_callback(functools.partial(__async_result_callback, future_result)) + * return # <<<<<<<<<<<<<< + * future_result.set_result(result) + * + */ + goto __pyx_L6_except_return; + + /* "providers.pxd":617 + * future_result.set_exception(exception) + * else: + * if __is_future_or_coroutine(result): # <<<<<<<<<<<<<< + * result = asyncio.ensure_future(result) + * result.add_done_callback(functools.partial(__async_result_callback, future_result)) + */ + } + + /* "providers.pxd":621 + * result.add_done_callback(functools.partial(__async_result_callback, future_result)) + * return + * future_result.set_result(result) # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_future_result, __pyx_n_s_set_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 621, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && likely(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); + } + } + __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_v_result) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_result); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 621, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L8_try_end; + __pyx_L3_error:; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "providers.pxd":614 + * args, kwargs = future.result() + * result = call(*args, **kwargs) + * except Exception as exception: # <<<<<<<<<<<<<< + * future_result.set_exception(exception) + * else: + */ + __pyx_t_12 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); + if (__pyx_t_12) { + __Pyx_AddTraceback("dependency_injector.providers.__async_call_callback", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_6) < 0) __PYX_ERR(1, 614, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(__pyx_t_4); + __pyx_v_exception = __pyx_t_4; + + /* "providers.pxd":615 + * result = call(*args, **kwargs) + * except Exception as exception: + * future_result.set_exception(exception) # <<<<<<<<<<<<<< + * else: + * if __is_future_or_coroutine(result): + */ + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_future_result, __pyx_n_s_set_exception); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 615, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_13); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_13))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_13); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_13, function); + } + } + __pyx_t_10 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_13, __pyx_t_7, __pyx_v_exception) : __Pyx_PyObject_CallOneArg(__pyx_t_13, __pyx_v_exception); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 615, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + goto __pyx_L4_exception_handled; + } + goto __pyx_L5_except_error; + __pyx_L5_except_error:; + + /* "providers.pxd":611 + * + * cdef inline void __async_call_callback(object future_result, object call, object future): + * try: # <<<<<<<<<<<<<< + * args, kwargs = future.result() + * result = call(*args, **kwargs) + */ + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + goto __pyx_L1_error; + __pyx_L6_except_return:; + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + goto __pyx_L0; + __pyx_L4_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + __pyx_L8_try_end:; + } + + /* "providers.pxd":610 + * + * + * cdef inline void __async_call_callback(object future_result, object call, object future): # <<<<<<<<<<<<<< + * try: + * args, kwargs = future.result() + */ + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_XDECREF(__pyx_t_13); + __Pyx_WriteUnraisable("dependency_injector.providers.__async_call_callback", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_args); + __Pyx_XDECREF(__pyx_v_kwargs); + __Pyx_XDECREF(__pyx_v_result); + __Pyx_XDECREF(__pyx_v_exception); + __Pyx_RefNannyFinishContext(); +} + +/* "providers.pxd":624 + * + * + * cdef inline object __async_result_callback(object future_result, object future): # <<<<<<<<<<<<<< + * try: + * result = future.result() + */ + +static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___async_result_callback(PyObject *__pyx_v_future_result, PyObject *__pyx_v_future) { + PyObject *__pyx_v_result = NULL; + PyObject *__pyx_v_exception = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__async_result_callback", 0); + + /* "providers.pxd":625 + * + * cdef inline object __async_result_callback(object future_result, object future): + * try: # <<<<<<<<<<<<<< + * result = future.result() + * except Exception as exception: + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_3); + /*try:*/ { + + /* "providers.pxd":626 + * cdef inline object __async_result_callback(object future_result, object future): + * try: + * result = future.result() # <<<<<<<<<<<<<< + * except Exception as exception: + * future_result.set_exception(exception) + */ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_future, __pyx_n_s_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 626, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + } + } + __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 626, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_result = __pyx_t_4; + __pyx_t_4 = 0; + + /* "providers.pxd":625 + * + * cdef inline object __async_result_callback(object future_result, object future): + * try: # <<<<<<<<<<<<<< + * result = future.result() + * except Exception as exception: + */ + } + + /* "providers.pxd":630 + * future_result.set_exception(exception) + * else: + * future_result.set_result(result) # <<<<<<<<<<<<<< + * + * + */ + /*else:*/ { + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_future_result, __pyx_n_s_set_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 630, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + } + } + __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_v_result) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_result); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 630, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L8_try_end; + __pyx_L3_error:; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "providers.pxd":627 + * try: + * result = future.result() + * except Exception as exception: # <<<<<<<<<<<<<< + * future_result.set_exception(exception) + * else: + */ + __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); + if (__pyx_t_7) { + __Pyx_AddTraceback("dependency_injector.providers.__async_result_callback", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6) < 0) __PYX_ERR(1, 627, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(__pyx_t_5); + __pyx_v_exception = __pyx_t_5; + + /* "providers.pxd":628 + * result = future.result() + * except Exception as exception: + * future_result.set_exception(exception) # <<<<<<<<<<<<<< + * else: + * future_result.set_result(result) + */ + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_future_result, __pyx_n_s_set_exception); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 628, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_10 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9); + if (likely(__pyx_t_10)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_10); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_9, function); + } + } + __pyx_t_8 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_10, __pyx_v_exception) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_exception); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 628, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + goto __pyx_L4_exception_handled; + } + goto __pyx_L5_except_error; + __pyx_L5_except_error:; + + /* "providers.pxd":625 + * + * cdef inline object __async_result_callback(object future_result, object future): + * try: # <<<<<<<<<<<<<< + * result = future.result() + * except Exception as exception: + */ + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + goto __pyx_L1_error; + __pyx_L4_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + __pyx_L8_try_end:; + } + + /* "providers.pxd":624 + * + * + * cdef inline object __async_result_callback(object future_result, object future): # <<<<<<<<<<<<<< + * try: + * result = future.result() + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_AddTraceback("dependency_injector.providers.__async_result_callback", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_result); + __Pyx_XDECREF(__pyx_v_exception); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "providers.pxd":633 + * + * + * cdef inline object __callable_call(Callable self, tuple args, dict kwargs, ): # <<<<<<<<<<<<<< + * return __call( + * self.__provides, + */ + +static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___callable_call(struct __pyx_obj_19dependency_injector_9providers_Callable *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__callable_call", 0); + + /* "providers.pxd":634 + * + * cdef inline object __callable_call(Callable self, tuple args, dict kwargs, ): + * return __call( # <<<<<<<<<<<<<< + * self.__provides, + * args, + */ + __Pyx_XDECREF(__pyx_r); + + /* "providers.pxd":635 + * cdef inline object __callable_call(Callable self, tuple args, dict kwargs, ): + * return __call( + * self.__provides, # <<<<<<<<<<<<<< + * args, + * self.__args, + */ + __pyx_t_1 = __pyx_v_self->__pyx___provides; + __Pyx_INCREF(__pyx_t_1); + + /* "providers.pxd":637 + * self.__provides, + * args, + * self.__args, # <<<<<<<<<<<<<< + * self.__args_len, + * kwargs, + */ + __pyx_t_2 = __pyx_v_self->__pyx___args; + __Pyx_INCREF(__pyx_t_2); + + /* "providers.pxd":640 + * self.__args_len, + * kwargs, + * self.__kwargs, # <<<<<<<<<<<<<< + * self.__kwargs_len, + * self.__async_mode, + */ + __pyx_t_3 = __pyx_v_self->__pyx___kwargs; + __Pyx_INCREF(__pyx_t_3); + + /* "providers.pxd":634 + * + * cdef inline object __callable_call(Callable self, tuple args, dict kwargs, ): + * return __call( # <<<<<<<<<<<<<< + * self.__provides, + * args, + */ + __pyx_t_4 = __pyx_f_19dependency_injector_9providers___call(__pyx_t_1, __pyx_v_args, ((PyObject*)__pyx_t_2), __pyx_v_self->__pyx___args_len, __pyx_v_kwargs, ((PyObject*)__pyx_t_3), __pyx_v_self->__pyx___kwargs_len, __pyx_v_self->__pyx_base.__pyx___async_mode); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 634, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __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; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "providers.pxd":633 + * + * + * cdef inline object __callable_call(Callable self, tuple args, dict kwargs, ): # <<<<<<<<<<<<<< + * return __call( + * self.__provides, + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("dependency_injector.providers.__callable_call", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "providers.pxd":646 + * + * + * cdef inline object __factory_call(Factory self, tuple args, dict kwargs): # <<<<<<<<<<<<<< + * cdef object instance + * + */ + +static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___factory_call(struct __pyx_obj_19dependency_injector_9providers_Factory *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { + PyObject *__pyx_v_instance = 0; + PyObject *__pyx_v_attributes = NULL; + int __pyx_v_is_future_instance; + int __pyx_v_is_future_attributes; + PyObject *__pyx_v_future_instance = NULL; + PyObject *__pyx_v_future_attributes = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; + int __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__factory_call", 0); + + /* "providers.pxd":650 + * + * instance = __call( + * self.__instantiator.__provides, # <<<<<<<<<<<<<< + * args, + * self.__instantiator.__args, + */ + __pyx_t_1 = __pyx_v_self->__pyx___instantiator->__pyx___provides; + __Pyx_INCREF(__pyx_t_1); + + /* "providers.pxd":652 + * self.__instantiator.__provides, + * args, + * self.__instantiator.__args, # <<<<<<<<<<<<<< + * self.__instantiator.__args_len, + * kwargs, + */ + __pyx_t_2 = __pyx_v_self->__pyx___instantiator->__pyx___args; + __Pyx_INCREF(__pyx_t_2); + + /* "providers.pxd":655 + * self.__instantiator.__args_len, + * kwargs, + * self.__instantiator.__kwargs, # <<<<<<<<<<<<<< + * self.__instantiator.__kwargs_len, + * self.__async_mode, + */ + __pyx_t_3 = __pyx_v_self->__pyx___instantiator->__pyx___kwargs; + __Pyx_INCREF(__pyx_t_3); + + /* "providers.pxd":649 + * cdef object instance + * + * instance = __call( # <<<<<<<<<<<<<< + * self.__instantiator.__provides, + * args, + */ + __pyx_t_4 = __pyx_f_19dependency_injector_9providers___call(__pyx_t_1, __pyx_v_args, ((PyObject*)__pyx_t_2), __pyx_v_self->__pyx___instantiator->__pyx___args_len, __pyx_v_kwargs, ((PyObject*)__pyx_t_3), __pyx_v_self->__pyx___instantiator->__pyx___kwargs_len, __pyx_v_self->__pyx_base.__pyx___async_mode); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 649, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __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; + __pyx_v_instance = __pyx_t_4; + __pyx_t_4 = 0; + + /* "providers.pxd":660 + * ) + * + * if self.__attributes_len > 0: # <<<<<<<<<<<<<< + * attributes = __provide_attributes(self.__attributes, self.__attributes_len) + * + */ + __pyx_t_5 = ((__pyx_v_self->__pyx___attributes_len > 0) != 0); + if (__pyx_t_5) { + + /* "providers.pxd":661 + * + * if self.__attributes_len > 0: + * attributes = __provide_attributes(self.__attributes, self.__attributes_len) # <<<<<<<<<<<<<< + * + * is_future_instance = __is_future_or_coroutine(instance) + */ + __pyx_t_4 = __pyx_v_self->__pyx___attributes; + __Pyx_INCREF(__pyx_t_4); + __pyx_t_3 = __pyx_f_19dependency_injector_9providers___provide_attributes(((PyObject*)__pyx_t_4), __pyx_v_self->__pyx___attributes_len); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 661, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_attributes = __pyx_t_3; + __pyx_t_3 = 0; + + /* "providers.pxd":663 + * attributes = __provide_attributes(self.__attributes, self.__attributes_len) + * + * is_future_instance = __is_future_or_coroutine(instance) # <<<<<<<<<<<<<< + * is_future_attributes = __is_future_or_coroutine(attributes) + * + */ + __pyx_v_is_future_instance = __pyx_f_19dependency_injector_9providers___is_future_or_coroutine(__pyx_v_instance); + + /* "providers.pxd":664 + * + * is_future_instance = __is_future_or_coroutine(instance) + * is_future_attributes = __is_future_or_coroutine(attributes) # <<<<<<<<<<<<<< + * + * if is_future_instance or is_future_attributes: + */ + __pyx_v_is_future_attributes = __pyx_f_19dependency_injector_9providers___is_future_or_coroutine(__pyx_v_attributes); + + /* "providers.pxd":666 + * is_future_attributes = __is_future_or_coroutine(attributes) + * + * if is_future_instance or is_future_attributes: # <<<<<<<<<<<<<< + * future_instance = instance if is_future_instance else __future_result(instance) + * future_attributes = attributes if is_future_attributes else __future_result(attributes) + */ + __pyx_t_6 = (__pyx_v_is_future_instance != 0); + if (!__pyx_t_6) { + } else { + __pyx_t_5 = __pyx_t_6; + goto __pyx_L5_bool_binop_done; + } + __pyx_t_6 = (__pyx_v_is_future_attributes != 0); + __pyx_t_5 = __pyx_t_6; + __pyx_L5_bool_binop_done:; + if (__pyx_t_5) { + + /* "providers.pxd":667 + * + * if is_future_instance or is_future_attributes: + * future_instance = instance if is_future_instance else __future_result(instance) # <<<<<<<<<<<<<< + * future_attributes = attributes if is_future_attributes else __future_result(attributes) + * return __async_inject_attributes(future_instance, future_attributes) + */ + if ((__pyx_v_is_future_instance != 0)) { + __Pyx_INCREF(__pyx_v_instance); + __pyx_t_3 = __pyx_v_instance; + } else { + __pyx_t_4 = __pyx_f_19dependency_injector_9providers___future_result(__pyx_v_instance); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 667, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __pyx_t_4; + __pyx_t_4 = 0; + } + __pyx_v_future_instance = __pyx_t_3; + __pyx_t_3 = 0; + + /* "providers.pxd":668 + * if is_future_instance or is_future_attributes: + * future_instance = instance if is_future_instance else __future_result(instance) + * future_attributes = attributes if is_future_attributes else __future_result(attributes) # <<<<<<<<<<<<<< + * return __async_inject_attributes(future_instance, future_attributes) + * + */ + if ((__pyx_v_is_future_attributes != 0)) { + __Pyx_INCREF(__pyx_v_attributes); + __pyx_t_3 = __pyx_v_attributes; + } else { + __pyx_t_4 = __pyx_f_19dependency_injector_9providers___future_result(__pyx_v_attributes); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 668, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __pyx_t_4; + __pyx_t_4 = 0; + } + __pyx_v_future_attributes = __pyx_t_3; + __pyx_t_3 = 0; + + /* "providers.pxd":669 + * future_instance = instance if is_future_instance else __future_result(instance) + * future_attributes = attributes if is_future_attributes else __future_result(attributes) + * return __async_inject_attributes(future_instance, future_attributes) # <<<<<<<<<<<<<< + * + * __inject_attributes(instance, attributes) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __pyx_f_19dependency_injector_9providers___async_inject_attributes(__pyx_v_future_instance, __pyx_v_future_attributes); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 669, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "providers.pxd":666 + * is_future_attributes = __is_future_or_coroutine(attributes) + * + * if is_future_instance or is_future_attributes: # <<<<<<<<<<<<<< + * future_instance = instance if is_future_instance else __future_result(instance) + * future_attributes = attributes if is_future_attributes else __future_result(attributes) + */ + } + + /* "providers.pxd":671 + * return __async_inject_attributes(future_instance, future_attributes) + * + * __inject_attributes(instance, attributes) # <<<<<<<<<<<<<< + * + * return instance + */ + if (!(likely(PyDict_CheckExact(__pyx_v_attributes))||((__pyx_v_attributes) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_attributes)->tp_name), 0))) __PYX_ERR(1, 671, __pyx_L1_error) + __pyx_f_19dependency_injector_9providers___inject_attributes(__pyx_v_instance, ((PyObject*)__pyx_v_attributes)); + + /* "providers.pxd":660 + * ) + * + * if self.__attributes_len > 0: # <<<<<<<<<<<<<< + * attributes = __provide_attributes(self.__attributes, self.__attributes_len) + * + */ + } + + /* "providers.pxd":673 + * __inject_attributes(instance, attributes) + * + * return instance # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_instance); + __pyx_r = __pyx_v_instance; + goto __pyx_L0; + + /* "providers.pxd":646 + * + * + * cdef inline object __factory_call(Factory self, tuple args, dict kwargs): # <<<<<<<<<<<<<< + * cdef object instance + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("dependency_injector.providers.__factory_call", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_instance); + __Pyx_XDECREF(__pyx_v_attributes); + __Pyx_XDECREF(__pyx_v_future_instance); + __Pyx_XDECREF(__pyx_v_future_attributes); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "providers.pxd":676 + * + * + * cdef inline bint __is_future_or_coroutine(object instance): # <<<<<<<<<<<<<< + * return __isfuture(instance) or __iscoroutine(instance) + * + */ + +static CYTHON_INLINE int __pyx_f_19dependency_injector_9providers___is_future_or_coroutine(PyObject *__pyx_v_instance) { + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + __Pyx_RefNannySetupContext("__is_future_or_coroutine", 0); + + /* "providers.pxd":677 + * + * cdef inline bint __is_future_or_coroutine(object instance): + * return __isfuture(instance) or __iscoroutine(instance) # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_2 = (__pyx_f_19dependency_injector_9providers___isfuture(__pyx_v_instance) != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L3_bool_binop_done; + } + __pyx_t_2 = (__pyx_f_19dependency_injector_9providers___iscoroutine(__pyx_v_instance) != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L3_bool_binop_done:; + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "providers.pxd":676 + * + * + * cdef inline bint __is_future_or_coroutine(object instance): # <<<<<<<<<<<<<< + * return __isfuture(instance) or __iscoroutine(instance) + * + */ + + /* function exit code */ + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "providers.pxd":680 + * + * + * cdef inline bint __isfuture(object obj): # <<<<<<<<<<<<<< + * return hasattr(obj.__class__, "_asyncio_future_blocking") and obj._asyncio_future_blocking is not None + * + */ + +static CYTHON_INLINE int __pyx_f_19dependency_injector_9providers___isfuture(PyObject *__pyx_v_obj) { + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + int __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__isfuture", 0); + + /* "providers.pxd":681 + * + * cdef inline bint __isfuture(object obj): + * return hasattr(obj.__class__, "_asyncio_future_blocking") and obj._asyncio_future_blocking is not None # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 681, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_HasAttr(__pyx_t_2, __pyx_n_s_asyncio_future_blocking); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 681, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = (__pyx_t_3 != 0); + if (__pyx_t_4) { + } else { + __pyx_t_1 = __pyx_t_4; + goto __pyx_L3_bool_binop_done; + } + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_asyncio_future_blocking); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 681, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = (__pyx_t_2 != Py_None); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_3 = (__pyx_t_4 != 0); + __pyx_t_1 = __pyx_t_3; + __pyx_L3_bool_binop_done:; + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "providers.pxd":680 + * + * + * cdef inline bint __isfuture(object obj): # <<<<<<<<<<<<<< + * return hasattr(obj.__class__, "_asyncio_future_blocking") and obj._asyncio_future_blocking is not None + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_WriteUnraisable("dependency_injector.providers.__isfuture", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); + __pyx_r = 0; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "providers.pxd":684 + * + * + * cdef inline bint __iscoroutine(object obj): # <<<<<<<<<<<<<< + * if type(obj) in __iscoroutine_typecache: + * return True + */ + +static CYTHON_INLINE int __pyx_f_19dependency_injector_9providers___iscoroutine(PyObject *__pyx_v_obj) { + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + Py_ssize_t __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__iscoroutine", 0); + + /* "providers.pxd":685 + * + * cdef inline bint __iscoroutine(object obj): + * if type(obj) in __iscoroutine_typecache: # <<<<<<<<<<<<<< + * return True + * + */ + if (unlikely(__pyx_v_19dependency_injector_9providers___iscoroutine_typecache == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); + __PYX_ERR(1, 685, __pyx_L1_error) + } + __pyx_t_1 = (__Pyx_PySet_ContainsTF(((PyObject *)Py_TYPE(__pyx_v_obj)), __pyx_v_19dependency_injector_9providers___iscoroutine_typecache, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 685, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "providers.pxd":686 + * cdef inline bint __iscoroutine(object obj): + * if type(obj) in __iscoroutine_typecache: + * return True # <<<<<<<<<<<<<< + * + * if isinstance(obj, __COROUTINE_TYPES): + */ + __pyx_r = 1; + goto __pyx_L0; + + /* "providers.pxd":685 + * + * cdef inline bint __iscoroutine(object obj): + * if type(obj) in __iscoroutine_typecache: # <<<<<<<<<<<<<< + * return True + * + */ + } + + /* "providers.pxd":688 + * return True + * + * if isinstance(obj, __COROUTINE_TYPES): # <<<<<<<<<<<<<< + * # Just in case we don't want to cache more than 100 + * # positive types. That shouldn't ever happen, unless + */ + __pyx_t_3 = __pyx_v_19dependency_injector_9providers___COROUTINE_TYPES; + __Pyx_INCREF(__pyx_t_3); + __pyx_t_2 = PyObject_IsInstance(__pyx_v_obj, __pyx_t_3); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 688, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "providers.pxd":692 + * # positive types. That shouldn't ever happen, unless + * # someone stressing the system on purpose. + * if len(__iscoroutine_typecache) < 100: # <<<<<<<<<<<<<< + * __iscoroutine_typecache.add(type(obj)) + * return True + */ + __pyx_t_3 = __pyx_v_19dependency_injector_9providers___iscoroutine_typecache; + __Pyx_INCREF(__pyx_t_3); + if (unlikely(__pyx_t_3 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(1, 692, __pyx_L1_error) + } + __pyx_t_4 = PySet_GET_SIZE(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 692, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_1 = ((__pyx_t_4 < 0x64) != 0); + if (__pyx_t_1) { + + /* "providers.pxd":693 + * # someone stressing the system on purpose. + * if len(__iscoroutine_typecache) < 100: + * __iscoroutine_typecache.add(type(obj)) # <<<<<<<<<<<<<< + * return True + * else: + */ + if (unlikely(__pyx_v_19dependency_injector_9providers___iscoroutine_typecache == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "add"); + __PYX_ERR(1, 693, __pyx_L1_error) + } + __pyx_t_5 = PySet_Add(__pyx_v_19dependency_injector_9providers___iscoroutine_typecache, ((PyObject *)Py_TYPE(__pyx_v_obj))); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 693, __pyx_L1_error) + + /* "providers.pxd":692 + * # positive types. That shouldn't ever happen, unless + * # someone stressing the system on purpose. + * if len(__iscoroutine_typecache) < 100: # <<<<<<<<<<<<<< + * __iscoroutine_typecache.add(type(obj)) + * return True + */ + } + + /* "providers.pxd":694 + * if len(__iscoroutine_typecache) < 100: + * __iscoroutine_typecache.add(type(obj)) + * return True # <<<<<<<<<<<<<< + * else: + * return False + */ + __pyx_r = 1; + goto __pyx_L0; + + /* "providers.pxd":688 + * return True + * + * if isinstance(obj, __COROUTINE_TYPES): # <<<<<<<<<<<<<< + * # Just in case we don't want to cache more than 100 + * # positive types. That shouldn't ever happen, unless + */ + } + + /* "providers.pxd":696 + * return True + * else: + * return False # <<<<<<<<<<<<<< + * + * + */ + /*else*/ { + __pyx_r = 0; + goto __pyx_L0; + } + + /* "providers.pxd":684 + * + * + * cdef inline bint __iscoroutine(object obj): # <<<<<<<<<<<<<< + * if type(obj) in __iscoroutine_typecache: + * return True + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_WriteUnraisable("dependency_injector.providers.__iscoroutine", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); + __pyx_r = 0; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "providers.pxd":699 + * + * + * cdef inline object __future_result(object instance): # <<<<<<<<<<<<<< + * future_result = asyncio.Future() + * future_result.set_result(instance) + */ + +static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___future_result(PyObject *__pyx_v_instance) { + PyObject *__pyx_v_future_result = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__future_result", 0); + + /* "providers.pxd":700 + * + * cdef inline object __future_result(object instance): + * future_result = asyncio.Future() # <<<<<<<<<<<<<< + * future_result.set_result(instance) + * return future_result + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 700, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Future); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 700, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 700, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_future_result = __pyx_t_1; + __pyx_t_1 = 0; + + /* "providers.pxd":701 + * cdef inline object __future_result(object instance): + * future_result = asyncio.Future() + * future_result.set_result(instance) # <<<<<<<<<<<<<< + * return future_result + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_future_result, __pyx_n_s_set_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 701, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_instance) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_instance); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 701, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "providers.pxd":702 + * future_result = asyncio.Future() + * future_result.set_result(instance) + * return future_result # <<<<<<<<<<<<<< + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_future_result); + __pyx_r = __pyx_v_future_result; + goto __pyx_L0; + + /* "providers.pxd":699 + * + * + * cdef inline object __future_result(object instance): # <<<<<<<<<<<<<< + * future_result = asyncio.Future() + * future_result.set_result(instance) + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("dependency_injector.providers.__future_result", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_future_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cfunc.to_py":65 + * @cname("__Pyx_CFunc_void____object____object____object____object___to_py") + * cdef object __Pyx_CFunc_void____object____object____object____object___to_py(void (*f)(object, object, object, object) except *): + * def wrap(object future_result, object args, object future_args_kwargs, object future): # <<<<<<<<<<<<<< + * """wrap(future_result, args, future_args_kwargs, future) -> 'void'""" + * f(future_result, args, future_args_kwargs, future) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_11cfunc_dot_to_py_64__Pyx_CFunc_void____object____object____object____object___to_py_1wrap(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_11cfunc_dot_to_py_64__Pyx_CFunc_void____object____object____object____object___to_py_wrap[] = "wrap(future_result, args, future_args_kwargs, future) -> 'void'"; +static PyMethodDef __pyx_mdef_11cfunc_dot_to_py_64__Pyx_CFunc_void____object____object____object____object___to_py_1wrap = {"wrap", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11cfunc_dot_to_py_64__Pyx_CFunc_void____object____object____object____object___to_py_1wrap, METH_VARARGS|METH_KEYWORDS, __pyx_doc_11cfunc_dot_to_py_64__Pyx_CFunc_void____object____object____object____object___to_py_wrap}; +static PyObject *__pyx_pw_11cfunc_dot_to_py_64__Pyx_CFunc_void____object____object____object____object___to_py_1wrap(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_future_result = 0; + PyObject *__pyx_v_args = 0; + PyObject *__pyx_v_future_args_kwargs = 0; + PyObject *__pyx_v_future = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("wrap (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_future_result,&__pyx_n_s_args,&__pyx_n_s_future_args_kwargs,&__pyx_n_s_future,0}; + PyObject* values[4] = {0,0,0,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 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_future_result)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_args)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("wrap", 1, 4, 4, 1); __PYX_ERR(2, 65, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_future_args_kwargs)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("wrap", 1, 4, 4, 2); __PYX_ERR(2, 65, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 3: + if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_future)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("wrap", 1, 4, 4, 3); __PYX_ERR(2, 65, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "wrap") < 0)) __PYX_ERR(2, 65, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + } + __pyx_v_future_result = values[0]; + __pyx_v_args = values[1]; + __pyx_v_future_args_kwargs = values[2]; + __pyx_v_future = values[3]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("wrap", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 65, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("cfunc.to_py.__Pyx_CFunc_void____object____object____object____object___to_py.wrap", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11cfunc_dot_to_py_64__Pyx_CFunc_void____object____object____object____object___to_py_wrap(__pyx_self, __pyx_v_future_result, __pyx_v_args, __pyx_v_future_args_kwargs, __pyx_v_future); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11cfunc_dot_to_py_64__Pyx_CFunc_void____object____object____object____object___to_py_wrap(PyObject *__pyx_self, PyObject *__pyx_v_future_result, PyObject *__pyx_v_args, PyObject *__pyx_v_future_args_kwargs, PyObject *__pyx_v_future) { + struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____object____object____object___to_py *__pyx_cur_scope; + struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____object____object____object___to_py *__pyx_outer_scope; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("wrap", 0); + __pyx_outer_scope = (struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____object____object____object___to_py *) __Pyx_CyFunction_GetClosure(__pyx_self); + __pyx_cur_scope = __pyx_outer_scope; + + /* "cfunc.to_py":67 + * def wrap(object future_result, object args, object future_args_kwargs, object future): + * """wrap(future_result, args, future_args_kwargs, future) -> 'void'""" + * f(future_result, args, future_args_kwargs, future) # <<<<<<<<<<<<<< + * return wrap + * + */ + __pyx_cur_scope->__pyx_v_f(__pyx_v_future_result, __pyx_v_args, __pyx_v_future_args_kwargs, __pyx_v_future); if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 67, __pyx_L1_error) + + /* "cfunc.to_py":65 + * @cname("__Pyx_CFunc_void____object____object____object____object___to_py") + * cdef object __Pyx_CFunc_void____object____object____object____object___to_py(void (*f)(object, object, object, object) except *): + * def wrap(object future_result, object args, object future_args_kwargs, object future): # <<<<<<<<<<<<<< + * """wrap(future_result, args, future_args_kwargs, future) -> 'void'""" + * f(future_result, args, future_args_kwargs, future) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("cfunc.to_py.__Pyx_CFunc_void____object____object____object____object___to_py.wrap", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cfunc.to_py":64 + * + * @cname("__Pyx_CFunc_void____object____object____object____object___to_py") + * cdef object __Pyx_CFunc_void____object____object____object____object___to_py(void (*f)(object, object, object, object) except *): # <<<<<<<<<<<<<< + * def wrap(object future_result, object args, object future_args_kwargs, object future): + * """wrap(future_result, args, future_args_kwargs, future) -> 'void'""" + */ + +static PyObject *__Pyx_CFunc_void____object____object____object____object___to_py(void (*__pyx_v_f)(PyObject *, PyObject *, PyObject *, PyObject *)) { + struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____object____object____object___to_py *__pyx_cur_scope; + PyObject *__pyx_v_wrap = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_CFunc_void____object____object____object____object___to_py", 0); + __pyx_cur_scope = (struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____object____object____object___to_py *)__pyx_tp_new___pyx_scope_struct____Pyx_CFunc_void____object____object____object____object___to_py(__pyx_ptype___pyx_scope_struct____Pyx_CFunc_void____object____object____object____object___to_py, __pyx_empty_tuple, NULL); + if (unlikely(!__pyx_cur_scope)) { + __pyx_cur_scope = ((struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____object____object____object___to_py *)Py_None); + __Pyx_INCREF(Py_None); + __PYX_ERR(2, 64, __pyx_L1_error) + } else { + __Pyx_GOTREF(__pyx_cur_scope); + } + __pyx_cur_scope->__pyx_v_f = __pyx_v_f; + + /* "cfunc.to_py":65 + * @cname("__Pyx_CFunc_void____object____object____object____object___to_py") + * cdef object __Pyx_CFunc_void____object____object____object____object___to_py(void (*f)(object, object, object, object) except *): + * def wrap(object future_result, object args, object future_args_kwargs, object future): # <<<<<<<<<<<<<< + * """wrap(future_result, args, future_args_kwargs, future) -> 'void'""" + * f(future_result, args, future_args_kwargs, future) + */ + __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_11cfunc_dot_to_py_64__Pyx_CFunc_void____object____object____object____object___to_py_1wrap, 0, __pyx_n_s_Pyx_CFunc_void____object____ob, ((PyObject*)__pyx_cur_scope), __pyx_n_s_cfunc_to_py, __pyx_d, ((PyObject *)__pyx_codeobj__6)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 65, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_wrap = __pyx_t_1; + __pyx_t_1 = 0; + + /* "cfunc.to_py":68 + * """wrap(future_result, args, future_args_kwargs, future) -> 'void'""" + * f(future_result, args, future_args_kwargs, future) + * return wrap # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_wrap); + __pyx_r = __pyx_v_wrap; + goto __pyx_L0; + + /* "cfunc.to_py":64 + * + * @cname("__Pyx_CFunc_void____object____object____object____object___to_py") + * cdef object __Pyx_CFunc_void____object____object____object____object___to_py(void (*f)(object, object, object, object) except *): # <<<<<<<<<<<<<< + * def wrap(object future_result, object args, object future_args_kwargs, object future): + * """wrap(future_result, args, future_args_kwargs, future) -> 'void'""" + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cfunc.to_py.__Pyx_CFunc_void____object____object____object____object___to_py", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_wrap); + __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cfunc.to_py":65 + * @cname("__Pyx_CFunc_void____object____object___to_py") + * cdef object __Pyx_CFunc_void____object____object___to_py(void (*f)(object, object) except *): + * def wrap(object future_result, object future): # <<<<<<<<<<<<<< + * """wrap(future_result, future) -> 'void'""" + * f(future_result, future) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_11cfunc_dot_to_py_44__Pyx_CFunc_void____object____object___to_py_1wrap(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_11cfunc_dot_to_py_44__Pyx_CFunc_void____object____object___to_py_wrap[] = "wrap(future_result, future) -> 'void'"; +static PyMethodDef __pyx_mdef_11cfunc_dot_to_py_44__Pyx_CFunc_void____object____object___to_py_1wrap = {"wrap", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11cfunc_dot_to_py_44__Pyx_CFunc_void____object____object___to_py_1wrap, METH_VARARGS|METH_KEYWORDS, __pyx_doc_11cfunc_dot_to_py_44__Pyx_CFunc_void____object____object___to_py_wrap}; +static PyObject *__pyx_pw_11cfunc_dot_to_py_44__Pyx_CFunc_void____object____object___to_py_1wrap(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_future_result = 0; + PyObject *__pyx_v_future = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("wrap (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_future_result,&__pyx_n_s_future,0}; + PyObject* values[2] = {0,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 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_future_result)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_future)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("wrap", 1, 2, 2, 1); __PYX_ERR(2, 65, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "wrap") < 0)) __PYX_ERR(2, 65, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_future_result = values[0]; + __pyx_v_future = values[1]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("wrap", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 65, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("cfunc.to_py.__Pyx_CFunc_void____object____object___to_py.wrap", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11cfunc_dot_to_py_44__Pyx_CFunc_void____object____object___to_py_wrap(__pyx_self, __pyx_v_future_result, __pyx_v_future); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11cfunc_dot_to_py_44__Pyx_CFunc_void____object____object___to_py_wrap(PyObject *__pyx_self, PyObject *__pyx_v_future_result, PyObject *__pyx_v_future) { + struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____object___to_py *__pyx_cur_scope; + struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____object___to_py *__pyx_outer_scope; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("wrap", 0); + __pyx_outer_scope = (struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____object___to_py *) __Pyx_CyFunction_GetClosure(__pyx_self); + __pyx_cur_scope = __pyx_outer_scope; + + /* "cfunc.to_py":67 + * def wrap(object future_result, object future): + * """wrap(future_result, future) -> 'void'""" + * f(future_result, future) # <<<<<<<<<<<<<< + * return wrap + * + */ + __pyx_cur_scope->__pyx_v_f(__pyx_v_future_result, __pyx_v_future); if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 67, __pyx_L1_error) + + /* "cfunc.to_py":65 + * @cname("__Pyx_CFunc_void____object____object___to_py") + * cdef object __Pyx_CFunc_void____object____object___to_py(void (*f)(object, object) except *): + * def wrap(object future_result, object future): # <<<<<<<<<<<<<< + * """wrap(future_result, future) -> 'void'""" + * f(future_result, future) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("cfunc.to_py.__Pyx_CFunc_void____object____object___to_py.wrap", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cfunc.to_py":64 + * + * @cname("__Pyx_CFunc_void____object____object___to_py") + * cdef object __Pyx_CFunc_void____object____object___to_py(void (*f)(object, object) except *): # <<<<<<<<<<<<<< + * def wrap(object future_result, object future): + * """wrap(future_result, future) -> 'void'""" + */ + +static PyObject *__Pyx_CFunc_void____object____object___to_py(void (*__pyx_v_f)(PyObject *, PyObject *)) { + struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____object___to_py *__pyx_cur_scope; + PyObject *__pyx_v_wrap = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_CFunc_void____object____object___to_py", 0); + __pyx_cur_scope = (struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____object___to_py *)__pyx_tp_new___pyx_scope_struct____Pyx_CFunc_void____object____object___to_py(__pyx_ptype___pyx_scope_struct____Pyx_CFunc_void____object____object___to_py, __pyx_empty_tuple, NULL); + if (unlikely(!__pyx_cur_scope)) { + __pyx_cur_scope = ((struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____object___to_py *)Py_None); + __Pyx_INCREF(Py_None); + __PYX_ERR(2, 64, __pyx_L1_error) + } else { + __Pyx_GOTREF(__pyx_cur_scope); + } + __pyx_cur_scope->__pyx_v_f = __pyx_v_f; + + /* "cfunc.to_py":65 + * @cname("__Pyx_CFunc_void____object____object___to_py") + * cdef object __Pyx_CFunc_void____object____object___to_py(void (*f)(object, object) except *): + * def wrap(object future_result, object future): # <<<<<<<<<<<<<< + * """wrap(future_result, future) -> 'void'""" + * f(future_result, future) + */ + __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_11cfunc_dot_to_py_44__Pyx_CFunc_void____object____object___to_py_1wrap, 0, __pyx_n_s_Pyx_CFunc_void____object____ob_2, ((PyObject*)__pyx_cur_scope), __pyx_n_s_cfunc_to_py, __pyx_d, ((PyObject *)__pyx_codeobj__8)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 65, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_wrap = __pyx_t_1; + __pyx_t_1 = 0; + + /* "cfunc.to_py":68 + * """wrap(future_result, future) -> 'void'""" + * f(future_result, future) + * return wrap # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_wrap); + __pyx_r = __pyx_v_wrap; + goto __pyx_L0; + + /* "cfunc.to_py":64 + * + * @cname("__Pyx_CFunc_void____object____object___to_py") + * cdef object __Pyx_CFunc_void____object____object___to_py(void (*f)(object, object) except *): # <<<<<<<<<<<<<< + * def wrap(object future_result, object future): + * """wrap(future_result, future) -> 'void'""" + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cfunc.to_py.__Pyx_CFunc_void____object____object___to_py", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_wrap); + __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cfunc.to_py":65 + * @cname("__Pyx_CFunc_void____object____object____object___to_py") + * cdef object __Pyx_CFunc_void____object____object____object___to_py(void (*f)(object, object, object) except *): + * def wrap(object future_result, object call, object future): # <<<<<<<<<<<<<< + * """wrap(future_result, call, future) -> 'void'""" + * f(future_result, call, future) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_11cfunc_dot_to_py_54__Pyx_CFunc_void____object____object____object___to_py_1wrap(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_11cfunc_dot_to_py_54__Pyx_CFunc_void____object____object____object___to_py_wrap[] = "wrap(future_result, call, future) -> 'void'"; +static PyMethodDef __pyx_mdef_11cfunc_dot_to_py_54__Pyx_CFunc_void____object____object____object___to_py_1wrap = {"wrap", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11cfunc_dot_to_py_54__Pyx_CFunc_void____object____object____object___to_py_1wrap, METH_VARARGS|METH_KEYWORDS, __pyx_doc_11cfunc_dot_to_py_54__Pyx_CFunc_void____object____object____object___to_py_wrap}; +static PyObject *__pyx_pw_11cfunc_dot_to_py_54__Pyx_CFunc_void____object____object____object___to_py_1wrap(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_future_result = 0; + PyObject *__pyx_v_call = 0; + PyObject *__pyx_v_future = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("wrap (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_future_result,&__pyx_n_s_call,&__pyx_n_s_future,0}; + PyObject* values[3] = {0,0,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 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_future_result)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_call)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("wrap", 1, 3, 3, 1); __PYX_ERR(2, 65, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_future)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("wrap", 1, 3, 3, 2); __PYX_ERR(2, 65, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "wrap") < 0)) __PYX_ERR(2, 65, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + } + __pyx_v_future_result = values[0]; + __pyx_v_call = values[1]; + __pyx_v_future = values[2]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("wrap", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 65, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("cfunc.to_py.__Pyx_CFunc_void____object____object____object___to_py.wrap", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11cfunc_dot_to_py_54__Pyx_CFunc_void____object____object____object___to_py_wrap(__pyx_self, __pyx_v_future_result, __pyx_v_call, __pyx_v_future); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11cfunc_dot_to_py_54__Pyx_CFunc_void____object____object____object___to_py_wrap(PyObject *__pyx_self, PyObject *__pyx_v_future_result, PyObject *__pyx_v_call, PyObject *__pyx_v_future) { + struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____object____object___to_py *__pyx_cur_scope; + struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____object____object___to_py *__pyx_outer_scope; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("wrap", 0); + __pyx_outer_scope = (struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____object____object___to_py *) __Pyx_CyFunction_GetClosure(__pyx_self); + __pyx_cur_scope = __pyx_outer_scope; + + /* "cfunc.to_py":67 + * def wrap(object future_result, object call, object future): + * """wrap(future_result, call, future) -> 'void'""" + * f(future_result, call, future) # <<<<<<<<<<<<<< + * return wrap + * + */ + __pyx_cur_scope->__pyx_v_f(__pyx_v_future_result, __pyx_v_call, __pyx_v_future); if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 67, __pyx_L1_error) + + /* "cfunc.to_py":65 + * @cname("__Pyx_CFunc_void____object____object____object___to_py") + * cdef object __Pyx_CFunc_void____object____object____object___to_py(void (*f)(object, object, object) except *): + * def wrap(object future_result, object call, object future): # <<<<<<<<<<<<<< + * """wrap(future_result, call, future) -> 'void'""" + * f(future_result, call, future) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("cfunc.to_py.__Pyx_CFunc_void____object____object____object___to_py.wrap", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cfunc.to_py":64 + * + * @cname("__Pyx_CFunc_void____object____object____object___to_py") + * cdef object __Pyx_CFunc_void____object____object____object___to_py(void (*f)(object, object, object) except *): # <<<<<<<<<<<<<< + * def wrap(object future_result, object call, object future): + * """wrap(future_result, call, future) -> 'void'""" + */ + +static PyObject *__Pyx_CFunc_void____object____object____object___to_py(void (*__pyx_v_f)(PyObject *, PyObject *, PyObject *)) { + struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____object____object___to_py *__pyx_cur_scope; + PyObject *__pyx_v_wrap = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_CFunc_void____object____object____object___to_py", 0); + __pyx_cur_scope = (struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____object____object___to_py *)__pyx_tp_new___pyx_scope_struct____Pyx_CFunc_void____object____object____object___to_py(__pyx_ptype___pyx_scope_struct____Pyx_CFunc_void____object____object____object___to_py, __pyx_empty_tuple, NULL); + if (unlikely(!__pyx_cur_scope)) { + __pyx_cur_scope = ((struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____object____object___to_py *)Py_None); + __Pyx_INCREF(Py_None); + __PYX_ERR(2, 64, __pyx_L1_error) + } else { + __Pyx_GOTREF(__pyx_cur_scope); + } + __pyx_cur_scope->__pyx_v_f = __pyx_v_f; + + /* "cfunc.to_py":65 + * @cname("__Pyx_CFunc_void____object____object____object___to_py") + * cdef object __Pyx_CFunc_void____object____object____object___to_py(void (*f)(object, object, object) except *): + * def wrap(object future_result, object call, object future): # <<<<<<<<<<<<<< + * """wrap(future_result, call, future) -> 'void'""" + * f(future_result, call, future) + */ + __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_11cfunc_dot_to_py_54__Pyx_CFunc_void____object____object____object___to_py_1wrap, 0, __pyx_n_s_Pyx_CFunc_void____object____ob_3, ((PyObject*)__pyx_cur_scope), __pyx_n_s_cfunc_to_py, __pyx_d, ((PyObject *)__pyx_codeobj__10)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 65, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_wrap = __pyx_t_1; + __pyx_t_1 = 0; + + /* "cfunc.to_py":68 + * """wrap(future_result, call, future) -> 'void'""" + * f(future_result, call, future) + * return wrap # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_wrap); + __pyx_r = __pyx_v_wrap; + goto __pyx_L0; + + /* "cfunc.to_py":64 + * + * @cname("__Pyx_CFunc_void____object____object____object___to_py") + * cdef object __Pyx_CFunc_void____object____object____object___to_py(void (*f)(object, object, object) except *): # <<<<<<<<<<<<<< + * def wrap(object future_result, object call, object future): + * """wrap(future_result, call, future) -> 'void'""" + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cfunc.to_py.__Pyx_CFunc_void____object____object____object___to_py", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_wrap); + __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cfunc.to_py":65 + * @cname("__Pyx_CFunc_object____object____object___to_py") + * cdef object __Pyx_CFunc_object____object____object___to_py(object (*f)(object, object) ): + * def wrap(object future_result, object future): # <<<<<<<<<<<<<< + * """wrap(future_result, future)""" + * return f(future_result, future) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_11cfunc_dot_to_py_46__Pyx_CFunc_object____object____object___to_py_1wrap(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_11cfunc_dot_to_py_46__Pyx_CFunc_object____object____object___to_py_wrap[] = "wrap(future_result, future)"; +static PyMethodDef __pyx_mdef_11cfunc_dot_to_py_46__Pyx_CFunc_object____object____object___to_py_1wrap = {"wrap", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11cfunc_dot_to_py_46__Pyx_CFunc_object____object____object___to_py_1wrap, METH_VARARGS|METH_KEYWORDS, __pyx_doc_11cfunc_dot_to_py_46__Pyx_CFunc_object____object____object___to_py_wrap}; +static PyObject *__pyx_pw_11cfunc_dot_to_py_46__Pyx_CFunc_object____object____object___to_py_1wrap(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_future_result = 0; + PyObject *__pyx_v_future = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("wrap (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_future_result,&__pyx_n_s_future,0}; + PyObject* values[2] = {0,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 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_future_result)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_future)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("wrap", 1, 2, 2, 1); __PYX_ERR(2, 65, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "wrap") < 0)) __PYX_ERR(2, 65, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_future_result = values[0]; + __pyx_v_future = values[1]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("wrap", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 65, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("cfunc.to_py.__Pyx_CFunc_object____object____object___to_py.wrap", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_11cfunc_dot_to_py_46__Pyx_CFunc_object____object____object___to_py_wrap(__pyx_self, __pyx_v_future_result, __pyx_v_future); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_11cfunc_dot_to_py_46__Pyx_CFunc_object____object____object___to_py_wrap(PyObject *__pyx_self, PyObject *__pyx_v_future_result, PyObject *__pyx_v_future) { + struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object____object____object___to_py *__pyx_cur_scope; + struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object____object____object___to_py *__pyx_outer_scope; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("wrap", 0); + __pyx_outer_scope = (struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object____object____object___to_py *) __Pyx_CyFunction_GetClosure(__pyx_self); + __pyx_cur_scope = __pyx_outer_scope; + + /* "cfunc.to_py":67 + * def wrap(object future_result, object future): + * """wrap(future_result, future)""" + * return f(future_result, future) # <<<<<<<<<<<<<< + * return wrap + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_cur_scope->__pyx_v_f(__pyx_v_future_result, __pyx_v_future); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 67, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "cfunc.to_py":65 + * @cname("__Pyx_CFunc_object____object____object___to_py") + * cdef object __Pyx_CFunc_object____object____object___to_py(object (*f)(object, object) ): + * def wrap(object future_result, object future): # <<<<<<<<<<<<<< + * """wrap(future_result, future)""" + * return f(future_result, future) + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cfunc.to_py.__Pyx_CFunc_object____object____object___to_py.wrap", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cfunc.to_py":64 + * + * @cname("__Pyx_CFunc_object____object____object___to_py") + * cdef object __Pyx_CFunc_object____object____object___to_py(object (*f)(object, object) ): # <<<<<<<<<<<<<< + * def wrap(object future_result, object future): + * """wrap(future_result, future)""" + */ + +static PyObject *__Pyx_CFunc_object____object____object___to_py(PyObject *(*__pyx_v_f)(PyObject *, PyObject *)) { + struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object____object____object___to_py *__pyx_cur_scope; + PyObject *__pyx_v_wrap = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_CFunc_object____object____object___to_py", 0); + __pyx_cur_scope = (struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object____object____object___to_py *)__pyx_tp_new___pyx_scope_struct____Pyx_CFunc_object____object____object___to_py(__pyx_ptype___pyx_scope_struct____Pyx_CFunc_object____object____object___to_py, __pyx_empty_tuple, NULL); + if (unlikely(!__pyx_cur_scope)) { + __pyx_cur_scope = ((struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object____object____object___to_py *)Py_None); + __Pyx_INCREF(Py_None); + __PYX_ERR(2, 64, __pyx_L1_error) + } else { + __Pyx_GOTREF(__pyx_cur_scope); + } + __pyx_cur_scope->__pyx_v_f = __pyx_v_f; + + /* "cfunc.to_py":65 + * @cname("__Pyx_CFunc_object____object____object___to_py") + * cdef object __Pyx_CFunc_object____object____object___to_py(object (*f)(object, object) ): + * def wrap(object future_result, object future): # <<<<<<<<<<<<<< + * """wrap(future_result, future)""" + * return f(future_result, future) + */ + __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_11cfunc_dot_to_py_46__Pyx_CFunc_object____object____object___to_py_1wrap, 0, __pyx_n_s_Pyx_CFunc_object____object, ((PyObject*)__pyx_cur_scope), __pyx_n_s_cfunc_to_py, __pyx_d, ((PyObject *)__pyx_codeobj__12)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 65, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_wrap = __pyx_t_1; + __pyx_t_1 = 0; + + /* "cfunc.to_py":68 + * """wrap(future_result, future)""" + * return f(future_result, future) + * return wrap # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_wrap); + __pyx_r = __pyx_v_wrap; + goto __pyx_L0; + + /* "cfunc.to_py":64 + * + * @cname("__Pyx_CFunc_object____object____object___to_py") + * cdef object __Pyx_CFunc_object____object____object___to_py(object (*f)(object, object) ): # <<<<<<<<<<<<<< + * def wrap(object future_result, object future): + * """wrap(future_result, future)""" + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cfunc.to_py.__Pyx_CFunc_object____object____object___to_py", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_wrap); + __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + static struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct___get_sync_patched *__pyx_freelist_19dependency_injector_8_cwiring___pyx_scope_struct___get_sync_patched[8]; static int __pyx_freecount_19dependency_injector_8_cwiring___pyx_scope_struct___get_sync_patched = 0; @@ -4026,14 +11444,14 @@ static PyTypeObject __pyx_type_19dependency_injector_8_cwiring___pyx_scope_struc #endif }; -static struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_1__get_async_patched *__pyx_freelist_19dependency_injector_8_cwiring___pyx_scope_struct_1__get_async_patched[8]; -static int __pyx_freecount_19dependency_injector_8_cwiring___pyx_scope_struct_1__get_async_patched = 0; +static struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_1__async_inject *__pyx_freelist_19dependency_injector_8_cwiring___pyx_scope_struct_1__async_inject[8]; +static int __pyx_freecount_19dependency_injector_8_cwiring___pyx_scope_struct_1__async_inject = 0; -static PyObject *__pyx_tp_new_19dependency_injector_8_cwiring___pyx_scope_struct_1__get_async_patched(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { +static PyObject *__pyx_tp_new_19dependency_injector_8_cwiring___pyx_scope_struct_1__async_inject(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; - if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_19dependency_injector_8_cwiring___pyx_scope_struct_1__get_async_patched > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_1__get_async_patched)))) { - o = (PyObject*)__pyx_freelist_19dependency_injector_8_cwiring___pyx_scope_struct_1__get_async_patched[--__pyx_freecount_19dependency_injector_8_cwiring___pyx_scope_struct_1__get_async_patched]; - memset(o, 0, sizeof(struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_1__get_async_patched)); + if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_19dependency_injector_8_cwiring___pyx_scope_struct_1__async_inject > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_1__async_inject)))) { + o = (PyObject*)__pyx_freelist_19dependency_injector_8_cwiring___pyx_scope_struct_1__async_inject[--__pyx_freecount_19dependency_injector_8_cwiring___pyx_scope_struct_1__async_inject]; + memset(o, 0, sizeof(struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_1__async_inject)); (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else { @@ -4043,137 +11461,18 @@ static PyObject *__pyx_tp_new_19dependency_injector_8_cwiring___pyx_scope_struct return o; } -static void __pyx_tp_dealloc_19dependency_injector_8_cwiring___pyx_scope_struct_1__get_async_patched(PyObject *o) { - struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_1__get_async_patched *p = (struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_1__get_async_patched *)o; +static void __pyx_tp_dealloc_19dependency_injector_8_cwiring___pyx_scope_struct_1__async_inject(PyObject *o) { + struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_1__async_inject *p = (struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_1__async_inject *)o; PyObject_GC_UnTrack(o); - Py_CLEAR(p->__pyx_v__patched); - Py_CLEAR(p->__pyx_v_fn); - if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_19dependency_injector_8_cwiring___pyx_scope_struct_1__get_async_patched < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_1__get_async_patched)))) { - __pyx_freelist_19dependency_injector_8_cwiring___pyx_scope_struct_1__get_async_patched[__pyx_freecount_19dependency_injector_8_cwiring___pyx_scope_struct_1__get_async_patched++] = ((struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_1__get_async_patched *)o); - } else { - (*Py_TYPE(o)->tp_free)(o); - } -} - -static int __pyx_tp_traverse_19dependency_injector_8_cwiring___pyx_scope_struct_1__get_async_patched(PyObject *o, visitproc v, void *a) { - int e; - struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_1__get_async_patched *p = (struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_1__get_async_patched *)o; - if (p->__pyx_v__patched) { - e = (*v)(p->__pyx_v__patched, a); if (e) return e; - } - if (p->__pyx_v_fn) { - e = (*v)(p->__pyx_v_fn, a); if (e) return e; - } - return 0; -} - -static int __pyx_tp_clear_19dependency_injector_8_cwiring___pyx_scope_struct_1__get_async_patched(PyObject *o) { - PyObject* tmp; - struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_1__get_async_patched *p = (struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_1__get_async_patched *)o; - tmp = ((PyObject*)p->__pyx_v__patched); - p->__pyx_v__patched = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->__pyx_v_fn); - p->__pyx_v_fn = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - return 0; -} - -static PyTypeObject __pyx_type_19dependency_injector_8_cwiring___pyx_scope_struct_1__get_async_patched = { - PyVarObject_HEAD_INIT(0, 0) - "dependency_injector._cwiring.__pyx_scope_struct_1__get_async_patched", /*tp_name*/ - sizeof(struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_1__get_async_patched), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - __pyx_tp_dealloc_19dependency_injector_8_cwiring___pyx_scope_struct_1__get_async_patched, /*tp_dealloc*/ - #if PY_VERSION_HEX < 0x030800b4 - 0, /*tp_print*/ - #endif - #if PY_VERSION_HEX >= 0x030800b4 - 0, /*tp_vectorcall_offset*/ - #endif - 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 - 0, /*tp_repr*/ - 0, /*tp_as_number*/ - 0, /*tp_as_sequence*/ - 0, /*tp_as_mapping*/ - 0, /*tp_hash*/ - 0, /*tp_call*/ - 0, /*tp_str*/ - 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_HAVE_GC, /*tp_flags*/ - 0, /*tp_doc*/ - __pyx_tp_traverse_19dependency_injector_8_cwiring___pyx_scope_struct_1__get_async_patched, /*tp_traverse*/ - __pyx_tp_clear_19dependency_injector_8_cwiring___pyx_scope_struct_1__get_async_patched, /*tp_clear*/ - 0, /*tp_richcompare*/ - 0, /*tp_weaklistoffset*/ - 0, /*tp_iter*/ - 0, /*tp_iternext*/ - 0, /*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*/ - 0, /*tp_init*/ - 0, /*tp_alloc*/ - __pyx_tp_new_19dependency_injector_8_cwiring___pyx_scope_struct_1__get_async_patched, /*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 - #if PY_VERSION_HEX >= 0x030800b1 - 0, /*tp_vectorcall*/ - #endif - #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 - 0, /*tp_print*/ - #endif -}; - -static struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_2__patched *__pyx_freelist_19dependency_injector_8_cwiring___pyx_scope_struct_2__patched[8]; -static int __pyx_freecount_19dependency_injector_8_cwiring___pyx_scope_struct_2__patched = 0; - -static PyObject *__pyx_tp_new_19dependency_injector_8_cwiring___pyx_scope_struct_2__patched(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - PyObject *o; - if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_19dependency_injector_8_cwiring___pyx_scope_struct_2__patched > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_2__patched)))) { - o = (PyObject*)__pyx_freelist_19dependency_injector_8_cwiring___pyx_scope_struct_2__patched[--__pyx_freecount_19dependency_injector_8_cwiring___pyx_scope_struct_2__patched]; - memset(o, 0, sizeof(struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_2__patched)); - (void) PyObject_INIT(o, t); - PyObject_GC_Track(o); - } else { - o = (*t->tp_alloc)(t, 0); - if (unlikely(!o)) return 0; - } - return o; -} - -static void __pyx_tp_dealloc_19dependency_injector_8_cwiring___pyx_scope_struct_2__patched(PyObject *o) { - struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_2__patched *p = (struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_2__patched *)o; - PyObject_GC_UnTrack(o); - Py_CLEAR(p->__pyx_outer_scope); Py_CLEAR(p->__pyx_v__); + Py_CLEAR(p->__pyx_v_arg_key); Py_CLEAR(p->__pyx_v_args); Py_CLEAR(p->__pyx_v_async_to_inject); + Py_CLEAR(p->__pyx_v_closings); + Py_CLEAR(p->__pyx_v_fn); Py_CLEAR(p->__pyx_v_genexpr); Py_CLEAR(p->__pyx_v_injection); + Py_CLEAR(p->__pyx_v_injections); Py_CLEAR(p->__pyx_v_kwargs); Py_CLEAR(p->__pyx_v_provide); Py_CLEAR(p->__pyx_v_provider); @@ -4182,34 +11481,43 @@ static void __pyx_tp_dealloc_19dependency_injector_8_cwiring___pyx_scope_struct_ Py_CLEAR(p->__pyx_v_to_close_await); Py_CLEAR(p->__pyx_v_to_inject); Py_CLEAR(p->__pyx_v_to_inject_await); - if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_19dependency_injector_8_cwiring___pyx_scope_struct_2__patched < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_2__patched)))) { - __pyx_freelist_19dependency_injector_8_cwiring___pyx_scope_struct_2__patched[__pyx_freecount_19dependency_injector_8_cwiring___pyx_scope_struct_2__patched++] = ((struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_2__patched *)o); + if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_19dependency_injector_8_cwiring___pyx_scope_struct_1__async_inject < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_1__async_inject)))) { + __pyx_freelist_19dependency_injector_8_cwiring___pyx_scope_struct_1__async_inject[__pyx_freecount_19dependency_injector_8_cwiring___pyx_scope_struct_1__async_inject++] = ((struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_1__async_inject *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } -static int __pyx_tp_traverse_19dependency_injector_8_cwiring___pyx_scope_struct_2__patched(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_19dependency_injector_8_cwiring___pyx_scope_struct_1__async_inject(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_2__patched *p = (struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_2__patched *)o; - if (p->__pyx_outer_scope) { - e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e; - } + struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_1__async_inject *p = (struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_1__async_inject *)o; if (p->__pyx_v__) { e = (*v)(p->__pyx_v__, a); if (e) return e; } + if (p->__pyx_v_arg_key) { + e = (*v)(p->__pyx_v_arg_key, a); if (e) return e; + } if (p->__pyx_v_args) { e = (*v)(p->__pyx_v_args, a); if (e) return e; } if (p->__pyx_v_async_to_inject) { e = (*v)(p->__pyx_v_async_to_inject, a); if (e) return e; } + if (p->__pyx_v_closings) { + e = (*v)(p->__pyx_v_closings, a); if (e) return e; + } + if (p->__pyx_v_fn) { + e = (*v)(p->__pyx_v_fn, a); if (e) return e; + } if (p->__pyx_v_genexpr) { e = (*v)(p->__pyx_v_genexpr, a); if (e) return e; } if (p->__pyx_v_injection) { e = (*v)(p->__pyx_v_injection, a); if (e) return e; } + if (p->__pyx_v_injections) { + e = (*v)(p->__pyx_v_injections, a); if (e) return e; + } if (p->__pyx_v_kwargs) { e = (*v)(p->__pyx_v_kwargs, a); if (e) return e; } @@ -4217,7 +11525,7 @@ static int __pyx_tp_traverse_19dependency_injector_8_cwiring___pyx_scope_struct_ e = (*v)(p->__pyx_v_provide, a); if (e) return e; } if (p->__pyx_v_provider) { - e = (*v)(p->__pyx_v_provider, a); if (e) return e; + e = (*v)(((PyObject *)p->__pyx_v_provider), a); if (e) return e; } if (p->__pyx_v_result) { e = (*v)(p->__pyx_v_result, a); if (e) return e; @@ -4237,12 +11545,12 @@ static int __pyx_tp_traverse_19dependency_injector_8_cwiring___pyx_scope_struct_ return 0; } -static PyTypeObject __pyx_type_19dependency_injector_8_cwiring___pyx_scope_struct_2__patched = { +static PyTypeObject __pyx_type_19dependency_injector_8_cwiring___pyx_scope_struct_1__async_inject = { PyVarObject_HEAD_INIT(0, 0) - "dependency_injector._cwiring.__pyx_scope_struct_2__patched", /*tp_name*/ - sizeof(struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_2__patched), /*tp_basicsize*/ + "dependency_injector._cwiring.__pyx_scope_struct_1__async_inject", /*tp_name*/ + sizeof(struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_1__async_inject), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_19dependency_injector_8_cwiring___pyx_scope_struct_2__patched, /*tp_dealloc*/ + __pyx_tp_dealloc_19dependency_injector_8_cwiring___pyx_scope_struct_1__async_inject, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif @@ -4269,7 +11577,7 @@ static PyTypeObject __pyx_type_19dependency_injector_8_cwiring___pyx_scope_struc 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ - __pyx_tp_traverse_19dependency_injector_8_cwiring___pyx_scope_struct_2__patched, /*tp_traverse*/ + __pyx_tp_traverse_19dependency_injector_8_cwiring___pyx_scope_struct_1__async_inject, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ @@ -4285,7 +11593,7 @@ static PyTypeObject __pyx_type_19dependency_injector_8_cwiring___pyx_scope_struc 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_19dependency_injector_8_cwiring___pyx_scope_struct_2__patched, /*tp_new*/ + __pyx_tp_new_19dependency_injector_8_cwiring___pyx_scope_struct_1__async_inject, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -4306,14 +11614,14 @@ static PyTypeObject __pyx_type_19dependency_injector_8_cwiring___pyx_scope_struc #endif }; -static struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_3_genexpr *__pyx_freelist_19dependency_injector_8_cwiring___pyx_scope_struct_3_genexpr[8]; -static int __pyx_freecount_19dependency_injector_8_cwiring___pyx_scope_struct_3_genexpr = 0; +static struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_2_genexpr *__pyx_freelist_19dependency_injector_8_cwiring___pyx_scope_struct_2_genexpr[8]; +static int __pyx_freecount_19dependency_injector_8_cwiring___pyx_scope_struct_2_genexpr = 0; -static PyObject *__pyx_tp_new_19dependency_injector_8_cwiring___pyx_scope_struct_3_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { +static PyObject *__pyx_tp_new_19dependency_injector_8_cwiring___pyx_scope_struct_2_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; - if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_19dependency_injector_8_cwiring___pyx_scope_struct_3_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_3_genexpr)))) { - o = (PyObject*)__pyx_freelist_19dependency_injector_8_cwiring___pyx_scope_struct_3_genexpr[--__pyx_freecount_19dependency_injector_8_cwiring___pyx_scope_struct_3_genexpr]; - memset(o, 0, sizeof(struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_3_genexpr)); + if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_19dependency_injector_8_cwiring___pyx_scope_struct_2_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_2_genexpr)))) { + o = (PyObject*)__pyx_freelist_19dependency_injector_8_cwiring___pyx_scope_struct_2_genexpr[--__pyx_freecount_19dependency_injector_8_cwiring___pyx_scope_struct_2_genexpr]; + memset(o, 0, sizeof(struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_2_genexpr)); (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else { @@ -4323,23 +11631,23 @@ static PyObject *__pyx_tp_new_19dependency_injector_8_cwiring___pyx_scope_struct return o; } -static void __pyx_tp_dealloc_19dependency_injector_8_cwiring___pyx_scope_struct_3_genexpr(PyObject *o) { - struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_3_genexpr *p = (struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_3_genexpr *)o; +static void __pyx_tp_dealloc_19dependency_injector_8_cwiring___pyx_scope_struct_2_genexpr(PyObject *o) { + struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_2_genexpr *p = (struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_2_genexpr *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_outer_scope); Py_CLEAR(p->__pyx_v__); Py_CLEAR(p->__pyx_v_provide); Py_CLEAR(p->__pyx_t_0); - if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_19dependency_injector_8_cwiring___pyx_scope_struct_3_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_3_genexpr)))) { - __pyx_freelist_19dependency_injector_8_cwiring___pyx_scope_struct_3_genexpr[__pyx_freecount_19dependency_injector_8_cwiring___pyx_scope_struct_3_genexpr++] = ((struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_3_genexpr *)o); + if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_19dependency_injector_8_cwiring___pyx_scope_struct_2_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_2_genexpr)))) { + __pyx_freelist_19dependency_injector_8_cwiring___pyx_scope_struct_2_genexpr[__pyx_freecount_19dependency_injector_8_cwiring___pyx_scope_struct_2_genexpr++] = ((struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_2_genexpr *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } -static int __pyx_tp_traverse_19dependency_injector_8_cwiring___pyx_scope_struct_3_genexpr(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_19dependency_injector_8_cwiring___pyx_scope_struct_2_genexpr(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_3_genexpr *p = (struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_3_genexpr *)o; + struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_2_genexpr *p = (struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_2_genexpr *)o; if (p->__pyx_outer_scope) { e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e; } @@ -4355,12 +11663,12 @@ static int __pyx_tp_traverse_19dependency_injector_8_cwiring___pyx_scope_struct_ return 0; } -static PyTypeObject __pyx_type_19dependency_injector_8_cwiring___pyx_scope_struct_3_genexpr = { +static PyTypeObject __pyx_type_19dependency_injector_8_cwiring___pyx_scope_struct_2_genexpr = { PyVarObject_HEAD_INIT(0, 0) - "dependency_injector._cwiring.__pyx_scope_struct_3_genexpr", /*tp_name*/ - sizeof(struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_3_genexpr), /*tp_basicsize*/ + "dependency_injector._cwiring.__pyx_scope_struct_2_genexpr", /*tp_name*/ + sizeof(struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_2_genexpr), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_19dependency_injector_8_cwiring___pyx_scope_struct_3_genexpr, /*tp_dealloc*/ + __pyx_tp_dealloc_19dependency_injector_8_cwiring___pyx_scope_struct_2_genexpr, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif @@ -4387,7 +11695,7 @@ static PyTypeObject __pyx_type_19dependency_injector_8_cwiring___pyx_scope_struc 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ - __pyx_tp_traverse_19dependency_injector_8_cwiring___pyx_scope_struct_3_genexpr, /*tp_traverse*/ + __pyx_tp_traverse_19dependency_injector_8_cwiring___pyx_scope_struct_2_genexpr, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ @@ -4403,7 +11711,379 @@ static PyTypeObject __pyx_type_19dependency_injector_8_cwiring___pyx_scope_struc 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_19dependency_injector_8_cwiring___pyx_scope_struct_3_genexpr, /*tp_new*/ + __pyx_tp_new_19dependency_injector_8_cwiring___pyx_scope_struct_2_genexpr, /*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 + #if PY_VERSION_HEX >= 0x030800b1 + 0, /*tp_vectorcall*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 + 0, /*tp_print*/ + #endif +}; + +static struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____object____object____object___to_py *__pyx_freelist___pyx_scope_struct____Pyx_CFunc_void____object____object____object____object___to_py[8]; +static int __pyx_freecount___pyx_scope_struct____Pyx_CFunc_void____object____object____object____object___to_py = 0; + +static PyObject *__pyx_tp_new___pyx_scope_struct____Pyx_CFunc_void____object____object____object____object___to_py(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + PyObject *o; + if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount___pyx_scope_struct____Pyx_CFunc_void____object____object____object____object___to_py > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____object____object____object___to_py)))) { + o = (PyObject*)__pyx_freelist___pyx_scope_struct____Pyx_CFunc_void____object____object____object____object___to_py[--__pyx_freecount___pyx_scope_struct____Pyx_CFunc_void____object____object____object____object___to_py]; + memset(o, 0, sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____object____object____object___to_py)); + (void) PyObject_INIT(o, t); + } else { + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; + } + return o; +} + +static void __pyx_tp_dealloc___pyx_scope_struct____Pyx_CFunc_void____object____object____object____object___to_py(PyObject *o) { + if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount___pyx_scope_struct____Pyx_CFunc_void____object____object____object____object___to_py < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____object____object____object___to_py)))) { + __pyx_freelist___pyx_scope_struct____Pyx_CFunc_void____object____object____object____object___to_py[__pyx_freecount___pyx_scope_struct____Pyx_CFunc_void____object____object____object____object___to_py++] = ((struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____object____object____object___to_py *)o); + } else { + (*Py_TYPE(o)->tp_free)(o); + } +} + +static PyTypeObject __pyx_scope_struct____Pyx_CFunc_void____object____object____object____object___to_py = { + PyVarObject_HEAD_INIT(0, 0) + "dependency_injector._cwiring.__pyx_scope_struct____Pyx_CFunc_void____object____object____object____object___to_py", /*tp_name*/ + sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____object____object____object___to_py), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc___pyx_scope_struct____Pyx_CFunc_void____object____object____object____object___to_py, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif + 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 + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 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, /*tp_flags*/ + 0, /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + 0, /*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*/ + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new___pyx_scope_struct____Pyx_CFunc_void____object____object____object____object___to_py, /*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 + #if PY_VERSION_HEX >= 0x030800b1 + 0, /*tp_vectorcall*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 + 0, /*tp_print*/ + #endif +}; + +static struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____object___to_py *__pyx_freelist___pyx_scope_struct____Pyx_CFunc_void____object____object___to_py[8]; +static int __pyx_freecount___pyx_scope_struct____Pyx_CFunc_void____object____object___to_py = 0; + +static PyObject *__pyx_tp_new___pyx_scope_struct____Pyx_CFunc_void____object____object___to_py(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + PyObject *o; + if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount___pyx_scope_struct____Pyx_CFunc_void____object____object___to_py > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____object___to_py)))) { + o = (PyObject*)__pyx_freelist___pyx_scope_struct____Pyx_CFunc_void____object____object___to_py[--__pyx_freecount___pyx_scope_struct____Pyx_CFunc_void____object____object___to_py]; + memset(o, 0, sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____object___to_py)); + (void) PyObject_INIT(o, t); + } else { + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; + } + return o; +} + +static void __pyx_tp_dealloc___pyx_scope_struct____Pyx_CFunc_void____object____object___to_py(PyObject *o) { + if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount___pyx_scope_struct____Pyx_CFunc_void____object____object___to_py < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____object___to_py)))) { + __pyx_freelist___pyx_scope_struct____Pyx_CFunc_void____object____object___to_py[__pyx_freecount___pyx_scope_struct____Pyx_CFunc_void____object____object___to_py++] = ((struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____object___to_py *)o); + } else { + (*Py_TYPE(o)->tp_free)(o); + } +} + +static PyTypeObject __pyx_scope_struct____Pyx_CFunc_void____object____object___to_py = { + PyVarObject_HEAD_INIT(0, 0) + "dependency_injector._cwiring.__pyx_scope_struct____Pyx_CFunc_void____object____object___to_py", /*tp_name*/ + sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____object___to_py), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc___pyx_scope_struct____Pyx_CFunc_void____object____object___to_py, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif + 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 + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 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, /*tp_flags*/ + 0, /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + 0, /*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*/ + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new___pyx_scope_struct____Pyx_CFunc_void____object____object___to_py, /*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 + #if PY_VERSION_HEX >= 0x030800b1 + 0, /*tp_vectorcall*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 + 0, /*tp_print*/ + #endif +}; + +static struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____object____object___to_py *__pyx_freelist___pyx_scope_struct____Pyx_CFunc_void____object____object____object___to_py[8]; +static int __pyx_freecount___pyx_scope_struct____Pyx_CFunc_void____object____object____object___to_py = 0; + +static PyObject *__pyx_tp_new___pyx_scope_struct____Pyx_CFunc_void____object____object____object___to_py(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + PyObject *o; + if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount___pyx_scope_struct____Pyx_CFunc_void____object____object____object___to_py > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____object____object___to_py)))) { + o = (PyObject*)__pyx_freelist___pyx_scope_struct____Pyx_CFunc_void____object____object____object___to_py[--__pyx_freecount___pyx_scope_struct____Pyx_CFunc_void____object____object____object___to_py]; + memset(o, 0, sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____object____object___to_py)); + (void) PyObject_INIT(o, t); + } else { + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; + } + return o; +} + +static void __pyx_tp_dealloc___pyx_scope_struct____Pyx_CFunc_void____object____object____object___to_py(PyObject *o) { + if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount___pyx_scope_struct____Pyx_CFunc_void____object____object____object___to_py < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____object____object___to_py)))) { + __pyx_freelist___pyx_scope_struct____Pyx_CFunc_void____object____object____object___to_py[__pyx_freecount___pyx_scope_struct____Pyx_CFunc_void____object____object____object___to_py++] = ((struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____object____object___to_py *)o); + } else { + (*Py_TYPE(o)->tp_free)(o); + } +} + +static PyTypeObject __pyx_scope_struct____Pyx_CFunc_void____object____object____object___to_py = { + PyVarObject_HEAD_INIT(0, 0) + "dependency_injector._cwiring.__pyx_scope_struct____Pyx_CFunc_void____object____object____object___to_py", /*tp_name*/ + sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____object____object___to_py), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc___pyx_scope_struct____Pyx_CFunc_void____object____object____object___to_py, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif + 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 + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 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, /*tp_flags*/ + 0, /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + 0, /*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*/ + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new___pyx_scope_struct____Pyx_CFunc_void____object____object____object___to_py, /*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 + #if PY_VERSION_HEX >= 0x030800b1 + 0, /*tp_vectorcall*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 + 0, /*tp_print*/ + #endif +}; + +static struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object____object____object___to_py *__pyx_freelist___pyx_scope_struct____Pyx_CFunc_object____object____object___to_py[8]; +static int __pyx_freecount___pyx_scope_struct____Pyx_CFunc_object____object____object___to_py = 0; + +static PyObject *__pyx_tp_new___pyx_scope_struct____Pyx_CFunc_object____object____object___to_py(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + PyObject *o; + if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount___pyx_scope_struct____Pyx_CFunc_object____object____object___to_py > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object____object____object___to_py)))) { + o = (PyObject*)__pyx_freelist___pyx_scope_struct____Pyx_CFunc_object____object____object___to_py[--__pyx_freecount___pyx_scope_struct____Pyx_CFunc_object____object____object___to_py]; + memset(o, 0, sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object____object____object___to_py)); + (void) PyObject_INIT(o, t); + } else { + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; + } + return o; +} + +static void __pyx_tp_dealloc___pyx_scope_struct____Pyx_CFunc_object____object____object___to_py(PyObject *o) { + if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount___pyx_scope_struct____Pyx_CFunc_object____object____object___to_py < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object____object____object___to_py)))) { + __pyx_freelist___pyx_scope_struct____Pyx_CFunc_object____object____object___to_py[__pyx_freecount___pyx_scope_struct____Pyx_CFunc_object____object____object___to_py++] = ((struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object____object____object___to_py *)o); + } else { + (*Py_TYPE(o)->tp_free)(o); + } +} + +static PyTypeObject __pyx_scope_struct____Pyx_CFunc_object____object____object___to_py = { + PyVarObject_HEAD_INIT(0, 0) + "dependency_injector._cwiring.__pyx_scope_struct____Pyx_CFunc_object____object____object___to_py", /*tp_name*/ + sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object____object____object___to_py), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc___pyx_scope_struct____Pyx_CFunc_object____object____object___to_py, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif + 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 + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 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, /*tp_flags*/ + 0, /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + 0, /*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*/ + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new___pyx_scope_struct____Pyx_CFunc_object____object____object___to_py, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -4473,53 +12153,76 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_Awaitable, __pyx_k_Awaitable, sizeof(__pyx_k_Awaitable), 0, 0, 1, 1}, {&__pyx_n_s_CO_ITERABLE_COROUTINE, __pyx_k_CO_ITERABLE_COROUTINE, sizeof(__pyx_k_CO_ITERABLE_COROUTINE), 0, 0, 1, 1}, {&__pyx_n_s_CoroutineType, __pyx_k_CoroutineType, sizeof(__pyx_k_CoroutineType), 0, 0, 1, 1}, + {&__pyx_n_s_Future, __pyx_k_Future, sizeof(__pyx_k_Future), 0, 0, 1, 1}, {&__pyx_n_s_GeneratorType, __pyx_k_GeneratorType, sizeof(__pyx_k_GeneratorType), 0, 0, 1, 1}, + {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1}, {&__pyx_n_s_Marker, __pyx_k_Marker, sizeof(__pyx_k_Marker), 0, 0, 1, 1}, + {&__pyx_n_s_Pyx_CFunc_object____object, __pyx_k_Pyx_CFunc_object____object, sizeof(__pyx_k_Pyx_CFunc_object____object), 0, 0, 1, 1}, + {&__pyx_n_s_Pyx_CFunc_void____object____ob, __pyx_k_Pyx_CFunc_void____object____ob, sizeof(__pyx_k_Pyx_CFunc_void____object____ob), 0, 0, 1, 1}, + {&__pyx_n_s_Pyx_CFunc_void____object____ob_2, __pyx_k_Pyx_CFunc_void____object____ob_2, sizeof(__pyx_k_Pyx_CFunc_void____object____ob_2), 0, 0, 1, 1}, + {&__pyx_n_s_Pyx_CFunc_void____object____ob_3, __pyx_k_Pyx_CFunc_void____object____ob_3, sizeof(__pyx_k_Pyx_CFunc_void____object____ob_3), 0, 0, 1, 1}, {&__pyx_n_s_Resource, __pyx_k_Resource, sizeof(__pyx_k_Resource), 0, 0, 1, 1}, - {&__pyx_n_s__3, __pyx_k__3, sizeof(__pyx_k__3), 0, 0, 1, 1}, - {&__pyx_n_s__6, __pyx_k__6, sizeof(__pyx_k__6), 0, 0, 1, 1}, + {&__pyx_n_s__13, __pyx_k__13, sizeof(__pyx_k__13), 0, 0, 1, 1}, + {&__pyx_n_s__16, __pyx_k__16, sizeof(__pyx_k__16), 0, 0, 1, 1}, + {&__pyx_n_s__4, __pyx_k__4, sizeof(__pyx_k__4), 0, 0, 1, 1}, {&__pyx_n_s_abc, __pyx_k_abc, sizeof(__pyx_k_abc), 0, 0, 1, 1}, + {&__pyx_n_s_add_done_callback, __pyx_k_add_done_callback, sizeof(__pyx_k_add_done_callback), 0, 0, 1, 1}, + {&__pyx_n_s_arg_key, __pyx_k_arg_key, sizeof(__pyx_k_arg_key), 0, 0, 1, 1}, {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1}, + {&__pyx_n_s_async_inject, __pyx_k_async_inject, sizeof(__pyx_k_async_inject), 0, 0, 1, 1}, + {&__pyx_n_s_async_inject_locals_genexpr, __pyx_k_async_inject_locals_genexpr, sizeof(__pyx_k_async_inject_locals_genexpr), 0, 0, 1, 1}, {&__pyx_n_s_async_to_inject, __pyx_k_async_to_inject, sizeof(__pyx_k_async_to_inject), 0, 0, 1, 1}, {&__pyx_n_s_asyncio, __pyx_k_asyncio, sizeof(__pyx_k_asyncio), 0, 0, 1, 1}, {&__pyx_n_s_asyncio_coroutines, __pyx_k_asyncio_coroutines, sizeof(__pyx_k_asyncio_coroutines), 0, 0, 1, 1}, + {&__pyx_n_s_asyncio_future_blocking, __pyx_k_asyncio_future_blocking, sizeof(__pyx_k_asyncio_future_blocking), 0, 0, 1, 1}, {&__pyx_n_s_asyncio_tasks, __pyx_k_asyncio_tasks, sizeof(__pyx_k_asyncio_tasks), 0, 0, 1, 1}, {&__pyx_n_s_await, __pyx_k_await, sizeof(__pyx_k_await), 0, 0, 1, 1}, + {&__pyx_n_s_call, __pyx_k_call, sizeof(__pyx_k_call), 0, 0, 1, 1}, + {&__pyx_n_s_cfunc_to_py, __pyx_k_cfunc_to_py, sizeof(__pyx_k_cfunc_to_py), 0, 0, 1, 1}, + {&__pyx_n_s_class, __pyx_k_class, sizeof(__pyx_k_class), 0, 0, 1, 1}, {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1}, {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1}, {&__pyx_n_s_closing, __pyx_k_closing, sizeof(__pyx_k_closing), 0, 0, 1, 1}, + {&__pyx_n_s_closings, __pyx_k_closings, sizeof(__pyx_k_closings), 0, 0, 1, 1}, {&__pyx_n_s_co_flags, __pyx_k_co_flags, sizeof(__pyx_k_co_flags), 0, 0, 1, 1}, {&__pyx_n_s_collections, __pyx_k_collections, sizeof(__pyx_k_collections), 0, 0, 1, 1}, {&__pyx_n_s_collections_abc, __pyx_k_collections_abc, sizeof(__pyx_k_collections_abc), 0, 0, 1, 1}, - {&__pyx_n_s_coroutines, __pyx_k_coroutines, sizeof(__pyx_k_coroutines), 0, 0, 1, 1}, {&__pyx_n_s_dependency_injector__cwiring, __pyx_k_dependency_injector__cwiring, sizeof(__pyx_k_dependency_injector__cwiring), 0, 0, 1, 1}, + {&__pyx_n_s_ensure_future, __pyx_k_ensure_future, sizeof(__pyx_k_ensure_future), 0, 0, 1, 1}, {&__pyx_n_s_fn, __pyx_k_fn, sizeof(__pyx_k_fn), 0, 0, 1, 1}, {&__pyx_n_s_functools, __pyx_k_functools, sizeof(__pyx_k_functools), 0, 0, 1, 1}, + {&__pyx_n_s_future, __pyx_k_future, sizeof(__pyx_k_future), 0, 0, 1, 1}, + {&__pyx_n_s_future_args_kwargs, __pyx_k_future_args_kwargs, sizeof(__pyx_k_future_args_kwargs), 0, 0, 1, 1}, + {&__pyx_n_s_future_result, __pyx_k_future_result, sizeof(__pyx_k_future_result), 0, 0, 1, 1}, {&__pyx_n_s_gather, __pyx_k_gather, sizeof(__pyx_k_gather), 0, 0, 1, 1}, {&__pyx_n_s_genexpr, __pyx_k_genexpr, sizeof(__pyx_k_genexpr), 0, 0, 1, 1}, - {&__pyx_n_s_get_async_patched, __pyx_k_get_async_patched, sizeof(__pyx_k_get_async_patched), 0, 0, 1, 1}, - {&__pyx_n_s_get_async_patched_locals__patch, __pyx_k_get_async_patched_locals__patch, sizeof(__pyx_k_get_async_patched_locals__patch), 0, 0, 1, 1}, - {&__pyx_n_s_get_async_patched_locals__patch_2, __pyx_k_get_async_patched_locals__patch_2, sizeof(__pyx_k_get_async_patched_locals__patch_2), 0, 0, 1, 1}, {&__pyx_n_s_get_sync_patched, __pyx_k_get_sync_patched, sizeof(__pyx_k_get_sync_patched), 0, 0, 1, 1}, {&__pyx_n_s_get_sync_patched_locals__patche, __pyx_k_get_sync_patched_locals__patche, sizeof(__pyx_k_get_sync_patched_locals__patche), 0, 0, 1, 1}, {&__pyx_n_s_gi_code, __pyx_k_gi_code, sizeof(__pyx_k_gi_code), 0, 0, 1, 1}, {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1}, + {&__pyx_n_s_index, __pyx_k_index, sizeof(__pyx_k_index), 0, 0, 1, 1}, {&__pyx_n_s_injection, __pyx_k_injection, sizeof(__pyx_k_injection), 0, 0, 1, 1}, {&__pyx_n_s_injections, __pyx_k_injections, sizeof(__pyx_k_injections), 0, 0, 1, 1}, + {&__pyx_n_s_injections_2, __pyx_k_injections_2, sizeof(__pyx_k_injections_2), 0, 0, 1, 1}, {&__pyx_n_s_inspect, __pyx_k_inspect, sizeof(__pyx_k_inspect), 0, 0, 1, 1}, - {&__pyx_n_s_is_coroutine, __pyx_k_is_coroutine, sizeof(__pyx_k_is_coroutine), 0, 0, 1, 1}, {&__pyx_n_s_items, __pyx_k_items, sizeof(__pyx_k_items), 0, 0, 1, 1}, {&__pyx_n_s_kwargs, __pyx_k_kwargs, sizeof(__pyx_k_kwargs), 0, 0, 1, 1}, {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1}, + {&__pyx_n_s_partial, __pyx_k_partial, sizeof(__pyx_k_partial), 0, 0, 1, 1}, {&__pyx_n_s_patched, __pyx_k_patched, sizeof(__pyx_k_patched), 0, 0, 1, 1}, {&__pyx_n_s_provide, __pyx_k_provide, sizeof(__pyx_k_provide), 0, 0, 1, 1}, {&__pyx_n_s_provider, __pyx_k_provider, sizeof(__pyx_k_provider), 0, 0, 1, 1}, {&__pyx_n_s_providers, __pyx_k_providers, sizeof(__pyx_k_providers), 0, 0, 1, 1}, + {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1}, + {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1}, {&__pyx_n_s_result, __pyx_k_result, sizeof(__pyx_k_result), 0, 0, 1, 1}, {&__pyx_n_s_send, __pyx_k_send, sizeof(__pyx_k_send), 0, 0, 1, 1}, + {&__pyx_n_s_set_exception, __pyx_k_set_exception, sizeof(__pyx_k_set_exception), 0, 0, 1, 1}, + {&__pyx_n_s_set_result, __pyx_k_set_result, sizeof(__pyx_k_set_result), 0, 0, 1, 1}, {&__pyx_n_s_shutdown, __pyx_k_shutdown, sizeof(__pyx_k_shutdown), 0, 0, 1, 1}, {&__pyx_kp_s_src_dependency_injector__cwiring, __pyx_k_src_dependency_injector__cwiring, sizeof(__pyx_k_src_dependency_injector__cwiring), 0, 0, 1, 0}, + {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0}, {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1}, {&__pyx_n_s_throw, __pyx_k_throw, sizeof(__pyx_k_throw), 0, 0, 1, 1}, {&__pyx_n_s_to_close_await, __pyx_k_to_close_await, sizeof(__pyx_k_to_close_await), 0, 0, 1, 1}, @@ -4527,12 +12230,15 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_to_inject_await, __pyx_k_to_inject_await, sizeof(__pyx_k_to_inject_await), 0, 0, 1, 1}, {&__pyx_n_s_types, __pyx_k_types, sizeof(__pyx_k_types), 0, 0, 1, 1}, {&__pyx_n_s_wiring, __pyx_k_wiring, sizeof(__pyx_k_wiring), 0, 0, 1, 1}, + {&__pyx_n_s_wrap, __pyx_k_wrap, sizeof(__pyx_k_wrap), 0, 0, 1, 1}, {&__pyx_n_s_wraps, __pyx_k_wraps, sizeof(__pyx_k_wraps), 0, 0, 1, 1}, {&__pyx_n_s_zip, __pyx_k_zip, sizeof(__pyx_k_zip), 0, 0, 1, 1}, {0, 0, 0, 0, 0, 0, 0} }; static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { - __pyx_builtin_zip = __Pyx_GetBuiltinName(__pyx_n_s_zip); if (!__pyx_builtin_zip) __PYX_ERR(0, 57, __pyx_L1_error) + __pyx_builtin_zip = __Pyx_GetBuiltinName(__pyx_n_s_zip); if (!__pyx_builtin_zip) __PYX_ERR(0, 63, __pyx_L1_error) + __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(1, 5, __pyx_L1_error) + __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(1, 409, __pyx_L1_error) return 0; __pyx_L1_error:; return -1; @@ -4542,53 +12248,65 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); - /* "dependency_injector/_cwiring.pyx":15 + /* "dependency_injector/_cwiring.pyx":17 * def _get_sync_patched(fn): * @functools.wraps(fn) * def _patched(*args, **kwargs): # <<<<<<<<<<<<<< * cdef object result * cdef dict to_inject */ - __pyx_tuple_ = PyTuple_Pack(6, __pyx_n_s_args, __pyx_n_s_kwargs, __pyx_n_s_result, __pyx_n_s_to_inject, __pyx_n_s_injection, __pyx_n_s_provider); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 15, __pyx_L1_error) + __pyx_tuple_ = PyTuple_Pack(6, __pyx_n_s_args, __pyx_n_s_kwargs, __pyx_n_s_result, __pyx_n_s_to_inject, __pyx_n_s_arg_key, __pyx_n_s_provider); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple_); __Pyx_GIVEREF(__pyx_tuple_); - __pyx_codeobj__2 = (PyObject*)__Pyx_PyCode_New(0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple_, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector__cwiring, __pyx_n_s_patched, 15, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__2)) __PYX_ERR(0, 15, __pyx_L1_error) + __pyx_codeobj__2 = (PyObject*)__Pyx_PyCode_New(0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple_, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector__cwiring, __pyx_n_s_patched, 17, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__2)) __PYX_ERR(0, 17, __pyx_L1_error) - /* "dependency_injector/_cwiring.pyx":40 - * def _get_async_patched(fn): - * @functools.wraps(fn) - * async def _patched(*args, **kwargs): # <<<<<<<<<<<<<< - * cdef object result - * cdef dict to_inject + /* "cfunc.to_py":65 + * @cname("__Pyx_CFunc_void____object____object____object____object___to_py") + * cdef object __Pyx_CFunc_void____object____object____object____object___to_py(void (*f)(object, object, object, object) except *): + * def wrap(object future_result, object args, object future_args_kwargs, object future): # <<<<<<<<<<<<<< + * """wrap(future_result, args, future_args_kwargs, future) -> 'void'""" + * f(future_result, args, future_args_kwargs, future) */ - __pyx_tuple__4 = PyTuple_Pack(14, __pyx_n_s_args, __pyx_n_s_kwargs, __pyx_n_s_result, __pyx_n_s_to_inject, __pyx_n_s_to_inject_await, __pyx_n_s_to_close_await, __pyx_n_s_injection, __pyx_n_s_provider, __pyx_n_s_provide, __pyx_n_s_async_to_inject, __pyx_n_s__3, __pyx_n_s_shutdown, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 40, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__4); - __Pyx_GIVEREF(__pyx_tuple__4); - __pyx_codeobj__5 = (PyObject*)__Pyx_PyCode_New(0, 0, 14, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__4, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector__cwiring, __pyx_n_s_patched, 40, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__5)) __PYX_ERR(0, 40, __pyx_L1_error) + __pyx_tuple__5 = PyTuple_Pack(4, __pyx_n_s_future_result, __pyx_n_s_args, __pyx_n_s_future_args_kwargs, __pyx_n_s_future); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(2, 65, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__5); + __Pyx_GIVEREF(__pyx_tuple__5); + __pyx_codeobj__6 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__5, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_wrap, 65, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__6)) __PYX_ERR(2, 65, __pyx_L1_error) + __pyx_tuple__7 = PyTuple_Pack(2, __pyx_n_s_future_result, __pyx_n_s_future); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(2, 65, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__7); + __Pyx_GIVEREF(__pyx_tuple__7); + __pyx_codeobj__8 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__7, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_wrap, 65, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__8)) __PYX_ERR(2, 65, __pyx_L1_error) + __pyx_tuple__9 = PyTuple_Pack(3, __pyx_n_s_future_result, __pyx_n_s_call, __pyx_n_s_future); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(2, 65, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__9); + __Pyx_GIVEREF(__pyx_tuple__9); + __pyx_codeobj__10 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__9, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_wrap, 65, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__10)) __PYX_ERR(2, 65, __pyx_L1_error) + __pyx_tuple__11 = PyTuple_Pack(2, __pyx_n_s_future_result, __pyx_n_s_future); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(2, 65, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__11); + __Pyx_GIVEREF(__pyx_tuple__11); + __pyx_codeobj__12 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__11, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_wrap, 65, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__12)) __PYX_ERR(2, 65, __pyx_L1_error) - /* "dependency_injector/_cwiring.pyx":13 + /* "dependency_injector/_cwiring.pyx":15 * * * def _get_sync_patched(fn): # <<<<<<<<<<<<<< * @functools.wraps(fn) * def _patched(*args, **kwargs): */ - __pyx_tuple__7 = PyTuple_Pack(3, __pyx_n_s_fn, __pyx_n_s_patched, __pyx_n_s_patched); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 13, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__7); - __Pyx_GIVEREF(__pyx_tuple__7); - __pyx_codeobj__8 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__7, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector__cwiring, __pyx_n_s_get_sync_patched, 13, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__8)) __PYX_ERR(0, 13, __pyx_L1_error) + __pyx_tuple__14 = PyTuple_Pack(3, __pyx_n_s_fn, __pyx_n_s_patched, __pyx_n_s_patched); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(0, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__14); + __Pyx_GIVEREF(__pyx_tuple__14); + __pyx_codeobj__15 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__14, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector__cwiring, __pyx_n_s_get_sync_patched, 15, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__15)) __PYX_ERR(0, 15, __pyx_L1_error) - /* "dependency_injector/_cwiring.pyx":38 + /* "dependency_injector/_cwiring.pyx":42 * * - * def _get_async_patched(fn): # <<<<<<<<<<<<<< - * @functools.wraps(fn) - * async def _patched(*args, **kwargs): + * async def _async_inject(object fn, tuple args, dict kwargs, dict injections, dict closings): # <<<<<<<<<<<<<< + * cdef object result + * cdef dict to_inject */ - __pyx_tuple__9 = PyTuple_Pack(3, __pyx_n_s_fn, __pyx_n_s_patched, __pyx_n_s_patched); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 38, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__9); - __Pyx_GIVEREF(__pyx_tuple__9); - __pyx_codeobj__10 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__9, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector__cwiring, __pyx_n_s_get_async_patched, 38, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__10)) __PYX_ERR(0, 38, __pyx_L1_error) + __pyx_tuple__17 = PyTuple_Pack(18, __pyx_n_s_fn, __pyx_n_s_args, __pyx_n_s_kwargs, __pyx_n_s_injections_2, __pyx_n_s_closings, __pyx_n_s_result, __pyx_n_s_to_inject, __pyx_n_s_to_inject_await, __pyx_n_s_to_close_await, __pyx_n_s_arg_key, __pyx_n_s_provider, __pyx_n_s_provide, __pyx_n_s_async_to_inject, __pyx_n_s_injection, __pyx_n_s__16, __pyx_n_s_shutdown, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 42, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__17); + __Pyx_GIVEREF(__pyx_tuple__17); + __pyx_codeobj__3 = (PyObject*)__Pyx_PyCode_New(5, 0, 18, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__17, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector__cwiring, __pyx_n_s_async_inject, 42, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__3)) __PYX_ERR(0, 42, __pyx_L1_error) __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; @@ -4597,7 +12315,9 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { } static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) { + __pyx_umethod_PyDict_Type_items.type = (PyObject*)&PyDict_Type; if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error); + __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) __PYX_ERR(0, 1, __pyx_L1_error) return 0; __pyx_L1_error:; return -1; @@ -4642,7 +12362,7 @@ static int __Pyx_modinit_type_init_code(void) { int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); /*--- Type init code ---*/ - if (PyType_Ready(&__pyx_type_19dependency_injector_8_cwiring___pyx_scope_struct___get_sync_patched) < 0) __PYX_ERR(0, 13, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_8_cwiring___pyx_scope_struct___get_sync_patched) < 0) __PYX_ERR(0, 15, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_19dependency_injector_8_cwiring___pyx_scope_struct___get_sync_patched.tp_print = 0; #endif @@ -4650,30 +12370,54 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_type_19dependency_injector_8_cwiring___pyx_scope_struct___get_sync_patched.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_19dependency_injector_8_cwiring___pyx_scope_struct___get_sync_patched = &__pyx_type_19dependency_injector_8_cwiring___pyx_scope_struct___get_sync_patched; - if (PyType_Ready(&__pyx_type_19dependency_injector_8_cwiring___pyx_scope_struct_1__get_async_patched) < 0) __PYX_ERR(0, 38, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_8_cwiring___pyx_scope_struct_1__async_inject) < 0) __PYX_ERR(0, 42, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 - __pyx_type_19dependency_injector_8_cwiring___pyx_scope_struct_1__get_async_patched.tp_print = 0; + __pyx_type_19dependency_injector_8_cwiring___pyx_scope_struct_1__async_inject.tp_print = 0; #endif - if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_19dependency_injector_8_cwiring___pyx_scope_struct_1__get_async_patched.tp_dictoffset && __pyx_type_19dependency_injector_8_cwiring___pyx_scope_struct_1__get_async_patched.tp_getattro == PyObject_GenericGetAttr)) { - __pyx_type_19dependency_injector_8_cwiring___pyx_scope_struct_1__get_async_patched.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_19dependency_injector_8_cwiring___pyx_scope_struct_1__async_inject.tp_dictoffset && __pyx_type_19dependency_injector_8_cwiring___pyx_scope_struct_1__async_inject.tp_getattro == PyObject_GenericGetAttr)) { + __pyx_type_19dependency_injector_8_cwiring___pyx_scope_struct_1__async_inject.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } - __pyx_ptype_19dependency_injector_8_cwiring___pyx_scope_struct_1__get_async_patched = &__pyx_type_19dependency_injector_8_cwiring___pyx_scope_struct_1__get_async_patched; - if (PyType_Ready(&__pyx_type_19dependency_injector_8_cwiring___pyx_scope_struct_2__patched) < 0) __PYX_ERR(0, 40, __pyx_L1_error) + __pyx_ptype_19dependency_injector_8_cwiring___pyx_scope_struct_1__async_inject = &__pyx_type_19dependency_injector_8_cwiring___pyx_scope_struct_1__async_inject; + if (PyType_Ready(&__pyx_type_19dependency_injector_8_cwiring___pyx_scope_struct_2_genexpr) < 0) __PYX_ERR(0, 62, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 - __pyx_type_19dependency_injector_8_cwiring___pyx_scope_struct_2__patched.tp_print = 0; + __pyx_type_19dependency_injector_8_cwiring___pyx_scope_struct_2_genexpr.tp_print = 0; #endif - if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_19dependency_injector_8_cwiring___pyx_scope_struct_2__patched.tp_dictoffset && __pyx_type_19dependency_injector_8_cwiring___pyx_scope_struct_2__patched.tp_getattro == PyObject_GenericGetAttr)) { - __pyx_type_19dependency_injector_8_cwiring___pyx_scope_struct_2__patched.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_19dependency_injector_8_cwiring___pyx_scope_struct_2_genexpr.tp_dictoffset && __pyx_type_19dependency_injector_8_cwiring___pyx_scope_struct_2_genexpr.tp_getattro == PyObject_GenericGetAttr)) { + __pyx_type_19dependency_injector_8_cwiring___pyx_scope_struct_2_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } - __pyx_ptype_19dependency_injector_8_cwiring___pyx_scope_struct_2__patched = &__pyx_type_19dependency_injector_8_cwiring___pyx_scope_struct_2__patched; - if (PyType_Ready(&__pyx_type_19dependency_injector_8_cwiring___pyx_scope_struct_3_genexpr) < 0) __PYX_ERR(0, 56, __pyx_L1_error) + __pyx_ptype_19dependency_injector_8_cwiring___pyx_scope_struct_2_genexpr = &__pyx_type_19dependency_injector_8_cwiring___pyx_scope_struct_2_genexpr; + if (PyType_Ready(&__pyx_scope_struct____Pyx_CFunc_void____object____object____object____object___to_py) < 0) __PYX_ERR(2, 64, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 - __pyx_type_19dependency_injector_8_cwiring___pyx_scope_struct_3_genexpr.tp_print = 0; + __pyx_scope_struct____Pyx_CFunc_void____object____object____object____object___to_py.tp_print = 0; #endif - if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_19dependency_injector_8_cwiring___pyx_scope_struct_3_genexpr.tp_dictoffset && __pyx_type_19dependency_injector_8_cwiring___pyx_scope_struct_3_genexpr.tp_getattro == PyObject_GenericGetAttr)) { - __pyx_type_19dependency_injector_8_cwiring___pyx_scope_struct_3_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_scope_struct____Pyx_CFunc_void____object____object____object____object___to_py.tp_dictoffset && __pyx_scope_struct____Pyx_CFunc_void____object____object____object____object___to_py.tp_getattro == PyObject_GenericGetAttr)) { + __pyx_scope_struct____Pyx_CFunc_void____object____object____object____object___to_py.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } - __pyx_ptype_19dependency_injector_8_cwiring___pyx_scope_struct_3_genexpr = &__pyx_type_19dependency_injector_8_cwiring___pyx_scope_struct_3_genexpr; + __pyx_ptype___pyx_scope_struct____Pyx_CFunc_void____object____object____object____object___to_py = &__pyx_scope_struct____Pyx_CFunc_void____object____object____object____object___to_py; + if (PyType_Ready(&__pyx_scope_struct____Pyx_CFunc_void____object____object___to_py) < 0) __PYX_ERR(2, 64, __pyx_L1_error) + #if PY_VERSION_HEX < 0x030800B1 + __pyx_scope_struct____Pyx_CFunc_void____object____object___to_py.tp_print = 0; + #endif + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_scope_struct____Pyx_CFunc_void____object____object___to_py.tp_dictoffset && __pyx_scope_struct____Pyx_CFunc_void____object____object___to_py.tp_getattro == PyObject_GenericGetAttr)) { + __pyx_scope_struct____Pyx_CFunc_void____object____object___to_py.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; + } + __pyx_ptype___pyx_scope_struct____Pyx_CFunc_void____object____object___to_py = &__pyx_scope_struct____Pyx_CFunc_void____object____object___to_py; + if (PyType_Ready(&__pyx_scope_struct____Pyx_CFunc_void____object____object____object___to_py) < 0) __PYX_ERR(2, 64, __pyx_L1_error) + #if PY_VERSION_HEX < 0x030800B1 + __pyx_scope_struct____Pyx_CFunc_void____object____object____object___to_py.tp_print = 0; + #endif + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_scope_struct____Pyx_CFunc_void____object____object____object___to_py.tp_dictoffset && __pyx_scope_struct____Pyx_CFunc_void____object____object____object___to_py.tp_getattro == PyObject_GenericGetAttr)) { + __pyx_scope_struct____Pyx_CFunc_void____object____object____object___to_py.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; + } + __pyx_ptype___pyx_scope_struct____Pyx_CFunc_void____object____object____object___to_py = &__pyx_scope_struct____Pyx_CFunc_void____object____object____object___to_py; + if (PyType_Ready(&__pyx_scope_struct____Pyx_CFunc_object____object____object___to_py) < 0) __PYX_ERR(2, 64, __pyx_L1_error) + #if PY_VERSION_HEX < 0x030800B1 + __pyx_scope_struct____Pyx_CFunc_object____object____object___to_py.tp_print = 0; + #endif + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_scope_struct____Pyx_CFunc_object____object____object___to_py.tp_dictoffset && __pyx_scope_struct____Pyx_CFunc_object____object____object___to_py.tp_getattro == PyObject_GenericGetAttr)) { + __pyx_scope_struct____Pyx_CFunc_object____object____object___to_py.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; + } + __pyx_ptype___pyx_scope_struct____Pyx_CFunc_object____object____object___to_py = &__pyx_scope_struct____Pyx_CFunc_object____object____object___to_py; __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; @@ -4683,18 +12427,189 @@ static int __Pyx_modinit_type_init_code(void) { static int __Pyx_modinit_type_import_code(void) { __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); /*--- Type import code ---*/ + __pyx_t_1 = PyImport_ImportModule("dependency_injector.providers"); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 22, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_ptype_19dependency_injector_9providers_Provider = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "Provider", sizeof(struct __pyx_obj_19dependency_injector_9providers_Provider), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_19dependency_injector_9providers_Provider) __PYX_ERR(1, 22, __pyx_L1_error) + __pyx_vtabptr_19dependency_injector_9providers_Provider = (struct __pyx_vtabstruct_19dependency_injector_9providers_Provider*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_Provider->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_Provider)) __PYX_ERR(1, 22, __pyx_L1_error) + __pyx_ptype_19dependency_injector_9providers_Object = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "Object", sizeof(struct __pyx_obj_19dependency_injector_9providers_Object), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_19dependency_injector_9providers_Object) __PYX_ERR(1, 36, __pyx_L1_error) + __pyx_vtabptr_19dependency_injector_9providers_Object = (struct __pyx_vtabstruct_19dependency_injector_9providers_Object*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_Object->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_Object)) __PYX_ERR(1, 36, __pyx_L1_error) + __pyx_ptype_19dependency_injector_9providers_Self = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "Self", sizeof(struct __pyx_obj_19dependency_injector_9providers_Self), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_19dependency_injector_9providers_Self) __PYX_ERR(1, 42, __pyx_L1_error) + __pyx_vtabptr_19dependency_injector_9providers_Self = (struct __pyx_vtabstruct_19dependency_injector_9providers_Self*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_Self->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_Self)) __PYX_ERR(1, 42, __pyx_L1_error) + __pyx_ptype_19dependency_injector_9providers_Delegate = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "Delegate", sizeof(struct __pyx_obj_19dependency_injector_9providers_Delegate), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_19dependency_injector_9providers_Delegate) __PYX_ERR(1, 47, __pyx_L1_error) + __pyx_vtabptr_19dependency_injector_9providers_Delegate = (struct __pyx_vtabstruct_19dependency_injector_9providers_Delegate*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_Delegate->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_Delegate)) __PYX_ERR(1, 47, __pyx_L1_error) + __pyx_ptype_19dependency_injector_9providers_Aggregate = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "Aggregate", sizeof(struct __pyx_obj_19dependency_injector_9providers_Aggregate), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_19dependency_injector_9providers_Aggregate) __PYX_ERR(1, 53, __pyx_L1_error) + __pyx_vtabptr_19dependency_injector_9providers_Aggregate = (struct __pyx_vtabstruct_19dependency_injector_9providers_Aggregate*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_Aggregate->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_Aggregate)) __PYX_ERR(1, 53, __pyx_L1_error) + __pyx_ptype_19dependency_injector_9providers_Dependency = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "Dependency", sizeof(struct __pyx_obj_19dependency_injector_9providers_Dependency), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_19dependency_injector_9providers_Dependency) __PYX_ERR(1, 59, __pyx_L1_error) + __pyx_vtabptr_19dependency_injector_9providers_Dependency = (struct __pyx_vtabstruct_19dependency_injector_9providers_Dependency*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_Dependency->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_Dependency)) __PYX_ERR(1, 59, __pyx_L1_error) + __pyx_ptype_19dependency_injector_9providers_ExternalDependency = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "ExternalDependency", sizeof(struct __pyx_obj_19dependency_injector_9providers_ExternalDependency), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_19dependency_injector_9providers_ExternalDependency) __PYX_ERR(1, 65, __pyx_L1_error) + __pyx_vtabptr_19dependency_injector_9providers_ExternalDependency = (struct __pyx_vtabstruct_19dependency_injector_9providers_ExternalDependency*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_ExternalDependency->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_ExternalDependency)) __PYX_ERR(1, 65, __pyx_L1_error) + __pyx_ptype_19dependency_injector_9providers_DependenciesContainer = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "DependenciesContainer", sizeof(struct __pyx_obj_19dependency_injector_9providers_DependenciesContainer), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_19dependency_injector_9providers_DependenciesContainer) __PYX_ERR(1, 69, __pyx_L1_error) + __pyx_vtabptr_19dependency_injector_9providers_DependenciesContainer = (struct __pyx_vtabstruct_19dependency_injector_9providers_DependenciesContainer*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_DependenciesContainer->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_DependenciesContainer)) __PYX_ERR(1, 69, __pyx_L1_error) + __pyx_ptype_19dependency_injector_9providers_Callable = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "Callable", sizeof(struct __pyx_obj_19dependency_injector_9providers_Callable), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_19dependency_injector_9providers_Callable) __PYX_ERR(1, 77, __pyx_L1_error) + __pyx_vtabptr_19dependency_injector_9providers_Callable = (struct __pyx_vtabstruct_19dependency_injector_9providers_Callable*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_Callable->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_Callable)) __PYX_ERR(1, 77, __pyx_L1_error) + __pyx_ptype_19dependency_injector_9providers_DelegatedCallable = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "DelegatedCallable", sizeof(struct __pyx_obj_19dependency_injector_9providers_DelegatedCallable), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_19dependency_injector_9providers_DelegatedCallable) __PYX_ERR(1, 89, __pyx_L1_error) + __pyx_vtabptr_19dependency_injector_9providers_DelegatedCallable = (struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedCallable*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_DelegatedCallable->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_DelegatedCallable)) __PYX_ERR(1, 89, __pyx_L1_error) + __pyx_ptype_19dependency_injector_9providers_AbstractCallable = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "AbstractCallable", sizeof(struct __pyx_obj_19dependency_injector_9providers_AbstractCallable), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_19dependency_injector_9providers_AbstractCallable) __PYX_ERR(1, 93, __pyx_L1_error) + __pyx_vtabptr_19dependency_injector_9providers_AbstractCallable = (struct __pyx_vtabstruct_19dependency_injector_9providers_AbstractCallable*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_AbstractCallable->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_AbstractCallable)) __PYX_ERR(1, 93, __pyx_L1_error) + __pyx_ptype_19dependency_injector_9providers_CallableDelegate = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "CallableDelegate", sizeof(struct __pyx_obj_19dependency_injector_9providers_CallableDelegate), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_19dependency_injector_9providers_CallableDelegate) __PYX_ERR(1, 97, __pyx_L1_error) + __pyx_vtabptr_19dependency_injector_9providers_CallableDelegate = (struct __pyx_vtabstruct_19dependency_injector_9providers_CallableDelegate*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_CallableDelegate->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_CallableDelegate)) __PYX_ERR(1, 97, __pyx_L1_error) + __pyx_ptype_19dependency_injector_9providers_Coroutine = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "Coroutine", sizeof(struct __pyx_obj_19dependency_injector_9providers_Coroutine), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_19dependency_injector_9providers_Coroutine) __PYX_ERR(1, 102, __pyx_L1_error) + __pyx_vtabptr_19dependency_injector_9providers_Coroutine = (struct __pyx_vtabstruct_19dependency_injector_9providers_Coroutine*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_Coroutine->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_Coroutine)) __PYX_ERR(1, 102, __pyx_L1_error) + __pyx_ptype_19dependency_injector_9providers_DelegatedCoroutine = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "DelegatedCoroutine", sizeof(struct __pyx_obj_19dependency_injector_9providers_DelegatedCoroutine), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_19dependency_injector_9providers_DelegatedCoroutine) __PYX_ERR(1, 106, __pyx_L1_error) + __pyx_vtabptr_19dependency_injector_9providers_DelegatedCoroutine = (struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedCoroutine*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_DelegatedCoroutine->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_DelegatedCoroutine)) __PYX_ERR(1, 106, __pyx_L1_error) + __pyx_ptype_19dependency_injector_9providers_AbstractCoroutine = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "AbstractCoroutine", sizeof(struct __pyx_obj_19dependency_injector_9providers_AbstractCoroutine), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_19dependency_injector_9providers_AbstractCoroutine) __PYX_ERR(1, 110, __pyx_L1_error) + __pyx_vtabptr_19dependency_injector_9providers_AbstractCoroutine = (struct __pyx_vtabstruct_19dependency_injector_9providers_AbstractCoroutine*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_AbstractCoroutine->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_AbstractCoroutine)) __PYX_ERR(1, 110, __pyx_L1_error) + __pyx_ptype_19dependency_injector_9providers_CoroutineDelegate = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "CoroutineDelegate", sizeof(struct __pyx_obj_19dependency_injector_9providers_CoroutineDelegate), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_19dependency_injector_9providers_CoroutineDelegate) __PYX_ERR(1, 114, __pyx_L1_error) + __pyx_vtabptr_19dependency_injector_9providers_CoroutineDelegate = (struct __pyx_vtabstruct_19dependency_injector_9providers_CoroutineDelegate*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_CoroutineDelegate->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_CoroutineDelegate)) __PYX_ERR(1, 114, __pyx_L1_error) + __pyx_ptype_19dependency_injector_9providers_ConfigurationOption = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "ConfigurationOption", sizeof(struct __pyx_obj_19dependency_injector_9providers_ConfigurationOption), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_19dependency_injector_9providers_ConfigurationOption) __PYX_ERR(1, 119, __pyx_L1_error) + __pyx_vtabptr_19dependency_injector_9providers_ConfigurationOption = (struct __pyx_vtabstruct_19dependency_injector_9providers_ConfigurationOption*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_ConfigurationOption->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_ConfigurationOption)) __PYX_ERR(1, 119, __pyx_L1_error) + __pyx_ptype_19dependency_injector_9providers_TypedConfigurationOption = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "TypedConfigurationOption", sizeof(struct __pyx_obj_19dependency_injector_9providers_TypedConfigurationOption), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_19dependency_injector_9providers_TypedConfigurationOption) __PYX_ERR(1, 127, __pyx_L1_error) + __pyx_vtabptr_19dependency_injector_9providers_TypedConfigurationOption = (struct __pyx_vtabstruct_19dependency_injector_9providers_TypedConfigurationOption*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_TypedConfigurationOption->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_TypedConfigurationOption)) __PYX_ERR(1, 127, __pyx_L1_error) + __pyx_ptype_19dependency_injector_9providers_Configuration = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "Configuration", sizeof(struct __pyx_obj_19dependency_injector_9providers_Configuration), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_19dependency_injector_9providers_Configuration) __PYX_ERR(1, 131, __pyx_L1_error) + __pyx_vtabptr_19dependency_injector_9providers_Configuration = (struct __pyx_vtabstruct_19dependency_injector_9providers_Configuration*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_Configuration->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_Configuration)) __PYX_ERR(1, 131, __pyx_L1_error) + __pyx_ptype_19dependency_injector_9providers_Factory = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "Factory", sizeof(struct __pyx_obj_19dependency_injector_9providers_Factory), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_19dependency_injector_9providers_Factory) __PYX_ERR(1, 142, __pyx_L1_error) + __pyx_vtabptr_19dependency_injector_9providers_Factory = (struct __pyx_vtabstruct_19dependency_injector_9providers_Factory*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_Factory->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_Factory)) __PYX_ERR(1, 142, __pyx_L1_error) + __pyx_ptype_19dependency_injector_9providers_DelegatedFactory = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "DelegatedFactory", sizeof(struct __pyx_obj_19dependency_injector_9providers_DelegatedFactory), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_19dependency_injector_9providers_DelegatedFactory) __PYX_ERR(1, 151, __pyx_L1_error) + __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, 151, __pyx_L1_error) + __pyx_ptype_19dependency_injector_9providers_AbstractFactory = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "AbstractFactory", sizeof(struct __pyx_obj_19dependency_injector_9providers_AbstractFactory), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_19dependency_injector_9providers_AbstractFactory) __PYX_ERR(1, 155, __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, 155, __pyx_L1_error) + __pyx_ptype_19dependency_injector_9providers_FactoryDelegate = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "FactoryDelegate", sizeof(struct __pyx_obj_19dependency_injector_9providers_FactoryDelegate), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_19dependency_injector_9providers_FactoryDelegate) __PYX_ERR(1, 159, __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, 159, __pyx_L1_error) + __pyx_ptype_19dependency_injector_9providers_FactoryAggregate = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "FactoryAggregate", sizeof(struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_19dependency_injector_9providers_FactoryAggregate) __PYX_ERR(1, 163, __pyx_L1_error) + __pyx_vtabptr_19dependency_injector_9providers_FactoryAggregate = (struct __pyx_vtabstruct_19dependency_injector_9providers_FactoryAggregate*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_FactoryAggregate->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_FactoryAggregate)) __PYX_ERR(1, 163, __pyx_L1_error) + __pyx_ptype_19dependency_injector_9providers_BaseSingleton = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "BaseSingleton", sizeof(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_19dependency_injector_9providers_BaseSingleton) __PYX_ERR(1, 168, __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, 168, __pyx_L1_error) + __pyx_ptype_19dependency_injector_9providers_Singleton = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "Singleton", sizeof(struct __pyx_obj_19dependency_injector_9providers_Singleton), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_19dependency_injector_9providers_Singleton) __PYX_ERR(1, 173, __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, 173, __pyx_L1_error) + __pyx_ptype_19dependency_injector_9providers_DelegatedSingleton = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "DelegatedSingleton", sizeof(struct __pyx_obj_19dependency_injector_9providers_DelegatedSingleton), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_19dependency_injector_9providers_DelegatedSingleton) __PYX_ERR(1, 178, __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, 178, __pyx_L1_error) + __pyx_ptype_19dependency_injector_9providers_ThreadSafeSingleton = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "ThreadSafeSingleton", sizeof(struct __pyx_obj_19dependency_injector_9providers_ThreadSafeSingleton), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_19dependency_injector_9providers_ThreadSafeSingleton) __PYX_ERR(1, 182, __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, 182, __pyx_L1_error) + __pyx_ptype_19dependency_injector_9providers_DelegatedThreadSafeSingleton = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "DelegatedThreadSafeSingleton", sizeof(struct __pyx_obj_19dependency_injector_9providers_DelegatedThreadSafeSingleton), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_19dependency_injector_9providers_DelegatedThreadSafeSingleton) __PYX_ERR(1, 188, __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, 188, __pyx_L1_error) + __pyx_ptype_19dependency_injector_9providers_ThreadLocalSingleton = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "ThreadLocalSingleton", sizeof(struct __pyx_obj_19dependency_injector_9providers_ThreadLocalSingleton), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_19dependency_injector_9providers_ThreadLocalSingleton) __PYX_ERR(1, 192, __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, 192, __pyx_L1_error) + __pyx_ptype_19dependency_injector_9providers_ContextLocalSingleton = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "ContextLocalSingleton", sizeof(struct __pyx_obj_19dependency_injector_9providers_ContextLocalSingleton), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_19dependency_injector_9providers_ContextLocalSingleton) __PYX_ERR(1, 197, __pyx_L1_error) + __pyx_vtabptr_19dependency_injector_9providers_ContextLocalSingleton = (struct __pyx_vtabstruct_19dependency_injector_9providers_ContextLocalSingleton*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_ContextLocalSingleton->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_ContextLocalSingleton)) __PYX_ERR(1, 197, __pyx_L1_error) + __pyx_ptype_19dependency_injector_9providers_DelegatedThreadLocalSingleton = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "DelegatedThreadLocalSingleton", sizeof(struct __pyx_obj_19dependency_injector_9providers_DelegatedThreadLocalSingleton), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_19dependency_injector_9providers_DelegatedThreadLocalSingleton) __PYX_ERR(1, 202, __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, 202, __pyx_L1_error) + __pyx_ptype_19dependency_injector_9providers_AbstractSingleton = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "AbstractSingleton", sizeof(struct __pyx_obj_19dependency_injector_9providers_AbstractSingleton), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_19dependency_injector_9providers_AbstractSingleton) __PYX_ERR(1, 206, __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, 206, __pyx_L1_error) + __pyx_ptype_19dependency_injector_9providers_SingletonDelegate = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "SingletonDelegate", sizeof(struct __pyx_obj_19dependency_injector_9providers_SingletonDelegate), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_19dependency_injector_9providers_SingletonDelegate) __PYX_ERR(1, 210, __pyx_L1_error) + __pyx_vtabptr_19dependency_injector_9providers_SingletonDelegate = (struct __pyx_vtabstruct_19dependency_injector_9providers_SingletonDelegate*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_SingletonDelegate->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_SingletonDelegate)) __PYX_ERR(1, 210, __pyx_L1_error) + __pyx_ptype_19dependency_injector_9providers_List = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "List", sizeof(struct __pyx_obj_19dependency_injector_9providers_List), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_19dependency_injector_9providers_List) __PYX_ERR(1, 216, __pyx_L1_error) + __pyx_vtabptr_19dependency_injector_9providers_List = (struct __pyx_vtabstruct_19dependency_injector_9providers_List*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_List->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_List)) __PYX_ERR(1, 216, __pyx_L1_error) + __pyx_ptype_19dependency_injector_9providers_Dict = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "Dict", sizeof(struct __pyx_obj_19dependency_injector_9providers_Dict), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_19dependency_injector_9providers_Dict) __PYX_ERR(1, 223, __pyx_L1_error) + __pyx_vtabptr_19dependency_injector_9providers_Dict = (struct __pyx_vtabstruct_19dependency_injector_9providers_Dict*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_Dict->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_Dict)) __PYX_ERR(1, 223, __pyx_L1_error) + __pyx_ptype_19dependency_injector_9providers_Resource = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "Resource", sizeof(struct __pyx_obj_19dependency_injector_9providers_Resource), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_19dependency_injector_9providers_Resource) __PYX_ERR(1, 230, __pyx_L1_error) + __pyx_vtabptr_19dependency_injector_9providers_Resource = (struct __pyx_vtabstruct_19dependency_injector_9providers_Resource*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_Resource->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_Resource)) __PYX_ERR(1, 230, __pyx_L1_error) + __pyx_ptype_19dependency_injector_9providers_Container = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "Container", sizeof(struct __pyx_obj_19dependency_injector_9providers_Container), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_19dependency_injector_9providers_Container) __PYX_ERR(1, 245, __pyx_L1_error) + __pyx_vtabptr_19dependency_injector_9providers_Container = (struct __pyx_vtabstruct_19dependency_injector_9providers_Container*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_Container->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_Container)) __PYX_ERR(1, 245, __pyx_L1_error) + __pyx_ptype_19dependency_injector_9providers_Selector = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "Selector", sizeof(struct __pyx_obj_19dependency_injector_9providers_Selector), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_19dependency_injector_9providers_Selector) __PYX_ERR(1, 254, __pyx_L1_error) + __pyx_vtabptr_19dependency_injector_9providers_Selector = (struct __pyx_vtabstruct_19dependency_injector_9providers_Selector*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_Selector->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_Selector)) __PYX_ERR(1, 254, __pyx_L1_error) + __pyx_ptype_19dependency_injector_9providers_ProvidedInstance = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "ProvidedInstance", sizeof(struct __pyx_obj_19dependency_injector_9providers_ProvidedInstance), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_19dependency_injector_9providers_ProvidedInstance) __PYX_ERR(1, 262, __pyx_L1_error) + __pyx_vtabptr_19dependency_injector_9providers_ProvidedInstance = (struct __pyx_vtabstruct_19dependency_injector_9providers_ProvidedInstance*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_ProvidedInstance->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_ProvidedInstance)) __PYX_ERR(1, 262, __pyx_L1_error) + __pyx_ptype_19dependency_injector_9providers_AttributeGetter = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "AttributeGetter", sizeof(struct __pyx_obj_19dependency_injector_9providers_AttributeGetter), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_19dependency_injector_9providers_AttributeGetter) __PYX_ERR(1, 268, __pyx_L1_error) + __pyx_vtabptr_19dependency_injector_9providers_AttributeGetter = (struct __pyx_vtabstruct_19dependency_injector_9providers_AttributeGetter*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_AttributeGetter->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_AttributeGetter)) __PYX_ERR(1, 268, __pyx_L1_error) + __pyx_ptype_19dependency_injector_9providers_ItemGetter = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "ItemGetter", sizeof(struct __pyx_obj_19dependency_injector_9providers_ItemGetter), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_19dependency_injector_9providers_ItemGetter) __PYX_ERR(1, 275, __pyx_L1_error) + __pyx_vtabptr_19dependency_injector_9providers_ItemGetter = (struct __pyx_vtabstruct_19dependency_injector_9providers_ItemGetter*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_ItemGetter->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_ItemGetter)) __PYX_ERR(1, 275, __pyx_L1_error) + __pyx_ptype_19dependency_injector_9providers_MethodCaller = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "MethodCaller", sizeof(struct __pyx_obj_19dependency_injector_9providers_MethodCaller), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_19dependency_injector_9providers_MethodCaller) __PYX_ERR(1, 282, __pyx_L1_error) + __pyx_vtabptr_19dependency_injector_9providers_MethodCaller = (struct __pyx_vtabstruct_19dependency_injector_9providers_MethodCaller*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_MethodCaller->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_MethodCaller)) __PYX_ERR(1, 282, __pyx_L1_error) + __pyx_ptype_19dependency_injector_9providers_Injection = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "Injection", sizeof(struct __pyx_obj_19dependency_injector_9providers_Injection), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_19dependency_injector_9providers_Injection) __PYX_ERR(1, 293, __pyx_L1_error) + __pyx_ptype_19dependency_injector_9providers_PositionalInjection = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "PositionalInjection", sizeof(struct __pyx_obj_19dependency_injector_9providers_PositionalInjection), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_19dependency_injector_9providers_PositionalInjection) __PYX_ERR(1, 300, __pyx_L1_error) + __pyx_ptype_19dependency_injector_9providers_NamedInjection = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "NamedInjection", sizeof(struct __pyx_obj_19dependency_injector_9providers_NamedInjection), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_19dependency_injector_9providers_NamedInjection) __PYX_ERR(1, 304, __pyx_L1_error) + __pyx_ptype_19dependency_injector_9providers_OverridingContext = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "OverridingContext", sizeof(struct __pyx_obj_19dependency_injector_9providers_OverridingContext), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_19dependency_injector_9providers_OverridingContext) __PYX_ERR(1, 315, __pyx_L1_error) + __pyx_ptype_19dependency_injector_9providers_BaseSingletonResetContext = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "BaseSingletonResetContext", sizeof(struct __pyx_obj_19dependency_injector_9providers_BaseSingletonResetContext), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_19dependency_injector_9providers_BaseSingletonResetContext) __PYX_ERR(1, 320, __pyx_L1_error) + __pyx_ptype_19dependency_injector_9providers_SingletonResetContext = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "SingletonResetContext", sizeof(struct __pyx_obj_19dependency_injector_9providers_SingletonResetContext), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_19dependency_injector_9providers_SingletonResetContext) __PYX_ERR(1, 324, __pyx_L1_error) + __pyx_ptype_19dependency_injector_9providers_SingletonFullResetContext = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "SingletonFullResetContext", sizeof(struct __pyx_obj_19dependency_injector_9providers_SingletonFullResetContext), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_19dependency_injector_9providers_SingletonFullResetContext) __PYX_ERR(1, 328, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_RefNannyFinishContext(); return 0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_RefNannyFinishContext(); + return -1; } static int __Pyx_modinit_variable_import_code(void) { __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0); /*--- Variable import code ---*/ + __pyx_t_1 = PyImport_ImportModule("dependency_injector.providers"); if (!__pyx_t_1) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (__Pyx_ImportVoidPtr(__pyx_t_1, "ASYNC_MODE_UNDEFINED", (void **)&__pyx_vp_19dependency_injector_9providers_ASYNC_MODE_UNDEFINED, "int") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportVoidPtr(__pyx_t_1, "ASYNC_MODE_ENABLED", (void **)&__pyx_vp_19dependency_injector_9providers_ASYNC_MODE_ENABLED, "int") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportVoidPtr(__pyx_t_1, "ASYNC_MODE_DISABLED", (void **)&__pyx_vp_19dependency_injector_9providers_ASYNC_MODE_DISABLED, "int") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportVoidPtr(__pyx_t_1, "__iscoroutine_typecache", (void **)&__pyx_vp_19dependency_injector_9providers___iscoroutine_typecache, "PyObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportVoidPtr(__pyx_t_1, "__COROUTINE_TYPES", (void **)&__pyx_vp_19dependency_injector_9providers___COROUTINE_TYPES, "PyObject *") < 0) __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) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_RefNannyFinishContext(); return 0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_RefNannyFinishContext(); + return -1; } static int __Pyx_modinit_function_import_code(void) { @@ -4898,8 +12813,8 @@ if (!__Pyx_RefNanny) { (void)__Pyx_modinit_variable_export_code(); (void)__Pyx_modinit_function_export_code(); if (unlikely(__Pyx_modinit_type_init_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error) - (void)__Pyx_modinit_type_import_code(); - (void)__Pyx_modinit_variable_import_code(); + if (unlikely(__Pyx_modinit_type_import_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error) + if (unlikely(__Pyx_modinit_variable_import_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error) (void)__Pyx_modinit_function_import_code(); /*--- Execution code ---*/ #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) @@ -4978,7 +12893,7 @@ if (!__Pyx_RefNanny) { __Pyx_INCREF(__pyx_n_s_providers); __Pyx_GIVEREF(__pyx_n_s_providers); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_providers); - __pyx_t_2 = __Pyx_Import(__pyx_n_s__6, __pyx_t_1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9, __pyx_L1_error) + __pyx_t_2 = __Pyx_Import(__pyx_n_s__13, __pyx_t_1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_providers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9, __pyx_L1_error) @@ -4992,7 +12907,7 @@ if (!__Pyx_RefNanny) { * from . import providers * from .wiring import _Marker # <<<<<<<<<<<<<< * - * + * from .providers cimport Provider */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -5008,28 +12923,28 @@ if (!__Pyx_RefNanny) { __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/_cwiring.pyx":13 + /* "dependency_injector/_cwiring.pyx":15 * * * def _get_sync_patched(fn): # <<<<<<<<<<<<<< * @functools.wraps(fn) * def _patched(*args, **kwargs): */ - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_8_cwiring_1_get_sync_patched, NULL, __pyx_n_s_dependency_injector__cwiring); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13, __pyx_L1_error) + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_8_cwiring_1_get_sync_patched, NULL, __pyx_n_s_dependency_injector__cwiring); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_sync_patched, __pyx_t_1) < 0) __PYX_ERR(0, 13, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_sync_patched, __pyx_t_1) < 0) __PYX_ERR(0, 15, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/_cwiring.pyx":38 + /* "dependency_injector/_cwiring.pyx":42 * * - * def _get_async_patched(fn): # <<<<<<<<<<<<<< - * @functools.wraps(fn) - * async def _patched(*args, **kwargs): + * async def _async_inject(object fn, tuple args, dict kwargs, dict injections, dict closings): # <<<<<<<<<<<<<< + * cdef object result + * cdef dict to_inject */ - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_8_cwiring_3_get_async_patched, NULL, __pyx_n_s_dependency_injector__cwiring); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 38, __pyx_L1_error) + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_8_cwiring_3_async_inject, NULL, __pyx_n_s_dependency_injector__cwiring); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 42, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_async_patched, __pyx_t_1) < 0) __PYX_ERR(0, 38, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_async_inject, __pyx_t_1) < 0) __PYX_ERR(0, 42, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "dependency_injector/_cwiring.pyx":1 @@ -5042,6 +12957,14 @@ if (!__Pyx_RefNanny) { if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + /* "cfunc.to_py":64 + * + * @cname("__Pyx_CFunc_object____object____object___to_py") + * cdef object __Pyx_CFunc_object____object____object___to_py(object (*f)(object, object) ): # <<<<<<<<<<<<<< + * def wrap(object future_result, object future): + * """wrap(future_result, future)""" + */ + /*--- Wrapped vars code ---*/ goto __pyx_L0; @@ -5462,6 +13385,19 @@ static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) { return 0; } +/* ExtTypeTest */ +static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { + if (unlikely(!type)) { + PyErr_SetString(PyExc_SystemError, "Missing type object"); + return 0; + } + if (likely(__Pyx_TypeCheck(obj, type))) + return 1; + PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s", + Py_TYPE(obj)->tp_name, type->tp_name); + return 0; +} + /* DictGetItem */ #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) { @@ -6233,6 +14169,216 @@ static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qual return op; } +/* RaiseArgTupleInvalid */ +static void __Pyx_RaiseArgtupleInvalid( + const char* func_name, + int exact, + Py_ssize_t num_min, + Py_ssize_t num_max, + Py_ssize_t num_found) +{ + Py_ssize_t num_expected; + const char *more_or_less; + if (num_found < num_min) { + num_expected = num_min; + more_or_less = "at least"; + } else { + num_expected = num_max; + more_or_less = "at most"; + } + if (exact) { + more_or_less = "exactly"; + } + PyErr_Format(PyExc_TypeError, + "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)", + func_name, more_or_less, num_expected, + (num_expected == 1) ? "" : "s", num_found); +} + +/* RaiseDoubleKeywords */ +static void __Pyx_RaiseDoubleKeywordsError( + const char* func_name, + PyObject* kw_name) +{ + PyErr_Format(PyExc_TypeError, + #if PY_MAJOR_VERSION >= 3 + "%s() got multiple values for keyword argument '%U'", func_name, kw_name); + #else + "%s() got multiple values for keyword argument '%s'", func_name, + PyString_AsString(kw_name)); + #endif +} + +/* ParseKeywords */ +static int __Pyx_ParseOptionalKeywords( + PyObject *kwds, + PyObject **argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + const char* function_name) +{ + PyObject *key = 0, *value = 0; + Py_ssize_t pos = 0; + PyObject*** name; + PyObject*** first_kw_arg = argnames + num_pos_args; + while (PyDict_Next(kwds, &pos, &key, &value)) { + name = first_kw_arg; + while (*name && (**name != key)) name++; + if (*name) { + values[name-argnames] = value; + continue; + } + name = first_kw_arg; + #if PY_MAJOR_VERSION < 3 + if (likely(PyString_Check(key))) { + while (*name) { + if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key)) + && _PyString_Eq(**name, key)) { + values[name-argnames] = value; + break; + } + name++; + } + if (*name) continue; + else { + PyObject*** argname = argnames; + while (argname != first_kw_arg) { + if ((**argname == key) || ( + (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key)) + && _PyString_Eq(**argname, key))) { + goto arg_passed_twice; + } + argname++; + } + } + } else + #endif + if (likely(PyUnicode_Check(key))) { + while (*name) { + int cmp = (**name == key) ? 0 : + #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 + (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : + #endif + PyUnicode_Compare(**name, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) { + values[name-argnames] = value; + break; + } + name++; + } + if (*name) continue; + else { + PyObject*** argname = argnames; + while (argname != first_kw_arg) { + int cmp = (**argname == key) ? 0 : + #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 + (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : + #endif + PyUnicode_Compare(**argname, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) goto arg_passed_twice; + argname++; + } + } + } else + goto invalid_keyword_type; + if (kwds2) { + if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad; + } else { + goto invalid_keyword; + } + } + return 0; +arg_passed_twice: + __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; +invalid_keyword_type: + PyErr_Format(PyExc_TypeError, + "%.200s() keywords must be strings", function_name); + goto bad; +invalid_keyword: + PyErr_Format(PyExc_TypeError, + #if PY_MAJOR_VERSION < 3 + "%.200s() got an unexpected keyword argument '%.200s'", + function_name, PyString_AsString(key)); + #else + "%s() got an unexpected keyword argument '%U'", + function_name, key); + #endif +bad: + return -1; +} + +/* ArgTypeTest */ +static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact) +{ + if (unlikely(!type)) { + PyErr_SetString(PyExc_SystemError, "Missing type object"); + return 0; + } + else if (exact) { + #if PY_MAJOR_VERSION == 2 + if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1; + #endif + } + else { + if (likely(__Pyx_TypeCheck(obj, type))) return 1; + } + PyErr_Format(PyExc_TypeError, + "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)", + name, type->tp_name, Py_TYPE(obj)->tp_name); + return 0; +} + +/* UnpackUnboundCMethod */ +static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) { + PyObject *method; + method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name); + if (unlikely(!method)) + return -1; + target->method = method; +#if CYTHON_COMPILING_IN_CPYTHON + #if PY_MAJOR_VERSION >= 3 + if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type))) + #endif + { + PyMethodDescrObject *descr = (PyMethodDescrObject*) method; + target->func = descr->d_method->ml_meth; + target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS); + } +#endif + return 0; +} + +/* CallUnboundCMethod0 */ +static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) { + PyObject *args, *result = NULL; + if (unlikely(!cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; +#if CYTHON_ASSUME_SAFE_MACROS + args = PyTuple_New(1); + if (unlikely(!args)) goto bad; + Py_INCREF(self); + PyTuple_SET_ITEM(args, 0, self); +#else + args = PyTuple_Pack(1, self); + if (unlikely(!args)) goto bad; +#endif + result = __Pyx_PyObject_Call(cfunc->method, args, NULL); + Py_DECREF(args); +bad: + return result; +} + +/* py_dict_items */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d) { + if (PY_MAJOR_VERSION >= 3) + return __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyDict_Type_items, d); + else + return PyDict_Items(d); +} + /* PyErrFetchRestore */ #if CYTHON_FAST_THREAD_STATE static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { @@ -8004,20 +16150,6 @@ static void __Pyx__ReturnWithStopIteration(PyObject* value) { Py_DECREF(exc); } -/* PyObjectSetAttrStr */ -#if CYTHON_USE_TYPE_SLOTS -static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) { - PyTypeObject* tp = Py_TYPE(obj); - if (likely(tp->tp_setattro)) - return tp->tp_setattro(obj, attr_name, value); -#if PY_MAJOR_VERSION < 3 - if (likely(tp->tp_setattr)) - return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value); -#endif - return PyObject_SetAttr(obj, attr_name, value); -} -#endif - /* WriteUnraisableException */ static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno, CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename, @@ -8060,6 +16192,497 @@ static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno, #endif } +/* SliceObject */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj, + Py_ssize_t cstart, Py_ssize_t cstop, + PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice, + int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) { +#if CYTHON_USE_TYPE_SLOTS + PyMappingMethods* mp; +#if PY_MAJOR_VERSION < 3 + PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence; + if (likely(ms && ms->sq_slice)) { + if (!has_cstart) { + if (_py_start && (*_py_start != Py_None)) { + cstart = __Pyx_PyIndex_AsSsize_t(*_py_start); + if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; + } else + cstart = 0; + } + if (!has_cstop) { + if (_py_stop && (*_py_stop != Py_None)) { + cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop); + if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; + } else + cstop = PY_SSIZE_T_MAX; + } + if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) { + Py_ssize_t l = ms->sq_length(obj); + if (likely(l >= 0)) { + if (cstop < 0) { + cstop += l; + if (cstop < 0) cstop = 0; + } + if (cstart < 0) { + cstart += l; + if (cstart < 0) cstart = 0; + } + } else { + if (!PyErr_ExceptionMatches(PyExc_OverflowError)) + goto bad; + PyErr_Clear(); + } + } + return ms->sq_slice(obj, cstart, cstop); + } +#endif + mp = Py_TYPE(obj)->tp_as_mapping; + if (likely(mp && mp->mp_subscript)) +#endif + { + PyObject* result; + PyObject *py_slice, *py_start, *py_stop; + if (_py_slice) { + py_slice = *_py_slice; + } else { + PyObject* owned_start = NULL; + PyObject* owned_stop = NULL; + if (_py_start) { + py_start = *_py_start; + } else { + if (has_cstart) { + owned_start = py_start = PyInt_FromSsize_t(cstart); + if (unlikely(!py_start)) goto bad; + } else + py_start = Py_None; + } + if (_py_stop) { + py_stop = *_py_stop; + } else { + if (has_cstop) { + owned_stop = py_stop = PyInt_FromSsize_t(cstop); + if (unlikely(!py_stop)) { + Py_XDECREF(owned_start); + goto bad; + } + } else + py_stop = Py_None; + } + py_slice = PySlice_New(py_start, py_stop, Py_None); + Py_XDECREF(owned_start); + Py_XDECREF(owned_stop); + if (unlikely(!py_slice)) goto bad; + } +#if CYTHON_USE_TYPE_SLOTS + result = mp->mp_subscript(obj, py_slice); +#else + result = PyObject_GetItem(obj, py_slice); +#endif + if (!_py_slice) { + Py_DECREF(py_slice); + } + return result; + } + PyErr_Format(PyExc_TypeError, + "'%.200s' object is unsliceable", Py_TYPE(obj)->tp_name); +bad: + return NULL; +} + +/* PyIntBinop */ +#if !CYTHON_COMPILING_IN_PYPY +static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) { + (void)inplace; + (void)zerodivision_check; + #if PY_MAJOR_VERSION < 3 + if (likely(PyInt_CheckExact(op1))) { + const long b = intval; + long x; + long a = PyInt_AS_LONG(op1); + x = (long)((unsigned long)a + b); + if (likely((x^a) >= 0 || (x^b) >= 0)) + return PyInt_FromLong(x); + return PyLong_Type.tp_as_number->nb_add(op1, op2); + } + #endif + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(PyLong_CheckExact(op1))) { + const long b = intval; + long a, x; +#ifdef HAVE_LONG_LONG + const PY_LONG_LONG llb = intval; + PY_LONG_LONG lla, llx; +#endif + const digit* digits = ((PyLongObject*)op1)->ob_digit; + const Py_ssize_t size = Py_SIZE(op1); + if (likely(__Pyx_sst_abs(size) <= 1)) { + a = likely(size) ? digits[0] : 0; + if (size == -1) a = -a; + } else { + switch (size) { + case -2: + if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; +#ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { + lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; +#endif + } + CYTHON_FALLTHROUGH; + case 2: + if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; +#ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; +#endif + } + CYTHON_FALLTHROUGH; + case -3: + if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; +#ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { + lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; +#endif + } + CYTHON_FALLTHROUGH; + case 3: + if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; +#ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; +#endif + } + CYTHON_FALLTHROUGH; + case -4: + if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { + a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; +#ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { + lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; +#endif + } + CYTHON_FALLTHROUGH; + case 4: + if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { + a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; +#ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; +#endif + } + CYTHON_FALLTHROUGH; + default: return PyLong_Type.tp_as_number->nb_add(op1, op2); + } + } + x = a + b; + return PyLong_FromLong(x); +#ifdef HAVE_LONG_LONG + long_long: + llx = lla + llb; + return PyLong_FromLongLong(llx); +#endif + + + } + #endif + if (PyFloat_CheckExact(op1)) { + const long b = intval; + double a = PyFloat_AS_DOUBLE(op1); + double result; + PyFPE_START_PROTECT("add", return NULL) + result = ((double)a) + (double)b; + PyFPE_END_PROTECT(result) + return PyFloat_FromDouble(result); + } + return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2); +} +#endif + +/* RaiseNoneIterError */ +static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); +} + +/* PyErrExceptionMatches */ +#if CYTHON_FAST_THREAD_STATE +static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(tuple); +#if PY_MAJOR_VERSION >= 3 + for (i=0; icurexc_type; + if (exc_type == err) return 1; + if (unlikely(!exc_type)) return 0; + if (unlikely(PyTuple_Check(err))) + return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err); + return __Pyx_PyErr_GivenExceptionMatches(exc_type, err); +} +#endif + +/* GetException */ +#if CYTHON_FAST_THREAD_STATE +static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) +#else +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) +#endif +{ + PyObject *local_type, *local_value, *local_tb; +#if CYTHON_FAST_THREAD_STATE + PyObject *tmp_type, *tmp_value, *tmp_tb; + local_type = tstate->curexc_type; + local_value = tstate->curexc_value; + local_tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; +#else + PyErr_Fetch(&local_type, &local_value, &local_tb); +#endif + PyErr_NormalizeException(&local_type, &local_value, &local_tb); +#if CYTHON_FAST_THREAD_STATE + if (unlikely(tstate->curexc_type)) +#else + if (unlikely(PyErr_Occurred())) +#endif + goto bad; + #if PY_MAJOR_VERSION >= 3 + if (local_tb) { + if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0)) + goto bad; + } + #endif + Py_XINCREF(local_tb); + Py_XINCREF(local_type); + Py_XINCREF(local_value); + *type = local_type; + *value = local_value; + *tb = local_tb; +#if CYTHON_FAST_THREAD_STATE + #if CYTHON_USE_EXC_INFO_STACK + { + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = local_type; + exc_info->exc_value = local_value; + exc_info->exc_traceback = local_tb; + } + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = local_type; + tstate->exc_value = local_value; + tstate->exc_traceback = local_tb; + #endif + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +#else + PyErr_SetExcInfo(local_type, local_value, local_tb); +#endif + return 0; +bad: + *type = 0; + *value = 0; + *tb = 0; + Py_XDECREF(local_type); + Py_XDECREF(local_value); + Py_XDECREF(local_tb); + return -1; +} + +/* GetAttr */ +static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) { +#if CYTHON_USE_TYPE_SLOTS +#if PY_MAJOR_VERSION >= 3 + if (likely(PyUnicode_Check(n))) +#else + if (likely(PyString_Check(n))) +#endif + return __Pyx_PyObject_GetAttrStr(o, n); +#endif + return PyObject_GetAttr(o, n); +} + +/* HasAttr */ +static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) { + PyObject *r; + if (unlikely(!__Pyx_PyBaseString_Check(n))) { + PyErr_SetString(PyExc_TypeError, + "hasattr(): attribute name must be string"); + return -1; + } + r = __Pyx_GetAttr(o, n); + if (unlikely(!r)) { + PyErr_Clear(); + return 0; + } else { + Py_DECREF(r); + return 1; + } +} + +/* pyfrozenset_new */ +static CYTHON_INLINE PyObject* __Pyx_PyFrozenSet_New(PyObject* it) { + if (it) { + PyObject* result; +#if CYTHON_COMPILING_IN_PYPY + PyObject* args; + args = PyTuple_Pack(1, it); + if (unlikely(!args)) + return NULL; + result = PyObject_Call((PyObject*)&PyFrozenSet_Type, args, NULL); + Py_DECREF(args); + return result; +#else + if (PyFrozenSet_CheckExact(it)) { + Py_INCREF(it); + return it; + } + result = PyFrozenSet_New(it); + if (unlikely(!result)) + return NULL; + if ((PY_VERSION_HEX >= 0x031000A1) || likely(PySet_GET_SIZE(result))) + return result; + Py_DECREF(result); +#endif + } +#if CYTHON_USE_TYPE_SLOTS + return PyFrozenSet_Type.tp_new(&PyFrozenSet_Type, __pyx_empty_tuple, NULL); +#else + return PyObject_Call((PyObject*)&PyFrozenSet_Type, __pyx_empty_tuple, NULL); +#endif +} + +/* PySetContains */ +static int __Pyx_PySet_ContainsUnhashable(PyObject *set, PyObject *key) { + int result = -1; + if (PySet_Check(key) && PyErr_ExceptionMatches(PyExc_TypeError)) { + PyObject *tmpkey; + PyErr_Clear(); + tmpkey = __Pyx_PyFrozenSet_New(key); + if (tmpkey != NULL) { + result = PySet_Contains(set, tmpkey); + Py_DECREF(tmpkey); + } + } + return result; +} +static CYTHON_INLINE int __Pyx_PySet_ContainsTF(PyObject* key, PyObject* set, int eq) { + int result = PySet_Contains(set, key); + if (unlikely(result < 0)) { + result = __Pyx_PySet_ContainsUnhashable(set, key); + } + return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); +} + +/* TypeImport */ +#ifndef __PYX_HAVE_RT_ImportType +#define __PYX_HAVE_RT_ImportType +static PyTypeObject *__Pyx_ImportType(PyObject *module, const char *module_name, const char *class_name, + size_t size, enum __Pyx_ImportType_CheckSize check_size) +{ + PyObject *result = 0; + char warning[200]; + Py_ssize_t basicsize; +#ifdef Py_LIMITED_API + PyObject *py_basicsize; +#endif + result = PyObject_GetAttrString(module, class_name); + if (!result) + goto bad; + if (!PyType_Check(result)) { + PyErr_Format(PyExc_TypeError, + "%.200s.%.200s is not a type object", + module_name, class_name); + goto bad; + } +#ifndef Py_LIMITED_API + basicsize = ((PyTypeObject *)result)->tp_basicsize; +#else + py_basicsize = PyObject_GetAttrString(result, "__basicsize__"); + if (!py_basicsize) + goto bad; + basicsize = PyLong_AsSsize_t(py_basicsize); + Py_DECREF(py_basicsize); + py_basicsize = 0; + if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred()) + goto bad; +#endif + if ((size_t)basicsize < size) { + PyErr_Format(PyExc_ValueError, + "%.200s.%.200s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd from PyObject", + module_name, class_name, size, basicsize); + goto bad; + } + if (check_size == __Pyx_ImportType_CheckSize_Error && (size_t)basicsize != size) { + PyErr_Format(PyExc_ValueError, + "%.200s.%.200s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd from PyObject", + module_name, class_name, size, basicsize); + goto bad; + } + else if (check_size == __Pyx_ImportType_CheckSize_Warn && (size_t)basicsize > size) { + PyOS_snprintf(warning, sizeof(warning), + "%s.%s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd from PyObject", + module_name, class_name, size, basicsize); + if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad; + } + return (PyTypeObject *)result; +bad: + Py_XDECREF(result); + return NULL; +} +#endif + +/* GetVTable */ +static void* __Pyx_GetVtable(PyObject *dict) { + void* ptr; + PyObject *ob = PyObject_GetItem(dict, __pyx_n_s_pyx_vtable); + if (!ob) + goto bad; +#if PY_VERSION_HEX >= 0x02070000 + ptr = PyCapsule_GetPointer(ob, 0); +#else + ptr = PyCObject_AsVoidPtr(ob); +#endif + if (!ptr && !PyErr_Occurred()) + PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type"); + Py_DECREF(ob); + return ptr; +bad: + Py_XDECREF(ob); + return NULL; +} + /* Import */ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { PyObject *empty_list = 0; @@ -8454,44 +17077,6 @@ bad: Py_XDECREF(py_frame); } -/* CIntToPy */ -static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { -#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wconversion" -#endif - const long neg_one = (long) -1, const_zero = (long) 0; -#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -#pragma GCC diagnostic pop -#endif - const int is_unsigned = neg_one > const_zero; - if (is_unsigned) { - if (sizeof(long) < sizeof(long)) { - return PyInt_FromLong((long) value); - } else if (sizeof(long) <= sizeof(unsigned long)) { - return PyLong_FromUnsignedLong((unsigned long) value); -#ifdef HAVE_LONG_LONG - } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { - return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); -#endif - } - } else { - if (sizeof(long) <= sizeof(long)) { - return PyInt_FromLong((long) value); -#ifdef HAVE_LONG_LONG - } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { - return PyLong_FromLongLong((PY_LONG_LONG) value); -#endif - } - } - { - int one = 1; int little = (int)*(unsigned char *)&one; - unsigned char *bytes = (unsigned char *)&value; - return _PyLong_FromByteArray(bytes, sizeof(long), - little, !is_unsigned); - } -} - /* CIntFromPyVerify */ #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) @@ -8514,200 +17099,42 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { return (target_type) value;\ } -/* CIntFromPy */ -static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif - const long neg_one = (long) -1, const_zero = (long) 0; + const int neg_one = (int) -1, const_zero = (int) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; -#if PY_MAJOR_VERSION < 3 - if (likely(PyInt_Check(x))) { - if (sizeof(long) < sizeof(long)) { - __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x)) - } else { - long val = PyInt_AS_LONG(x); - if (is_unsigned && unlikely(val < 0)) { - goto raise_neg_overflow; - } - return (long) val; - } - } else -#endif - if (likely(PyLong_Check(x))) { - if (is_unsigned) { -#if CYTHON_USE_PYLONG_INTERNALS - const digit* digits = ((PyLongObject*)x)->ob_digit; - switch (Py_SIZE(x)) { - case 0: return (long) 0; - case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0]) - case 2: - if (8 * sizeof(long) > 1 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) { - return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); - } - } - break; - case 3: - if (8 * sizeof(long) > 2 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) { - return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); - } - } - break; - case 4: - if (8 * sizeof(long) > 3 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) { - return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); - } - } - break; - } -#endif -#if CYTHON_COMPILING_IN_CPYTHON - if (unlikely(Py_SIZE(x) < 0)) { - goto raise_neg_overflow; - } -#else - { - int result = PyObject_RichCompareBool(x, Py_False, Py_LT); - if (unlikely(result < 0)) - return (long) -1; - if (unlikely(result == 1)) - goto raise_neg_overflow; - } -#endif - if (sizeof(long) <= sizeof(unsigned long)) { - __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) + if (is_unsigned) { + if (sizeof(int) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(int) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG - } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { - __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif - } - } else { -#if CYTHON_USE_PYLONG_INTERNALS - const digit* digits = ((PyLongObject*)x)->ob_digit; - switch (Py_SIZE(x)) { - case 0: return (long) 0; - case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0])) - case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0]) - case -2: - if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { - return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); - } - } - break; - case 2: - if (8 * sizeof(long) > 1 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { - return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); - } - } - break; - case -3: - if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { - return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); - } - } - break; - case 3: - if (8 * sizeof(long) > 2 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { - return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); - } - } - break; - case -4: - if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { - return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); - } - } - break; - case 4: - if (8 * sizeof(long) > 3 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { - return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); - } - } - break; - } -#endif - if (sizeof(long) <= sizeof(long)) { - __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) -#ifdef HAVE_LONG_LONG - } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { - __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) -#endif - } - } - { -#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) - PyErr_SetString(PyExc_RuntimeError, - "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); -#else - long val; - PyObject *v = __Pyx_PyNumber_IntOrLong(x); - #if PY_MAJOR_VERSION < 3 - if (likely(v) && !PyLong_Check(v)) { - PyObject *tmp = v; - v = PyNumber_Long(tmp); - Py_DECREF(tmp); - } - #endif - if (likely(v)) { - int one = 1; int is_little = (int)*(unsigned char *)&one; - unsigned char *bytes = (unsigned char *)&val; - int ret = _PyLong_AsByteArray((PyLongObject *)v, - bytes, sizeof(val), - is_little, !is_unsigned); - Py_DECREF(v); - if (likely(!ret)) - return val; - } -#endif - return (long) -1; } } else { - long val; - PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); - if (!tmp) return (long) -1; - val = __Pyx_PyInt_As_long(tmp); - Py_DECREF(tmp); - return val; + if (sizeof(int) <= sizeof(long)) { + return PyInt_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(int), + little, !is_unsigned); } -raise_overflow: - PyErr_SetString(PyExc_OverflowError, - "value too large to convert to long"); - return (long) -1; -raise_neg_overflow: - PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to long"); - return (long) -1; } /* CIntFromPy */ @@ -8906,6 +17333,240 @@ raise_neg_overflow: return (int) -1; } +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(long) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(long) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(long) <= sizeof(long)) { + return PyInt_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(long), + little, !is_unsigned); + } +} + +/* CIntFromPy */ +static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x))) { + if (sizeof(long) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x)) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + goto raise_neg_overflow; + } + return (long) val; + } + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (long) 0; + case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0]) + case 2: + if (8 * sizeof(long) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) { + return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 3: + if (8 * sizeof(long) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) { + return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 4: + if (8 * sizeof(long) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) { + return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (long) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if (sizeof(long) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (long) 0; + case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0])) + case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0]) + case -2: + if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 2: + if (8 * sizeof(long) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -3: + if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 3: + if (8 * sizeof(long) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -4: + if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { + return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 4: + if (8 * sizeof(long) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { + return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + } +#endif + if (sizeof(long) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { +#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); +#else + long val; + PyObject *v = __Pyx_PyNumber_IntOrLong(x); + #if PY_MAJOR_VERSION < 3 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); + } + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } +#endif + return (long) -1; + } + } else { + long val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (long) -1; + val = __Pyx_PyInt_As_long(tmp); + Py_DECREF(tmp); + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to long"); + return (long) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to long"); + return (long) -1; +} + /* FastTypeChecks */ #if CYTHON_COMPILING_IN_CPYTHON static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { @@ -9122,6 +17783,55 @@ static int __Pyx_check_binary_version(void) { return 0; } +/* VoidPtrImport */ +#ifndef __PYX_HAVE_RT_ImportVoidPtr +#define __PYX_HAVE_RT_ImportVoidPtr +static int __Pyx_ImportVoidPtr(PyObject *module, const char *name, void **p, const char *sig) { + PyObject *d = 0; + PyObject *cobj = 0; + d = PyObject_GetAttrString(module, (char *)"__pyx_capi__"); + if (!d) + goto bad; + cobj = PyDict_GetItemString(d, name); + if (!cobj) { + PyErr_Format(PyExc_ImportError, + "%.200s does not export expected C variable %.200s", + PyModule_GetName(module), name); + goto bad; + } +#if PY_VERSION_HEX >= 0x02070000 + if (!PyCapsule_IsValid(cobj, sig)) { + PyErr_Format(PyExc_TypeError, + "C variable %.200s.%.200s has wrong signature (expected %.500s, got %.500s)", + PyModule_GetName(module), name, sig, PyCapsule_GetName(cobj)); + goto bad; + } + *p = PyCapsule_GetPointer(cobj, sig); +#else + {const char *desc, *s1, *s2; + desc = (const char *)PyCObject_GetDesc(cobj); + if (!desc) + goto bad; + s1 = desc; s2 = sig; + while (*s1 != '\0' && *s1 == *s2) { s1++; s2++; } + if (*s1 != *s2) { + PyErr_Format(PyExc_TypeError, + "C variable %.200s.%.200s has wrong signature (expected %.500s, got %.500s)", + PyModule_GetName(module), name, sig, desc); + goto bad; + } + *p = PyCObject_AsVoidPtr(cobj);} +#endif + if (!(*p)) + goto bad; + Py_DECREF(d); + return 0; +bad: + Py_XDECREF(d); + return -1; +} +#endif + /* InitStrings */ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { while (t->p) { diff --git a/src/dependency_injector/_cwiring.pyx b/src/dependency_injector/_cwiring.pyx index ec05354d..a089727d 100644 --- a/src/dependency_injector/_cwiring.pyx +++ b/src/dependency_injector/_cwiring.pyx @@ -9,23 +9,27 @@ import types from . import providers from .wiring import _Marker +from .providers cimport Provider + def _get_sync_patched(fn): @functools.wraps(fn) def _patched(*args, **kwargs): cdef object result cdef dict to_inject + cdef object arg_key + cdef Provider provider to_inject = kwargs.copy() - for injection, provider in _patched.__injections__.items(): - if injection not in kwargs or isinstance(kwargs[injection], _Marker): - to_inject[injection] = provider() + for arg_key, provider in _patched.__injections__.items(): + if arg_key not in kwargs or isinstance(kwargs[arg_key], _Marker): + to_inject[arg_key] = provider() result = fn(*args, **to_inject) if _patched.__closing__: - for injection, provider in _patched.__closing__.items(): - if injection in kwargs and not isinstance(kwargs[injection], _Marker): + for arg_key, provider in _patched.__closing__.items(): + if arg_key in kwargs and not isinstance(kwargs[arg_key], _Marker): continue if not isinstance(provider, providers.Resource): continue @@ -35,49 +39,45 @@ def _get_sync_patched(fn): return _patched -def _get_async_patched(fn): - @functools.wraps(fn) - async def _patched(*args, **kwargs): - cdef object result - cdef dict to_inject - cdef list to_inject_await = [] - cdef list to_close_await = [] +async def _async_inject(object fn, tuple args, dict kwargs, dict injections, dict closings): + cdef object result + cdef dict to_inject + cdef list to_inject_await = [] + cdef list to_close_await = [] + cdef object arg_key + cdef Provider provider - to_inject = kwargs.copy() - for injection, provider in _patched.__injections__.items(): - if injection not in kwargs or isinstance(kwargs[injection], _Marker): - provide = provider() - if _isawaitable(provide): - to_inject_await.append((injection, provide)) - else: - to_inject[injection] = provide + to_inject = kwargs.copy() + for arg_key, provider in injections.items(): + if arg_key not in kwargs or isinstance(kwargs[arg_key], _Marker): + provide = provider() + if provider.is_async_mode_enabled(): + to_inject_await.append((arg_key, provide)) + elif _isawaitable(provide): + to_inject_await.append((arg_key, provide)) + else: + to_inject[arg_key] = provide - if to_inject_await: - async_to_inject = await asyncio.gather(*(provide for _, provide in to_inject_await)) - for provide, (injection, _) in zip(async_to_inject, to_inject_await): - to_inject[injection] = provide + if to_inject_await: + async_to_inject = await asyncio.gather(*(provide for _, provide in to_inject_await)) + for provide, (injection, _) in zip(async_to_inject, to_inject_await): + to_inject[injection] = provide - result = await fn(*args, **to_inject) + result = await fn(*args, **to_inject) - if _patched.__closing__: - for injection, provider in _patched.__closing__.items(): - if injection in kwargs \ - and isinstance(kwargs[injection], _Marker): - continue - if not isinstance(provider, providers.Resource): - continue - shutdown = provider.shutdown() - if _isawaitable(shutdown): - to_close_await.append(shutdown) + if closings: + for arg_key, provider in closings.items(): + if arg_key in kwargs and isinstance(kwargs[arg_key], _Marker): + continue + if not isinstance(provider, providers.Resource): + continue + shutdown = provider.shutdown() + if _isawaitable(shutdown): + to_close_await.append(shutdown) - await asyncio.gather(*to_close_await) + await asyncio.gather(*to_close_await) - return result - - # Hotfix for iscoroutinefunction() for Cython < 3.0.0; can be removed after migration to Cython 3.0.0+ - _patched._is_coroutine = asyncio.coroutines._is_coroutine - - return _patched + return result cdef bint _isawaitable(object instance): diff --git a/src/dependency_injector/containers.c b/src/dependency_injector/containers.c index 2e8c078b..26c04190 100644 --- a/src/dependency_injector/containers.c +++ b/src/dependency_injector/containers.c @@ -896,7 +896,7 @@ struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____object____obj struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object____object____object___to_py; struct __pyx_opt_args_19dependency_injector_9providers_deepcopy; -/* "providers.pxd":349 +/* "providers.pxd":353 * * * cpdef object deepcopy(object instance, dict memo=*) # <<<<<<<<<<<<<< @@ -925,7 +925,7 @@ struct __pyx_obj_19dependency_injector_9providers_Provider { }; -/* "providers.pxd":32 +/* "providers.pxd":36 * * * cdef class Object(Provider): # <<<<<<<<<<<<<< @@ -938,7 +938,7 @@ struct __pyx_obj_19dependency_injector_9providers_Object { }; -/* "providers.pxd":38 +/* "providers.pxd":42 * * * cdef class Self(Provider): # <<<<<<<<<<<<<< @@ -952,7 +952,7 @@ struct __pyx_obj_19dependency_injector_9providers_Self { }; -/* "providers.pxd":43 +/* "providers.pxd":47 * * * cdef class Delegate(Provider): # <<<<<<<<<<<<<< @@ -965,7 +965,7 @@ struct __pyx_obj_19dependency_injector_9providers_Delegate { }; -/* "providers.pxd":49 +/* "providers.pxd":53 * * * cdef class Aggregate(Provider): # <<<<<<<<<<<<<< @@ -978,7 +978,7 @@ struct __pyx_obj_19dependency_injector_9providers_Aggregate { }; -/* "providers.pxd":55 +/* "providers.pxd":59 * * * cdef class Dependency(Provider): # <<<<<<<<<<<<<< @@ -993,7 +993,7 @@ struct __pyx_obj_19dependency_injector_9providers_Dependency { }; -/* "providers.pxd":61 +/* "providers.pxd":65 * * * cdef class ExternalDependency(Dependency): # <<<<<<<<<<<<<< @@ -1005,7 +1005,7 @@ struct __pyx_obj_19dependency_injector_9providers_ExternalDependency { }; -/* "providers.pxd":65 +/* "providers.pxd":69 * * * cdef class DependenciesContainer(Object): # <<<<<<<<<<<<<< @@ -1019,7 +1019,7 @@ struct __pyx_obj_19dependency_injector_9providers_DependenciesContainer { }; -/* "providers.pxd":73 +/* "providers.pxd":77 * * # Callable providers * cdef class Callable(Provider): # <<<<<<<<<<<<<< @@ -1036,7 +1036,7 @@ struct __pyx_obj_19dependency_injector_9providers_Callable { }; -/* "providers.pxd":85 +/* "providers.pxd":89 * * * cdef class DelegatedCallable(Callable): # <<<<<<<<<<<<<< @@ -1048,7 +1048,7 @@ struct __pyx_obj_19dependency_injector_9providers_DelegatedCallable { }; -/* "providers.pxd":89 +/* "providers.pxd":93 * * * cdef class AbstractCallable(Callable): # <<<<<<<<<<<<<< @@ -1060,7 +1060,7 @@ struct __pyx_obj_19dependency_injector_9providers_AbstractCallable { }; -/* "providers.pxd":93 +/* "providers.pxd":97 * * * cdef class CallableDelegate(Delegate): # <<<<<<<<<<<<<< @@ -1072,7 +1072,7 @@ struct __pyx_obj_19dependency_injector_9providers_CallableDelegate { }; -/* "providers.pxd":98 +/* "providers.pxd":102 * * # Coroutine providers * cdef class Coroutine(Callable): # <<<<<<<<<<<<<< @@ -1084,7 +1084,7 @@ struct __pyx_obj_19dependency_injector_9providers_Coroutine { }; -/* "providers.pxd":102 +/* "providers.pxd":106 * * * cdef class DelegatedCoroutine(Coroutine): # <<<<<<<<<<<<<< @@ -1096,7 +1096,7 @@ struct __pyx_obj_19dependency_injector_9providers_DelegatedCoroutine { }; -/* "providers.pxd":106 +/* "providers.pxd":110 * * * cdef class AbstractCoroutine(Coroutine): # <<<<<<<<<<<<<< @@ -1108,7 +1108,7 @@ struct __pyx_obj_19dependency_injector_9providers_AbstractCoroutine { }; -/* "providers.pxd":110 +/* "providers.pxd":114 * * * cdef class CoroutineDelegate(Delegate): # <<<<<<<<<<<<<< @@ -1120,7 +1120,7 @@ struct __pyx_obj_19dependency_injector_9providers_CoroutineDelegate { }; -/* "providers.pxd":115 +/* "providers.pxd":119 * * # Configuration providers * cdef class ConfigurationOption(Provider): # <<<<<<<<<<<<<< @@ -1137,7 +1137,7 @@ struct __pyx_obj_19dependency_injector_9providers_ConfigurationOption { }; -/* "providers.pxd":123 +/* "providers.pxd":127 * * * cdef class TypedConfigurationOption(Callable): # <<<<<<<<<<<<<< @@ -1149,7 +1149,7 @@ struct __pyx_obj_19dependency_injector_9providers_TypedConfigurationOption { }; -/* "providers.pxd":127 +/* "providers.pxd":131 * * * cdef class Configuration(Object): # <<<<<<<<<<<<<< @@ -1168,7 +1168,7 @@ struct __pyx_obj_19dependency_injector_9providers_Configuration { }; -/* "providers.pxd":138 +/* "providers.pxd":142 * * # Factory providers * cdef class Factory(Provider): # <<<<<<<<<<<<<< @@ -1183,7 +1183,7 @@ struct __pyx_obj_19dependency_injector_9providers_Factory { }; -/* "providers.pxd":147 +/* "providers.pxd":151 * * * cdef class DelegatedFactory(Factory): # <<<<<<<<<<<<<< @@ -1195,7 +1195,7 @@ struct __pyx_obj_19dependency_injector_9providers_DelegatedFactory { }; -/* "providers.pxd":151 +/* "providers.pxd":155 * * * cdef class AbstractFactory(Factory): # <<<<<<<<<<<<<< @@ -1207,7 +1207,7 @@ struct __pyx_obj_19dependency_injector_9providers_AbstractFactory { }; -/* "providers.pxd":155 +/* "providers.pxd":159 * * * cdef class FactoryDelegate(Delegate): # <<<<<<<<<<<<<< @@ -1219,7 +1219,7 @@ struct __pyx_obj_19dependency_injector_9providers_FactoryDelegate { }; -/* "providers.pxd":159 +/* "providers.pxd":163 * * * cdef class FactoryAggregate(Aggregate): # <<<<<<<<<<<<<< @@ -1231,7 +1231,7 @@ struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate { }; -/* "providers.pxd":164 +/* "providers.pxd":168 * * # Singleton providers * cdef class BaseSingleton(Provider): # <<<<<<<<<<<<<< @@ -1245,7 +1245,7 @@ struct __pyx_obj_19dependency_injector_9providers_BaseSingleton { }; -/* "providers.pxd":169 +/* "providers.pxd":173 * * * cdef class Singleton(BaseSingleton): # <<<<<<<<<<<<<< @@ -1257,7 +1257,7 @@ struct __pyx_obj_19dependency_injector_9providers_Singleton { }; -/* "providers.pxd":174 +/* "providers.pxd":178 * * * cdef class DelegatedSingleton(Singleton): # <<<<<<<<<<<<<< @@ -1269,7 +1269,7 @@ struct __pyx_obj_19dependency_injector_9providers_DelegatedSingleton { }; -/* "providers.pxd":178 +/* "providers.pxd":182 * * * cdef class ThreadSafeSingleton(BaseSingleton): # <<<<<<<<<<<<<< @@ -1282,7 +1282,7 @@ struct __pyx_obj_19dependency_injector_9providers_ThreadSafeSingleton { }; -/* "providers.pxd":184 +/* "providers.pxd":188 * * * cdef class DelegatedThreadSafeSingleton(ThreadSafeSingleton): # <<<<<<<<<<<<<< @@ -1294,7 +1294,7 @@ struct __pyx_obj_19dependency_injector_9providers_DelegatedThreadSafeSingleton { }; -/* "providers.pxd":188 +/* "providers.pxd":192 * * * cdef class ThreadLocalSingleton(BaseSingleton): # <<<<<<<<<<<<<< @@ -1306,7 +1306,7 @@ struct __pyx_obj_19dependency_injector_9providers_ThreadLocalSingleton { }; -/* "providers.pxd":193 +/* "providers.pxd":197 * * * cdef class ContextLocalSingleton(BaseSingleton): # <<<<<<<<<<<<<< @@ -1318,7 +1318,7 @@ struct __pyx_obj_19dependency_injector_9providers_ContextLocalSingleton { }; -/* "providers.pxd":198 +/* "providers.pxd":202 * * * cdef class DelegatedThreadLocalSingleton(ThreadLocalSingleton): # <<<<<<<<<<<<<< @@ -1330,7 +1330,7 @@ struct __pyx_obj_19dependency_injector_9providers_DelegatedThreadLocalSingleton }; -/* "providers.pxd":202 +/* "providers.pxd":206 * * * cdef class AbstractSingleton(BaseSingleton): # <<<<<<<<<<<<<< @@ -1342,7 +1342,7 @@ struct __pyx_obj_19dependency_injector_9providers_AbstractSingleton { }; -/* "providers.pxd":206 +/* "providers.pxd":210 * * * cdef class SingletonDelegate(Delegate): # <<<<<<<<<<<<<< @@ -1354,7 +1354,7 @@ struct __pyx_obj_19dependency_injector_9providers_SingletonDelegate { }; -/* "providers.pxd":212 +/* "providers.pxd":216 * # Miscellaneous providers * * cdef class List(Provider): # <<<<<<<<<<<<<< @@ -1368,7 +1368,7 @@ struct __pyx_obj_19dependency_injector_9providers_List { }; -/* "providers.pxd":219 +/* "providers.pxd":223 * * * cdef class Dict(Provider): # <<<<<<<<<<<<<< @@ -1382,7 +1382,7 @@ struct __pyx_obj_19dependency_injector_9providers_Dict { }; -/* "providers.pxd":226 +/* "providers.pxd":230 * * * cdef class Resource(Provider): # <<<<<<<<<<<<<< @@ -1402,7 +1402,7 @@ struct __pyx_obj_19dependency_injector_9providers_Resource { }; -/* "providers.pxd":241 +/* "providers.pxd":245 * * * cdef class Container(Provider): # <<<<<<<<<<<<<< @@ -1418,7 +1418,7 @@ struct __pyx_obj_19dependency_injector_9providers_Container { }; -/* "providers.pxd":250 +/* "providers.pxd":254 * * * cdef class Selector(Provider): # <<<<<<<<<<<<<< @@ -1432,7 +1432,7 @@ struct __pyx_obj_19dependency_injector_9providers_Selector { }; -/* "providers.pxd":258 +/* "providers.pxd":262 * # Provided instance * * cdef class ProvidedInstance(Provider): # <<<<<<<<<<<<<< @@ -1445,7 +1445,7 @@ struct __pyx_obj_19dependency_injector_9providers_ProvidedInstance { }; -/* "providers.pxd":264 +/* "providers.pxd":268 * * * cdef class AttributeGetter(Provider): # <<<<<<<<<<<<<< @@ -1459,7 +1459,7 @@ struct __pyx_obj_19dependency_injector_9providers_AttributeGetter { }; -/* "providers.pxd":271 +/* "providers.pxd":275 * * * cdef class ItemGetter(Provider): # <<<<<<<<<<<<<< @@ -1473,7 +1473,7 @@ struct __pyx_obj_19dependency_injector_9providers_ItemGetter { }; -/* "providers.pxd":278 +/* "providers.pxd":282 * * * cdef class MethodCaller(Provider): # <<<<<<<<<<<<<< @@ -1490,7 +1490,7 @@ struct __pyx_obj_19dependency_injector_9providers_MethodCaller { }; -/* "providers.pxd":289 +/* "providers.pxd":293 * * # Injections * cdef class Injection(object): # <<<<<<<<<<<<<< @@ -1506,7 +1506,7 @@ struct __pyx_obj_19dependency_injector_9providers_Injection { }; -/* "providers.pxd":296 +/* "providers.pxd":300 * * * cdef class PositionalInjection(Injection): # <<<<<<<<<<<<<< @@ -1518,7 +1518,7 @@ struct __pyx_obj_19dependency_injector_9providers_PositionalInjection { }; -/* "providers.pxd":300 +/* "providers.pxd":304 * * * cdef class NamedInjection(Injection): # <<<<<<<<<<<<<< @@ -1531,7 +1531,7 @@ struct __pyx_obj_19dependency_injector_9providers_NamedInjection { }; -/* "providers.pxd":311 +/* "providers.pxd":315 * * # Utils * cdef class OverridingContext(object): # <<<<<<<<<<<<<< @@ -1545,7 +1545,7 @@ struct __pyx_obj_19dependency_injector_9providers_OverridingContext { }; -/* "providers.pxd":316 +/* "providers.pxd":320 * * * cdef class BaseSingletonResetContext(object): # <<<<<<<<<<<<<< @@ -1558,7 +1558,7 @@ struct __pyx_obj_19dependency_injector_9providers_BaseSingletonResetContext { }; -/* "providers.pxd":320 +/* "providers.pxd":324 * * * cdef class SingletonResetContext(BaseSingletonResetContext): # <<<<<<<<<<<<<< @@ -1570,7 +1570,7 @@ struct __pyx_obj_19dependency_injector_9providers_SingletonResetContext { }; -/* "providers.pxd":324 +/* "providers.pxd":328 * * * cdef class SingletonFullResetContext(BaseSingletonResetContext): # <<<<<<<<<<<<<< @@ -1785,13 +1785,16 @@ struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object____object____object___to */ struct __pyx_vtabstruct_19dependency_injector_9providers_Provider { + int (*is_async_mode_enabled)(struct __pyx_obj_19dependency_injector_9providers_Provider *, int __pyx_skip_dispatch); + int (*is_async_mode_disabled)(struct __pyx_obj_19dependency_injector_9providers_Provider *, int __pyx_skip_dispatch); + int (*is_async_mode_undefined)(struct __pyx_obj_19dependency_injector_9providers_Provider *, int __pyx_skip_dispatch); PyObject *(*_provide)(struct __pyx_obj_19dependency_injector_9providers_Provider *, PyObject *, PyObject *, int __pyx_skip_dispatch); void (*_copy_overridings)(struct __pyx_obj_19dependency_injector_9providers_Provider *, struct __pyx_obj_19dependency_injector_9providers_Provider *, PyObject *, int __pyx_skip_dispatch); }; static struct __pyx_vtabstruct_19dependency_injector_9providers_Provider *__pyx_vtabptr_19dependency_injector_9providers_Provider; -/* "providers.pxd":32 +/* "providers.pxd":36 * * * cdef class Object(Provider): # <<<<<<<<<<<<<< @@ -1805,7 +1808,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_Object { static struct __pyx_vtabstruct_19dependency_injector_9providers_Object *__pyx_vtabptr_19dependency_injector_9providers_Object; -/* "providers.pxd":38 +/* "providers.pxd":42 * * * cdef class Self(Provider): # <<<<<<<<<<<<<< @@ -1819,7 +1822,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_Self { static struct __pyx_vtabstruct_19dependency_injector_9providers_Self *__pyx_vtabptr_19dependency_injector_9providers_Self; -/* "providers.pxd":43 +/* "providers.pxd":47 * * * cdef class Delegate(Provider): # <<<<<<<<<<<<<< @@ -1833,7 +1836,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_Delegate { static struct __pyx_vtabstruct_19dependency_injector_9providers_Delegate *__pyx_vtabptr_19dependency_injector_9providers_Delegate; -/* "providers.pxd":49 +/* "providers.pxd":53 * * * cdef class Aggregate(Provider): # <<<<<<<<<<<<<< @@ -1848,7 +1851,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_Aggregate { static struct __pyx_vtabstruct_19dependency_injector_9providers_Aggregate *__pyx_vtabptr_19dependency_injector_9providers_Aggregate; -/* "providers.pxd":55 +/* "providers.pxd":59 * * * cdef class Dependency(Provider): # <<<<<<<<<<<<<< @@ -1862,7 +1865,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_Dependency { static struct __pyx_vtabstruct_19dependency_injector_9providers_Dependency *__pyx_vtabptr_19dependency_injector_9providers_Dependency; -/* "providers.pxd":61 +/* "providers.pxd":65 * * * cdef class ExternalDependency(Dependency): # <<<<<<<<<<<<<< @@ -1876,7 +1879,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_ExternalDependency { static struct __pyx_vtabstruct_19dependency_injector_9providers_ExternalDependency *__pyx_vtabptr_19dependency_injector_9providers_ExternalDependency; -/* "providers.pxd":65 +/* "providers.pxd":69 * * * cdef class DependenciesContainer(Object): # <<<<<<<<<<<<<< @@ -1891,7 +1894,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_DependenciesContainer { static struct __pyx_vtabstruct_19dependency_injector_9providers_DependenciesContainer *__pyx_vtabptr_19dependency_injector_9providers_DependenciesContainer; -/* "providers.pxd":73 +/* "providers.pxd":77 * * # Callable providers * cdef class Callable(Provider): # <<<<<<<<<<<<<< @@ -1905,7 +1908,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_Callable { static struct __pyx_vtabstruct_19dependency_injector_9providers_Callable *__pyx_vtabptr_19dependency_injector_9providers_Callable; -/* "providers.pxd":85 +/* "providers.pxd":89 * * * cdef class DelegatedCallable(Callable): # <<<<<<<<<<<<<< @@ -1919,7 +1922,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedCallable { static struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedCallable *__pyx_vtabptr_19dependency_injector_9providers_DelegatedCallable; -/* "providers.pxd":89 +/* "providers.pxd":93 * * * cdef class AbstractCallable(Callable): # <<<<<<<<<<<<<< @@ -1933,7 +1936,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_AbstractCallable { static struct __pyx_vtabstruct_19dependency_injector_9providers_AbstractCallable *__pyx_vtabptr_19dependency_injector_9providers_AbstractCallable; -/* "providers.pxd":93 +/* "providers.pxd":97 * * * cdef class CallableDelegate(Delegate): # <<<<<<<<<<<<<< @@ -1947,7 +1950,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_CallableDelegate { static struct __pyx_vtabstruct_19dependency_injector_9providers_CallableDelegate *__pyx_vtabptr_19dependency_injector_9providers_CallableDelegate; -/* "providers.pxd":98 +/* "providers.pxd":102 * * # Coroutine providers * cdef class Coroutine(Callable): # <<<<<<<<<<<<<< @@ -1961,7 +1964,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_Coroutine { static struct __pyx_vtabstruct_19dependency_injector_9providers_Coroutine *__pyx_vtabptr_19dependency_injector_9providers_Coroutine; -/* "providers.pxd":102 +/* "providers.pxd":106 * * * cdef class DelegatedCoroutine(Coroutine): # <<<<<<<<<<<<<< @@ -1975,7 +1978,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedCoroutine { static struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedCoroutine *__pyx_vtabptr_19dependency_injector_9providers_DelegatedCoroutine; -/* "providers.pxd":106 +/* "providers.pxd":110 * * * cdef class AbstractCoroutine(Coroutine): # <<<<<<<<<<<<<< @@ -1989,7 +1992,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_AbstractCoroutine { static struct __pyx_vtabstruct_19dependency_injector_9providers_AbstractCoroutine *__pyx_vtabptr_19dependency_injector_9providers_AbstractCoroutine; -/* "providers.pxd":110 +/* "providers.pxd":114 * * * cdef class CoroutineDelegate(Delegate): # <<<<<<<<<<<<<< @@ -2003,7 +2006,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_CoroutineDelegate { static struct __pyx_vtabstruct_19dependency_injector_9providers_CoroutineDelegate *__pyx_vtabptr_19dependency_injector_9providers_CoroutineDelegate; -/* "providers.pxd":115 +/* "providers.pxd":119 * * # Configuration providers * cdef class ConfigurationOption(Provider): # <<<<<<<<<<<<<< @@ -2017,7 +2020,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_ConfigurationOption { static struct __pyx_vtabstruct_19dependency_injector_9providers_ConfigurationOption *__pyx_vtabptr_19dependency_injector_9providers_ConfigurationOption; -/* "providers.pxd":123 +/* "providers.pxd":127 * * * cdef class TypedConfigurationOption(Callable): # <<<<<<<<<<<<<< @@ -2031,7 +2034,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_TypedConfigurationOptio static struct __pyx_vtabstruct_19dependency_injector_9providers_TypedConfigurationOption *__pyx_vtabptr_19dependency_injector_9providers_TypedConfigurationOption; -/* "providers.pxd":127 +/* "providers.pxd":131 * * * cdef class Configuration(Object): # <<<<<<<<<<<<<< @@ -2045,7 +2048,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_Configuration { static struct __pyx_vtabstruct_19dependency_injector_9providers_Configuration *__pyx_vtabptr_19dependency_injector_9providers_Configuration; -/* "providers.pxd":138 +/* "providers.pxd":142 * * # Factory providers * cdef class Factory(Provider): # <<<<<<<<<<<<<< @@ -2059,7 +2062,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_Factory { static struct __pyx_vtabstruct_19dependency_injector_9providers_Factory *__pyx_vtabptr_19dependency_injector_9providers_Factory; -/* "providers.pxd":147 +/* "providers.pxd":151 * * * cdef class DelegatedFactory(Factory): # <<<<<<<<<<<<<< @@ -2073,7 +2076,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedFactory { static struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedFactory *__pyx_vtabptr_19dependency_injector_9providers_DelegatedFactory; -/* "providers.pxd":151 +/* "providers.pxd":155 * * * cdef class AbstractFactory(Factory): # <<<<<<<<<<<<<< @@ -2087,7 +2090,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_AbstractFactory { static struct __pyx_vtabstruct_19dependency_injector_9providers_AbstractFactory *__pyx_vtabptr_19dependency_injector_9providers_AbstractFactory; -/* "providers.pxd":155 +/* "providers.pxd":159 * * * cdef class FactoryDelegate(Delegate): # <<<<<<<<<<<<<< @@ -2101,7 +2104,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_FactoryDelegate { static struct __pyx_vtabstruct_19dependency_injector_9providers_FactoryDelegate *__pyx_vtabptr_19dependency_injector_9providers_FactoryDelegate; -/* "providers.pxd":159 +/* "providers.pxd":163 * * * cdef class FactoryAggregate(Aggregate): # <<<<<<<<<<<<<< @@ -2115,7 +2118,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_FactoryAggregate { static struct __pyx_vtabstruct_19dependency_injector_9providers_FactoryAggregate *__pyx_vtabptr_19dependency_injector_9providers_FactoryAggregate; -/* "providers.pxd":164 +/* "providers.pxd":168 * * # Singleton providers * cdef class BaseSingleton(Provider): # <<<<<<<<<<<<<< @@ -2129,7 +2132,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_BaseSingleton { static struct __pyx_vtabstruct_19dependency_injector_9providers_BaseSingleton *__pyx_vtabptr_19dependency_injector_9providers_BaseSingleton; -/* "providers.pxd":169 +/* "providers.pxd":173 * * * cdef class Singleton(BaseSingleton): # <<<<<<<<<<<<<< @@ -2143,7 +2146,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_Singleton { static struct __pyx_vtabstruct_19dependency_injector_9providers_Singleton *__pyx_vtabptr_19dependency_injector_9providers_Singleton; -/* "providers.pxd":174 +/* "providers.pxd":178 * * * cdef class DelegatedSingleton(Singleton): # <<<<<<<<<<<<<< @@ -2157,7 +2160,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedSingleton { static struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedSingleton *__pyx_vtabptr_19dependency_injector_9providers_DelegatedSingleton; -/* "providers.pxd":178 +/* "providers.pxd":182 * * * cdef class ThreadSafeSingleton(BaseSingleton): # <<<<<<<<<<<<<< @@ -2171,7 +2174,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_ThreadSafeSingleton { static struct __pyx_vtabstruct_19dependency_injector_9providers_ThreadSafeSingleton *__pyx_vtabptr_19dependency_injector_9providers_ThreadSafeSingleton; -/* "providers.pxd":184 +/* "providers.pxd":188 * * * cdef class DelegatedThreadSafeSingleton(ThreadSafeSingleton): # <<<<<<<<<<<<<< @@ -2185,7 +2188,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedThreadSafeSing static struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedThreadSafeSingleton *__pyx_vtabptr_19dependency_injector_9providers_DelegatedThreadSafeSingleton; -/* "providers.pxd":188 +/* "providers.pxd":192 * * * cdef class ThreadLocalSingleton(BaseSingleton): # <<<<<<<<<<<<<< @@ -2199,7 +2202,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_ThreadLocalSingleton { static struct __pyx_vtabstruct_19dependency_injector_9providers_ThreadLocalSingleton *__pyx_vtabptr_19dependency_injector_9providers_ThreadLocalSingleton; -/* "providers.pxd":193 +/* "providers.pxd":197 * * * cdef class ContextLocalSingleton(BaseSingleton): # <<<<<<<<<<<<<< @@ -2213,7 +2216,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_ContextLocalSingleton { static struct __pyx_vtabstruct_19dependency_injector_9providers_ContextLocalSingleton *__pyx_vtabptr_19dependency_injector_9providers_ContextLocalSingleton; -/* "providers.pxd":198 +/* "providers.pxd":202 * * * cdef class DelegatedThreadLocalSingleton(ThreadLocalSingleton): # <<<<<<<<<<<<<< @@ -2227,7 +2230,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedThreadLocalSin static struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedThreadLocalSingleton *__pyx_vtabptr_19dependency_injector_9providers_DelegatedThreadLocalSingleton; -/* "providers.pxd":202 +/* "providers.pxd":206 * * * cdef class AbstractSingleton(BaseSingleton): # <<<<<<<<<<<<<< @@ -2241,7 +2244,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_AbstractSingleton { static struct __pyx_vtabstruct_19dependency_injector_9providers_AbstractSingleton *__pyx_vtabptr_19dependency_injector_9providers_AbstractSingleton; -/* "providers.pxd":206 +/* "providers.pxd":210 * * * cdef class SingletonDelegate(Delegate): # <<<<<<<<<<<<<< @@ -2255,7 +2258,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_SingletonDelegate { static struct __pyx_vtabstruct_19dependency_injector_9providers_SingletonDelegate *__pyx_vtabptr_19dependency_injector_9providers_SingletonDelegate; -/* "providers.pxd":212 +/* "providers.pxd":216 * # Miscellaneous providers * * cdef class List(Provider): # <<<<<<<<<<<<<< @@ -2269,7 +2272,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_List { static struct __pyx_vtabstruct_19dependency_injector_9providers_List *__pyx_vtabptr_19dependency_injector_9providers_List; -/* "providers.pxd":219 +/* "providers.pxd":223 * * * cdef class Dict(Provider): # <<<<<<<<<<<<<< @@ -2283,7 +2286,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_Dict { static struct __pyx_vtabstruct_19dependency_injector_9providers_Dict *__pyx_vtabptr_19dependency_injector_9providers_Dict; -/* "providers.pxd":226 +/* "providers.pxd":230 * * * cdef class Resource(Provider): # <<<<<<<<<<<<<< @@ -2297,7 +2300,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_Resource { static struct __pyx_vtabstruct_19dependency_injector_9providers_Resource *__pyx_vtabptr_19dependency_injector_9providers_Resource; -/* "providers.pxd":241 +/* "providers.pxd":245 * * * cdef class Container(Provider): # <<<<<<<<<<<<<< @@ -2311,7 +2314,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_Container { static struct __pyx_vtabstruct_19dependency_injector_9providers_Container *__pyx_vtabptr_19dependency_injector_9providers_Container; -/* "providers.pxd":250 +/* "providers.pxd":254 * * * cdef class Selector(Provider): # <<<<<<<<<<<<<< @@ -2325,7 +2328,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_Selector { static struct __pyx_vtabstruct_19dependency_injector_9providers_Selector *__pyx_vtabptr_19dependency_injector_9providers_Selector; -/* "providers.pxd":258 +/* "providers.pxd":262 * # Provided instance * * cdef class ProvidedInstance(Provider): # <<<<<<<<<<<<<< @@ -2339,7 +2342,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_ProvidedInstance { static struct __pyx_vtabstruct_19dependency_injector_9providers_ProvidedInstance *__pyx_vtabptr_19dependency_injector_9providers_ProvidedInstance; -/* "providers.pxd":264 +/* "providers.pxd":268 * * * cdef class AttributeGetter(Provider): # <<<<<<<<<<<<<< @@ -2353,7 +2356,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_AttributeGetter { static struct __pyx_vtabstruct_19dependency_injector_9providers_AttributeGetter *__pyx_vtabptr_19dependency_injector_9providers_AttributeGetter; -/* "providers.pxd":271 +/* "providers.pxd":275 * * * cdef class ItemGetter(Provider): # <<<<<<<<<<<<<< @@ -2367,7 +2370,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_ItemGetter { static struct __pyx_vtabstruct_19dependency_injector_9providers_ItemGetter *__pyx_vtabptr_19dependency_injector_9providers_ItemGetter; -/* "providers.pxd":278 +/* "providers.pxd":282 * * * cdef class MethodCaller(Provider): # <<<<<<<<<<<<<< @@ -22242,7 +22245,7 @@ static PyObject *__pyx_pf_19dependency_injector_10containers_18_resolve_package_ return __pyx_r; } -/* "providers.pxd":353 +/* "providers.pxd":357 * * # Inline helper functions * cdef inline object __get_name(NamedInjection self): # <<<<<<<<<<<<<< @@ -22255,7 +22258,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___get_na __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get_name", 0); - /* "providers.pxd":354 + /* "providers.pxd":358 * # Inline helper functions * cdef inline object __get_name(NamedInjection self): * return self.__name # <<<<<<<<<<<<<< @@ -22267,7 +22270,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___get_na __pyx_r = __pyx_v_self->__pyx___name; goto __pyx_L0; - /* "providers.pxd":353 + /* "providers.pxd":357 * * # Inline helper functions * cdef inline object __get_name(NamedInjection self): # <<<<<<<<<<<<<< @@ -22282,7 +22285,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___get_na return __pyx_r; } -/* "providers.pxd":357 +/* "providers.pxd":361 * * * cdef inline object __get_value(Injection self): # <<<<<<<<<<<<<< @@ -22302,7 +22305,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___get_va int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get_value", 0); - /* "providers.pxd":358 + /* "providers.pxd":362 * * cdef inline object __get_value(Injection self): * if self.__call == 0: # <<<<<<<<<<<<<< @@ -22312,7 +22315,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":359 + /* "providers.pxd":363 * cdef inline object __get_value(Injection self): * if self.__call == 0: * return self.__value # <<<<<<<<<<<<<< @@ -22324,7 +22327,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___get_va __pyx_r = __pyx_v_self->__pyx___value; goto __pyx_L0; - /* "providers.pxd":358 + /* "providers.pxd":362 * * cdef inline object __get_value(Injection self): * if self.__call == 0: # <<<<<<<<<<<<<< @@ -22333,7 +22336,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___get_va */ } - /* "providers.pxd":360 + /* "providers.pxd":364 * if self.__call == 0: * return self.__value * return self.__value() # <<<<<<<<<<<<<< @@ -22354,14 +22357,14 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___get_va } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 360, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 364, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "providers.pxd":357 + /* "providers.pxd":361 * * * cdef inline object __get_value(Injection self): # <<<<<<<<<<<<<< @@ -22382,7 +22385,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___get_va return __pyx_r; } -/* "providers.pxd":363 +/* "providers.pxd":367 * * * cdef inline object __get_value_kwargs(Injection self, dict kwargs): # <<<<<<<<<<<<<< @@ -22401,7 +22404,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___get_va int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get_value_kwargs", 0); - /* "providers.pxd":364 + /* "providers.pxd":368 * * cdef inline object __get_value_kwargs(Injection self, dict kwargs): * if self.__call == 0: # <<<<<<<<<<<<<< @@ -22411,7 +22414,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":365 + /* "providers.pxd":369 * cdef inline object __get_value_kwargs(Injection self, dict kwargs): * if self.__call == 0: * return self.__value # <<<<<<<<<<<<<< @@ -22423,7 +22426,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___get_va __pyx_r = __pyx_v_self->__pyx___value; goto __pyx_L0; - /* "providers.pxd":364 + /* "providers.pxd":368 * * cdef inline object __get_value_kwargs(Injection self, dict kwargs): * if self.__call == 0: # <<<<<<<<<<<<<< @@ -22432,7 +22435,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___get_va */ } - /* "providers.pxd":366 + /* "providers.pxd":370 * if self.__call == 0: * return self.__value * return self.__value(**kwargs) # <<<<<<<<<<<<<< @@ -22442,18 +22445,18 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___get_va __Pyx_XDECREF(__pyx_r); if (unlikely(__pyx_v_kwargs == Py_None)) { PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); - __PYX_ERR(1, 366, __pyx_L1_error) + __PYX_ERR(1, 370, __pyx_L1_error) } - __pyx_t_2 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 366, __pyx_L1_error) + __pyx_t_2 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 370, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_v_self->__pyx___value, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 366, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_v_self->__pyx___value, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 370, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "providers.pxd":363 + /* "providers.pxd":367 * * * cdef inline object __get_value_kwargs(Injection self, dict kwargs): # <<<<<<<<<<<<<< @@ -22473,7 +22476,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___get_va return __pyx_r; } -/* "providers.pxd":369 +/* "providers.pxd":373 * * * cdef inline tuple __separate_prefixed_kwargs(dict kwargs): # <<<<<<<<<<<<<< @@ -22506,31 +22509,31 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___separa int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__separate_prefixed_kwargs", 0); - /* "providers.pxd":370 + /* "providers.pxd":374 * * cdef inline tuple __separate_prefixed_kwargs(dict kwargs): * cdef dict plain_kwargs = {} # <<<<<<<<<<<<<< * cdef dict prefixed_kwargs = {} * */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 370, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 374, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_plain_kwargs = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "providers.pxd":371 + /* "providers.pxd":375 * cdef inline tuple __separate_prefixed_kwargs(dict kwargs): * cdef dict plain_kwargs = {} * cdef dict prefixed_kwargs = {} # <<<<<<<<<<<<<< * * for key, value in kwargs.items(): */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 371, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 375, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_prefixed_kwargs = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "providers.pxd":373 + /* "providers.pxd":377 * cdef dict prefixed_kwargs = {} * * for key, value in kwargs.items(): # <<<<<<<<<<<<<< @@ -22539,17 +22542,17 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___separa */ if (unlikely(__pyx_v_kwargs == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); - __PYX_ERR(1, 373, __pyx_L1_error) + __PYX_ERR(1, 377, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_Items(__pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 373, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_Items(__pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 377, __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, 373, __pyx_L1_error) + __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 377, __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, 373, __pyx_L1_error) + __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 377, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -22557,17 +22560,17 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___separa 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, 373, __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, 377, __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, 373, __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, 377, __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, 373, __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, 377, __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, 373, __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, 377, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -22577,7 +22580,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___separa PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(1, 373, __pyx_L1_error) + else __PYX_ERR(1, 377, __pyx_L1_error) } break; } @@ -22589,7 +22592,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___separa if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(1, 373, __pyx_L1_error) + __PYX_ERR(1, 377, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -22602,15 +22605,15 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___separa __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, 373, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 377, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 373, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 377, __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, 373, __pyx_L1_error) + __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 377, __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; @@ -22618,7 +22621,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___separa __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, 373, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(1, 377, __pyx_L1_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L6_unpacking_done; @@ -22626,7 +22629,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___separa __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(1, 373, __pyx_L1_error) + __PYX_ERR(1, 377, __pyx_L1_error) __pyx_L6_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_5); @@ -22634,27 +22637,27 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___separa __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_6); __pyx_t_6 = 0; - /* "providers.pxd":374 + /* "providers.pxd":378 * * for key, value in kwargs.items(): * if "__" not in key: # <<<<<<<<<<<<<< * plain_kwargs[key] = value * continue */ - __pyx_t_9 = (__Pyx_PySequence_ContainsTF(__pyx_n_s__22, __pyx_v_key, Py_NE)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(1, 374, __pyx_L1_error) + __pyx_t_9 = (__Pyx_PySequence_ContainsTF(__pyx_n_s__22, __pyx_v_key, Py_NE)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(1, 378, __pyx_L1_error) __pyx_t_10 = (__pyx_t_9 != 0); if (__pyx_t_10) { - /* "providers.pxd":375 + /* "providers.pxd":379 * for key, value in kwargs.items(): * if "__" not in key: * plain_kwargs[key] = value # <<<<<<<<<<<<<< * continue * */ - if (unlikely(PyDict_SetItem(__pyx_v_plain_kwargs, __pyx_v_key, __pyx_v_value) < 0)) __PYX_ERR(1, 375, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_plain_kwargs, __pyx_v_key, __pyx_v_value) < 0)) __PYX_ERR(1, 379, __pyx_L1_error) - /* "providers.pxd":376 + /* "providers.pxd":380 * if "__" not in key: * plain_kwargs[key] = value * continue # <<<<<<<<<<<<<< @@ -22663,7 +22666,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___separa */ goto __pyx_L3_continue; - /* "providers.pxd":374 + /* "providers.pxd":378 * * for key, value in kwargs.items(): * if "__" not in key: # <<<<<<<<<<<<<< @@ -22672,14 +22675,14 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___separa */ } - /* "providers.pxd":378 + /* "providers.pxd":382 * continue * * index = key.index("__") # <<<<<<<<<<<<<< * prefix, name = key[:index], key[index+2:] * */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_key, __pyx_n_s_index); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 378, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_key, __pyx_n_s_index); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 382, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { @@ -22693,24 +22696,24 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___separa } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_5, __pyx_n_s__22) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_n_s__22); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 378, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 382, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF_SET(__pyx_v_index, __pyx_t_1); __pyx_t_1 = 0; - /* "providers.pxd":379 + /* "providers.pxd":383 * * index = key.index("__") * prefix, name = key[:index], key[index+2:] # <<<<<<<<<<<<<< * * if prefix not in prefixed_kwargs: */ - __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_key, 0, 0, NULL, &__pyx_v_index, NULL, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 379, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_key, 0, 0, NULL, &__pyx_v_index, NULL, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 383, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_v_index, __pyx_int_2, 2, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 379, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_v_index, __pyx_int_2, 2, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 383, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_v_key, 0, 0, &__pyx_t_6, NULL, NULL, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 379, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_v_key, 0, 0, &__pyx_t_6, NULL, NULL, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 383, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF_SET(__pyx_v_prefix, __pyx_t_1); @@ -22718,30 +22721,30 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___separa __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_5); __pyx_t_5 = 0; - /* "providers.pxd":381 + /* "providers.pxd":385 * prefix, name = key[:index], key[index+2:] * * if prefix not in prefixed_kwargs: # <<<<<<<<<<<<<< * prefixed_kwargs[prefix] = {} * prefixed_kwargs[prefix][name] = value */ - __pyx_t_10 = (__Pyx_PyDict_ContainsTF(__pyx_v_prefix, __pyx_v_prefixed_kwargs, Py_NE)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(1, 381, __pyx_L1_error) + __pyx_t_10 = (__Pyx_PyDict_ContainsTF(__pyx_v_prefix, __pyx_v_prefixed_kwargs, Py_NE)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(1, 385, __pyx_L1_error) __pyx_t_9 = (__pyx_t_10 != 0); if (__pyx_t_9) { - /* "providers.pxd":382 + /* "providers.pxd":386 * * if prefix not in prefixed_kwargs: * prefixed_kwargs[prefix] = {} # <<<<<<<<<<<<<< * prefixed_kwargs[prefix][name] = value * */ - __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 382, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 386, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (unlikely(PyDict_SetItem(__pyx_v_prefixed_kwargs, __pyx_v_prefix, __pyx_t_5) < 0)) __PYX_ERR(1, 382, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_prefixed_kwargs, __pyx_v_prefix, __pyx_t_5) < 0)) __PYX_ERR(1, 386, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "providers.pxd":381 + /* "providers.pxd":385 * prefix, name = key[:index], key[index+2:] * * if prefix not in prefixed_kwargs: # <<<<<<<<<<<<<< @@ -22750,19 +22753,19 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___separa */ } - /* "providers.pxd":383 + /* "providers.pxd":387 * if prefix not in prefixed_kwargs: * prefixed_kwargs[prefix] = {} * prefixed_kwargs[prefix][name] = value # <<<<<<<<<<<<<< * * return plain_kwargs, prefixed_kwargs */ - __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_prefixed_kwargs, __pyx_v_prefix); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 383, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_prefixed_kwargs, __pyx_v_prefix); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 387, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (unlikely(PyObject_SetItem(__pyx_t_5, __pyx_v_name, __pyx_v_value) < 0)) __PYX_ERR(1, 383, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_t_5, __pyx_v_name, __pyx_v_value) < 0)) __PYX_ERR(1, 387, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "providers.pxd":373 + /* "providers.pxd":377 * cdef dict prefixed_kwargs = {} * * for key, value in kwargs.items(): # <<<<<<<<<<<<<< @@ -22773,7 +22776,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___separa } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "providers.pxd":385 + /* "providers.pxd":389 * prefixed_kwargs[prefix][name] = value * * return plain_kwargs, prefixed_kwargs # <<<<<<<<<<<<<< @@ -22781,7 +22784,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___separa * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 385, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 389, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_plain_kwargs); __Pyx_GIVEREF(__pyx_v_plain_kwargs); @@ -22793,7 +22796,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___separa __pyx_t_2 = 0; goto __pyx_L0; - /* "providers.pxd":369 + /* "providers.pxd":373 * * * cdef inline tuple __separate_prefixed_kwargs(dict kwargs): # <<<<<<<<<<<<<< @@ -22823,7 +22826,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___separa return __pyx_r; } -/* "providers.pxd":390 +/* "providers.pxd":394 * @cython.boundscheck(False) * @cython.wraparound(False) * cdef inline object __provide_positional_args( # <<<<<<<<<<<<<< @@ -22852,31 +22855,31 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__provide_positional_args", 0); - /* "providers.pxd":397 + /* "providers.pxd":401 * ): * cdef int index * cdef list positional_args = [] # <<<<<<<<<<<<<< * cdef list future_args = [] * cdef PositionalInjection injection */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 397, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 401, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_positional_args = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "providers.pxd":398 + /* "providers.pxd":402 * cdef int index * cdef list positional_args = [] * cdef list future_args = [] # <<<<<<<<<<<<<< * cdef PositionalInjection injection * cdef object value */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 398, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 402, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_future_args = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "providers.pxd":402 + /* "providers.pxd":406 * cdef object value * * if inj_args_len == 0: # <<<<<<<<<<<<<< @@ -22886,7 +22889,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid __pyx_t_2 = ((__pyx_v_inj_args_len == 0) != 0); if (__pyx_t_2) { - /* "providers.pxd":403 + /* "providers.pxd":407 * * if inj_args_len == 0: * return args # <<<<<<<<<<<<<< @@ -22898,7 +22901,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid __pyx_r = __pyx_v_args; goto __pyx_L0; - /* "providers.pxd":402 + /* "providers.pxd":406 * cdef object value * * if inj_args_len == 0: # <<<<<<<<<<<<<< @@ -22907,7 +22910,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid */ } - /* "providers.pxd":405 + /* "providers.pxd":409 * return args * * for index in range(inj_args_len): # <<<<<<<<<<<<<< @@ -22919,7 +22922,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { __pyx_v_index = __pyx_t_5; - /* "providers.pxd":406 + /* "providers.pxd":410 * * for index in range(inj_args_len): * injection = inj_args[index] # <<<<<<<<<<<<<< @@ -22928,35 +22931,35 @@ 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, 406, __pyx_L1_error) + __PYX_ERR(1, 410, __pyx_L1_error) } __pyx_t_1 = PyTuple_GET_ITEM(__pyx_v_inj_args, __pyx_v_index); __Pyx_INCREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_injection, ((struct __pyx_obj_19dependency_injector_9providers_PositionalInjection *)__pyx_t_1)); __pyx_t_1 = 0; - /* "providers.pxd":407 + /* "providers.pxd":411 * for index in range(inj_args_len): * injection = inj_args[index] * value = __get_value(injection) # <<<<<<<<<<<<<< * positional_args.append(value) * */ - __pyx_t_1 = __pyx_f_19dependency_injector_9providers___get_value(((struct __pyx_obj_19dependency_injector_9providers_Injection *)__pyx_v_injection)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 407, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers___get_value(((struct __pyx_obj_19dependency_injector_9providers_Injection *)__pyx_v_injection)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 411, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_1); __pyx_t_1 = 0; - /* "providers.pxd":408 + /* "providers.pxd":412 * injection = inj_args[index] * value = __get_value(injection) * positional_args.append(value) # <<<<<<<<<<<<<< * * if async_mode != ASYNC_MODE_DISABLED and __is_future_or_coroutine(value): */ - __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_positional_args, __pyx_v_value); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 408, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_positional_args, __pyx_v_value); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 412, __pyx_L1_error) - /* "providers.pxd":410 + /* "providers.pxd":414 * positional_args.append(value) * * if async_mode != ASYNC_MODE_DISABLED and __is_future_or_coroutine(value): # <<<<<<<<<<<<<< @@ -22974,16 +22977,16 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid __pyx_L7_bool_binop_done:; if (__pyx_t_2) { - /* "providers.pxd":411 + /* "providers.pxd":415 * * if async_mode != ASYNC_MODE_DISABLED and __is_future_or_coroutine(value): * future_args.append((index, value)) # <<<<<<<<<<<<<< * * positional_args.extend(args) */ - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 411, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 415, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 411, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 415, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1); @@ -22991,10 +22994,10 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid __Pyx_GIVEREF(__pyx_v_value); PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_value); __pyx_t_1 = 0; - __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_future_args, __pyx_t_8); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 411, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_future_args, __pyx_t_8); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 415, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "providers.pxd":410 + /* "providers.pxd":414 * positional_args.append(value) * * if async_mode != ASYNC_MODE_DISABLED and __is_future_or_coroutine(value): # <<<<<<<<<<<<<< @@ -23004,16 +23007,16 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid } } - /* "providers.pxd":413 + /* "providers.pxd":417 * future_args.append((index, value)) * * positional_args.extend(args) # <<<<<<<<<<<<<< * * if future_args: */ - __pyx_t_6 = __Pyx_PyList_Extend(__pyx_v_positional_args, __pyx_v_args); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 413, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyList_Extend(__pyx_v_positional_args, __pyx_v_args); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 417, __pyx_L1_error) - /* "providers.pxd":415 + /* "providers.pxd":419 * positional_args.extend(args) * * if future_args: # <<<<<<<<<<<<<< @@ -23023,7 +23026,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid __pyx_t_2 = (PyList_GET_SIZE(__pyx_v_future_args) != 0); if (__pyx_t_2) { - /* "providers.pxd":416 + /* "providers.pxd":420 * * if future_args: * return __combine_future_injections(positional_args, future_args) # <<<<<<<<<<<<<< @@ -23031,13 +23034,13 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid * return positional_args */ __Pyx_XDECREF(__pyx_r); - __pyx_t_8 = __pyx_f_19dependency_injector_9providers___combine_future_injections(__pyx_v_positional_args, __pyx_v_future_args); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 416, __pyx_L1_error) + __pyx_t_8 = __pyx_f_19dependency_injector_9providers___combine_future_injections(__pyx_v_positional_args, __pyx_v_future_args); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 420, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_r = __pyx_t_8; __pyx_t_8 = 0; goto __pyx_L0; - /* "providers.pxd":415 + /* "providers.pxd":419 * positional_args.extend(args) * * if future_args: # <<<<<<<<<<<<<< @@ -23046,7 +23049,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid */ } - /* "providers.pxd":418 + /* "providers.pxd":422 * return __combine_future_injections(positional_args, future_args) * * return positional_args # <<<<<<<<<<<<<< @@ -23058,7 +23061,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid __pyx_r = __pyx_v_positional_args; goto __pyx_L0; - /* "providers.pxd":390 + /* "providers.pxd":394 * @cython.boundscheck(False) * @cython.wraparound(False) * cdef inline object __provide_positional_args( # <<<<<<<<<<<<<< @@ -23082,7 +23085,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid return __pyx_r; } -/* "providers.pxd":423 +/* "providers.pxd":427 * @cython.boundscheck(False) * @cython.wraparound(False) * cdef inline object __provide_keyword_args( # <<<<<<<<<<<<<< @@ -23115,31 +23118,31 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid __Pyx_RefNannySetupContext("__provide_keyword_args", 0); __Pyx_INCREF(__pyx_v_kwargs); - /* "providers.pxd":432 + /* "providers.pxd":436 * cdef object name * cdef object value * cdef dict prefixed = {} # <<<<<<<<<<<<<< * cdef list future_kwargs = [] * cdef NamedInjection kw_injection */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 432, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 436, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_prefixed = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "providers.pxd":433 + /* "providers.pxd":437 * cdef object value * cdef dict prefixed = {} * cdef list future_kwargs = [] # <<<<<<<<<<<<<< * cdef NamedInjection kw_injection * */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 433, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 437, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_future_kwargs = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "providers.pxd":436 + /* "providers.pxd":440 * cdef NamedInjection kw_injection * * if len(kwargs) == 0: # <<<<<<<<<<<<<< @@ -23148,13 +23151,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, 436, __pyx_L1_error) + __PYX_ERR(1, 440, __pyx_L1_error) } - __pyx_t_2 = PyDict_Size(__pyx_v_kwargs); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 436, __pyx_L1_error) + __pyx_t_2 = PyDict_Size(__pyx_v_kwargs); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 440, __pyx_L1_error) __pyx_t_3 = ((__pyx_t_2 == 0) != 0); if (__pyx_t_3) { - /* "providers.pxd":437 + /* "providers.pxd":441 * * if len(kwargs) == 0: * for index in range(inj_kwargs_len): # <<<<<<<<<<<<<< @@ -23166,7 +23169,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { __pyx_v_index = __pyx_t_6; - /* "providers.pxd":438 + /* "providers.pxd":442 * if len(kwargs) == 0: * for index in range(inj_kwargs_len): * kw_injection = inj_kwargs[index] # <<<<<<<<<<<<<< @@ -23175,38 +23178,38 @@ 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, 438, __pyx_L1_error) + __PYX_ERR(1, 442, __pyx_L1_error) } __pyx_t_1 = PyTuple_GET_ITEM(__pyx_v_inj_kwargs, __pyx_v_index); __Pyx_INCREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_kw_injection, ((struct __pyx_obj_19dependency_injector_9providers_NamedInjection *)__pyx_t_1)); __pyx_t_1 = 0; - /* "providers.pxd":439 + /* "providers.pxd":443 * for index in range(inj_kwargs_len): * kw_injection = inj_kwargs[index] * name = __get_name(kw_injection) # <<<<<<<<<<<<<< * value = __get_value(kw_injection) * kwargs[name] = value */ - __pyx_t_1 = __pyx_f_19dependency_injector_9providers___get_name(__pyx_v_kw_injection); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 439, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers___get_name(__pyx_v_kw_injection); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 443, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_1); __pyx_t_1 = 0; - /* "providers.pxd":440 + /* "providers.pxd":444 * kw_injection = inj_kwargs[index] * name = __get_name(kw_injection) * value = __get_value(kw_injection) # <<<<<<<<<<<<<< * kwargs[name] = value * if async_mode != ASYNC_MODE_DISABLED and __is_future_or_coroutine(value): */ - __pyx_t_1 = __pyx_f_19dependency_injector_9providers___get_value(((struct __pyx_obj_19dependency_injector_9providers_Injection *)__pyx_v_kw_injection)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 440, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers___get_value(((struct __pyx_obj_19dependency_injector_9providers_Injection *)__pyx_v_kw_injection)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 444, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_1); __pyx_t_1 = 0; - /* "providers.pxd":441 + /* "providers.pxd":445 * name = __get_name(kw_injection) * value = __get_value(kw_injection) * kwargs[name] = value # <<<<<<<<<<<<<< @@ -23215,11 +23218,11 @@ 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 subscriptable"); - __PYX_ERR(1, 441, __pyx_L1_error) + __PYX_ERR(1, 445, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__pyx_v_kwargs, __pyx_v_name, __pyx_v_value) < 0)) __PYX_ERR(1, 441, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_kwargs, __pyx_v_name, __pyx_v_value) < 0)) __PYX_ERR(1, 445, __pyx_L1_error) - /* "providers.pxd":442 + /* "providers.pxd":446 * value = __get_value(kw_injection) * kwargs[name] = value * if async_mode != ASYNC_MODE_DISABLED and __is_future_or_coroutine(value): # <<<<<<<<<<<<<< @@ -23237,14 +23240,14 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid __pyx_L7_bool_binop_done:; if (__pyx_t_3) { - /* "providers.pxd":443 + /* "providers.pxd":447 * kwargs[name] = value * if async_mode != ASYNC_MODE_DISABLED and __is_future_or_coroutine(value): * future_kwargs.append((name, value)) # <<<<<<<<<<<<<< * else: * kwargs, prefixed = __separate_prefixed_kwargs(kwargs) */ - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 443, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 447, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); @@ -23252,10 +23255,10 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_value); - __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_future_kwargs, __pyx_t_1); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(1, 443, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_future_kwargs, __pyx_t_1); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(1, 447, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "providers.pxd":442 + /* "providers.pxd":446 * value = __get_value(kw_injection) * kwargs[name] = value * if async_mode != ASYNC_MODE_DISABLED and __is_future_or_coroutine(value): # <<<<<<<<<<<<<< @@ -23265,7 +23268,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid } } - /* "providers.pxd":436 + /* "providers.pxd":440 * cdef NamedInjection kw_injection * * if len(kwargs) == 0: # <<<<<<<<<<<<<< @@ -23275,7 +23278,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid goto __pyx_L3; } - /* "providers.pxd":445 + /* "providers.pxd":449 * future_kwargs.append((name, value)) * else: * kwargs, prefixed = __separate_prefixed_kwargs(kwargs) # <<<<<<<<<<<<<< @@ -23283,7 +23286,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid * */ /*else*/ { - __pyx_t_1 = __pyx_f_19dependency_injector_9providers___separate_prefixed_kwargs(__pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 445, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers___separate_prefixed_kwargs(__pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 449, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (likely(__pyx_t_1 != Py_None)) { PyObject* sequence = __pyx_t_1; @@ -23291,7 +23294,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(1, 445, __pyx_L1_error) + __PYX_ERR(1, 449, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_9 = PyTuple_GET_ITEM(sequence, 0); @@ -23299,23 +23302,23 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(__pyx_t_10); #else - __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 445, __pyx_L1_error) + __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 449, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 445, __pyx_L1_error) + __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 449, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { - __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(1, 445, __pyx_L1_error) + __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(1, 449, __pyx_L1_error) } - if (!(likely(PyDict_CheckExact(__pyx_t_9))||((__pyx_t_9) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_9)->tp_name), 0))) __PYX_ERR(1, 445, __pyx_L1_error) - if (!(likely(PyDict_CheckExact(__pyx_t_10))||((__pyx_t_10) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_10)->tp_name), 0))) __PYX_ERR(1, 445, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_t_9))||((__pyx_t_9) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_9)->tp_name), 0))) __PYX_ERR(1, 449, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_t_10))||((__pyx_t_10) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_10)->tp_name), 0))) __PYX_ERR(1, 449, __pyx_L1_error) __Pyx_DECREF_SET(__pyx_v_kwargs, ((PyObject*)__pyx_t_9)); __pyx_t_9 = 0; __Pyx_DECREF_SET(__pyx_v_prefixed, ((PyObject*)__pyx_t_10)); __pyx_t_10 = 0; - /* "providers.pxd":448 + /* "providers.pxd":452 * * * for index in range(inj_kwargs_len): # <<<<<<<<<<<<<< @@ -23327,7 +23330,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { __pyx_v_index = __pyx_t_6; - /* "providers.pxd":449 + /* "providers.pxd":453 * * for index in range(inj_kwargs_len): * kw_injection = inj_kwargs[index] # <<<<<<<<<<<<<< @@ -23336,26 +23339,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, 449, __pyx_L1_error) + __PYX_ERR(1, 453, __pyx_L1_error) } __pyx_t_1 = PyTuple_GET_ITEM(__pyx_v_inj_kwargs, __pyx_v_index); __Pyx_INCREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_kw_injection, ((struct __pyx_obj_19dependency_injector_9providers_NamedInjection *)__pyx_t_1)); __pyx_t_1 = 0; - /* "providers.pxd":450 + /* "providers.pxd":454 * for index in range(inj_kwargs_len): * kw_injection = inj_kwargs[index] * name = __get_name(kw_injection) # <<<<<<<<<<<<<< * * if name in kwargs: */ - __pyx_t_1 = __pyx_f_19dependency_injector_9providers___get_name(__pyx_v_kw_injection); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 450, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers___get_name(__pyx_v_kw_injection); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 454, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_1); __pyx_t_1 = 0; - /* "providers.pxd":452 + /* "providers.pxd":456 * name = __get_name(kw_injection) * * if name in kwargs: # <<<<<<<<<<<<<< @@ -23364,13 +23367,13 @@ 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, 452, __pyx_L1_error) + __PYX_ERR(1, 456, __pyx_L1_error) } - __pyx_t_3 = (__Pyx_PyDict_ContainsTF(__pyx_v_name, __pyx_v_kwargs, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 452, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PyDict_ContainsTF(__pyx_v_name, __pyx_v_kwargs, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 456, __pyx_L1_error) __pyx_t_7 = (__pyx_t_3 != 0); if (__pyx_t_7) { - /* "providers.pxd":453 + /* "providers.pxd":457 * * if name in kwargs: * continue # <<<<<<<<<<<<<< @@ -23379,7 +23382,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid */ goto __pyx_L9_continue; - /* "providers.pxd":452 + /* "providers.pxd":456 * name = __get_name(kw_injection) * * if name in kwargs: # <<<<<<<<<<<<<< @@ -23388,7 +23391,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid */ } - /* "providers.pxd":455 + /* "providers.pxd":459 * continue * * if name in prefixed: # <<<<<<<<<<<<<< @@ -23397,13 +23400,13 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid */ if (unlikely(__pyx_v_prefixed == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(1, 455, __pyx_L1_error) + __PYX_ERR(1, 459, __pyx_L1_error) } - __pyx_t_7 = (__Pyx_PyDict_ContainsTF(__pyx_v_name, __pyx_v_prefixed, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(1, 455, __pyx_L1_error) + __pyx_t_7 = (__Pyx_PyDict_ContainsTF(__pyx_v_name, __pyx_v_prefixed, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(1, 459, __pyx_L1_error) __pyx_t_3 = (__pyx_t_7 != 0); if (__pyx_t_3) { - /* "providers.pxd":456 + /* "providers.pxd":460 * * if name in prefixed: * value = __get_value_kwargs(kw_injection, prefixed[name]) # <<<<<<<<<<<<<< @@ -23412,18 +23415,18 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid */ if (unlikely(__pyx_v_prefixed == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(1, 456, __pyx_L1_error) + __PYX_ERR(1, 460, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_prefixed, __pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 456, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_prefixed, __pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 460, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(1, 456, __pyx_L1_error) - __pyx_t_10 = __pyx_f_19dependency_injector_9providers___get_value_kwargs(((struct __pyx_obj_19dependency_injector_9providers_Injection *)__pyx_v_kw_injection), ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 456, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(1, 460, __pyx_L1_error) + __pyx_t_10 = __pyx_f_19dependency_injector_9providers___get_value_kwargs(((struct __pyx_obj_19dependency_injector_9providers_Injection *)__pyx_v_kw_injection), ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 460, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_10); __pyx_t_10 = 0; - /* "providers.pxd":455 + /* "providers.pxd":459 * continue * * if name in prefixed: # <<<<<<<<<<<<<< @@ -23433,7 +23436,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid goto __pyx_L12; } - /* "providers.pxd":458 + /* "providers.pxd":462 * value = __get_value_kwargs(kw_injection, prefixed[name]) * else: * value = __get_value(kw_injection) # <<<<<<<<<<<<<< @@ -23441,14 +23444,14 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid * kwargs[name] = value */ /*else*/ { - __pyx_t_10 = __pyx_f_19dependency_injector_9providers___get_value(((struct __pyx_obj_19dependency_injector_9providers_Injection *)__pyx_v_kw_injection)); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 458, __pyx_L1_error) + __pyx_t_10 = __pyx_f_19dependency_injector_9providers___get_value(((struct __pyx_obj_19dependency_injector_9providers_Injection *)__pyx_v_kw_injection)); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 462, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_10); __pyx_t_10 = 0; } __pyx_L12:; - /* "providers.pxd":460 + /* "providers.pxd":464 * value = __get_value(kw_injection) * * kwargs[name] = value # <<<<<<<<<<<<<< @@ -23457,11 +23460,11 @@ 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 subscriptable"); - __PYX_ERR(1, 460, __pyx_L1_error) + __PYX_ERR(1, 464, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__pyx_v_kwargs, __pyx_v_name, __pyx_v_value) < 0)) __PYX_ERR(1, 460, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_kwargs, __pyx_v_name, __pyx_v_value) < 0)) __PYX_ERR(1, 464, __pyx_L1_error) - /* "providers.pxd":461 + /* "providers.pxd":465 * * kwargs[name] = value * if async_mode != ASYNC_MODE_DISABLED and __is_future_or_coroutine(value): # <<<<<<<<<<<<<< @@ -23479,14 +23482,14 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid __pyx_L14_bool_binop_done:; if (__pyx_t_3) { - /* "providers.pxd":462 + /* "providers.pxd":466 * kwargs[name] = value * if async_mode != ASYNC_MODE_DISABLED and __is_future_or_coroutine(value): * future_kwargs.append((name, value)) # <<<<<<<<<<<<<< * * if future_kwargs: */ - __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 462, __pyx_L1_error) + __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 466, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_INCREF(__pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); @@ -23494,10 +23497,10 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_v_value); - __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_future_kwargs, __pyx_t_10); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(1, 462, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_future_kwargs, __pyx_t_10); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(1, 466, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - /* "providers.pxd":461 + /* "providers.pxd":465 * * kwargs[name] = value * if async_mode != ASYNC_MODE_DISABLED and __is_future_or_coroutine(value): # <<<<<<<<<<<<<< @@ -23510,7 +23513,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid } __pyx_L3:; - /* "providers.pxd":464 + /* "providers.pxd":468 * future_kwargs.append((name, value)) * * if future_kwargs: # <<<<<<<<<<<<<< @@ -23520,7 +23523,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid __pyx_t_3 = (PyList_GET_SIZE(__pyx_v_future_kwargs) != 0); if (__pyx_t_3) { - /* "providers.pxd":465 + /* "providers.pxd":469 * * if future_kwargs: * return __combine_future_injections(kwargs, future_kwargs) # <<<<<<<<<<<<<< @@ -23528,13 +23531,13 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid * return kwargs */ __Pyx_XDECREF(__pyx_r); - __pyx_t_10 = __pyx_f_19dependency_injector_9providers___combine_future_injections(__pyx_v_kwargs, __pyx_v_future_kwargs); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 465, __pyx_L1_error) + __pyx_t_10 = __pyx_f_19dependency_injector_9providers___combine_future_injections(__pyx_v_kwargs, __pyx_v_future_kwargs); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 469, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_r = __pyx_t_10; __pyx_t_10 = 0; goto __pyx_L0; - /* "providers.pxd":464 + /* "providers.pxd":468 * future_kwargs.append((name, value)) * * if future_kwargs: # <<<<<<<<<<<<<< @@ -23543,7 +23546,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid */ } - /* "providers.pxd":467 + /* "providers.pxd":471 * return __combine_future_injections(kwargs, future_kwargs) * * return kwargs # <<<<<<<<<<<<<< @@ -23555,7 +23558,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid __pyx_r = __pyx_v_kwargs; goto __pyx_L0; - /* "providers.pxd":423 + /* "providers.pxd":427 * @cython.boundscheck(False) * @cython.wraparound(False) * cdef inline object __provide_keyword_args( # <<<<<<<<<<<<<< @@ -23582,7 +23585,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid return __pyx_r; } -/* "providers.pxd":470 +/* "providers.pxd":474 * * * cdef inline object __combine_future_injections(object injections, list future_injections): # <<<<<<<<<<<<<< @@ -23612,16 +23615,16 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___combin int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__combine_future_injections", 0); - /* "providers.pxd":471 + /* "providers.pxd":475 * * cdef inline object __combine_future_injections(object injections, list future_injections): * future_result = asyncio.Future() # <<<<<<<<<<<<<< * * injections_ready = asyncio.gather(*[value for _, value in future_injections]) */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 471, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 475, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Future); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 471, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Future); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 475, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -23636,37 +23639,37 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___combin } __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 471, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 475, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_future_result = __pyx_t_1; __pyx_t_1 = 0; - /* "providers.pxd":473 + /* "providers.pxd":477 * future_result = asyncio.Future() * * injections_ready = asyncio.gather(*[value for _, value in future_injections]) # <<<<<<<<<<<<<< * injections_ready.add_done_callback( * functools.partial( */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 473, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 477, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_gather); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 473, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_gather); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 477, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 473, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 477, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(__pyx_v_future_injections == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(1, 473, __pyx_L1_error) + __PYX_ERR(1, 477, __pyx_L1_error) } __pyx_t_2 = __pyx_v_future_injections; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; for (;;) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_5); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 473, __pyx_L1_error) + __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_5); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 477, __pyx_L1_error) #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 473, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 477, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) { @@ -23675,7 +23678,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___combin if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(1, 473, __pyx_L1_error) + __PYX_ERR(1, 477, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -23688,15 +23691,15 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___combin __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); #else - __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 473, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 477, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 473, __pyx_L1_error) + __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 477, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #endif __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { Py_ssize_t index = -1; - __pyx_t_8 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 473, __pyx_L1_error) + __pyx_t_8 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 477, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext; @@ -23704,7 +23707,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___combin __Pyx_GOTREF(__pyx_t_6); index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_7); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(1, 473, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(1, 477, __pyx_L1_error) __pyx_t_9 = NULL; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L6_unpacking_done; @@ -23712,60 +23715,60 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___combin __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_9 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(1, 473, __pyx_L1_error) + __PYX_ERR(1, 477, __pyx_L1_error) __pyx_L6_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v__, __pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_7); __pyx_t_7 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_v_value))) __PYX_ERR(1, 473, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_v_value))) __PYX_ERR(1, 477, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PySequence_Tuple(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 473, __pyx_L1_error) + __pyx_t_2 = PySequence_Tuple(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 477, __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_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 473, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 477, __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_v_injections_ready = __pyx_t_1; __pyx_t_1 = 0; - /* "providers.pxd":474 + /* "providers.pxd":478 * * injections_ready = asyncio.gather(*[value for _, value in future_injections]) * injections_ready.add_done_callback( # <<<<<<<<<<<<<< * functools.partial( * __async_prepare_args_kwargs_callback, */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_injections_ready, __pyx_n_s_add_done_callback); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 474, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_injections_ready, __pyx_n_s_add_done_callback); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 478, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - /* "providers.pxd":475 + /* "providers.pxd":479 * injections_ready = asyncio.gather(*[value for _, value in future_injections]) * injections_ready.add_done_callback( * functools.partial( # <<<<<<<<<<<<<< * __async_prepare_args_kwargs_callback, * future_result, */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_functools); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 475, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_functools); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 479, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_partial); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 475, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_partial); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 479, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "providers.pxd":476 + /* "providers.pxd":480 * injections_ready.add_done_callback( * functools.partial( * __async_prepare_args_kwargs_callback, # <<<<<<<<<<<<<< * future_result, * injections, */ - __pyx_t_5 = __Pyx_CFunc_void____object____object____object____object___to_py(__pyx_f_19dependency_injector_9providers___async_prepare_args_kwargs_callback); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 476, __pyx_L1_error) + __pyx_t_5 = __Pyx_CFunc_void____object____object____object____object___to_py(__pyx_f_19dependency_injector_9providers___async_prepare_args_kwargs_callback); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 480, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - /* "providers.pxd":479 + /* "providers.pxd":483 * future_result, * injections, * future_injections, # <<<<<<<<<<<<<< @@ -23787,7 +23790,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___combin #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[5] = {__pyx_t_6, __pyx_t_5, __pyx_v_future_result, __pyx_v_injections, __pyx_v_future_injections}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_10, 4+__pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 475, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_10, 4+__pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 479, __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; @@ -23796,14 +23799,14 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___combin #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[5] = {__pyx_t_6, __pyx_t_5, __pyx_v_future_result, __pyx_v_injections, __pyx_v_future_injections}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_10, 4+__pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 475, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_10, 4+__pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 479, __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(4+__pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 475, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(4+__pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 479, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; @@ -23820,7 +23823,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___combin __Pyx_GIVEREF(__pyx_v_future_injections); PyTuple_SET_ITEM(__pyx_t_8, 3+__pyx_t_10, __pyx_v_future_injections); __pyx_t_5 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 475, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 479, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } @@ -23838,21 +23841,21 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___combin __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_7, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 474, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 478, __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":482 + /* "providers.pxd":486 * ), * ) * asyncio.ensure_future(injections_ready) # <<<<<<<<<<<<<< * * return future_result */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 482, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 486, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ensure_future); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 482, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ensure_future); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 486, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -23867,12 +23870,12 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___combin } __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_injections_ready) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_injections_ready); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 482, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 486, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "providers.pxd":484 + /* "providers.pxd":488 * asyncio.ensure_future(injections_ready) * * return future_result # <<<<<<<<<<<<<< @@ -23884,7 +23887,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___combin __pyx_r = __pyx_v_future_result; goto __pyx_L0; - /* "providers.pxd":470 + /* "providers.pxd":474 * * * cdef inline object __combine_future_injections(object injections, list future_injections): # <<<<<<<<<<<<<< @@ -23913,7 +23916,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___combin return __pyx_r; } -/* "providers.pxd":487 +/* "providers.pxd":491 * * * cdef inline void __async_prepare_args_kwargs_callback( # <<<<<<<<<<<<<< @@ -23947,7 +23950,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_prepa int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__async_prepare_args_kwargs_callback", 0); - /* "providers.pxd":493 + /* "providers.pxd":497 * object future, * ): * try: # <<<<<<<<<<<<<< @@ -23963,14 +23966,14 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_prepa __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "providers.pxd":494 + /* "providers.pxd":498 * ): * try: * result = future.result() # <<<<<<<<<<<<<< * for value, (key, _) in zip(result, future_args_kwargs): * args[key] = value */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_future, __pyx_n_s_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 494, __pyx_L3_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_future, __pyx_n_s_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 498, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -23984,20 +23987,20 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_prepa } __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 494, __pyx_L3_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 498, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_result = __pyx_t_4; __pyx_t_4 = 0; - /* "providers.pxd":495 + /* "providers.pxd":499 * try: * result = future.result() * for value, (key, _) in zip(result, future_args_kwargs): # <<<<<<<<<<<<<< * args[key] = value * except Exception as exception: */ - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 495, __pyx_L3_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 499, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_result); __Pyx_GIVEREF(__pyx_v_result); @@ -24005,16 +24008,16 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_prepa __Pyx_INCREF(__pyx_v_future_args_kwargs); __Pyx_GIVEREF(__pyx_v_future_args_kwargs); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_future_args_kwargs); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 495, __pyx_L3_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 499, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) { __pyx_t_4 = __pyx_t_5; __Pyx_INCREF(__pyx_t_4); __pyx_t_7 = 0; __pyx_t_8 = NULL; } else { - __pyx_t_7 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 495, __pyx_L3_error) + __pyx_t_7 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 499, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_8 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 495, __pyx_L3_error) + __pyx_t_8 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 499, __pyx_L3_error) } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; for (;;) { @@ -24022,17 +24025,17 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_prepa if (likely(PyList_CheckExact(__pyx_t_4))) { if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_5 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_7); __Pyx_INCREF(__pyx_t_5); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(1, 495, __pyx_L3_error) + __pyx_t_5 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_7); __Pyx_INCREF(__pyx_t_5); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(1, 499, __pyx_L3_error) #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 495, __pyx_L3_error) + __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 499, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); #endif } else { if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_7); __Pyx_INCREF(__pyx_t_5); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(1, 495, __pyx_L3_error) + __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_7); __Pyx_INCREF(__pyx_t_5); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(1, 499, __pyx_L3_error) #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 495, __pyx_L3_error) + __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 499, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); #endif } @@ -24042,7 +24045,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_prepa PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(1, 495, __pyx_L3_error) + else __PYX_ERR(1, 499, __pyx_L3_error) } break; } @@ -24054,7 +24057,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_prepa if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(1, 495, __pyx_L3_error) + __PYX_ERR(1, 499, __pyx_L3_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -24067,15 +24070,15 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_prepa __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_9); #else - __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 495, __pyx_L3_error) + __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 499, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 495, __pyx_L3_error) + __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 499, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_9); #endif __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { Py_ssize_t index = -1; - __pyx_t_10 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 495, __pyx_L3_error) + __pyx_t_10 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 499, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_11 = Py_TYPE(__pyx_t_10)->tp_iternext; @@ -24083,7 +24086,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_prepa __Pyx_GOTREF(__pyx_t_6); index = 1; __pyx_t_9 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_9)) goto __pyx_L11_unpacking_failed; __Pyx_GOTREF(__pyx_t_9); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 2) < 0) __PYX_ERR(1, 495, __pyx_L3_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 2) < 0) __PYX_ERR(1, 499, __pyx_L3_error) __pyx_t_11 = NULL; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L12_unpacking_done; @@ -24091,7 +24094,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_prepa __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_11 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(1, 495, __pyx_L3_error) + __PYX_ERR(1, 499, __pyx_L3_error) __pyx_L12_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_6); @@ -24102,7 +24105,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_prepa if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(1, 495, __pyx_L3_error) + __PYX_ERR(1, 499, __pyx_L3_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -24115,15 +24118,15 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_prepa __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(__pyx_t_12); #else - __pyx_t_10 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 495, __pyx_L3_error) + __pyx_t_10 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 499, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_12 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 495, __pyx_L3_error) + __pyx_t_12 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 499, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_12); #endif __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } else { Py_ssize_t index = -1; - __pyx_t_13 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 495, __pyx_L3_error) + __pyx_t_13 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 499, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_11 = Py_TYPE(__pyx_t_13)->tp_iternext; @@ -24131,7 +24134,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_prepa __Pyx_GOTREF(__pyx_t_10); index = 1; __pyx_t_12 = __pyx_t_11(__pyx_t_13); if (unlikely(!__pyx_t_12)) goto __pyx_L13_unpacking_failed; __Pyx_GOTREF(__pyx_t_12); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_13), 2) < 0) __PYX_ERR(1, 495, __pyx_L3_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_13), 2) < 0) __PYX_ERR(1, 499, __pyx_L3_error) __pyx_t_11 = NULL; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L14_unpacking_done; @@ -24139,7 +24142,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_prepa __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_11 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(1, 495, __pyx_L3_error) + __PYX_ERR(1, 499, __pyx_L3_error) __pyx_L14_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_10); @@ -24147,16 +24150,16 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_prepa __Pyx_XDECREF_SET(__pyx_v__, __pyx_t_12); __pyx_t_12 = 0; - /* "providers.pxd":496 + /* "providers.pxd":500 * result = future.result() * for value, (key, _) in zip(result, future_args_kwargs): * args[key] = value # <<<<<<<<<<<<<< * except Exception as exception: * future_result.set_exception(exception) */ - if (unlikely(PyObject_SetItem(__pyx_v_args, __pyx_v_key, __pyx_v_value) < 0)) __PYX_ERR(1, 496, __pyx_L3_error) + if (unlikely(PyObject_SetItem(__pyx_v_args, __pyx_v_key, __pyx_v_value) < 0)) __PYX_ERR(1, 500, __pyx_L3_error) - /* "providers.pxd":495 + /* "providers.pxd":499 * try: * result = future.result() * for value, (key, _) in zip(result, future_args_kwargs): # <<<<<<<<<<<<<< @@ -24166,7 +24169,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_prepa } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "providers.pxd":493 + /* "providers.pxd":497 * object future, * ): * try: # <<<<<<<<<<<<<< @@ -24175,7 +24178,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_prepa */ } - /* "providers.pxd":500 + /* "providers.pxd":504 * future_result.set_exception(exception) * else: * future_result.set_result(args) # <<<<<<<<<<<<<< @@ -24183,7 +24186,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_prepa * */ /*else:*/ { - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_future_result, __pyx_n_s_set_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 500, __pyx_L5_except_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_future_result, __pyx_n_s_set_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 504, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -24197,7 +24200,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_prepa } __pyx_t_4 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_9, __pyx_v_args) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_args); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 500, __pyx_L5_except_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 504, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -24215,7 +24218,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_prepa __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "providers.pxd":497 + /* "providers.pxd":501 * for value, (key, _) in zip(result, future_args_kwargs): * args[key] = value * except Exception as exception: # <<<<<<<<<<<<<< @@ -24225,21 +24228,21 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_prepa __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); if (__pyx_t_14) { __Pyx_AddTraceback("dependency_injector.providers.__async_prepare_args_kwargs_callback", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_9) < 0) __PYX_ERR(1, 497, __pyx_L5_except_error) + if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_9) < 0) __PYX_ERR(1, 501, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(__pyx_t_5); __pyx_v_exception = __pyx_t_5; - /* "providers.pxd":498 + /* "providers.pxd":502 * args[key] = value * except Exception as exception: * future_result.set_exception(exception) # <<<<<<<<<<<<<< * else: * future_result.set_result(args) */ - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_future_result, __pyx_n_s_set_exception); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 498, __pyx_L5_except_error) + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_future_result, __pyx_n_s_set_exception); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 502, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) { @@ -24253,7 +24256,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_prepa } __pyx_t_6 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_12, __pyx_t_10, __pyx_v_exception) : __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_v_exception); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 498, __pyx_L5_except_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 502, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -24265,7 +24268,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_prepa goto __pyx_L5_except_error; __pyx_L5_except_error:; - /* "providers.pxd":493 + /* "providers.pxd":497 * object future, * ): * try: # <<<<<<<<<<<<<< @@ -24285,7 +24288,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_prepa __pyx_L8_try_end:; } - /* "providers.pxd":487 + /* "providers.pxd":491 * * * cdef inline void __async_prepare_args_kwargs_callback( # <<<<<<<<<<<<<< @@ -24313,7 +24316,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_prepa __Pyx_RefNannyFinishContext(); } -/* "providers.pxd":505 +/* "providers.pxd":509 * @cython.boundscheck(False) * @cython.wraparound(False) * cdef inline object __provide_attributes(tuple attributes, int attributes_len): # <<<<<<<<<<<<<< @@ -24341,31 +24344,31 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__provide_attributes", 0); - /* "providers.pxd":507 + /* "providers.pxd":511 * cdef inline object __provide_attributes(tuple attributes, int attributes_len): * cdef NamedInjection attr_injection * cdef dict attribute_injections = {} # <<<<<<<<<<<<<< * cdef list future_attributes = [] * */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 507, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 511, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_attribute_injections = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "providers.pxd":508 + /* "providers.pxd":512 * cdef NamedInjection attr_injection * cdef dict attribute_injections = {} * cdef list future_attributes = [] # <<<<<<<<<<<<<< * * for index in range(attributes_len): */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 508, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 512, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_future_attributes = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "providers.pxd":510 + /* "providers.pxd":514 * cdef list future_attributes = [] * * for index in range(attributes_len): # <<<<<<<<<<<<<< @@ -24377,7 +24380,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":511 + /* "providers.pxd":515 * * for index in range(attributes_len): * attr_injection = attributes[index] # <<<<<<<<<<<<<< @@ -24386,47 +24389,47 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid */ if (unlikely(__pyx_v_attributes == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(1, 511, __pyx_L1_error) + __PYX_ERR(1, 515, __pyx_L1_error) } __pyx_t_1 = PyTuple_GET_ITEM(__pyx_v_attributes, __pyx_v_index); __Pyx_INCREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_attr_injection, ((struct __pyx_obj_19dependency_injector_9providers_NamedInjection *)__pyx_t_1)); __pyx_t_1 = 0; - /* "providers.pxd":512 + /* "providers.pxd":516 * for index in range(attributes_len): * attr_injection = attributes[index] * name = __get_name(attr_injection) # <<<<<<<<<<<<<< * value = __get_value(attr_injection) * attribute_injections[name] = value */ - __pyx_t_1 = __pyx_f_19dependency_injector_9providers___get_name(__pyx_v_attr_injection); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 512, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers___get_name(__pyx_v_attr_injection); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 516, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_1); __pyx_t_1 = 0; - /* "providers.pxd":513 + /* "providers.pxd":517 * attr_injection = attributes[index] * name = __get_name(attr_injection) * value = __get_value(attr_injection) # <<<<<<<<<<<<<< * attribute_injections[name] = value * if __is_future_or_coroutine(value): */ - __pyx_t_1 = __pyx_f_19dependency_injector_9providers___get_value(((struct __pyx_obj_19dependency_injector_9providers_Injection *)__pyx_v_attr_injection)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 513, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers___get_value(((struct __pyx_obj_19dependency_injector_9providers_Injection *)__pyx_v_attr_injection)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 517, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_1); __pyx_t_1 = 0; - /* "providers.pxd":514 + /* "providers.pxd":518 * name = __get_name(attr_injection) * value = __get_value(attr_injection) * attribute_injections[name] = value # <<<<<<<<<<<<<< * if __is_future_or_coroutine(value): * future_attributes.append((name, value)) */ - if (unlikely(PyDict_SetItem(__pyx_v_attribute_injections, __pyx_v_name, __pyx_v_value) < 0)) __PYX_ERR(1, 514, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_attribute_injections, __pyx_v_name, __pyx_v_value) < 0)) __PYX_ERR(1, 518, __pyx_L1_error) - /* "providers.pxd":515 + /* "providers.pxd":519 * value = __get_value(attr_injection) * attribute_injections[name] = value * if __is_future_or_coroutine(value): # <<<<<<<<<<<<<< @@ -24436,14 +24439,14 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid __pyx_t_5 = (__pyx_f_19dependency_injector_9providers___is_future_or_coroutine(__pyx_v_value) != 0); if (__pyx_t_5) { - /* "providers.pxd":516 + /* "providers.pxd":520 * attribute_injections[name] = value * if __is_future_or_coroutine(value): * future_attributes.append((name, value)) # <<<<<<<<<<<<<< * * if future_attributes: */ - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 516, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 520, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); @@ -24451,10 +24454,10 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_value); - __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_future_attributes, __pyx_t_1); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 516, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_future_attributes, __pyx_t_1); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 520, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "providers.pxd":515 + /* "providers.pxd":519 * value = __get_value(attr_injection) * attribute_injections[name] = value * if __is_future_or_coroutine(value): # <<<<<<<<<<<<<< @@ -24464,7 +24467,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid } } - /* "providers.pxd":518 + /* "providers.pxd":522 * future_attributes.append((name, value)) * * if future_attributes: # <<<<<<<<<<<<<< @@ -24474,7 +24477,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid __pyx_t_5 = (PyList_GET_SIZE(__pyx_v_future_attributes) != 0); if (__pyx_t_5) { - /* "providers.pxd":519 + /* "providers.pxd":523 * * if future_attributes: * return __combine_future_injections(attribute_injections, future_attributes) # <<<<<<<<<<<<<< @@ -24482,13 +24485,13 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid * return attribute_injections */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_19dependency_injector_9providers___combine_future_injections(__pyx_v_attribute_injections, __pyx_v_future_attributes); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 519, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers___combine_future_injections(__pyx_v_attribute_injections, __pyx_v_future_attributes); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 523, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "providers.pxd":518 + /* "providers.pxd":522 * future_attributes.append((name, value)) * * if future_attributes: # <<<<<<<<<<<<<< @@ -24497,7 +24500,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid */ } - /* "providers.pxd":521 + /* "providers.pxd":525 * return __combine_future_injections(attribute_injections, future_attributes) * * return attribute_injections # <<<<<<<<<<<<<< @@ -24509,7 +24512,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid __pyx_r = __pyx_v_attribute_injections; goto __pyx_L0; - /* "providers.pxd":505 + /* "providers.pxd":509 * @cython.boundscheck(False) * @cython.wraparound(False) * cdef inline object __provide_attributes(tuple attributes, int attributes_len): # <<<<<<<<<<<<<< @@ -24533,7 +24536,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid return __pyx_r; } -/* "providers.pxd":524 +/* "providers.pxd":528 * * * cdef inline object __async_inject_attributes(future_instance, future_attributes): # <<<<<<<<<<<<<< @@ -24559,16 +24562,16 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___async_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__async_inject_attributes", 0); - /* "providers.pxd":525 + /* "providers.pxd":529 * * cdef inline object __async_inject_attributes(future_instance, future_attributes): * future_result = asyncio.Future() # <<<<<<<<<<<<<< * * attributes_ready = asyncio.gather(future_instance, future_attributes) */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 525, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 529, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Future); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 525, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Future); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 529, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -24583,22 +24586,22 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___async_ } __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 525, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 529, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_future_result = __pyx_t_1; __pyx_t_1 = 0; - /* "providers.pxd":527 + /* "providers.pxd":531 * future_result = asyncio.Future() * * attributes_ready = asyncio.gather(future_instance, future_attributes) # <<<<<<<<<<<<<< * attributes_ready.add_done_callback( * functools.partial( */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 527, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 531, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_gather); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 527, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_gather); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 531, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -24616,7 +24619,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___async_ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_future_instance, __pyx_v_future_attributes}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 527, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 531, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -24624,13 +24627,13 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___async_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_future_instance, __pyx_v_future_attributes}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 527, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 531, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 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, 527, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 531, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; @@ -24641,7 +24644,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___async_ __Pyx_INCREF(__pyx_v_future_attributes); __Pyx_GIVEREF(__pyx_v_future_attributes); PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_future_attributes); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 527, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 531, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } @@ -24649,40 +24652,40 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___async_ __pyx_v_attributes_ready = __pyx_t_1; __pyx_t_1 = 0; - /* "providers.pxd":528 + /* "providers.pxd":532 * * attributes_ready = asyncio.gather(future_instance, future_attributes) * attributes_ready.add_done_callback( # <<<<<<<<<<<<<< * functools.partial( * __async_inject_attributes_callback, */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_attributes_ready, __pyx_n_s_add_done_callback); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 528, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_attributes_ready, __pyx_n_s_add_done_callback); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - /* "providers.pxd":529 + /* "providers.pxd":533 * attributes_ready = asyncio.gather(future_instance, future_attributes) * attributes_ready.add_done_callback( * functools.partial( # <<<<<<<<<<<<<< * __async_inject_attributes_callback, * future_result, */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_functools); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 529, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_functools); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 533, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_partial); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 529, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_partial); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 533, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "providers.pxd":530 + /* "providers.pxd":534 * attributes_ready.add_done_callback( * functools.partial( * __async_inject_attributes_callback, # <<<<<<<<<<<<<< * future_result, * ), */ - __pyx_t_3 = __Pyx_CFunc_void____object____object___to_py(__pyx_f_19dependency_injector_9providers___async_inject_attributes_callback); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 530, __pyx_L1_error) + __pyx_t_3 = __Pyx_CFunc_void____object____object___to_py(__pyx_f_19dependency_injector_9providers___async_inject_attributes_callback); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 534, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - /* "providers.pxd":531 + /* "providers.pxd":535 * functools.partial( * __async_inject_attributes_callback, * future_result, # <<<<<<<<<<<<<< @@ -24704,7 +24707,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___async_ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_3, __pyx_v_future_result}; - __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 529, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 533, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -24713,14 +24716,14 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___async_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_3, __pyx_v_future_result}; - __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 529, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 533, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { - __pyx_t_8 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 529, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 533, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL; @@ -24731,7 +24734,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___async_ __Pyx_GIVEREF(__pyx_v_future_result); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_4, __pyx_v_future_result); __pyx_t_3 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 529, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 533, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } @@ -24749,21 +24752,21 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___async_ __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 528, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 532, __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":534 + /* "providers.pxd":538 * ), * ) * asyncio.ensure_future(attributes_ready) # <<<<<<<<<<<<<< * * return future_result */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 534, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 538, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ensure_future); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 534, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ensure_future); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 538, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -24778,12 +24781,12 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___async_ } __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_2, __pyx_v_attributes_ready) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_attributes_ready); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 534, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 538, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "providers.pxd":536 + /* "providers.pxd":540 * asyncio.ensure_future(attributes_ready) * * return future_result # <<<<<<<<<<<<<< @@ -24795,7 +24798,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___async_ __pyx_r = __pyx_v_future_result; goto __pyx_L0; - /* "providers.pxd":524 + /* "providers.pxd":528 * * * cdef inline object __async_inject_attributes(future_instance, future_attributes): # <<<<<<<<<<<<<< @@ -24822,7 +24825,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___async_ return __pyx_r; } -/* "providers.pxd":539 +/* "providers.pxd":543 * * * cdef inline void __async_inject_attributes_callback(object future_result, object future): # <<<<<<<<<<<<<< @@ -24856,7 +24859,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_injec int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__async_inject_attributes_callback", 0); - /* "providers.pxd":540 + /* "providers.pxd":544 * * cdef inline void __async_inject_attributes_callback(object future_result, object future): * try: # <<<<<<<<<<<<<< @@ -24872,14 +24875,14 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_injec __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "providers.pxd":541 + /* "providers.pxd":545 * cdef inline void __async_inject_attributes_callback(object future_result, object future): * try: * instance, attributes = future.result() # <<<<<<<<<<<<<< * * for name, value in attributes.items(): */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_future, __pyx_n_s_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 541, __pyx_L3_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_future, __pyx_n_s_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 545, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -24893,7 +24896,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_injec } __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 541, __pyx_L3_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 545, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) { @@ -24902,7 +24905,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_injec if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(1, 541, __pyx_L3_error) + __PYX_ERR(1, 545, __pyx_L3_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -24915,15 +24918,15 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_injec __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, 541, __pyx_L3_error) + __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 545, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 541, __pyx_L3_error) + __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 545, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { Py_ssize_t index = -1; - __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 541, __pyx_L3_error) + __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 545, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext; @@ -24931,7 +24934,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_injec __Pyx_GOTREF(__pyx_t_5); index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L9_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(1, 541, __pyx_L3_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(1, 545, __pyx_L3_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L10_unpacking_done; @@ -24939,7 +24942,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_injec __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(1, 541, __pyx_L3_error) + __PYX_ERR(1, 545, __pyx_L3_error) __pyx_L10_unpacking_done:; } __pyx_v_instance = __pyx_t_5; @@ -24947,14 +24950,14 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_injec __pyx_v_attributes = __pyx_t_6; __pyx_t_6 = 0; - /* "providers.pxd":543 + /* "providers.pxd":547 * instance, attributes = future.result() * * for name, value in attributes.items(): # <<<<<<<<<<<<<< * setattr(instance, name, value) * except Exception as exception: */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_attributes, __pyx_n_s_items); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 543, __pyx_L3_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_attributes, __pyx_n_s_items); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 547, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { @@ -24968,16 +24971,16 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_injec } __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 543, __pyx_L3_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 547, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { __pyx_t_6 = __pyx_t_4; __Pyx_INCREF(__pyx_t_6); __pyx_t_9 = 0; __pyx_t_10 = NULL; } else { - __pyx_t_9 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 543, __pyx_L3_error) + __pyx_t_9 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 547, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_10 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 543, __pyx_L3_error) + __pyx_t_10 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 547, __pyx_L3_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { @@ -24985,17 +24988,17 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_injec if (likely(PyList_CheckExact(__pyx_t_6))) { if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_6)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(1, 543, __pyx_L3_error) + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(1, 547, __pyx_L3_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 543, __pyx_L3_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 547, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_6)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(1, 543, __pyx_L3_error) + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(1, 547, __pyx_L3_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 543, __pyx_L3_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 547, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); #endif } @@ -25005,7 +25008,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_injec PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(1, 543, __pyx_L3_error) + else __PYX_ERR(1, 547, __pyx_L3_error) } break; } @@ -25017,7 +25020,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_injec if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(1, 543, __pyx_L3_error) + __PYX_ERR(1, 547, __pyx_L3_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -25030,15 +25033,15 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_injec __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_7); #else - __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 543, __pyx_L3_error) + __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 547, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 543, __pyx_L3_error) + __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 547, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_7); #endif __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { Py_ssize_t index = -1; - __pyx_t_11 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 543, __pyx_L3_error) + __pyx_t_11 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 547, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_8 = Py_TYPE(__pyx_t_11)->tp_iternext; @@ -25046,7 +25049,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_injec __Pyx_GOTREF(__pyx_t_5); index = 1; __pyx_t_7 = __pyx_t_8(__pyx_t_11); if (unlikely(!__pyx_t_7)) goto __pyx_L13_unpacking_failed; __Pyx_GOTREF(__pyx_t_7); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_11), 2) < 0) __PYX_ERR(1, 543, __pyx_L3_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_11), 2) < 0) __PYX_ERR(1, 547, __pyx_L3_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L14_unpacking_done; @@ -25054,7 +25057,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_injec __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(1, 543, __pyx_L3_error) + __PYX_ERR(1, 547, __pyx_L3_error) __pyx_L14_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_5); @@ -25062,16 +25065,16 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_injec __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_7); __pyx_t_7 = 0; - /* "providers.pxd":544 + /* "providers.pxd":548 * * for name, value in attributes.items(): * setattr(instance, name, value) # <<<<<<<<<<<<<< * except Exception as exception: * future_result.set_exception(exception) */ - __pyx_t_12 = PyObject_SetAttr(__pyx_v_instance, __pyx_v_name, __pyx_v_value); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(1, 544, __pyx_L3_error) + __pyx_t_12 = PyObject_SetAttr(__pyx_v_instance, __pyx_v_name, __pyx_v_value); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(1, 548, __pyx_L3_error) - /* "providers.pxd":543 + /* "providers.pxd":547 * instance, attributes = future.result() * * for name, value in attributes.items(): # <<<<<<<<<<<<<< @@ -25081,7 +25084,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_injec } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "providers.pxd":540 + /* "providers.pxd":544 * * cdef inline void __async_inject_attributes_callback(object future_result, object future): * try: # <<<<<<<<<<<<<< @@ -25090,7 +25093,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_injec */ } - /* "providers.pxd":548 + /* "providers.pxd":552 * future_result.set_exception(exception) * else: * future_result.set_result(instance) # <<<<<<<<<<<<<< @@ -25098,7 +25101,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_injec * */ /*else:*/ { - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_future_result, __pyx_n_s_set_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 548, __pyx_L5_except_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_future_result, __pyx_n_s_set_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 552, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -25112,7 +25115,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_injec } __pyx_t_6 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, __pyx_v_instance) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_instance); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 548, __pyx_L5_except_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 552, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -25128,7 +25131,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_injec __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "providers.pxd":545 + /* "providers.pxd":549 * for name, value in attributes.items(): * setattr(instance, name, value) * except Exception as exception: # <<<<<<<<<<<<<< @@ -25138,21 +25141,21 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_injec __pyx_t_13 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); if (__pyx_t_13) { __Pyx_AddTraceback("dependency_injector.providers.__async_inject_attributes_callback", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_4, &__pyx_t_7) < 0) __PYX_ERR(1, 545, __pyx_L5_except_error) + if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_4, &__pyx_t_7) < 0) __PYX_ERR(1, 549, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_v_exception = __pyx_t_4; - /* "providers.pxd":546 + /* "providers.pxd":550 * setattr(instance, name, value) * except Exception as exception: * future_result.set_exception(exception) # <<<<<<<<<<<<<< * else: * future_result.set_result(instance) */ - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_future_result, __pyx_n_s_set_exception); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 546, __pyx_L5_except_error) + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_future_result, __pyx_n_s_set_exception); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 550, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_14 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) { @@ -25166,7 +25169,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_injec } __pyx_t_5 = (__pyx_t_14) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_14, __pyx_v_exception) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_v_exception); __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 546, __pyx_L5_except_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 550, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -25178,7 +25181,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_injec goto __pyx_L5_except_error; __pyx_L5_except_error:; - /* "providers.pxd":540 + /* "providers.pxd":544 * * cdef inline void __async_inject_attributes_callback(object future_result, object future): * try: # <<<<<<<<<<<<<< @@ -25198,7 +25201,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_injec __pyx_L8_try_end:; } - /* "providers.pxd":539 + /* "providers.pxd":543 * * * cdef inline void __async_inject_attributes_callback(object future_result, object future): # <<<<<<<<<<<<<< @@ -25225,7 +25228,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_injec __Pyx_RefNannyFinishContext(); } -/* "providers.pxd":551 +/* "providers.pxd":555 * * * cdef inline void __inject_attributes(object instance, dict attributes): # <<<<<<<<<<<<<< @@ -25251,7 +25254,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___inject_attr int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__inject_attributes", 0); - /* "providers.pxd":552 + /* "providers.pxd":556 * * cdef inline void __inject_attributes(object instance, dict attributes): * for name, value in attributes.items(): # <<<<<<<<<<<<<< @@ -25260,17 +25263,17 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___inject_attr */ if (unlikely(__pyx_v_attributes == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); - __PYX_ERR(1, 552, __pyx_L1_error) + __PYX_ERR(1, 556, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_Items(__pyx_v_attributes); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 552, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_Items(__pyx_v_attributes); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 556, __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, 552, __pyx_L1_error) + __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 556, __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, 552, __pyx_L1_error) + __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 556, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -25278,17 +25281,17 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___inject_attr 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, 552, __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, 556, __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, 552, __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, 556, __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, 552, __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, 556, __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, 552, __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, 556, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -25298,7 +25301,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___inject_attr PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(1, 552, __pyx_L1_error) + else __PYX_ERR(1, 556, __pyx_L1_error) } break; } @@ -25310,7 +25313,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___inject_attr if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(1, 552, __pyx_L1_error) + __PYX_ERR(1, 556, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -25323,15 +25326,15 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___inject_attr __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, 552, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 556, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 552, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 556, __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, 552, __pyx_L1_error) + __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 556, __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; @@ -25339,7 +25342,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___inject_attr __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, 552, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(1, 556, __pyx_L1_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L6_unpacking_done; @@ -25347,7 +25350,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___inject_attr __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(1, 552, __pyx_L1_error) + __PYX_ERR(1, 556, __pyx_L1_error) __pyx_L6_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_5); @@ -25355,16 +25358,16 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___inject_attr __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_6); __pyx_t_6 = 0; - /* "providers.pxd":553 + /* "providers.pxd":557 * cdef inline void __inject_attributes(object instance, dict attributes): * for name, value in attributes.items(): * setattr(instance, name, value) # <<<<<<<<<<<<<< * * */ - __pyx_t_9 = PyObject_SetAttr(__pyx_v_instance, __pyx_v_name, __pyx_v_value); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 553, __pyx_L1_error) + __pyx_t_9 = PyObject_SetAttr(__pyx_v_instance, __pyx_v_name, __pyx_v_value); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 557, __pyx_L1_error) - /* "providers.pxd":552 + /* "providers.pxd":556 * * cdef inline void __inject_attributes(object instance, dict attributes): * for name, value in attributes.items(): # <<<<<<<<<<<<<< @@ -25374,7 +25377,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___inject_attr } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "providers.pxd":551 + /* "providers.pxd":555 * * * cdef inline void __inject_attributes(object instance, dict attributes): # <<<<<<<<<<<<<< @@ -25397,7 +25400,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___inject_attr __Pyx_RefNannyFinishContext(); } -/* "providers.pxd":556 +/* "providers.pxd":560 * * * cdef inline object __call( # <<<<<<<<<<<<<< @@ -25431,31 +25434,31 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___call(P int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__call", 0); - /* "providers.pxd":566 + /* "providers.pxd":570 * int async_mode, * ): * cdef object args = __provide_positional_args( # <<<<<<<<<<<<<< * context_args, * injection_args, */ - __pyx_t_1 = __pyx_f_19dependency_injector_9providers___provide_positional_args(__pyx_v_context_args, __pyx_v_injection_args, __pyx_v_injection_args_len, __pyx_v_async_mode); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 566, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers___provide_positional_args(__pyx_v_context_args, __pyx_v_injection_args, __pyx_v_injection_args_len, __pyx_v_async_mode); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 570, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_args = __pyx_t_1; __pyx_t_1 = 0; - /* "providers.pxd":572 + /* "providers.pxd":576 * async_mode, * ) * cdef object kwargs = __provide_keyword_args( # <<<<<<<<<<<<<< * context_kwargs, * injection_kwargs, */ - __pyx_t_1 = __pyx_f_19dependency_injector_9providers___provide_keyword_args(__pyx_v_context_kwargs, __pyx_v_injection_kwargs, __pyx_v_injection_kwargs_len, __pyx_v_async_mode); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 572, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers___provide_keyword_args(__pyx_v_context_kwargs, __pyx_v_injection_kwargs, __pyx_v_injection_kwargs_len, __pyx_v_async_mode); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 576, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_kwargs = __pyx_t_1; __pyx_t_1 = 0; - /* "providers.pxd":579 + /* "providers.pxd":583 * ) * * if async_mode == ASYNC_MODE_DISABLED: # <<<<<<<<<<<<<< @@ -25465,7 +25468,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___call(P __pyx_t_2 = ((__pyx_v_async_mode == __pyx_v_19dependency_injector_9providers_ASYNC_MODE_DISABLED) != 0); if (__pyx_t_2) { - /* "providers.pxd":580 + /* "providers.pxd":584 * * if async_mode == ASYNC_MODE_DISABLED: * return call(*args, **kwargs) # <<<<<<<<<<<<<< @@ -25473,20 +25476,20 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___call(P * cdef bint is_future_args = __is_future_or_coroutine(args) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PySequence_Tuple(__pyx_v_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 580, __pyx_L1_error) + __pyx_t_1 = __Pyx_PySequence_Tuple(__pyx_v_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 584, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(__pyx_v_kwargs == Py_None)) { PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); - __PYX_ERR(1, 580, __pyx_L1_error) + __PYX_ERR(1, 584, __pyx_L1_error) } if (likely(PyDict_CheckExact(__pyx_v_kwargs))) { - __pyx_t_3 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 580, __pyx_L1_error) + __pyx_t_3 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 584, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } else { - __pyx_t_3 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_v_kwargs, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 580, __pyx_L1_error) + __pyx_t_3 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_v_kwargs, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 584, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_v_call, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 580, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_v_call, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 584, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -25494,7 +25497,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___call(P __pyx_t_4 = 0; goto __pyx_L0; - /* "providers.pxd":579 + /* "providers.pxd":583 * ) * * if async_mode == ASYNC_MODE_DISABLED: # <<<<<<<<<<<<<< @@ -25503,7 +25506,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___call(P */ } - /* "providers.pxd":582 + /* "providers.pxd":586 * return call(*args, **kwargs) * * cdef bint is_future_args = __is_future_or_coroutine(args) # <<<<<<<<<<<<<< @@ -25512,7 +25515,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___call(P */ __pyx_v_is_future_args = __pyx_f_19dependency_injector_9providers___is_future_or_coroutine(__pyx_v_args); - /* "providers.pxd":583 + /* "providers.pxd":587 * * cdef bint is_future_args = __is_future_or_coroutine(args) * cdef bint is_future_kwargs = __is_future_or_coroutine(kwargs) # <<<<<<<<<<<<<< @@ -25521,7 +25524,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___call(P */ __pyx_v_is_future_kwargs = __pyx_f_19dependency_injector_9providers___is_future_or_coroutine(__pyx_v_kwargs); - /* "providers.pxd":585 + /* "providers.pxd":589 * cdef bint is_future_kwargs = __is_future_or_coroutine(kwargs) * * if is_future_args or is_future_kwargs: # <<<<<<<<<<<<<< @@ -25539,7 +25542,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___call(P __pyx_L5_bool_binop_done:; if (__pyx_t_2) { - /* "providers.pxd":586 + /* "providers.pxd":590 * * if is_future_args or is_future_kwargs: * future_args = args if is_future_args else __future_result(args) # <<<<<<<<<<<<<< @@ -25550,7 +25553,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___call(P __Pyx_INCREF(__pyx_v_args); __pyx_t_4 = __pyx_v_args; } else { - __pyx_t_3 = __pyx_f_19dependency_injector_9providers___future_result(__pyx_v_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 586, __pyx_L1_error) + __pyx_t_3 = __pyx_f_19dependency_injector_9providers___future_result(__pyx_v_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 590, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __pyx_t_3; __pyx_t_3 = 0; @@ -25558,7 +25561,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___call(P __pyx_v_future_args = __pyx_t_4; __pyx_t_4 = 0; - /* "providers.pxd":587 + /* "providers.pxd":591 * if is_future_args or is_future_kwargs: * future_args = args if is_future_args else __future_result(args) * future_kwargs = kwargs if is_future_kwargs else __future_result(kwargs) # <<<<<<<<<<<<<< @@ -25569,7 +25572,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___call(P __Pyx_INCREF(__pyx_v_kwargs); __pyx_t_4 = __pyx_v_kwargs; } else { - __pyx_t_3 = __pyx_f_19dependency_injector_9providers___future_result(__pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 587, __pyx_L1_error) + __pyx_t_3 = __pyx_f_19dependency_injector_9providers___future_result(__pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 591, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __pyx_t_3; __pyx_t_3 = 0; @@ -25577,16 +25580,16 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___call(P __pyx_v_future_kwargs = __pyx_t_4; __pyx_t_4 = 0; - /* "providers.pxd":589 + /* "providers.pxd":593 * future_kwargs = kwargs if is_future_kwargs else __future_result(kwargs) * * future_result = asyncio.Future() # <<<<<<<<<<<<<< * * args_kwargs_ready = asyncio.gather(future_args, future_kwargs) */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 589, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 593, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_Future); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 589, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_Future); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 593, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -25601,22 +25604,22 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___call(P } __pyx_t_4 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 589, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 593, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_future_result = __pyx_t_4; __pyx_t_4 = 0; - /* "providers.pxd":591 + /* "providers.pxd":595 * future_result = asyncio.Future() * * args_kwargs_ready = asyncio.gather(future_args, future_kwargs) # <<<<<<<<<<<<<< * args_kwargs_ready.add_done_callback( * functools.partial( */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 591, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 595, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_gather); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 591, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_gather); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 595, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = NULL; @@ -25634,7 +25637,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___call(P #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_future_args, __pyx_v_future_kwargs}; - __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 591, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 595, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_4); } else @@ -25642,13 +25645,13 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___call(P #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_future_args, __pyx_v_future_kwargs}; - __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 591, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 595, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_4); } else #endif { - __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 591, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 595, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_1) { __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1); __pyx_t_1 = NULL; @@ -25659,7 +25662,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___call(P __Pyx_INCREF(__pyx_v_future_kwargs); __Pyx_GIVEREF(__pyx_v_future_kwargs); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_future_kwargs); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 591, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 595, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } @@ -25667,40 +25670,40 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___call(P __pyx_v_args_kwargs_ready = __pyx_t_4; __pyx_t_4 = 0; - /* "providers.pxd":592 + /* "providers.pxd":596 * * args_kwargs_ready = asyncio.gather(future_args, future_kwargs) * args_kwargs_ready.add_done_callback( # <<<<<<<<<<<<<< * functools.partial( * __async_call_callback, */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_args_kwargs_ready, __pyx_n_s_add_done_callback); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 592, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_args_kwargs_ready, __pyx_n_s_add_done_callback); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 596, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - /* "providers.pxd":593 + /* "providers.pxd":597 * args_kwargs_ready = asyncio.gather(future_args, future_kwargs) * args_kwargs_ready.add_done_callback( * functools.partial( # <<<<<<<<<<<<<< * __async_call_callback, * future_result, */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_functools); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 593, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_functools); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 597, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_partial); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 593, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_partial); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 597, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "providers.pxd":594 + /* "providers.pxd":598 * args_kwargs_ready.add_done_callback( * functools.partial( * __async_call_callback, # <<<<<<<<<<<<<< * future_result, * call, */ - __pyx_t_1 = __Pyx_CFunc_void____object____object____object___to_py(__pyx_f_19dependency_injector_9providers___async_call_callback); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 594, __pyx_L1_error) + __pyx_t_1 = __Pyx_CFunc_void____object____object____object___to_py(__pyx_f_19dependency_injector_9providers___async_call_callback); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 598, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - /* "providers.pxd":596 + /* "providers.pxd":600 * __async_call_callback, * future_result, * call, # <<<<<<<<<<<<<< @@ -25722,7 +25725,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___call(P #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[4] = {__pyx_t_9, __pyx_t_1, __pyx_v_future_result, __pyx_v_call}; - __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 593, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 597, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -25731,14 +25734,14 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___call(P #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[4] = {__pyx_t_9, __pyx_t_1, __pyx_v_future_result, __pyx_v_call}; - __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 593, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 597, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else #endif { - __pyx_t_10 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 593, __pyx_L1_error) + __pyx_t_10 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 597, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); if (__pyx_t_9) { __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __pyx_t_9 = NULL; @@ -25752,7 +25755,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___call(P __Pyx_GIVEREF(__pyx_v_call); PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_6, __pyx_v_call); __pyx_t_1 = 0; - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_10, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 593, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_10, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 597, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } @@ -25770,21 +25773,21 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___call(P __pyx_t_4 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 592, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 596, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "providers.pxd":599 + /* "providers.pxd":603 * ), * ) * asyncio.ensure_future(args_kwargs_ready) # <<<<<<<<<<<<<< * * return future_result */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 599, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 603, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_ensure_future); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 599, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_ensure_future); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 603, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -25799,12 +25802,12 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___call(P } __pyx_t_4 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_3, __pyx_v_args_kwargs_ready) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_args_kwargs_ready); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 599, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 603, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "providers.pxd":601 + /* "providers.pxd":605 * asyncio.ensure_future(args_kwargs_ready) * * return future_result # <<<<<<<<<<<<<< @@ -25816,7 +25819,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___call(P __pyx_r = __pyx_v_future_result; goto __pyx_L0; - /* "providers.pxd":585 + /* "providers.pxd":589 * cdef bint is_future_kwargs = __is_future_or_coroutine(kwargs) * * if is_future_args or is_future_kwargs: # <<<<<<<<<<<<<< @@ -25825,7 +25828,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___call(P */ } - /* "providers.pxd":603 + /* "providers.pxd":607 * return future_result * * return call(*args, **kwargs) # <<<<<<<<<<<<<< @@ -25833,20 +25836,20 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___call(P * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_v_args); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 603, __pyx_L1_error) + __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_v_args); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 607, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (unlikely(__pyx_v_kwargs == Py_None)) { PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); - __PYX_ERR(1, 603, __pyx_L1_error) + __PYX_ERR(1, 607, __pyx_L1_error) } if (likely(PyDict_CheckExact(__pyx_v_kwargs))) { - __pyx_t_7 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 603, __pyx_L1_error) + __pyx_t_7 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 607, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } else { - __pyx_t_7 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_v_kwargs, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 603, __pyx_L1_error) + __pyx_t_7 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_v_kwargs, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 607, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_v_call, __pyx_t_4, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 603, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_v_call, __pyx_t_4, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 607, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -25854,7 +25857,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___call(P __pyx_t_3 = 0; goto __pyx_L0; - /* "providers.pxd":556 + /* "providers.pxd":560 * * * cdef inline object __call( # <<<<<<<<<<<<<< @@ -25885,7 +25888,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___call(P return __pyx_r; } -/* "providers.pxd":606 +/* "providers.pxd":610 * * * cdef inline void __async_call_callback(object future_result, object call, object future): # <<<<<<<<<<<<<< @@ -25917,7 +25920,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_call_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__async_call_callback", 0); - /* "providers.pxd":607 + /* "providers.pxd":611 * * cdef inline void __async_call_callback(object future_result, object call, object future): * try: # <<<<<<<<<<<<<< @@ -25933,14 +25936,14 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_call_ __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "providers.pxd":608 + /* "providers.pxd":612 * cdef inline void __async_call_callback(object future_result, object call, object future): * try: * args, kwargs = future.result() # <<<<<<<<<<<<<< * result = call(*args, **kwargs) * except Exception as exception: */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_future, __pyx_n_s_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 608, __pyx_L3_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_future, __pyx_n_s_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 612, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -25954,7 +25957,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_call_ } __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 608, __pyx_L3_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 612, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) { @@ -25963,7 +25966,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_call_ if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(1, 608, __pyx_L3_error) + __PYX_ERR(1, 612, __pyx_L3_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -25976,15 +25979,15 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_call_ __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, 608, __pyx_L3_error) + __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 612, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 608, __pyx_L3_error) + __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 612, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { Py_ssize_t index = -1; - __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 608, __pyx_L3_error) + __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 612, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext; @@ -25992,7 +25995,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_call_ __Pyx_GOTREF(__pyx_t_5); index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L9_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(1, 608, __pyx_L3_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(1, 612, __pyx_L3_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L10_unpacking_done; @@ -26000,7 +26003,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_call_ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(1, 608, __pyx_L3_error) + __PYX_ERR(1, 612, __pyx_L3_error) __pyx_L10_unpacking_done:; } __pyx_v_args = __pyx_t_5; @@ -26008,34 +26011,34 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_call_ __pyx_v_kwargs = __pyx_t_6; __pyx_t_6 = 0; - /* "providers.pxd":609 + /* "providers.pxd":613 * try: * args, kwargs = future.result() * result = call(*args, **kwargs) # <<<<<<<<<<<<<< * except Exception as exception: * future_result.set_exception(exception) */ - __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_v_args); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 609, __pyx_L3_error) + __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_v_args); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 613, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); if (unlikely(__pyx_v_kwargs == Py_None)) { PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); - __PYX_ERR(1, 609, __pyx_L3_error) + __PYX_ERR(1, 613, __pyx_L3_error) } if (likely(PyDict_CheckExact(__pyx_v_kwargs))) { - __pyx_t_6 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 609, __pyx_L3_error) + __pyx_t_6 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 613, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_6); } else { - __pyx_t_6 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_v_kwargs, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 609, __pyx_L3_error) + __pyx_t_6 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_v_kwargs, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 613, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_6); } - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_v_call, __pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 609, __pyx_L3_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_v_call, __pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 613, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_result = __pyx_t_5; __pyx_t_5 = 0; - /* "providers.pxd":607 + /* "providers.pxd":611 * * cdef inline void __async_call_callback(object future_result, object call, object future): * try: # <<<<<<<<<<<<<< @@ -26044,7 +26047,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_call_ */ } - /* "providers.pxd":613 + /* "providers.pxd":617 * future_result.set_exception(exception) * else: * if __is_future_or_coroutine(result): # <<<<<<<<<<<<<< @@ -26055,16 +26058,16 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_call_ __pyx_t_9 = (__pyx_f_19dependency_injector_9providers___is_future_or_coroutine(__pyx_v_result) != 0); if (__pyx_t_9) { - /* "providers.pxd":614 + /* "providers.pxd":618 * else: * if __is_future_or_coroutine(result): * result = asyncio.ensure_future(result) # <<<<<<<<<<<<<< * result.add_done_callback(functools.partial(__async_result_callback, future_result)) * return */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 614, __pyx_L5_except_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 618, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_ensure_future); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 614, __pyx_L5_except_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_ensure_future); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 618, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; @@ -26079,27 +26082,27 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_call_ } __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_v_result) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_result); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 614, __pyx_L5_except_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 618, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_5); __pyx_t_5 = 0; - /* "providers.pxd":615 + /* "providers.pxd":619 * if __is_future_or_coroutine(result): * result = asyncio.ensure_future(result) * result.add_done_callback(functools.partial(__async_result_callback, future_result)) # <<<<<<<<<<<<<< * return * future_result.set_result(result) */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s_add_done_callback); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 615, __pyx_L5_except_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s_add_done_callback); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 619, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_functools); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 615, __pyx_L5_except_error) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_functools); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 619, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_partial); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 615, __pyx_L5_except_error) + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_partial); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 619, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_CFunc_object____object____object___to_py(__pyx_f_19dependency_injector_9providers___async_result_callback); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 615, __pyx_L5_except_error) + __pyx_t_7 = __Pyx_CFunc_object____object____object___to_py(__pyx_f_19dependency_injector_9providers___async_result_callback); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 619, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_11 = NULL; __pyx_t_12 = 0; @@ -26116,7 +26119,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_call_ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_10)) { PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_t_7, __pyx_v_future_result}; - __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 615, __pyx_L5_except_error) + __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 619, __pyx_L5_except_error) __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -26125,14 +26128,14 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_call_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) { PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_t_7, __pyx_v_future_result}; - __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 615, __pyx_L5_except_error) + __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 619, __pyx_L5_except_error) __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif { - __pyx_t_13 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 615, __pyx_L5_except_error) + __pyx_t_13 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 619, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_13); if (__pyx_t_11) { __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_11); __pyx_t_11 = NULL; @@ -26143,7 +26146,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_call_ __Pyx_GIVEREF(__pyx_v_future_result); PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_12, __pyx_v_future_result); __pyx_t_7 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_13, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 615, __pyx_L5_except_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_13, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 619, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } @@ -26161,12 +26164,12 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_call_ __pyx_t_5 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_10, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 615, __pyx_L5_except_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 619, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "providers.pxd":616 + /* "providers.pxd":620 * result = asyncio.ensure_future(result) * result.add_done_callback(functools.partial(__async_result_callback, future_result)) * return # <<<<<<<<<<<<<< @@ -26175,7 +26178,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_call_ */ goto __pyx_L6_except_return; - /* "providers.pxd":613 + /* "providers.pxd":617 * future_result.set_exception(exception) * else: * if __is_future_or_coroutine(result): # <<<<<<<<<<<<<< @@ -26184,14 +26187,14 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_call_ */ } - /* "providers.pxd":617 + /* "providers.pxd":621 * result.add_done_callback(functools.partial(__async_result_callback, future_result)) * return * future_result.set_result(result) # <<<<<<<<<<<<<< * * */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_future_result, __pyx_n_s_set_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 617, __pyx_L5_except_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_future_result, __pyx_n_s_set_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 621, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -26205,7 +26208,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_call_ } __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_v_result) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_result); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 617, __pyx_L5_except_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 621, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -26220,7 +26223,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_call_ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "providers.pxd":610 + /* "providers.pxd":614 * args, kwargs = future.result() * result = call(*args, **kwargs) * except Exception as exception: # <<<<<<<<<<<<<< @@ -26230,21 +26233,21 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_call_ __pyx_t_12 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); if (__pyx_t_12) { __Pyx_AddTraceback("dependency_injector.providers.__async_call_callback", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_6) < 0) __PYX_ERR(1, 610, __pyx_L5_except_error) + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_6) < 0) __PYX_ERR(1, 614, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_v_exception = __pyx_t_4; - /* "providers.pxd":611 + /* "providers.pxd":615 * result = call(*args, **kwargs) * except Exception as exception: * future_result.set_exception(exception) # <<<<<<<<<<<<<< * else: * if __is_future_or_coroutine(result): */ - __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_future_result, __pyx_n_s_set_exception); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 611, __pyx_L5_except_error) + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_future_result, __pyx_n_s_set_exception); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 615, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_13))) { @@ -26258,7 +26261,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_call_ } __pyx_t_10 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_13, __pyx_t_7, __pyx_v_exception) : __Pyx_PyObject_CallOneArg(__pyx_t_13, __pyx_v_exception); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 611, __pyx_L5_except_error) + if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 615, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; @@ -26270,7 +26273,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_call_ goto __pyx_L5_except_error; __pyx_L5_except_error:; - /* "providers.pxd":607 + /* "providers.pxd":611 * * cdef inline void __async_call_callback(object future_result, object call, object future): * try: # <<<<<<<<<<<<<< @@ -26296,7 +26299,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_call_ __pyx_L8_try_end:; } - /* "providers.pxd":606 + /* "providers.pxd":610 * * * cdef inline void __async_call_callback(object future_result, object call, object future): # <<<<<<<<<<<<<< @@ -26323,7 +26326,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_call_ __Pyx_RefNannyFinishContext(); } -/* "providers.pxd":620 +/* "providers.pxd":624 * * * cdef inline object __async_result_callback(object future_result, object future): # <<<<<<<<<<<<<< @@ -26351,7 +26354,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___async_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__async_result_callback", 0); - /* "providers.pxd":621 + /* "providers.pxd":625 * * cdef inline object __async_result_callback(object future_result, object future): * try: # <<<<<<<<<<<<<< @@ -26367,14 +26370,14 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___async_ __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "providers.pxd":622 + /* "providers.pxd":626 * cdef inline object __async_result_callback(object future_result, object future): * try: * result = future.result() # <<<<<<<<<<<<<< * except Exception as exception: * future_result.set_exception(exception) */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_future, __pyx_n_s_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 622, __pyx_L3_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_future, __pyx_n_s_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 626, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -26388,13 +26391,13 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___async_ } __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 622, __pyx_L3_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 626, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_result = __pyx_t_4; __pyx_t_4 = 0; - /* "providers.pxd":621 + /* "providers.pxd":625 * * cdef inline object __async_result_callback(object future_result, object future): * try: # <<<<<<<<<<<<<< @@ -26403,7 +26406,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___async_ */ } - /* "providers.pxd":626 + /* "providers.pxd":630 * future_result.set_exception(exception) * else: * future_result.set_result(result) # <<<<<<<<<<<<<< @@ -26411,7 +26414,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___async_ * */ /*else:*/ { - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_future_result, __pyx_n_s_set_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 626, __pyx_L5_except_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_future_result, __pyx_n_s_set_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 630, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -26425,7 +26428,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___async_ } __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_v_result) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_result); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 626, __pyx_L5_except_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 630, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -26439,7 +26442,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___async_ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "providers.pxd":623 + /* "providers.pxd":627 * try: * result = future.result() * except Exception as exception: # <<<<<<<<<<<<<< @@ -26449,21 +26452,21 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___async_ __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); if (__pyx_t_7) { __Pyx_AddTraceback("dependency_injector.providers.__async_result_callback", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6) < 0) __PYX_ERR(1, 623, __pyx_L5_except_error) + if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6) < 0) __PYX_ERR(1, 627, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_v_exception = __pyx_t_5; - /* "providers.pxd":624 + /* "providers.pxd":628 * result = future.result() * except Exception as exception: * future_result.set_exception(exception) # <<<<<<<<<<<<<< * else: * future_result.set_result(result) */ - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_future_result, __pyx_n_s_set_exception); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 624, __pyx_L5_except_error) + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_future_result, __pyx_n_s_set_exception); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 628, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { @@ -26477,7 +26480,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___async_ } __pyx_t_8 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_10, __pyx_v_exception) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_exception); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 624, __pyx_L5_except_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 628, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -26489,7 +26492,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___async_ goto __pyx_L5_except_error; __pyx_L5_except_error:; - /* "providers.pxd":621 + /* "providers.pxd":625 * * cdef inline object __async_result_callback(object future_result, object future): * try: # <<<<<<<<<<<<<< @@ -26509,7 +26512,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___async_ __pyx_L8_try_end:; } - /* "providers.pxd":620 + /* "providers.pxd":624 * * * cdef inline object __async_result_callback(object future_result, object future): # <<<<<<<<<<<<<< @@ -26537,7 +26540,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___async_ return __pyx_r; } -/* "providers.pxd":629 +/* "providers.pxd":633 * * * cdef inline object __callable_call(Callable self, tuple args, dict kwargs, ): # <<<<<<<<<<<<<< @@ -26557,7 +26560,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___callab int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__callable_call", 0); - /* "providers.pxd":630 + /* "providers.pxd":634 * * cdef inline object __callable_call(Callable self, tuple args, dict kwargs, ): * return __call( # <<<<<<<<<<<<<< @@ -26566,7 +26569,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___callab */ __Pyx_XDECREF(__pyx_r); - /* "providers.pxd":631 + /* "providers.pxd":635 * cdef inline object __callable_call(Callable self, tuple args, dict kwargs, ): * return __call( * self.__provides, # <<<<<<<<<<<<<< @@ -26576,7 +26579,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___callab __pyx_t_1 = __pyx_v_self->__pyx___provides; __Pyx_INCREF(__pyx_t_1); - /* "providers.pxd":633 + /* "providers.pxd":637 * self.__provides, * args, * self.__args, # <<<<<<<<<<<<<< @@ -26586,7 +26589,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___callab __pyx_t_2 = __pyx_v_self->__pyx___args; __Pyx_INCREF(__pyx_t_2); - /* "providers.pxd":636 + /* "providers.pxd":640 * self.__args_len, * kwargs, * self.__kwargs, # <<<<<<<<<<<<<< @@ -26596,14 +26599,14 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___callab __pyx_t_3 = __pyx_v_self->__pyx___kwargs; __Pyx_INCREF(__pyx_t_3); - /* "providers.pxd":630 + /* "providers.pxd":634 * * cdef inline object __callable_call(Callable self, tuple args, dict kwargs, ): * return __call( # <<<<<<<<<<<<<< * self.__provides, * args, */ - __pyx_t_4 = __pyx_f_19dependency_injector_9providers___call(__pyx_t_1, __pyx_v_args, ((PyObject*)__pyx_t_2), __pyx_v_self->__pyx___args_len, __pyx_v_kwargs, ((PyObject*)__pyx_t_3), __pyx_v_self->__pyx___kwargs_len, __pyx_v_self->__pyx_base.__pyx___async_mode); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 630, __pyx_L1_error) + __pyx_t_4 = __pyx_f_19dependency_injector_9providers___call(__pyx_t_1, __pyx_v_args, ((PyObject*)__pyx_t_2), __pyx_v_self->__pyx___args_len, __pyx_v_kwargs, ((PyObject*)__pyx_t_3), __pyx_v_self->__pyx___kwargs_len, __pyx_v_self->__pyx_base.__pyx___async_mode); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 634, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -26612,7 +26615,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___callab __pyx_t_4 = 0; goto __pyx_L0; - /* "providers.pxd":629 + /* "providers.pxd":633 * * * cdef inline object __callable_call(Callable self, tuple args, dict kwargs, ): # <<<<<<<<<<<<<< @@ -26634,7 +26637,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___callab return __pyx_r; } -/* "providers.pxd":642 +/* "providers.pxd":646 * * * cdef inline object __factory_call(Factory self, tuple args, dict kwargs): # <<<<<<<<<<<<<< @@ -26662,7 +26665,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___factor int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__factory_call", 0); - /* "providers.pxd":646 + /* "providers.pxd":650 * * instance = __call( * self.__instantiator.__provides, # <<<<<<<<<<<<<< @@ -26672,7 +26675,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___factor __pyx_t_1 = __pyx_v_self->__pyx___instantiator->__pyx___provides; __Pyx_INCREF(__pyx_t_1); - /* "providers.pxd":648 + /* "providers.pxd":652 * self.__instantiator.__provides, * args, * self.__instantiator.__args, # <<<<<<<<<<<<<< @@ -26682,7 +26685,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___factor __pyx_t_2 = __pyx_v_self->__pyx___instantiator->__pyx___args; __Pyx_INCREF(__pyx_t_2); - /* "providers.pxd":651 + /* "providers.pxd":655 * self.__instantiator.__args_len, * kwargs, * self.__instantiator.__kwargs, # <<<<<<<<<<<<<< @@ -26692,14 +26695,14 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___factor __pyx_t_3 = __pyx_v_self->__pyx___instantiator->__pyx___kwargs; __Pyx_INCREF(__pyx_t_3); - /* "providers.pxd":645 + /* "providers.pxd":649 * cdef object instance * * instance = __call( # <<<<<<<<<<<<<< * self.__instantiator.__provides, * args, */ - __pyx_t_4 = __pyx_f_19dependency_injector_9providers___call(__pyx_t_1, __pyx_v_args, ((PyObject*)__pyx_t_2), __pyx_v_self->__pyx___instantiator->__pyx___args_len, __pyx_v_kwargs, ((PyObject*)__pyx_t_3), __pyx_v_self->__pyx___instantiator->__pyx___kwargs_len, __pyx_v_self->__pyx_base.__pyx___async_mode); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 645, __pyx_L1_error) + __pyx_t_4 = __pyx_f_19dependency_injector_9providers___call(__pyx_t_1, __pyx_v_args, ((PyObject*)__pyx_t_2), __pyx_v_self->__pyx___instantiator->__pyx___args_len, __pyx_v_kwargs, ((PyObject*)__pyx_t_3), __pyx_v_self->__pyx___instantiator->__pyx___kwargs_len, __pyx_v_self->__pyx_base.__pyx___async_mode); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 649, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -26707,7 +26710,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___factor __pyx_v_instance = __pyx_t_4; __pyx_t_4 = 0; - /* "providers.pxd":656 + /* "providers.pxd":660 * ) * * if self.__attributes_len > 0: # <<<<<<<<<<<<<< @@ -26717,7 +26720,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___factor __pyx_t_5 = ((__pyx_v_self->__pyx___attributes_len > 0) != 0); if (__pyx_t_5) { - /* "providers.pxd":657 + /* "providers.pxd":661 * * if self.__attributes_len > 0: * attributes = __provide_attributes(self.__attributes, self.__attributes_len) # <<<<<<<<<<<<<< @@ -26726,13 +26729,13 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___factor */ __pyx_t_4 = __pyx_v_self->__pyx___attributes; __Pyx_INCREF(__pyx_t_4); - __pyx_t_3 = __pyx_f_19dependency_injector_9providers___provide_attributes(((PyObject*)__pyx_t_4), __pyx_v_self->__pyx___attributes_len); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 657, __pyx_L1_error) + __pyx_t_3 = __pyx_f_19dependency_injector_9providers___provide_attributes(((PyObject*)__pyx_t_4), __pyx_v_self->__pyx___attributes_len); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 661, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_attributes = __pyx_t_3; __pyx_t_3 = 0; - /* "providers.pxd":659 + /* "providers.pxd":663 * attributes = __provide_attributes(self.__attributes, self.__attributes_len) * * is_future_instance = __is_future_or_coroutine(instance) # <<<<<<<<<<<<<< @@ -26741,7 +26744,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___factor */ __pyx_v_is_future_instance = __pyx_f_19dependency_injector_9providers___is_future_or_coroutine(__pyx_v_instance); - /* "providers.pxd":660 + /* "providers.pxd":664 * * is_future_instance = __is_future_or_coroutine(instance) * is_future_attributes = __is_future_or_coroutine(attributes) # <<<<<<<<<<<<<< @@ -26750,7 +26753,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___factor */ __pyx_v_is_future_attributes = __pyx_f_19dependency_injector_9providers___is_future_or_coroutine(__pyx_v_attributes); - /* "providers.pxd":662 + /* "providers.pxd":666 * is_future_attributes = __is_future_or_coroutine(attributes) * * if is_future_instance or is_future_attributes: # <<<<<<<<<<<<<< @@ -26768,7 +26771,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___factor __pyx_L5_bool_binop_done:; if (__pyx_t_5) { - /* "providers.pxd":663 + /* "providers.pxd":667 * * if is_future_instance or is_future_attributes: * future_instance = instance if is_future_instance else __future_result(instance) # <<<<<<<<<<<<<< @@ -26779,7 +26782,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___factor __Pyx_INCREF(__pyx_v_instance); __pyx_t_3 = __pyx_v_instance; } else { - __pyx_t_4 = __pyx_f_19dependency_injector_9providers___future_result(__pyx_v_instance); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 663, __pyx_L1_error) + __pyx_t_4 = __pyx_f_19dependency_injector_9providers___future_result(__pyx_v_instance); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 667, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __pyx_t_4; __pyx_t_4 = 0; @@ -26787,7 +26790,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___factor __pyx_v_future_instance = __pyx_t_3; __pyx_t_3 = 0; - /* "providers.pxd":664 + /* "providers.pxd":668 * if is_future_instance or is_future_attributes: * future_instance = instance if is_future_instance else __future_result(instance) * future_attributes = attributes if is_future_attributes else __future_result(attributes) # <<<<<<<<<<<<<< @@ -26798,7 +26801,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___factor __Pyx_INCREF(__pyx_v_attributes); __pyx_t_3 = __pyx_v_attributes; } else { - __pyx_t_4 = __pyx_f_19dependency_injector_9providers___future_result(__pyx_v_attributes); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 664, __pyx_L1_error) + __pyx_t_4 = __pyx_f_19dependency_injector_9providers___future_result(__pyx_v_attributes); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 668, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __pyx_t_4; __pyx_t_4 = 0; @@ -26806,7 +26809,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___factor __pyx_v_future_attributes = __pyx_t_3; __pyx_t_3 = 0; - /* "providers.pxd":665 + /* "providers.pxd":669 * future_instance = instance if is_future_instance else __future_result(instance) * future_attributes = attributes if is_future_attributes else __future_result(attributes) * return __async_inject_attributes(future_instance, future_attributes) # <<<<<<<<<<<<<< @@ -26814,13 +26817,13 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___factor * __inject_attributes(instance, attributes) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __pyx_f_19dependency_injector_9providers___async_inject_attributes(__pyx_v_future_instance, __pyx_v_future_attributes); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 665, __pyx_L1_error) + __pyx_t_3 = __pyx_f_19dependency_injector_9providers___async_inject_attributes(__pyx_v_future_instance, __pyx_v_future_attributes); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 669, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "providers.pxd":662 + /* "providers.pxd":666 * is_future_attributes = __is_future_or_coroutine(attributes) * * if is_future_instance or is_future_attributes: # <<<<<<<<<<<<<< @@ -26829,17 +26832,17 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___factor */ } - /* "providers.pxd":667 + /* "providers.pxd":671 * return __async_inject_attributes(future_instance, future_attributes) * * __inject_attributes(instance, attributes) # <<<<<<<<<<<<<< * * return instance */ - if (!(likely(PyDict_CheckExact(__pyx_v_attributes))||((__pyx_v_attributes) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_attributes)->tp_name), 0))) __PYX_ERR(1, 667, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_v_attributes))||((__pyx_v_attributes) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_attributes)->tp_name), 0))) __PYX_ERR(1, 671, __pyx_L1_error) __pyx_f_19dependency_injector_9providers___inject_attributes(__pyx_v_instance, ((PyObject*)__pyx_v_attributes)); - /* "providers.pxd":656 + /* "providers.pxd":660 * ) * * if self.__attributes_len > 0: # <<<<<<<<<<<<<< @@ -26848,7 +26851,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___factor */ } - /* "providers.pxd":669 + /* "providers.pxd":673 * __inject_attributes(instance, attributes) * * return instance # <<<<<<<<<<<<<< @@ -26860,7 +26863,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___factor __pyx_r = __pyx_v_instance; goto __pyx_L0; - /* "providers.pxd":642 + /* "providers.pxd":646 * * * cdef inline object __factory_call(Factory self, tuple args, dict kwargs): # <<<<<<<<<<<<<< @@ -26886,7 +26889,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___factor return __pyx_r; } -/* "providers.pxd":672 +/* "providers.pxd":676 * * * cdef inline bint __is_future_or_coroutine(object instance): # <<<<<<<<<<<<<< @@ -26901,7 +26904,7 @@ static CYTHON_INLINE int __pyx_f_19dependency_injector_9providers___is_future_or int __pyx_t_2; __Pyx_RefNannySetupContext("__is_future_or_coroutine", 0); - /* "providers.pxd":673 + /* "providers.pxd":677 * * cdef inline bint __is_future_or_coroutine(object instance): * return __isfuture(instance) or __iscoroutine(instance) # <<<<<<<<<<<<<< @@ -26920,7 +26923,7 @@ static CYTHON_INLINE int __pyx_f_19dependency_injector_9providers___is_future_or __pyx_r = __pyx_t_1; goto __pyx_L0; - /* "providers.pxd":672 + /* "providers.pxd":676 * * * cdef inline bint __is_future_or_coroutine(object instance): # <<<<<<<<<<<<<< @@ -26934,7 +26937,7 @@ static CYTHON_INLINE int __pyx_f_19dependency_injector_9providers___is_future_or return __pyx_r; } -/* "providers.pxd":676 +/* "providers.pxd":680 * * * cdef inline bint __isfuture(object obj): # <<<<<<<<<<<<<< @@ -26954,16 +26957,16 @@ static CYTHON_INLINE int __pyx_f_19dependency_injector_9providers___isfuture(PyO int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__isfuture", 0); - /* "providers.pxd":677 + /* "providers.pxd":681 * * cdef inline bint __isfuture(object obj): * return hasattr(obj.__class__, "_asyncio_future_blocking") and obj._asyncio_future_blocking is not None # <<<<<<<<<<<<<< * * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 677, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 681, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_HasAttr(__pyx_t_2, __pyx_n_s_asyncio_future_blocking); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 677, __pyx_L1_error) + __pyx_t_3 = __Pyx_HasAttr(__pyx_t_2, __pyx_n_s_asyncio_future_blocking); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 681, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = (__pyx_t_3 != 0); if (__pyx_t_4) { @@ -26971,7 +26974,7 @@ static CYTHON_INLINE int __pyx_f_19dependency_injector_9providers___isfuture(PyO __pyx_t_1 = __pyx_t_4; goto __pyx_L3_bool_binop_done; } - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_asyncio_future_blocking); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 677, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_asyncio_future_blocking); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 681, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = (__pyx_t_2 != Py_None); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -26981,7 +26984,7 @@ static CYTHON_INLINE int __pyx_f_19dependency_injector_9providers___isfuture(PyO __pyx_r = __pyx_t_1; goto __pyx_L0; - /* "providers.pxd":676 + /* "providers.pxd":680 * * * cdef inline bint __isfuture(object obj): # <<<<<<<<<<<<<< @@ -26999,7 +27002,7 @@ static CYTHON_INLINE int __pyx_f_19dependency_injector_9providers___isfuture(PyO return __pyx_r; } -/* "providers.pxd":680 +/* "providers.pxd":684 * * * cdef inline bint __iscoroutine(object obj): # <<<<<<<<<<<<<< @@ -27020,7 +27023,7 @@ static CYTHON_INLINE int __pyx_f_19dependency_injector_9providers___iscoroutine( int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__iscoroutine", 0); - /* "providers.pxd":681 + /* "providers.pxd":685 * * cdef inline bint __iscoroutine(object obj): * if type(obj) in __iscoroutine_typecache: # <<<<<<<<<<<<<< @@ -27029,13 +27032,13 @@ static CYTHON_INLINE int __pyx_f_19dependency_injector_9providers___iscoroutine( */ if (unlikely(__pyx_v_19dependency_injector_9providers___iscoroutine_typecache == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(1, 681, __pyx_L1_error) + __PYX_ERR(1, 685, __pyx_L1_error) } - __pyx_t_1 = (__Pyx_PySet_ContainsTF(((PyObject *)Py_TYPE(__pyx_v_obj)), __pyx_v_19dependency_injector_9providers___iscoroutine_typecache, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 681, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PySet_ContainsTF(((PyObject *)Py_TYPE(__pyx_v_obj)), __pyx_v_19dependency_injector_9providers___iscoroutine_typecache, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 685, __pyx_L1_error) __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "providers.pxd":682 + /* "providers.pxd":686 * cdef inline bint __iscoroutine(object obj): * if type(obj) in __iscoroutine_typecache: * return True # <<<<<<<<<<<<<< @@ -27045,7 +27048,7 @@ static CYTHON_INLINE int __pyx_f_19dependency_injector_9providers___iscoroutine( __pyx_r = 1; goto __pyx_L0; - /* "providers.pxd":681 + /* "providers.pxd":685 * * cdef inline bint __iscoroutine(object obj): * if type(obj) in __iscoroutine_typecache: # <<<<<<<<<<<<<< @@ -27054,7 +27057,7 @@ static CYTHON_INLINE int __pyx_f_19dependency_injector_9providers___iscoroutine( */ } - /* "providers.pxd":684 + /* "providers.pxd":688 * return True * * if isinstance(obj, __COROUTINE_TYPES): # <<<<<<<<<<<<<< @@ -27063,12 +27066,12 @@ static CYTHON_INLINE int __pyx_f_19dependency_injector_9providers___iscoroutine( */ __pyx_t_3 = __pyx_v_19dependency_injector_9providers___COROUTINE_TYPES; __Pyx_INCREF(__pyx_t_3); - __pyx_t_2 = PyObject_IsInstance(__pyx_v_obj, __pyx_t_3); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 684, __pyx_L1_error) + __pyx_t_2 = PyObject_IsInstance(__pyx_v_obj, __pyx_t_3); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 688, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "providers.pxd":688 + /* "providers.pxd":692 * # positive types. That shouldn't ever happen, unless * # someone stressing the system on purpose. * if len(__iscoroutine_typecache) < 100: # <<<<<<<<<<<<<< @@ -27079,14 +27082,14 @@ static CYTHON_INLINE int __pyx_f_19dependency_injector_9providers___iscoroutine( __Pyx_INCREF(__pyx_t_3); if (unlikely(__pyx_t_3 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(1, 688, __pyx_L1_error) + __PYX_ERR(1, 692, __pyx_L1_error) } - __pyx_t_4 = PySet_GET_SIZE(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 688, __pyx_L1_error) + __pyx_t_4 = PySet_GET_SIZE(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 692, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = ((__pyx_t_4 < 0x64) != 0); if (__pyx_t_1) { - /* "providers.pxd":689 + /* "providers.pxd":693 * # someone stressing the system on purpose. * if len(__iscoroutine_typecache) < 100: * __iscoroutine_typecache.add(type(obj)) # <<<<<<<<<<<<<< @@ -27095,11 +27098,11 @@ static CYTHON_INLINE int __pyx_f_19dependency_injector_9providers___iscoroutine( */ if (unlikely(__pyx_v_19dependency_injector_9providers___iscoroutine_typecache == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "add"); - __PYX_ERR(1, 689, __pyx_L1_error) + __PYX_ERR(1, 693, __pyx_L1_error) } - __pyx_t_5 = PySet_Add(__pyx_v_19dependency_injector_9providers___iscoroutine_typecache, ((PyObject *)Py_TYPE(__pyx_v_obj))); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 689, __pyx_L1_error) + __pyx_t_5 = PySet_Add(__pyx_v_19dependency_injector_9providers___iscoroutine_typecache, ((PyObject *)Py_TYPE(__pyx_v_obj))); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 693, __pyx_L1_error) - /* "providers.pxd":688 + /* "providers.pxd":692 * # positive types. That shouldn't ever happen, unless * # someone stressing the system on purpose. * if len(__iscoroutine_typecache) < 100: # <<<<<<<<<<<<<< @@ -27108,7 +27111,7 @@ static CYTHON_INLINE int __pyx_f_19dependency_injector_9providers___iscoroutine( */ } - /* "providers.pxd":690 + /* "providers.pxd":694 * if len(__iscoroutine_typecache) < 100: * __iscoroutine_typecache.add(type(obj)) * return True # <<<<<<<<<<<<<< @@ -27118,7 +27121,7 @@ static CYTHON_INLINE int __pyx_f_19dependency_injector_9providers___iscoroutine( __pyx_r = 1; goto __pyx_L0; - /* "providers.pxd":684 + /* "providers.pxd":688 * return True * * if isinstance(obj, __COROUTINE_TYPES): # <<<<<<<<<<<<<< @@ -27127,7 +27130,7 @@ static CYTHON_INLINE int __pyx_f_19dependency_injector_9providers___iscoroutine( */ } - /* "providers.pxd":692 + /* "providers.pxd":696 * return True * else: * return False # <<<<<<<<<<<<<< @@ -27139,7 +27142,7 @@ static CYTHON_INLINE int __pyx_f_19dependency_injector_9providers___iscoroutine( goto __pyx_L0; } - /* "providers.pxd":680 + /* "providers.pxd":684 * * * cdef inline bint __iscoroutine(object obj): # <<<<<<<<<<<<<< @@ -27157,7 +27160,7 @@ static CYTHON_INLINE int __pyx_f_19dependency_injector_9providers___iscoroutine( return __pyx_r; } -/* "providers.pxd":695 +/* "providers.pxd":699 * * * cdef inline object __future_result(object instance): # <<<<<<<<<<<<<< @@ -27177,16 +27180,16 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___future int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__future_result", 0); - /* "providers.pxd":696 + /* "providers.pxd":700 * * cdef inline object __future_result(object instance): * future_result = asyncio.Future() # <<<<<<<<<<<<<< * future_result.set_result(instance) * return future_result */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 696, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 700, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Future); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 696, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Future); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 700, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -27201,19 +27204,19 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___future } __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 696, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 700, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_future_result = __pyx_t_1; __pyx_t_1 = 0; - /* "providers.pxd":697 + /* "providers.pxd":701 * cdef inline object __future_result(object instance): * future_result = asyncio.Future() * future_result.set_result(instance) # <<<<<<<<<<<<<< * return future_result */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_future_result, __pyx_n_s_set_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 697, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_future_result, __pyx_n_s_set_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 701, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -27227,12 +27230,12 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___future } __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_instance) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_instance); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 697, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 701, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "providers.pxd":698 + /* "providers.pxd":702 * future_result = asyncio.Future() * future_result.set_result(instance) * return future_result # <<<<<<<<<<<<<< @@ -27242,7 +27245,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___future __pyx_r = __pyx_v_future_result; goto __pyx_L0; - /* "providers.pxd":695 + /* "providers.pxd":699 * * * cdef inline object __future_result(object instance): # <<<<<<<<<<<<<< @@ -30083,8 +30086,8 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s_AttributeError); if (!__pyx_builtin_AttributeError) __PYX_ERR(0, 240, __pyx_L1_error) __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(0, 367, __pyx_L1_error) __pyx_builtin_open = __Pyx_GetBuiltinName(__pyx_n_s_open); if (!__pyx_builtin_open) __PYX_ERR(0, 452, __pyx_L1_error) - __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(1, 405, __pyx_L1_error) - __pyx_builtin_zip = __Pyx_GetBuiltinName(__pyx_n_s_zip); if (!__pyx_builtin_zip) __PYX_ERR(1, 495, __pyx_L1_error) + __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(1, 409, __pyx_L1_error) + __pyx_builtin_zip = __Pyx_GetBuiltinName(__pyx_n_s_zip); if (!__pyx_builtin_zip) __PYX_ERR(1, 499, __pyx_L1_error) return 0; __pyx_L1_error:; return -1; @@ -31120,145 +31123,145 @@ static int __Pyx_modinit_type_import_code(void) { if (!__pyx_ptype_19dependency_injector_9providers_Provider) __PYX_ERR(1, 22, __pyx_L1_error) __pyx_vtabptr_19dependency_injector_9providers_Provider = (struct __pyx_vtabstruct_19dependency_injector_9providers_Provider*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_Provider->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_Provider)) __PYX_ERR(1, 22, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_Object = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "Object", sizeof(struct __pyx_obj_19dependency_injector_9providers_Object), __Pyx_ImportType_CheckSize_Warn); - if (!__pyx_ptype_19dependency_injector_9providers_Object) __PYX_ERR(1, 32, __pyx_L1_error) - __pyx_vtabptr_19dependency_injector_9providers_Object = (struct __pyx_vtabstruct_19dependency_injector_9providers_Object*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_Object->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_Object)) __PYX_ERR(1, 32, __pyx_L1_error) + if (!__pyx_ptype_19dependency_injector_9providers_Object) __PYX_ERR(1, 36, __pyx_L1_error) + __pyx_vtabptr_19dependency_injector_9providers_Object = (struct __pyx_vtabstruct_19dependency_injector_9providers_Object*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_Object->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_Object)) __PYX_ERR(1, 36, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_Self = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "Self", sizeof(struct __pyx_obj_19dependency_injector_9providers_Self), __Pyx_ImportType_CheckSize_Warn); - if (!__pyx_ptype_19dependency_injector_9providers_Self) __PYX_ERR(1, 38, __pyx_L1_error) - __pyx_vtabptr_19dependency_injector_9providers_Self = (struct __pyx_vtabstruct_19dependency_injector_9providers_Self*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_Self->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_Self)) __PYX_ERR(1, 38, __pyx_L1_error) + if (!__pyx_ptype_19dependency_injector_9providers_Self) __PYX_ERR(1, 42, __pyx_L1_error) + __pyx_vtabptr_19dependency_injector_9providers_Self = (struct __pyx_vtabstruct_19dependency_injector_9providers_Self*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_Self->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_Self)) __PYX_ERR(1, 42, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_Delegate = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "Delegate", sizeof(struct __pyx_obj_19dependency_injector_9providers_Delegate), __Pyx_ImportType_CheckSize_Warn); - if (!__pyx_ptype_19dependency_injector_9providers_Delegate) __PYX_ERR(1, 43, __pyx_L1_error) - __pyx_vtabptr_19dependency_injector_9providers_Delegate = (struct __pyx_vtabstruct_19dependency_injector_9providers_Delegate*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_Delegate->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_Delegate)) __PYX_ERR(1, 43, __pyx_L1_error) + if (!__pyx_ptype_19dependency_injector_9providers_Delegate) __PYX_ERR(1, 47, __pyx_L1_error) + __pyx_vtabptr_19dependency_injector_9providers_Delegate = (struct __pyx_vtabstruct_19dependency_injector_9providers_Delegate*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_Delegate->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_Delegate)) __PYX_ERR(1, 47, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_Aggregate = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "Aggregate", sizeof(struct __pyx_obj_19dependency_injector_9providers_Aggregate), __Pyx_ImportType_CheckSize_Warn); - if (!__pyx_ptype_19dependency_injector_9providers_Aggregate) __PYX_ERR(1, 49, __pyx_L1_error) - __pyx_vtabptr_19dependency_injector_9providers_Aggregate = (struct __pyx_vtabstruct_19dependency_injector_9providers_Aggregate*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_Aggregate->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_Aggregate)) __PYX_ERR(1, 49, __pyx_L1_error) + if (!__pyx_ptype_19dependency_injector_9providers_Aggregate) __PYX_ERR(1, 53, __pyx_L1_error) + __pyx_vtabptr_19dependency_injector_9providers_Aggregate = (struct __pyx_vtabstruct_19dependency_injector_9providers_Aggregate*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_Aggregate->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_Aggregate)) __PYX_ERR(1, 53, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_Dependency = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "Dependency", sizeof(struct __pyx_obj_19dependency_injector_9providers_Dependency), __Pyx_ImportType_CheckSize_Warn); - if (!__pyx_ptype_19dependency_injector_9providers_Dependency) __PYX_ERR(1, 55, __pyx_L1_error) - __pyx_vtabptr_19dependency_injector_9providers_Dependency = (struct __pyx_vtabstruct_19dependency_injector_9providers_Dependency*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_Dependency->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_Dependency)) __PYX_ERR(1, 55, __pyx_L1_error) + if (!__pyx_ptype_19dependency_injector_9providers_Dependency) __PYX_ERR(1, 59, __pyx_L1_error) + __pyx_vtabptr_19dependency_injector_9providers_Dependency = (struct __pyx_vtabstruct_19dependency_injector_9providers_Dependency*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_Dependency->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_Dependency)) __PYX_ERR(1, 59, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_ExternalDependency = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "ExternalDependency", sizeof(struct __pyx_obj_19dependency_injector_9providers_ExternalDependency), __Pyx_ImportType_CheckSize_Warn); - if (!__pyx_ptype_19dependency_injector_9providers_ExternalDependency) __PYX_ERR(1, 61, __pyx_L1_error) - __pyx_vtabptr_19dependency_injector_9providers_ExternalDependency = (struct __pyx_vtabstruct_19dependency_injector_9providers_ExternalDependency*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_ExternalDependency->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_ExternalDependency)) __PYX_ERR(1, 61, __pyx_L1_error) + if (!__pyx_ptype_19dependency_injector_9providers_ExternalDependency) __PYX_ERR(1, 65, __pyx_L1_error) + __pyx_vtabptr_19dependency_injector_9providers_ExternalDependency = (struct __pyx_vtabstruct_19dependency_injector_9providers_ExternalDependency*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_ExternalDependency->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_ExternalDependency)) __PYX_ERR(1, 65, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_DependenciesContainer = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "DependenciesContainer", sizeof(struct __pyx_obj_19dependency_injector_9providers_DependenciesContainer), __Pyx_ImportType_CheckSize_Warn); - if (!__pyx_ptype_19dependency_injector_9providers_DependenciesContainer) __PYX_ERR(1, 65, __pyx_L1_error) - __pyx_vtabptr_19dependency_injector_9providers_DependenciesContainer = (struct __pyx_vtabstruct_19dependency_injector_9providers_DependenciesContainer*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_DependenciesContainer->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_DependenciesContainer)) __PYX_ERR(1, 65, __pyx_L1_error) + if (!__pyx_ptype_19dependency_injector_9providers_DependenciesContainer) __PYX_ERR(1, 69, __pyx_L1_error) + __pyx_vtabptr_19dependency_injector_9providers_DependenciesContainer = (struct __pyx_vtabstruct_19dependency_injector_9providers_DependenciesContainer*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_DependenciesContainer->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_DependenciesContainer)) __PYX_ERR(1, 69, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_Callable = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "Callable", sizeof(struct __pyx_obj_19dependency_injector_9providers_Callable), __Pyx_ImportType_CheckSize_Warn); - if (!__pyx_ptype_19dependency_injector_9providers_Callable) __PYX_ERR(1, 73, __pyx_L1_error) - __pyx_vtabptr_19dependency_injector_9providers_Callable = (struct __pyx_vtabstruct_19dependency_injector_9providers_Callable*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_Callable->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_Callable)) __PYX_ERR(1, 73, __pyx_L1_error) + if (!__pyx_ptype_19dependency_injector_9providers_Callable) __PYX_ERR(1, 77, __pyx_L1_error) + __pyx_vtabptr_19dependency_injector_9providers_Callable = (struct __pyx_vtabstruct_19dependency_injector_9providers_Callable*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_Callable->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_Callable)) __PYX_ERR(1, 77, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_DelegatedCallable = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "DelegatedCallable", sizeof(struct __pyx_obj_19dependency_injector_9providers_DelegatedCallable), __Pyx_ImportType_CheckSize_Warn); - if (!__pyx_ptype_19dependency_injector_9providers_DelegatedCallable) __PYX_ERR(1, 85, __pyx_L1_error) - __pyx_vtabptr_19dependency_injector_9providers_DelegatedCallable = (struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedCallable*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_DelegatedCallable->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_DelegatedCallable)) __PYX_ERR(1, 85, __pyx_L1_error) + if (!__pyx_ptype_19dependency_injector_9providers_DelegatedCallable) __PYX_ERR(1, 89, __pyx_L1_error) + __pyx_vtabptr_19dependency_injector_9providers_DelegatedCallable = (struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedCallable*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_DelegatedCallable->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_DelegatedCallable)) __PYX_ERR(1, 89, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_AbstractCallable = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "AbstractCallable", sizeof(struct __pyx_obj_19dependency_injector_9providers_AbstractCallable), __Pyx_ImportType_CheckSize_Warn); - if (!__pyx_ptype_19dependency_injector_9providers_AbstractCallable) __PYX_ERR(1, 89, __pyx_L1_error) - __pyx_vtabptr_19dependency_injector_9providers_AbstractCallable = (struct __pyx_vtabstruct_19dependency_injector_9providers_AbstractCallable*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_AbstractCallable->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_AbstractCallable)) __PYX_ERR(1, 89, __pyx_L1_error) + if (!__pyx_ptype_19dependency_injector_9providers_AbstractCallable) __PYX_ERR(1, 93, __pyx_L1_error) + __pyx_vtabptr_19dependency_injector_9providers_AbstractCallable = (struct __pyx_vtabstruct_19dependency_injector_9providers_AbstractCallable*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_AbstractCallable->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_AbstractCallable)) __PYX_ERR(1, 93, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_CallableDelegate = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "CallableDelegate", sizeof(struct __pyx_obj_19dependency_injector_9providers_CallableDelegate), __Pyx_ImportType_CheckSize_Warn); - if (!__pyx_ptype_19dependency_injector_9providers_CallableDelegate) __PYX_ERR(1, 93, __pyx_L1_error) - __pyx_vtabptr_19dependency_injector_9providers_CallableDelegate = (struct __pyx_vtabstruct_19dependency_injector_9providers_CallableDelegate*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_CallableDelegate->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_CallableDelegate)) __PYX_ERR(1, 93, __pyx_L1_error) + if (!__pyx_ptype_19dependency_injector_9providers_CallableDelegate) __PYX_ERR(1, 97, __pyx_L1_error) + __pyx_vtabptr_19dependency_injector_9providers_CallableDelegate = (struct __pyx_vtabstruct_19dependency_injector_9providers_CallableDelegate*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_CallableDelegate->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_CallableDelegate)) __PYX_ERR(1, 97, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_Coroutine = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "Coroutine", sizeof(struct __pyx_obj_19dependency_injector_9providers_Coroutine), __Pyx_ImportType_CheckSize_Warn); - if (!__pyx_ptype_19dependency_injector_9providers_Coroutine) __PYX_ERR(1, 98, __pyx_L1_error) - __pyx_vtabptr_19dependency_injector_9providers_Coroutine = (struct __pyx_vtabstruct_19dependency_injector_9providers_Coroutine*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_Coroutine->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_Coroutine)) __PYX_ERR(1, 98, __pyx_L1_error) + if (!__pyx_ptype_19dependency_injector_9providers_Coroutine) __PYX_ERR(1, 102, __pyx_L1_error) + __pyx_vtabptr_19dependency_injector_9providers_Coroutine = (struct __pyx_vtabstruct_19dependency_injector_9providers_Coroutine*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_Coroutine->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_Coroutine)) __PYX_ERR(1, 102, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_DelegatedCoroutine = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "DelegatedCoroutine", sizeof(struct __pyx_obj_19dependency_injector_9providers_DelegatedCoroutine), __Pyx_ImportType_CheckSize_Warn); - if (!__pyx_ptype_19dependency_injector_9providers_DelegatedCoroutine) __PYX_ERR(1, 102, __pyx_L1_error) - __pyx_vtabptr_19dependency_injector_9providers_DelegatedCoroutine = (struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedCoroutine*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_DelegatedCoroutine->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_DelegatedCoroutine)) __PYX_ERR(1, 102, __pyx_L1_error) + if (!__pyx_ptype_19dependency_injector_9providers_DelegatedCoroutine) __PYX_ERR(1, 106, __pyx_L1_error) + __pyx_vtabptr_19dependency_injector_9providers_DelegatedCoroutine = (struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedCoroutine*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_DelegatedCoroutine->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_DelegatedCoroutine)) __PYX_ERR(1, 106, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_AbstractCoroutine = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "AbstractCoroutine", sizeof(struct __pyx_obj_19dependency_injector_9providers_AbstractCoroutine), __Pyx_ImportType_CheckSize_Warn); - if (!__pyx_ptype_19dependency_injector_9providers_AbstractCoroutine) __PYX_ERR(1, 106, __pyx_L1_error) - __pyx_vtabptr_19dependency_injector_9providers_AbstractCoroutine = (struct __pyx_vtabstruct_19dependency_injector_9providers_AbstractCoroutine*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_AbstractCoroutine->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_AbstractCoroutine)) __PYX_ERR(1, 106, __pyx_L1_error) + if (!__pyx_ptype_19dependency_injector_9providers_AbstractCoroutine) __PYX_ERR(1, 110, __pyx_L1_error) + __pyx_vtabptr_19dependency_injector_9providers_AbstractCoroutine = (struct __pyx_vtabstruct_19dependency_injector_9providers_AbstractCoroutine*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_AbstractCoroutine->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_AbstractCoroutine)) __PYX_ERR(1, 110, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_CoroutineDelegate = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "CoroutineDelegate", sizeof(struct __pyx_obj_19dependency_injector_9providers_CoroutineDelegate), __Pyx_ImportType_CheckSize_Warn); - if (!__pyx_ptype_19dependency_injector_9providers_CoroutineDelegate) __PYX_ERR(1, 110, __pyx_L1_error) - __pyx_vtabptr_19dependency_injector_9providers_CoroutineDelegate = (struct __pyx_vtabstruct_19dependency_injector_9providers_CoroutineDelegate*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_CoroutineDelegate->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_CoroutineDelegate)) __PYX_ERR(1, 110, __pyx_L1_error) + if (!__pyx_ptype_19dependency_injector_9providers_CoroutineDelegate) __PYX_ERR(1, 114, __pyx_L1_error) + __pyx_vtabptr_19dependency_injector_9providers_CoroutineDelegate = (struct __pyx_vtabstruct_19dependency_injector_9providers_CoroutineDelegate*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_CoroutineDelegate->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_CoroutineDelegate)) __PYX_ERR(1, 114, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_ConfigurationOption = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "ConfigurationOption", sizeof(struct __pyx_obj_19dependency_injector_9providers_ConfigurationOption), __Pyx_ImportType_CheckSize_Warn); - if (!__pyx_ptype_19dependency_injector_9providers_ConfigurationOption) __PYX_ERR(1, 115, __pyx_L1_error) - __pyx_vtabptr_19dependency_injector_9providers_ConfigurationOption = (struct __pyx_vtabstruct_19dependency_injector_9providers_ConfigurationOption*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_ConfigurationOption->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_ConfigurationOption)) __PYX_ERR(1, 115, __pyx_L1_error) + if (!__pyx_ptype_19dependency_injector_9providers_ConfigurationOption) __PYX_ERR(1, 119, __pyx_L1_error) + __pyx_vtabptr_19dependency_injector_9providers_ConfigurationOption = (struct __pyx_vtabstruct_19dependency_injector_9providers_ConfigurationOption*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_ConfigurationOption->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_ConfigurationOption)) __PYX_ERR(1, 119, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_TypedConfigurationOption = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "TypedConfigurationOption", sizeof(struct __pyx_obj_19dependency_injector_9providers_TypedConfigurationOption), __Pyx_ImportType_CheckSize_Warn); - if (!__pyx_ptype_19dependency_injector_9providers_TypedConfigurationOption) __PYX_ERR(1, 123, __pyx_L1_error) - __pyx_vtabptr_19dependency_injector_9providers_TypedConfigurationOption = (struct __pyx_vtabstruct_19dependency_injector_9providers_TypedConfigurationOption*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_TypedConfigurationOption->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_TypedConfigurationOption)) __PYX_ERR(1, 123, __pyx_L1_error) + if (!__pyx_ptype_19dependency_injector_9providers_TypedConfigurationOption) __PYX_ERR(1, 127, __pyx_L1_error) + __pyx_vtabptr_19dependency_injector_9providers_TypedConfigurationOption = (struct __pyx_vtabstruct_19dependency_injector_9providers_TypedConfigurationOption*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_TypedConfigurationOption->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_TypedConfigurationOption)) __PYX_ERR(1, 127, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_Configuration = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "Configuration", sizeof(struct __pyx_obj_19dependency_injector_9providers_Configuration), __Pyx_ImportType_CheckSize_Warn); - if (!__pyx_ptype_19dependency_injector_9providers_Configuration) __PYX_ERR(1, 127, __pyx_L1_error) - __pyx_vtabptr_19dependency_injector_9providers_Configuration = (struct __pyx_vtabstruct_19dependency_injector_9providers_Configuration*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_Configuration->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_Configuration)) __PYX_ERR(1, 127, __pyx_L1_error) + if (!__pyx_ptype_19dependency_injector_9providers_Configuration) __PYX_ERR(1, 131, __pyx_L1_error) + __pyx_vtabptr_19dependency_injector_9providers_Configuration = (struct __pyx_vtabstruct_19dependency_injector_9providers_Configuration*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_Configuration->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_Configuration)) __PYX_ERR(1, 131, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_Factory = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "Factory", sizeof(struct __pyx_obj_19dependency_injector_9providers_Factory), __Pyx_ImportType_CheckSize_Warn); - if (!__pyx_ptype_19dependency_injector_9providers_Factory) __PYX_ERR(1, 138, __pyx_L1_error) - __pyx_vtabptr_19dependency_injector_9providers_Factory = (struct __pyx_vtabstruct_19dependency_injector_9providers_Factory*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_Factory->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_Factory)) __PYX_ERR(1, 138, __pyx_L1_error) + if (!__pyx_ptype_19dependency_injector_9providers_Factory) __PYX_ERR(1, 142, __pyx_L1_error) + __pyx_vtabptr_19dependency_injector_9providers_Factory = (struct __pyx_vtabstruct_19dependency_injector_9providers_Factory*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_Factory->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_Factory)) __PYX_ERR(1, 142, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_DelegatedFactory = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "DelegatedFactory", sizeof(struct __pyx_obj_19dependency_injector_9providers_DelegatedFactory), __Pyx_ImportType_CheckSize_Warn); - if (!__pyx_ptype_19dependency_injector_9providers_DelegatedFactory) __PYX_ERR(1, 147, __pyx_L1_error) - __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, 147, __pyx_L1_error) + if (!__pyx_ptype_19dependency_injector_9providers_DelegatedFactory) __PYX_ERR(1, 151, __pyx_L1_error) + __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, 151, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_AbstractFactory = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "AbstractFactory", sizeof(struct __pyx_obj_19dependency_injector_9providers_AbstractFactory), __Pyx_ImportType_CheckSize_Warn); - if (!__pyx_ptype_19dependency_injector_9providers_AbstractFactory) __PYX_ERR(1, 151, __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, 151, __pyx_L1_error) + if (!__pyx_ptype_19dependency_injector_9providers_AbstractFactory) __PYX_ERR(1, 155, __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, 155, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_FactoryDelegate = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "FactoryDelegate", sizeof(struct __pyx_obj_19dependency_injector_9providers_FactoryDelegate), __Pyx_ImportType_CheckSize_Warn); - if (!__pyx_ptype_19dependency_injector_9providers_FactoryDelegate) __PYX_ERR(1, 155, __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, 155, __pyx_L1_error) + if (!__pyx_ptype_19dependency_injector_9providers_FactoryDelegate) __PYX_ERR(1, 159, __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, 159, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_FactoryAggregate = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "FactoryAggregate", sizeof(struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate), __Pyx_ImportType_CheckSize_Warn); - if (!__pyx_ptype_19dependency_injector_9providers_FactoryAggregate) __PYX_ERR(1, 159, __pyx_L1_error) - __pyx_vtabptr_19dependency_injector_9providers_FactoryAggregate = (struct __pyx_vtabstruct_19dependency_injector_9providers_FactoryAggregate*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_FactoryAggregate->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_FactoryAggregate)) __PYX_ERR(1, 159, __pyx_L1_error) + if (!__pyx_ptype_19dependency_injector_9providers_FactoryAggregate) __PYX_ERR(1, 163, __pyx_L1_error) + __pyx_vtabptr_19dependency_injector_9providers_FactoryAggregate = (struct __pyx_vtabstruct_19dependency_injector_9providers_FactoryAggregate*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_FactoryAggregate->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_FactoryAggregate)) __PYX_ERR(1, 163, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_BaseSingleton = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "BaseSingleton", sizeof(struct __pyx_obj_19dependency_injector_9providers_BaseSingleton), __Pyx_ImportType_CheckSize_Warn); - if (!__pyx_ptype_19dependency_injector_9providers_BaseSingleton) __PYX_ERR(1, 164, __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, 164, __pyx_L1_error) + if (!__pyx_ptype_19dependency_injector_9providers_BaseSingleton) __PYX_ERR(1, 168, __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, 168, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_Singleton = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "Singleton", sizeof(struct __pyx_obj_19dependency_injector_9providers_Singleton), __Pyx_ImportType_CheckSize_Warn); - if (!__pyx_ptype_19dependency_injector_9providers_Singleton) __PYX_ERR(1, 169, __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, 169, __pyx_L1_error) + if (!__pyx_ptype_19dependency_injector_9providers_Singleton) __PYX_ERR(1, 173, __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, 173, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_DelegatedSingleton = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "DelegatedSingleton", sizeof(struct __pyx_obj_19dependency_injector_9providers_DelegatedSingleton), __Pyx_ImportType_CheckSize_Warn); - if (!__pyx_ptype_19dependency_injector_9providers_DelegatedSingleton) __PYX_ERR(1, 174, __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, 174, __pyx_L1_error) + if (!__pyx_ptype_19dependency_injector_9providers_DelegatedSingleton) __PYX_ERR(1, 178, __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, 178, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_ThreadSafeSingleton = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "ThreadSafeSingleton", sizeof(struct __pyx_obj_19dependency_injector_9providers_ThreadSafeSingleton), __Pyx_ImportType_CheckSize_Warn); - if (!__pyx_ptype_19dependency_injector_9providers_ThreadSafeSingleton) __PYX_ERR(1, 178, __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, 178, __pyx_L1_error) + if (!__pyx_ptype_19dependency_injector_9providers_ThreadSafeSingleton) __PYX_ERR(1, 182, __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, 182, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_DelegatedThreadSafeSingleton = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "DelegatedThreadSafeSingleton", sizeof(struct __pyx_obj_19dependency_injector_9providers_DelegatedThreadSafeSingleton), __Pyx_ImportType_CheckSize_Warn); - if (!__pyx_ptype_19dependency_injector_9providers_DelegatedThreadSafeSingleton) __PYX_ERR(1, 184, __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, 184, __pyx_L1_error) + if (!__pyx_ptype_19dependency_injector_9providers_DelegatedThreadSafeSingleton) __PYX_ERR(1, 188, __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, 188, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_ThreadLocalSingleton = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "ThreadLocalSingleton", sizeof(struct __pyx_obj_19dependency_injector_9providers_ThreadLocalSingleton), __Pyx_ImportType_CheckSize_Warn); - if (!__pyx_ptype_19dependency_injector_9providers_ThreadLocalSingleton) __PYX_ERR(1, 188, __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, 188, __pyx_L1_error) + if (!__pyx_ptype_19dependency_injector_9providers_ThreadLocalSingleton) __PYX_ERR(1, 192, __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, 192, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_ContextLocalSingleton = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "ContextLocalSingleton", sizeof(struct __pyx_obj_19dependency_injector_9providers_ContextLocalSingleton), __Pyx_ImportType_CheckSize_Warn); - if (!__pyx_ptype_19dependency_injector_9providers_ContextLocalSingleton) __PYX_ERR(1, 193, __pyx_L1_error) - __pyx_vtabptr_19dependency_injector_9providers_ContextLocalSingleton = (struct __pyx_vtabstruct_19dependency_injector_9providers_ContextLocalSingleton*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_ContextLocalSingleton->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_ContextLocalSingleton)) __PYX_ERR(1, 193, __pyx_L1_error) + if (!__pyx_ptype_19dependency_injector_9providers_ContextLocalSingleton) __PYX_ERR(1, 197, __pyx_L1_error) + __pyx_vtabptr_19dependency_injector_9providers_ContextLocalSingleton = (struct __pyx_vtabstruct_19dependency_injector_9providers_ContextLocalSingleton*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_ContextLocalSingleton->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_ContextLocalSingleton)) __PYX_ERR(1, 197, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_DelegatedThreadLocalSingleton = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "DelegatedThreadLocalSingleton", sizeof(struct __pyx_obj_19dependency_injector_9providers_DelegatedThreadLocalSingleton), __Pyx_ImportType_CheckSize_Warn); - if (!__pyx_ptype_19dependency_injector_9providers_DelegatedThreadLocalSingleton) __PYX_ERR(1, 198, __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, 198, __pyx_L1_error) + if (!__pyx_ptype_19dependency_injector_9providers_DelegatedThreadLocalSingleton) __PYX_ERR(1, 202, __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, 202, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_AbstractSingleton = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "AbstractSingleton", sizeof(struct __pyx_obj_19dependency_injector_9providers_AbstractSingleton), __Pyx_ImportType_CheckSize_Warn); - if (!__pyx_ptype_19dependency_injector_9providers_AbstractSingleton) __PYX_ERR(1, 202, __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, 202, __pyx_L1_error) + if (!__pyx_ptype_19dependency_injector_9providers_AbstractSingleton) __PYX_ERR(1, 206, __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, 206, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_SingletonDelegate = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "SingletonDelegate", sizeof(struct __pyx_obj_19dependency_injector_9providers_SingletonDelegate), __Pyx_ImportType_CheckSize_Warn); - if (!__pyx_ptype_19dependency_injector_9providers_SingletonDelegate) __PYX_ERR(1, 206, __pyx_L1_error) - __pyx_vtabptr_19dependency_injector_9providers_SingletonDelegate = (struct __pyx_vtabstruct_19dependency_injector_9providers_SingletonDelegate*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_SingletonDelegate->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_SingletonDelegate)) __PYX_ERR(1, 206, __pyx_L1_error) + if (!__pyx_ptype_19dependency_injector_9providers_SingletonDelegate) __PYX_ERR(1, 210, __pyx_L1_error) + __pyx_vtabptr_19dependency_injector_9providers_SingletonDelegate = (struct __pyx_vtabstruct_19dependency_injector_9providers_SingletonDelegate*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_SingletonDelegate->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_SingletonDelegate)) __PYX_ERR(1, 210, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_List = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "List", sizeof(struct __pyx_obj_19dependency_injector_9providers_List), __Pyx_ImportType_CheckSize_Warn); - if (!__pyx_ptype_19dependency_injector_9providers_List) __PYX_ERR(1, 212, __pyx_L1_error) - __pyx_vtabptr_19dependency_injector_9providers_List = (struct __pyx_vtabstruct_19dependency_injector_9providers_List*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_List->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_List)) __PYX_ERR(1, 212, __pyx_L1_error) + if (!__pyx_ptype_19dependency_injector_9providers_List) __PYX_ERR(1, 216, __pyx_L1_error) + __pyx_vtabptr_19dependency_injector_9providers_List = (struct __pyx_vtabstruct_19dependency_injector_9providers_List*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_List->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_List)) __PYX_ERR(1, 216, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_Dict = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "Dict", sizeof(struct __pyx_obj_19dependency_injector_9providers_Dict), __Pyx_ImportType_CheckSize_Warn); - if (!__pyx_ptype_19dependency_injector_9providers_Dict) __PYX_ERR(1, 219, __pyx_L1_error) - __pyx_vtabptr_19dependency_injector_9providers_Dict = (struct __pyx_vtabstruct_19dependency_injector_9providers_Dict*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_Dict->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_Dict)) __PYX_ERR(1, 219, __pyx_L1_error) + if (!__pyx_ptype_19dependency_injector_9providers_Dict) __PYX_ERR(1, 223, __pyx_L1_error) + __pyx_vtabptr_19dependency_injector_9providers_Dict = (struct __pyx_vtabstruct_19dependency_injector_9providers_Dict*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_Dict->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_Dict)) __PYX_ERR(1, 223, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_Resource = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "Resource", sizeof(struct __pyx_obj_19dependency_injector_9providers_Resource), __Pyx_ImportType_CheckSize_Warn); - if (!__pyx_ptype_19dependency_injector_9providers_Resource) __PYX_ERR(1, 226, __pyx_L1_error) - __pyx_vtabptr_19dependency_injector_9providers_Resource = (struct __pyx_vtabstruct_19dependency_injector_9providers_Resource*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_Resource->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_Resource)) __PYX_ERR(1, 226, __pyx_L1_error) + if (!__pyx_ptype_19dependency_injector_9providers_Resource) __PYX_ERR(1, 230, __pyx_L1_error) + __pyx_vtabptr_19dependency_injector_9providers_Resource = (struct __pyx_vtabstruct_19dependency_injector_9providers_Resource*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_Resource->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_Resource)) __PYX_ERR(1, 230, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_Container = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "Container", sizeof(struct __pyx_obj_19dependency_injector_9providers_Container), __Pyx_ImportType_CheckSize_Warn); - if (!__pyx_ptype_19dependency_injector_9providers_Container) __PYX_ERR(1, 241, __pyx_L1_error) - __pyx_vtabptr_19dependency_injector_9providers_Container = (struct __pyx_vtabstruct_19dependency_injector_9providers_Container*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_Container->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_Container)) __PYX_ERR(1, 241, __pyx_L1_error) + if (!__pyx_ptype_19dependency_injector_9providers_Container) __PYX_ERR(1, 245, __pyx_L1_error) + __pyx_vtabptr_19dependency_injector_9providers_Container = (struct __pyx_vtabstruct_19dependency_injector_9providers_Container*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_Container->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_Container)) __PYX_ERR(1, 245, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_Selector = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "Selector", sizeof(struct __pyx_obj_19dependency_injector_9providers_Selector), __Pyx_ImportType_CheckSize_Warn); - if (!__pyx_ptype_19dependency_injector_9providers_Selector) __PYX_ERR(1, 250, __pyx_L1_error) - __pyx_vtabptr_19dependency_injector_9providers_Selector = (struct __pyx_vtabstruct_19dependency_injector_9providers_Selector*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_Selector->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_Selector)) __PYX_ERR(1, 250, __pyx_L1_error) + if (!__pyx_ptype_19dependency_injector_9providers_Selector) __PYX_ERR(1, 254, __pyx_L1_error) + __pyx_vtabptr_19dependency_injector_9providers_Selector = (struct __pyx_vtabstruct_19dependency_injector_9providers_Selector*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_Selector->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_Selector)) __PYX_ERR(1, 254, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_ProvidedInstance = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "ProvidedInstance", sizeof(struct __pyx_obj_19dependency_injector_9providers_ProvidedInstance), __Pyx_ImportType_CheckSize_Warn); - if (!__pyx_ptype_19dependency_injector_9providers_ProvidedInstance) __PYX_ERR(1, 258, __pyx_L1_error) - __pyx_vtabptr_19dependency_injector_9providers_ProvidedInstance = (struct __pyx_vtabstruct_19dependency_injector_9providers_ProvidedInstance*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_ProvidedInstance->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_ProvidedInstance)) __PYX_ERR(1, 258, __pyx_L1_error) + if (!__pyx_ptype_19dependency_injector_9providers_ProvidedInstance) __PYX_ERR(1, 262, __pyx_L1_error) + __pyx_vtabptr_19dependency_injector_9providers_ProvidedInstance = (struct __pyx_vtabstruct_19dependency_injector_9providers_ProvidedInstance*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_ProvidedInstance->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_ProvidedInstance)) __PYX_ERR(1, 262, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_AttributeGetter = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "AttributeGetter", sizeof(struct __pyx_obj_19dependency_injector_9providers_AttributeGetter), __Pyx_ImportType_CheckSize_Warn); - if (!__pyx_ptype_19dependency_injector_9providers_AttributeGetter) __PYX_ERR(1, 264, __pyx_L1_error) - __pyx_vtabptr_19dependency_injector_9providers_AttributeGetter = (struct __pyx_vtabstruct_19dependency_injector_9providers_AttributeGetter*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_AttributeGetter->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_AttributeGetter)) __PYX_ERR(1, 264, __pyx_L1_error) + if (!__pyx_ptype_19dependency_injector_9providers_AttributeGetter) __PYX_ERR(1, 268, __pyx_L1_error) + __pyx_vtabptr_19dependency_injector_9providers_AttributeGetter = (struct __pyx_vtabstruct_19dependency_injector_9providers_AttributeGetter*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_AttributeGetter->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_AttributeGetter)) __PYX_ERR(1, 268, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_ItemGetter = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "ItemGetter", sizeof(struct __pyx_obj_19dependency_injector_9providers_ItemGetter), __Pyx_ImportType_CheckSize_Warn); - if (!__pyx_ptype_19dependency_injector_9providers_ItemGetter) __PYX_ERR(1, 271, __pyx_L1_error) - __pyx_vtabptr_19dependency_injector_9providers_ItemGetter = (struct __pyx_vtabstruct_19dependency_injector_9providers_ItemGetter*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_ItemGetter->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_ItemGetter)) __PYX_ERR(1, 271, __pyx_L1_error) + if (!__pyx_ptype_19dependency_injector_9providers_ItemGetter) __PYX_ERR(1, 275, __pyx_L1_error) + __pyx_vtabptr_19dependency_injector_9providers_ItemGetter = (struct __pyx_vtabstruct_19dependency_injector_9providers_ItemGetter*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_ItemGetter->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_ItemGetter)) __PYX_ERR(1, 275, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_MethodCaller = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "MethodCaller", sizeof(struct __pyx_obj_19dependency_injector_9providers_MethodCaller), __Pyx_ImportType_CheckSize_Warn); - if (!__pyx_ptype_19dependency_injector_9providers_MethodCaller) __PYX_ERR(1, 278, __pyx_L1_error) - __pyx_vtabptr_19dependency_injector_9providers_MethodCaller = (struct __pyx_vtabstruct_19dependency_injector_9providers_MethodCaller*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_MethodCaller->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_MethodCaller)) __PYX_ERR(1, 278, __pyx_L1_error) + if (!__pyx_ptype_19dependency_injector_9providers_MethodCaller) __PYX_ERR(1, 282, __pyx_L1_error) + __pyx_vtabptr_19dependency_injector_9providers_MethodCaller = (struct __pyx_vtabstruct_19dependency_injector_9providers_MethodCaller*)__Pyx_GetVtable(__pyx_ptype_19dependency_injector_9providers_MethodCaller->tp_dict); if (unlikely(!__pyx_vtabptr_19dependency_injector_9providers_MethodCaller)) __PYX_ERR(1, 282, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_Injection = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "Injection", sizeof(struct __pyx_obj_19dependency_injector_9providers_Injection), __Pyx_ImportType_CheckSize_Warn); - if (!__pyx_ptype_19dependency_injector_9providers_Injection) __PYX_ERR(1, 289, __pyx_L1_error) + if (!__pyx_ptype_19dependency_injector_9providers_Injection) __PYX_ERR(1, 293, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_PositionalInjection = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "PositionalInjection", sizeof(struct __pyx_obj_19dependency_injector_9providers_PositionalInjection), __Pyx_ImportType_CheckSize_Warn); - if (!__pyx_ptype_19dependency_injector_9providers_PositionalInjection) __PYX_ERR(1, 296, __pyx_L1_error) + if (!__pyx_ptype_19dependency_injector_9providers_PositionalInjection) __PYX_ERR(1, 300, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_NamedInjection = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "NamedInjection", sizeof(struct __pyx_obj_19dependency_injector_9providers_NamedInjection), __Pyx_ImportType_CheckSize_Warn); - if (!__pyx_ptype_19dependency_injector_9providers_NamedInjection) __PYX_ERR(1, 300, __pyx_L1_error) + if (!__pyx_ptype_19dependency_injector_9providers_NamedInjection) __PYX_ERR(1, 304, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_OverridingContext = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "OverridingContext", sizeof(struct __pyx_obj_19dependency_injector_9providers_OverridingContext), __Pyx_ImportType_CheckSize_Warn); - if (!__pyx_ptype_19dependency_injector_9providers_OverridingContext) __PYX_ERR(1, 311, __pyx_L1_error) + if (!__pyx_ptype_19dependency_injector_9providers_OverridingContext) __PYX_ERR(1, 315, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_BaseSingletonResetContext = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "BaseSingletonResetContext", sizeof(struct __pyx_obj_19dependency_injector_9providers_BaseSingletonResetContext), __Pyx_ImportType_CheckSize_Warn); - if (!__pyx_ptype_19dependency_injector_9providers_BaseSingletonResetContext) __PYX_ERR(1, 316, __pyx_L1_error) + if (!__pyx_ptype_19dependency_injector_9providers_BaseSingletonResetContext) __PYX_ERR(1, 320, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_SingletonResetContext = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "SingletonResetContext", sizeof(struct __pyx_obj_19dependency_injector_9providers_SingletonResetContext), __Pyx_ImportType_CheckSize_Warn); - if (!__pyx_ptype_19dependency_injector_9providers_SingletonResetContext) __PYX_ERR(1, 320, __pyx_L1_error) + if (!__pyx_ptype_19dependency_injector_9providers_SingletonResetContext) __PYX_ERR(1, 324, __pyx_L1_error) __pyx_ptype_19dependency_injector_9providers_SingletonFullResetContext = __Pyx_ImportType(__pyx_t_1, "dependency_injector.providers", "SingletonFullResetContext", sizeof(struct __pyx_obj_19dependency_injector_9providers_SingletonFullResetContext), __Pyx_ImportType_CheckSize_Warn); - if (!__pyx_ptype_19dependency_injector_9providers_SingletonFullResetContext) __PYX_ERR(1, 324, __pyx_L1_error) + if (!__pyx_ptype_19dependency_injector_9providers_SingletonFullResetContext) __PYX_ERR(1, 328, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_RefNannyFinishContext(); return 0; diff --git a/src/dependency_injector/providers.c b/src/dependency_injector/providers.c index 7c8c3473..7391df3c 100644 --- a/src/dependency_injector/providers.c +++ b/src/dependency_injector/providers.c @@ -910,7 +910,7 @@ struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_void____object____object____obj struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object____object____object___to_py; struct __pyx_opt_args_19dependency_injector_9providers_deepcopy; -/* "dependency_injector/providers.pxd":349 +/* "dependency_injector/providers.pxd":353 * * * cpdef object deepcopy(object instance, dict memo=*) # <<<<<<<<<<<<<< @@ -939,7 +939,7 @@ struct __pyx_obj_19dependency_injector_9providers_Provider { }; -/* "dependency_injector/providers.pxd":32 +/* "dependency_injector/providers.pxd":36 * * * cdef class Object(Provider): # <<<<<<<<<<<<<< @@ -952,7 +952,7 @@ struct __pyx_obj_19dependency_injector_9providers_Object { }; -/* "dependency_injector/providers.pxd":38 +/* "dependency_injector/providers.pxd":42 * * * cdef class Self(Provider): # <<<<<<<<<<<<<< @@ -966,7 +966,7 @@ struct __pyx_obj_19dependency_injector_9providers_Self { }; -/* "dependency_injector/providers.pxd":43 +/* "dependency_injector/providers.pxd":47 * * * cdef class Delegate(Provider): # <<<<<<<<<<<<<< @@ -979,7 +979,7 @@ struct __pyx_obj_19dependency_injector_9providers_Delegate { }; -/* "dependency_injector/providers.pxd":49 +/* "dependency_injector/providers.pxd":53 * * * cdef class Aggregate(Provider): # <<<<<<<<<<<<<< @@ -992,7 +992,7 @@ struct __pyx_obj_19dependency_injector_9providers_Aggregate { }; -/* "dependency_injector/providers.pxd":55 +/* "dependency_injector/providers.pxd":59 * * * cdef class Dependency(Provider): # <<<<<<<<<<<<<< @@ -1007,7 +1007,7 @@ struct __pyx_obj_19dependency_injector_9providers_Dependency { }; -/* "dependency_injector/providers.pxd":61 +/* "dependency_injector/providers.pxd":65 * * * cdef class ExternalDependency(Dependency): # <<<<<<<<<<<<<< @@ -1019,7 +1019,7 @@ struct __pyx_obj_19dependency_injector_9providers_ExternalDependency { }; -/* "dependency_injector/providers.pxd":65 +/* "dependency_injector/providers.pxd":69 * * * cdef class DependenciesContainer(Object): # <<<<<<<<<<<<<< @@ -1033,7 +1033,7 @@ struct __pyx_obj_19dependency_injector_9providers_DependenciesContainer { }; -/* "dependency_injector/providers.pxd":73 +/* "dependency_injector/providers.pxd":77 * * # Callable providers * cdef class Callable(Provider): # <<<<<<<<<<<<<< @@ -1050,7 +1050,7 @@ struct __pyx_obj_19dependency_injector_9providers_Callable { }; -/* "dependency_injector/providers.pxd":85 +/* "dependency_injector/providers.pxd":89 * * * cdef class DelegatedCallable(Callable): # <<<<<<<<<<<<<< @@ -1062,7 +1062,7 @@ struct __pyx_obj_19dependency_injector_9providers_DelegatedCallable { }; -/* "dependency_injector/providers.pxd":89 +/* "dependency_injector/providers.pxd":93 * * * cdef class AbstractCallable(Callable): # <<<<<<<<<<<<<< @@ -1074,7 +1074,7 @@ struct __pyx_obj_19dependency_injector_9providers_AbstractCallable { }; -/* "dependency_injector/providers.pxd":93 +/* "dependency_injector/providers.pxd":97 * * * cdef class CallableDelegate(Delegate): # <<<<<<<<<<<<<< @@ -1086,7 +1086,7 @@ struct __pyx_obj_19dependency_injector_9providers_CallableDelegate { }; -/* "dependency_injector/providers.pxd":98 +/* "dependency_injector/providers.pxd":102 * * # Coroutine providers * cdef class Coroutine(Callable): # <<<<<<<<<<<<<< @@ -1098,7 +1098,7 @@ struct __pyx_obj_19dependency_injector_9providers_Coroutine { }; -/* "dependency_injector/providers.pxd":102 +/* "dependency_injector/providers.pxd":106 * * * cdef class DelegatedCoroutine(Coroutine): # <<<<<<<<<<<<<< @@ -1110,7 +1110,7 @@ struct __pyx_obj_19dependency_injector_9providers_DelegatedCoroutine { }; -/* "dependency_injector/providers.pxd":106 +/* "dependency_injector/providers.pxd":110 * * * cdef class AbstractCoroutine(Coroutine): # <<<<<<<<<<<<<< @@ -1122,7 +1122,7 @@ struct __pyx_obj_19dependency_injector_9providers_AbstractCoroutine { }; -/* "dependency_injector/providers.pxd":110 +/* "dependency_injector/providers.pxd":114 * * * cdef class CoroutineDelegate(Delegate): # <<<<<<<<<<<<<< @@ -1134,7 +1134,7 @@ struct __pyx_obj_19dependency_injector_9providers_CoroutineDelegate { }; -/* "dependency_injector/providers.pxd":115 +/* "dependency_injector/providers.pxd":119 * * # Configuration providers * cdef class ConfigurationOption(Provider): # <<<<<<<<<<<<<< @@ -1151,7 +1151,7 @@ struct __pyx_obj_19dependency_injector_9providers_ConfigurationOption { }; -/* "dependency_injector/providers.pxd":123 +/* "dependency_injector/providers.pxd":127 * * * cdef class TypedConfigurationOption(Callable): # <<<<<<<<<<<<<< @@ -1163,7 +1163,7 @@ struct __pyx_obj_19dependency_injector_9providers_TypedConfigurationOption { }; -/* "dependency_injector/providers.pxd":127 +/* "dependency_injector/providers.pxd":131 * * * cdef class Configuration(Object): # <<<<<<<<<<<<<< @@ -1182,7 +1182,7 @@ struct __pyx_obj_19dependency_injector_9providers_Configuration { }; -/* "dependency_injector/providers.pxd":138 +/* "dependency_injector/providers.pxd":142 * * # Factory providers * cdef class Factory(Provider): # <<<<<<<<<<<<<< @@ -1197,7 +1197,7 @@ struct __pyx_obj_19dependency_injector_9providers_Factory { }; -/* "dependency_injector/providers.pxd":147 +/* "dependency_injector/providers.pxd":151 * * * cdef class DelegatedFactory(Factory): # <<<<<<<<<<<<<< @@ -1209,7 +1209,7 @@ struct __pyx_obj_19dependency_injector_9providers_DelegatedFactory { }; -/* "dependency_injector/providers.pxd":151 +/* "dependency_injector/providers.pxd":155 * * * cdef class AbstractFactory(Factory): # <<<<<<<<<<<<<< @@ -1221,7 +1221,7 @@ struct __pyx_obj_19dependency_injector_9providers_AbstractFactory { }; -/* "dependency_injector/providers.pxd":155 +/* "dependency_injector/providers.pxd":159 * * * cdef class FactoryDelegate(Delegate): # <<<<<<<<<<<<<< @@ -1233,7 +1233,7 @@ struct __pyx_obj_19dependency_injector_9providers_FactoryDelegate { }; -/* "dependency_injector/providers.pxd":159 +/* "dependency_injector/providers.pxd":163 * * * cdef class FactoryAggregate(Aggregate): # <<<<<<<<<<<<<< @@ -1245,7 +1245,7 @@ struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate { }; -/* "dependency_injector/providers.pxd":164 +/* "dependency_injector/providers.pxd":168 * * # Singleton providers * cdef class BaseSingleton(Provider): # <<<<<<<<<<<<<< @@ -1259,7 +1259,7 @@ struct __pyx_obj_19dependency_injector_9providers_BaseSingleton { }; -/* "dependency_injector/providers.pxd":169 +/* "dependency_injector/providers.pxd":173 * * * cdef class Singleton(BaseSingleton): # <<<<<<<<<<<<<< @@ -1271,7 +1271,7 @@ struct __pyx_obj_19dependency_injector_9providers_Singleton { }; -/* "dependency_injector/providers.pxd":174 +/* "dependency_injector/providers.pxd":178 * * * cdef class DelegatedSingleton(Singleton): # <<<<<<<<<<<<<< @@ -1283,7 +1283,7 @@ struct __pyx_obj_19dependency_injector_9providers_DelegatedSingleton { }; -/* "dependency_injector/providers.pxd":178 +/* "dependency_injector/providers.pxd":182 * * * cdef class ThreadSafeSingleton(BaseSingleton): # <<<<<<<<<<<<<< @@ -1296,7 +1296,7 @@ struct __pyx_obj_19dependency_injector_9providers_ThreadSafeSingleton { }; -/* "dependency_injector/providers.pxd":184 +/* "dependency_injector/providers.pxd":188 * * * cdef class DelegatedThreadSafeSingleton(ThreadSafeSingleton): # <<<<<<<<<<<<<< @@ -1308,7 +1308,7 @@ struct __pyx_obj_19dependency_injector_9providers_DelegatedThreadSafeSingleton { }; -/* "dependency_injector/providers.pxd":188 +/* "dependency_injector/providers.pxd":192 * * * cdef class ThreadLocalSingleton(BaseSingleton): # <<<<<<<<<<<<<< @@ -1320,7 +1320,7 @@ struct __pyx_obj_19dependency_injector_9providers_ThreadLocalSingleton { }; -/* "dependency_injector/providers.pxd":193 +/* "dependency_injector/providers.pxd":197 * * * cdef class ContextLocalSingleton(BaseSingleton): # <<<<<<<<<<<<<< @@ -1332,7 +1332,7 @@ struct __pyx_obj_19dependency_injector_9providers_ContextLocalSingleton { }; -/* "dependency_injector/providers.pxd":198 +/* "dependency_injector/providers.pxd":202 * * * cdef class DelegatedThreadLocalSingleton(ThreadLocalSingleton): # <<<<<<<<<<<<<< @@ -1344,7 +1344,7 @@ struct __pyx_obj_19dependency_injector_9providers_DelegatedThreadLocalSingleton }; -/* "dependency_injector/providers.pxd":202 +/* "dependency_injector/providers.pxd":206 * * * cdef class AbstractSingleton(BaseSingleton): # <<<<<<<<<<<<<< @@ -1356,7 +1356,7 @@ struct __pyx_obj_19dependency_injector_9providers_AbstractSingleton { }; -/* "dependency_injector/providers.pxd":206 +/* "dependency_injector/providers.pxd":210 * * * cdef class SingletonDelegate(Delegate): # <<<<<<<<<<<<<< @@ -1368,7 +1368,7 @@ struct __pyx_obj_19dependency_injector_9providers_SingletonDelegate { }; -/* "dependency_injector/providers.pxd":212 +/* "dependency_injector/providers.pxd":216 * # Miscellaneous providers * * cdef class List(Provider): # <<<<<<<<<<<<<< @@ -1382,7 +1382,7 @@ struct __pyx_obj_19dependency_injector_9providers_List { }; -/* "dependency_injector/providers.pxd":219 +/* "dependency_injector/providers.pxd":223 * * * cdef class Dict(Provider): # <<<<<<<<<<<<<< @@ -1396,7 +1396,7 @@ struct __pyx_obj_19dependency_injector_9providers_Dict { }; -/* "dependency_injector/providers.pxd":226 +/* "dependency_injector/providers.pxd":230 * * * cdef class Resource(Provider): # <<<<<<<<<<<<<< @@ -1416,7 +1416,7 @@ struct __pyx_obj_19dependency_injector_9providers_Resource { }; -/* "dependency_injector/providers.pxd":241 +/* "dependency_injector/providers.pxd":245 * * * cdef class Container(Provider): # <<<<<<<<<<<<<< @@ -1432,7 +1432,7 @@ struct __pyx_obj_19dependency_injector_9providers_Container { }; -/* "dependency_injector/providers.pxd":250 +/* "dependency_injector/providers.pxd":254 * * * cdef class Selector(Provider): # <<<<<<<<<<<<<< @@ -1446,7 +1446,7 @@ struct __pyx_obj_19dependency_injector_9providers_Selector { }; -/* "dependency_injector/providers.pxd":258 +/* "dependency_injector/providers.pxd":262 * # Provided instance * * cdef class ProvidedInstance(Provider): # <<<<<<<<<<<<<< @@ -1459,7 +1459,7 @@ struct __pyx_obj_19dependency_injector_9providers_ProvidedInstance { }; -/* "dependency_injector/providers.pxd":264 +/* "dependency_injector/providers.pxd":268 * * * cdef class AttributeGetter(Provider): # <<<<<<<<<<<<<< @@ -1473,7 +1473,7 @@ struct __pyx_obj_19dependency_injector_9providers_AttributeGetter { }; -/* "dependency_injector/providers.pxd":271 +/* "dependency_injector/providers.pxd":275 * * * cdef class ItemGetter(Provider): # <<<<<<<<<<<<<< @@ -1487,7 +1487,7 @@ struct __pyx_obj_19dependency_injector_9providers_ItemGetter { }; -/* "dependency_injector/providers.pxd":278 +/* "dependency_injector/providers.pxd":282 * * * cdef class MethodCaller(Provider): # <<<<<<<<<<<<<< @@ -1504,7 +1504,7 @@ struct __pyx_obj_19dependency_injector_9providers_MethodCaller { }; -/* "dependency_injector/providers.pxd":289 +/* "dependency_injector/providers.pxd":293 * * # Injections * cdef class Injection(object): # <<<<<<<<<<<<<< @@ -1520,7 +1520,7 @@ struct __pyx_obj_19dependency_injector_9providers_Injection { }; -/* "dependency_injector/providers.pxd":296 +/* "dependency_injector/providers.pxd":300 * * * cdef class PositionalInjection(Injection): # <<<<<<<<<<<<<< @@ -1532,7 +1532,7 @@ struct __pyx_obj_19dependency_injector_9providers_PositionalInjection { }; -/* "dependency_injector/providers.pxd":300 +/* "dependency_injector/providers.pxd":304 * * * cdef class NamedInjection(Injection): # <<<<<<<<<<<<<< @@ -1545,7 +1545,7 @@ struct __pyx_obj_19dependency_injector_9providers_NamedInjection { }; -/* "dependency_injector/providers.pxd":311 +/* "dependency_injector/providers.pxd":315 * * # Utils * cdef class OverridingContext(object): # <<<<<<<<<<<<<< @@ -1559,7 +1559,7 @@ struct __pyx_obj_19dependency_injector_9providers_OverridingContext { }; -/* "dependency_injector/providers.pxd":316 +/* "dependency_injector/providers.pxd":320 * * * cdef class BaseSingletonResetContext(object): # <<<<<<<<<<<<<< @@ -1572,7 +1572,7 @@ struct __pyx_obj_19dependency_injector_9providers_BaseSingletonResetContext { }; -/* "dependency_injector/providers.pxd":320 +/* "dependency_injector/providers.pxd":324 * * * cdef class SingletonResetContext(BaseSingletonResetContext): # <<<<<<<<<<<<<< @@ -1584,7 +1584,7 @@ struct __pyx_obj_19dependency_injector_9providers_SingletonResetContext { }; -/* "dependency_injector/providers.pxd":324 +/* "dependency_injector/providers.pxd":328 * * * cdef class SingletonFullResetContext(BaseSingletonResetContext): # <<<<<<<<<<<<<< @@ -1972,6 +1972,9 @@ struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object____object____object___to */ struct __pyx_vtabstruct_19dependency_injector_9providers_Provider { + int (*is_async_mode_enabled)(struct __pyx_obj_19dependency_injector_9providers_Provider *, int __pyx_skip_dispatch); + int (*is_async_mode_disabled)(struct __pyx_obj_19dependency_injector_9providers_Provider *, int __pyx_skip_dispatch); + int (*is_async_mode_undefined)(struct __pyx_obj_19dependency_injector_9providers_Provider *, int __pyx_skip_dispatch); PyObject *(*_provide)(struct __pyx_obj_19dependency_injector_9providers_Provider *, PyObject *, PyObject *, int __pyx_skip_dispatch); void (*_copy_overridings)(struct __pyx_obj_19dependency_injector_9providers_Provider *, struct __pyx_obj_19dependency_injector_9providers_Provider *, PyObject *, int __pyx_skip_dispatch); }; @@ -2948,6 +2951,11 @@ static CYTHON_INLINE int __Pyx_PySet_ContainsTF(PyObject* key, PyObject* set, in /* py_set_remove.proto */ static CYTHON_INLINE int __Pyx_PySet_Remove(PyObject *set, PyObject *key); +/* WriteUnraisableException.proto */ +static void __Pyx_WriteUnraisable(const char *name, int clineno, + int lineno, const char *filename, + int full_traceback, int nogil); + /* FetchCommonType.proto */ static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type); @@ -3057,11 +3065,6 @@ static CYTHON_INLINE PyObject* __Pyx_Generator_Yield_From(__pyx_CoroutineObject __Pyx__ArgTypeTest(obj, type, name, exact)) static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact); -/* WriteUnraisableException.proto */ -static void __Pyx_WriteUnraisable(const char *name, int clineno, - int lineno, const char *filename, - int full_traceback, int nogil); - /* GetAttr.proto */ static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *); @@ -3461,6 +3464,9 @@ static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *s /* InitStrings.proto */ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); +static int __pyx_f_19dependency_injector_9providers_8Provider_is_async_mode_enabled(struct __pyx_obj_19dependency_injector_9providers_Provider *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ +static int __pyx_f_19dependency_injector_9providers_8Provider_is_async_mode_disabled(struct __pyx_obj_19dependency_injector_9providers_Provider *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ +static int __pyx_f_19dependency_injector_9providers_8Provider_is_async_mode_undefined(struct __pyx_obj_19dependency_injector_9providers_Provider *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ static PyObject *__pyx_f_19dependency_injector_9providers_8Provider__provide(CYTHON_UNUSED struct __pyx_obj_19dependency_injector_9providers_Provider *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs, int __pyx_skip_dispatch); /* proto*/ static void __pyx_f_19dependency_injector_9providers_8Provider__copy_overridings(struct __pyx_obj_19dependency_injector_9providers_Provider *__pyx_v_self, struct __pyx_obj_19dependency_injector_9providers_Provider *__pyx_v_copied, PyObject *__pyx_v_memo, int __pyx_skip_dispatch); /* proto*/ static PyObject *__pyx_f_19dependency_injector_9providers_6Object__provide(struct __pyx_obj_19dependency_injector_9providers_Object *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs, int __pyx_skip_dispatch); /* proto*/ @@ -4106,6 +4112,7 @@ static const char __pyx_k_ContextLocalSingleton[] = "ContextLocalSingleton"; static const char __pyx_k_DependenciesContainer[] = "DependenciesContainer"; static const char __pyx_k_SingletonResetContext[] = "SingletonResetContext"; static const char __pyx_k_get_pydantic_settings[] = "get_pydantic_settings"; +static const char __pyx_k_is_async_mode_enabled[] = "is_async_mode_enabled"; static const char __pyx_k_iscoroutine_typecache[] = "__iscoroutine_typecache"; static const char __pyx_k_pyx_unpickle_Callable[] = "__pyx_unpickle_Callable"; static const char __pyx_k_pyx_unpickle_Delegate[] = "__pyx_unpickle_Delegate"; @@ -4119,6 +4126,7 @@ static const char __pyx_k_resolve_string_import[] = "_resolve_string_import"; static const char __pyx_k_set_pydantic_settings[] = "set_pydantic_settings"; static const char __pyx_k_ProvidedInstance___get[] = "ProvidedInstance.__get__"; static const char __pyx_k_create_shutdown_future[] = "_create_shutdown_future"; +static const char __pyx_k_is_async_mode_disabled[] = "is_async_mode_disabled"; static const char __pyx_k_is_strict_mode_enabled[] = "_is_strict_mode_enabled"; static const char __pyx_k_pyx_unpickle_Aggregate[] = "__pyx_unpickle_Aggregate"; static const char __pyx_k_pyx_unpickle_Container[] = "__pyx_unpickle_Container"; @@ -4128,6 +4136,7 @@ static const char __pyx_k_pyx_unpickle_Singleton[] = "__pyx_unpickle_Singleton"; static const char __pyx_k_resolve_calling_module[] = "_resolve_calling_module"; static const char __pyx_k_async_shutdown_callback[] = "_async_shutdown_callback"; static const char __pyx_k_asyncio_future_blocking[] = "_asyncio_future_blocking"; +static const char __pyx_k_is_async_mode_undefined[] = "is_async_mode_undefined"; static const char __pyx_k_pyx_unpickle_Dependency[] = "__pyx_unpickle_Dependency"; static const char __pyx_k_pyx_unpickle_ItemGetter[] = "__pyx_unpickle_ItemGetter"; static const char __pyx_k_TypedConfigurationOption[] = "TypedConfigurationOption"; @@ -4585,6 +4594,9 @@ static PyObject *__pyx_n_s_instance; static PyObject *__pyx_n_s_instance_of; static PyObject *__pyx_kp_s_instance_of_has_incorrect_type; static PyObject *__pyx_kp_u_instead; +static PyObject *__pyx_n_s_is_async_mode_disabled; +static PyObject *__pyx_n_s_is_async_mode_enabled; +static PyObject *__pyx_n_s_is_async_mode_undefined; static PyObject *__pyx_n_s_is_async_resource_subclass; static PyObject *__pyx_n_s_is_coroutine; static PyObject *__pyx_n_s_is_coroutine_marker; @@ -10072,7 +10084,7 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Provider_30reset_asy * """ * self.__async_mode = ASYNC_MODE_UNDEFINED # <<<<<<<<<<<<<< * - * def is_async_mode_enabled(self): + * cpdef bint is_async_mode_enabled(self): */ __pyx_v_self->__pyx___async_mode = __pyx_v_19dependency_injector_9providers_ASYNC_MODE_UNDEFINED; @@ -10094,11 +10106,102 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Provider_30reset_asy /* "dependency_injector/providers.pyx":409 * self.__async_mode = ASYNC_MODE_UNDEFINED * - * def is_async_mode_enabled(self): # <<<<<<<<<<<<<< + * cpdef bint is_async_mode_enabled(self): # <<<<<<<<<<<<<< * """Check if async mode is enabled.""" * return self.__async_mode == ASYNC_MODE_ENABLED */ +static PyObject *__pyx_pw_19dependency_injector_9providers_8Provider_33is_async_mode_enabled(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static int __pyx_f_19dependency_injector_9providers_8Provider_is_async_mode_enabled(struct __pyx_obj_19dependency_injector_9providers_Provider *__pyx_v_self, int __pyx_skip_dispatch) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("is_async_mode_enabled", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_async_mode_enabled); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 409, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_19dependency_injector_9providers_8Provider_33is_async_mode_enabled)) { + __Pyx_INCREF(__pyx_t_1); + __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 409, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 409, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_5; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "dependency_injector/providers.pyx":411 + * cpdef bint is_async_mode_enabled(self): + * """Check if async mode is enabled.""" + * return self.__async_mode == ASYNC_MODE_ENABLED # <<<<<<<<<<<<<< + * + * cpdef bint is_async_mode_disabled(self): + */ + __pyx_r = (__pyx_v_self->__pyx___async_mode == __pyx_v_19dependency_injector_9providers_ASYNC_MODE_ENABLED); + goto __pyx_L0; + + /* "dependency_injector/providers.pyx":409 + * self.__async_mode = ASYNC_MODE_UNDEFINED + * + * cpdef bint is_async_mode_enabled(self): # <<<<<<<<<<<<<< + * """Check if async mode is enabled.""" + * return self.__async_mode == ASYNC_MODE_ENABLED + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_WriteUnraisable("dependency_injector.providers.Provider.is_async_mode_enabled", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); + __pyx_r = 0; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + /* Python wrapper */ static PyObject *__pyx_pw_19dependency_injector_9providers_8Provider_33is_async_mode_enabled(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_19dependency_injector_9providers_8Provider_32is_async_mode_enabled[] = "Check if async mode is enabled."; @@ -10121,29 +10224,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Provider_32is_async_ const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_async_mode_enabled", 0); - - /* "dependency_injector/providers.pyx":411 - * def is_async_mode_enabled(self): - * """Check if async mode is enabled.""" - * return self.__async_mode == ASYNC_MODE_ENABLED # <<<<<<<<<<<<<< - * - * def is_async_mode_disabled(self): - */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_self->__pyx___async_mode == __pyx_v_19dependency_injector_9providers_ASYNC_MODE_ENABLED)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 411, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_19dependency_injector_9providers_8Provider_is_async_mode_enabled(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 409, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":409 - * self.__async_mode = ASYNC_MODE_UNDEFINED - * - * def is_async_mode_enabled(self): # <<<<<<<<<<<<<< - * """Check if async mode is enabled.""" - * return self.__async_mode == ASYNC_MODE_ENABLED - */ - /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); @@ -10158,11 +10245,102 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Provider_32is_async_ /* "dependency_injector/providers.pyx":413 * return self.__async_mode == ASYNC_MODE_ENABLED * - * def is_async_mode_disabled(self): # <<<<<<<<<<<<<< + * cpdef bint is_async_mode_disabled(self): # <<<<<<<<<<<<<< * """Check if async mode is disabled.""" * return self.__async_mode == ASYNC_MODE_DISABLED */ +static PyObject *__pyx_pw_19dependency_injector_9providers_8Provider_35is_async_mode_disabled(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static int __pyx_f_19dependency_injector_9providers_8Provider_is_async_mode_disabled(struct __pyx_obj_19dependency_injector_9providers_Provider *__pyx_v_self, int __pyx_skip_dispatch) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("is_async_mode_disabled", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_async_mode_disabled); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 413, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_19dependency_injector_9providers_8Provider_35is_async_mode_disabled)) { + __Pyx_INCREF(__pyx_t_1); + __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 413, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 413, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_5; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "dependency_injector/providers.pyx":415 + * cpdef bint is_async_mode_disabled(self): + * """Check if async mode is disabled.""" + * return self.__async_mode == ASYNC_MODE_DISABLED # <<<<<<<<<<<<<< + * + * cpdef bint is_async_mode_undefined(self): + */ + __pyx_r = (__pyx_v_self->__pyx___async_mode == __pyx_v_19dependency_injector_9providers_ASYNC_MODE_DISABLED); + goto __pyx_L0; + + /* "dependency_injector/providers.pyx":413 + * return self.__async_mode == ASYNC_MODE_ENABLED + * + * cpdef bint is_async_mode_disabled(self): # <<<<<<<<<<<<<< + * """Check if async mode is disabled.""" + * return self.__async_mode == ASYNC_MODE_DISABLED + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_WriteUnraisable("dependency_injector.providers.Provider.is_async_mode_disabled", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); + __pyx_r = 0; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + /* Python wrapper */ static PyObject *__pyx_pw_19dependency_injector_9providers_8Provider_35is_async_mode_disabled(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_19dependency_injector_9providers_8Provider_34is_async_mode_disabled[] = "Check if async mode is disabled."; @@ -10185,29 +10363,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Provider_34is_async_ const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_async_mode_disabled", 0); - - /* "dependency_injector/providers.pyx":415 - * def is_async_mode_disabled(self): - * """Check if async mode is disabled.""" - * return self.__async_mode == ASYNC_MODE_DISABLED # <<<<<<<<<<<<<< - * - * def is_async_mode_undefined(self): - */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_self->__pyx___async_mode == __pyx_v_19dependency_injector_9providers_ASYNC_MODE_DISABLED)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 415, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_19dependency_injector_9providers_8Provider_is_async_mode_disabled(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 413, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":413 - * return self.__async_mode == ASYNC_MODE_ENABLED - * - * def is_async_mode_disabled(self): # <<<<<<<<<<<<<< - * """Check if async mode is disabled.""" - * return self.__async_mode == ASYNC_MODE_DISABLED - */ - /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); @@ -10222,11 +10384,102 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Provider_34is_async_ /* "dependency_injector/providers.pyx":417 * return self.__async_mode == ASYNC_MODE_DISABLED * - * def is_async_mode_undefined(self): # <<<<<<<<<<<<<< + * cpdef bint is_async_mode_undefined(self): # <<<<<<<<<<<<<< * """Check if async mode is undefined.""" * return self.__async_mode == ASYNC_MODE_UNDEFINED */ +static PyObject *__pyx_pw_19dependency_injector_9providers_8Provider_37is_async_mode_undefined(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static int __pyx_f_19dependency_injector_9providers_8Provider_is_async_mode_undefined(struct __pyx_obj_19dependency_injector_9providers_Provider *__pyx_v_self, int __pyx_skip_dispatch) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("is_async_mode_undefined", 0); + /* Check if called by wrapper */ + if (unlikely(__pyx_skip_dispatch)) ; + /* Check if overridden in Python */ + else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { + PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_async_mode_undefined); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 417, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_19dependency_injector_9providers_8Provider_37is_async_mode_undefined)) { + __Pyx_INCREF(__pyx_t_1); + __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 417, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 417, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_5; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); + __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); + if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { + __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; + } + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS + } + #endif + } + + /* "dependency_injector/providers.pyx":419 + * cpdef bint is_async_mode_undefined(self): + * """Check if async mode is undefined.""" + * return self.__async_mode == ASYNC_MODE_UNDEFINED # <<<<<<<<<<<<<< + * + * @property + */ + __pyx_r = (__pyx_v_self->__pyx___async_mode == __pyx_v_19dependency_injector_9providers_ASYNC_MODE_UNDEFINED); + goto __pyx_L0; + + /* "dependency_injector/providers.pyx":417 + * return self.__async_mode == ASYNC_MODE_DISABLED + * + * cpdef bint is_async_mode_undefined(self): # <<<<<<<<<<<<<< + * """Check if async mode is undefined.""" + * return self.__async_mode == ASYNC_MODE_UNDEFINED + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_WriteUnraisable("dependency_injector.providers.Provider.is_async_mode_undefined", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); + __pyx_r = 0; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + /* Python wrapper */ static PyObject *__pyx_pw_19dependency_injector_9providers_8Provider_37is_async_mode_undefined(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_19dependency_injector_9providers_8Provider_36is_async_mode_undefined[] = "Check if async mode is undefined."; @@ -10249,29 +10502,13 @@ static PyObject *__pyx_pf_19dependency_injector_9providers_8Provider_36is_async_ const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_async_mode_undefined", 0); - - /* "dependency_injector/providers.pyx":419 - * def is_async_mode_undefined(self): - * """Check if async mode is undefined.""" - * return self.__async_mode == ASYNC_MODE_UNDEFINED # <<<<<<<<<<<<<< - * - * @property - */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_self->__pyx___async_mode == __pyx_v_19dependency_injector_9providers_ASYNC_MODE_UNDEFINED)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 419, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_19dependency_injector_9providers_8Provider_is_async_mode_undefined(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 417, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pyx":417 - * return self.__async_mode == ASYNC_MODE_DISABLED - * - * def is_async_mode_undefined(self): # <<<<<<<<<<<<<< - * """Check if async mode is undefined.""" - * return self.__async_mode == ASYNC_MODE_UNDEFINED - */ - /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); @@ -121394,7 +121631,7 @@ static PyObject *__pyx_f_19dependency_injector_9providers___pyx_unpickle_Singlet return __pyx_r; } -/* "dependency_injector/providers.pxd":353 +/* "dependency_injector/providers.pxd":357 * * # Inline helper functions * cdef inline object __get_name(NamedInjection self): # <<<<<<<<<<<<<< @@ -121407,7 +121644,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___get_na __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get_name", 0); - /* "dependency_injector/providers.pxd":354 + /* "dependency_injector/providers.pxd":358 * # Inline helper functions * cdef inline object __get_name(NamedInjection self): * return self.__name # <<<<<<<<<<<<<< @@ -121419,7 +121656,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":353 + /* "dependency_injector/providers.pxd":357 * * # Inline helper functions * cdef inline object __get_name(NamedInjection self): # <<<<<<<<<<<<<< @@ -121434,7 +121671,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___get_na return __pyx_r; } -/* "dependency_injector/providers.pxd":357 +/* "dependency_injector/providers.pxd":361 * * * cdef inline object __get_value(Injection self): # <<<<<<<<<<<<<< @@ -121454,7 +121691,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___get_va int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get_value", 0); - /* "dependency_injector/providers.pxd":358 + /* "dependency_injector/providers.pxd":362 * * cdef inline object __get_value(Injection self): * if self.__call == 0: # <<<<<<<<<<<<<< @@ -121464,7 +121701,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":359 + /* "dependency_injector/providers.pxd":363 * cdef inline object __get_value(Injection self): * if self.__call == 0: * return self.__value # <<<<<<<<<<<<<< @@ -121476,7 +121713,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":358 + /* "dependency_injector/providers.pxd":362 * * cdef inline object __get_value(Injection self): * if self.__call == 0: # <<<<<<<<<<<<<< @@ -121485,7 +121722,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___get_va */ } - /* "dependency_injector/providers.pxd":360 + /* "dependency_injector/providers.pxd":364 * if self.__call == 0: * return self.__value * return self.__value() # <<<<<<<<<<<<<< @@ -121506,14 +121743,14 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___get_va } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 360, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 364, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pxd":357 + /* "dependency_injector/providers.pxd":361 * * * cdef inline object __get_value(Injection self): # <<<<<<<<<<<<<< @@ -121534,7 +121771,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___get_va return __pyx_r; } -/* "dependency_injector/providers.pxd":363 +/* "dependency_injector/providers.pxd":367 * * * cdef inline object __get_value_kwargs(Injection self, dict kwargs): # <<<<<<<<<<<<<< @@ -121553,7 +121790,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___get_va int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get_value_kwargs", 0); - /* "dependency_injector/providers.pxd":364 + /* "dependency_injector/providers.pxd":368 * * cdef inline object __get_value_kwargs(Injection self, dict kwargs): * if self.__call == 0: # <<<<<<<<<<<<<< @@ -121563,7 +121800,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":365 + /* "dependency_injector/providers.pxd":369 * cdef inline object __get_value_kwargs(Injection self, dict kwargs): * if self.__call == 0: * return self.__value # <<<<<<<<<<<<<< @@ -121575,7 +121812,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":364 + /* "dependency_injector/providers.pxd":368 * * cdef inline object __get_value_kwargs(Injection self, dict kwargs): * if self.__call == 0: # <<<<<<<<<<<<<< @@ -121584,7 +121821,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___get_va */ } - /* "dependency_injector/providers.pxd":366 + /* "dependency_injector/providers.pxd":370 * if self.__call == 0: * return self.__value * return self.__value(**kwargs) # <<<<<<<<<<<<<< @@ -121594,18 +121831,18 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___get_va __Pyx_XDECREF(__pyx_r); if (unlikely(__pyx_v_kwargs == Py_None)) { PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); - __PYX_ERR(0, 366, __pyx_L1_error) + __PYX_ERR(0, 370, __pyx_L1_error) } - __pyx_t_2 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 366, __pyx_L1_error) + __pyx_t_2 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 370, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_v_self->__pyx___value, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 366, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_v_self->__pyx___value, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 370, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pxd":363 + /* "dependency_injector/providers.pxd":367 * * * cdef inline object __get_value_kwargs(Injection self, dict kwargs): # <<<<<<<<<<<<<< @@ -121625,7 +121862,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___get_va return __pyx_r; } -/* "dependency_injector/providers.pxd":369 +/* "dependency_injector/providers.pxd":373 * * * cdef inline tuple __separate_prefixed_kwargs(dict kwargs): # <<<<<<<<<<<<<< @@ -121658,31 +121895,31 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___separa int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__separate_prefixed_kwargs", 0); - /* "dependency_injector/providers.pxd":370 + /* "dependency_injector/providers.pxd":374 * * cdef inline tuple __separate_prefixed_kwargs(dict kwargs): * cdef dict plain_kwargs = {} # <<<<<<<<<<<<<< * cdef dict prefixed_kwargs = {} * */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 370, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 374, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_plain_kwargs = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pxd":371 + /* "dependency_injector/providers.pxd":375 * cdef inline tuple __separate_prefixed_kwargs(dict kwargs): * cdef dict plain_kwargs = {} * cdef dict prefixed_kwargs = {} # <<<<<<<<<<<<<< * * for key, value in kwargs.items(): */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 371, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 375, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_prefixed_kwargs = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pxd":373 + /* "dependency_injector/providers.pxd":377 * cdef dict prefixed_kwargs = {} * * for key, value in kwargs.items(): # <<<<<<<<<<<<<< @@ -121691,17 +121928,17 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___separa */ if (unlikely(__pyx_v_kwargs == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); - __PYX_ERR(0, 373, __pyx_L1_error) + __PYX_ERR(0, 377, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_Items(__pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 373, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_Items(__pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 377, __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(0, 373, __pyx_L1_error) + __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 377, __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(0, 373, __pyx_L1_error) + __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 377, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -121709,17 +121946,17 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___separa 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(0, 373, __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(0, 377, __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(0, 373, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 377, __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(0, 373, __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(0, 377, __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(0, 373, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 377, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -121729,7 +121966,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___separa PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 373, __pyx_L1_error) + else __PYX_ERR(0, 377, __pyx_L1_error) } break; } @@ -121741,7 +121978,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___separa if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 373, __pyx_L1_error) + __PYX_ERR(0, 377, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -121754,15 +121991,15 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___separa __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(0, 373, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 377, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 373, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 377, __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(0, 373, __pyx_L1_error) + __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 377, __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; @@ -121770,7 +122007,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___separa __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(0, 373, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 377, __pyx_L1_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L6_unpacking_done; @@ -121778,7 +122015,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___separa __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 373, __pyx_L1_error) + __PYX_ERR(0, 377, __pyx_L1_error) __pyx_L6_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_5); @@ -121786,27 +122023,27 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___separa __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_6); __pyx_t_6 = 0; - /* "dependency_injector/providers.pxd":374 + /* "dependency_injector/providers.pxd":378 * * for key, value in kwargs.items(): * if "__" not in key: # <<<<<<<<<<<<<< * plain_kwargs[key] = value * continue */ - __pyx_t_9 = (__Pyx_PySequence_ContainsTF(__pyx_n_s__11, __pyx_v_key, Py_NE)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 374, __pyx_L1_error) + __pyx_t_9 = (__Pyx_PySequence_ContainsTF(__pyx_n_s__11, __pyx_v_key, Py_NE)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 378, __pyx_L1_error) __pyx_t_10 = (__pyx_t_9 != 0); if (__pyx_t_10) { - /* "dependency_injector/providers.pxd":375 + /* "dependency_injector/providers.pxd":379 * for key, value in kwargs.items(): * if "__" not in key: * plain_kwargs[key] = value # <<<<<<<<<<<<<< * continue * */ - if (unlikely(PyDict_SetItem(__pyx_v_plain_kwargs, __pyx_v_key, __pyx_v_value) < 0)) __PYX_ERR(0, 375, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_plain_kwargs, __pyx_v_key, __pyx_v_value) < 0)) __PYX_ERR(0, 379, __pyx_L1_error) - /* "dependency_injector/providers.pxd":376 + /* "dependency_injector/providers.pxd":380 * if "__" not in key: * plain_kwargs[key] = value * continue # <<<<<<<<<<<<<< @@ -121815,7 +122052,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___separa */ goto __pyx_L3_continue; - /* "dependency_injector/providers.pxd":374 + /* "dependency_injector/providers.pxd":378 * * for key, value in kwargs.items(): * if "__" not in key: # <<<<<<<<<<<<<< @@ -121824,14 +122061,14 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___separa */ } - /* "dependency_injector/providers.pxd":378 + /* "dependency_injector/providers.pxd":382 * continue * * index = key.index("__") # <<<<<<<<<<<<<< * prefix, name = key[:index], key[index+2:] * */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_key, __pyx_n_s_index); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 378, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_key, __pyx_n_s_index); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 382, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { @@ -121845,24 +122082,24 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___separa } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_5, __pyx_n_s__11) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_n_s__11); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 378, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 382, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF_SET(__pyx_v_index, __pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pxd":379 + /* "dependency_injector/providers.pxd":383 * * index = key.index("__") * prefix, name = key[:index], key[index+2:] # <<<<<<<<<<<<<< * * if prefix not in prefixed_kwargs: */ - __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_key, 0, 0, NULL, &__pyx_v_index, NULL, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 379, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_key, 0, 0, NULL, &__pyx_v_index, NULL, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 383, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_v_index, __pyx_int_2, 2, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 379, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_v_index, __pyx_int_2, 2, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 383, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_v_key, 0, 0, &__pyx_t_6, NULL, NULL, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 379, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_v_key, 0, 0, &__pyx_t_6, NULL, NULL, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 383, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF_SET(__pyx_v_prefix, __pyx_t_1); @@ -121870,30 +122107,30 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___separa __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_5); __pyx_t_5 = 0; - /* "dependency_injector/providers.pxd":381 + /* "dependency_injector/providers.pxd":385 * prefix, name = key[:index], key[index+2:] * * if prefix not in prefixed_kwargs: # <<<<<<<<<<<<<< * prefixed_kwargs[prefix] = {} * prefixed_kwargs[prefix][name] = value */ - __pyx_t_10 = (__Pyx_PyDict_ContainsTF(__pyx_v_prefix, __pyx_v_prefixed_kwargs, Py_NE)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 381, __pyx_L1_error) + __pyx_t_10 = (__Pyx_PyDict_ContainsTF(__pyx_v_prefix, __pyx_v_prefixed_kwargs, Py_NE)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 385, __pyx_L1_error) __pyx_t_9 = (__pyx_t_10 != 0); if (__pyx_t_9) { - /* "dependency_injector/providers.pxd":382 + /* "dependency_injector/providers.pxd":386 * * if prefix not in prefixed_kwargs: * prefixed_kwargs[prefix] = {} # <<<<<<<<<<<<<< * prefixed_kwargs[prefix][name] = value * */ - __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 382, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 386, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (unlikely(PyDict_SetItem(__pyx_v_prefixed_kwargs, __pyx_v_prefix, __pyx_t_5) < 0)) __PYX_ERR(0, 382, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_prefixed_kwargs, __pyx_v_prefix, __pyx_t_5) < 0)) __PYX_ERR(0, 386, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "dependency_injector/providers.pxd":381 + /* "dependency_injector/providers.pxd":385 * prefix, name = key[:index], key[index+2:] * * if prefix not in prefixed_kwargs: # <<<<<<<<<<<<<< @@ -121902,19 +122139,19 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___separa */ } - /* "dependency_injector/providers.pxd":383 + /* "dependency_injector/providers.pxd":387 * if prefix not in prefixed_kwargs: * prefixed_kwargs[prefix] = {} * prefixed_kwargs[prefix][name] = value # <<<<<<<<<<<<<< * * return plain_kwargs, prefixed_kwargs */ - __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_prefixed_kwargs, __pyx_v_prefix); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 383, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_prefixed_kwargs, __pyx_v_prefix); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 387, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (unlikely(PyObject_SetItem(__pyx_t_5, __pyx_v_name, __pyx_v_value) < 0)) __PYX_ERR(0, 383, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_t_5, __pyx_v_name, __pyx_v_value) < 0)) __PYX_ERR(0, 387, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "dependency_injector/providers.pxd":373 + /* "dependency_injector/providers.pxd":377 * cdef dict prefixed_kwargs = {} * * for key, value in kwargs.items(): # <<<<<<<<<<<<<< @@ -121925,7 +122162,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___separa } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pxd":385 + /* "dependency_injector/providers.pxd":389 * prefixed_kwargs[prefix][name] = value * * return plain_kwargs, prefixed_kwargs # <<<<<<<<<<<<<< @@ -121933,7 +122170,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___separa * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 385, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 389, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_plain_kwargs); __Pyx_GIVEREF(__pyx_v_plain_kwargs); @@ -121945,7 +122182,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___separa __pyx_t_2 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pxd":369 + /* "dependency_injector/providers.pxd":373 * * * cdef inline tuple __separate_prefixed_kwargs(dict kwargs): # <<<<<<<<<<<<<< @@ -121975,7 +122212,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___separa return __pyx_r; } -/* "dependency_injector/providers.pxd":390 +/* "dependency_injector/providers.pxd":394 * @cython.boundscheck(False) * @cython.wraparound(False) * cdef inline object __provide_positional_args( # <<<<<<<<<<<<<< @@ -122004,31 +122241,31 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__provide_positional_args", 0); - /* "dependency_injector/providers.pxd":397 + /* "dependency_injector/providers.pxd":401 * ): * cdef int index * cdef list positional_args = [] # <<<<<<<<<<<<<< * cdef list future_args = [] * cdef PositionalInjection injection */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 397, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 401, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_positional_args = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pxd":398 + /* "dependency_injector/providers.pxd":402 * cdef int index * cdef list positional_args = [] * cdef list future_args = [] # <<<<<<<<<<<<<< * cdef PositionalInjection injection * cdef object value */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 398, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 402, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_future_args = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pxd":402 + /* "dependency_injector/providers.pxd":406 * cdef object value * * if inj_args_len == 0: # <<<<<<<<<<<<<< @@ -122038,7 +122275,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid __pyx_t_2 = ((__pyx_v_inj_args_len == 0) != 0); if (__pyx_t_2) { - /* "dependency_injector/providers.pxd":403 + /* "dependency_injector/providers.pxd":407 * * if inj_args_len == 0: * return args # <<<<<<<<<<<<<< @@ -122050,7 +122287,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid __pyx_r = __pyx_v_args; goto __pyx_L0; - /* "dependency_injector/providers.pxd":402 + /* "dependency_injector/providers.pxd":406 * cdef object value * * if inj_args_len == 0: # <<<<<<<<<<<<<< @@ -122059,7 +122296,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid */ } - /* "dependency_injector/providers.pxd":405 + /* "dependency_injector/providers.pxd":409 * return args * * for index in range(inj_args_len): # <<<<<<<<<<<<<< @@ -122071,7 +122308,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { __pyx_v_index = __pyx_t_5; - /* "dependency_injector/providers.pxd":406 + /* "dependency_injector/providers.pxd":410 * * for index in range(inj_args_len): * injection = inj_args[index] # <<<<<<<<<<<<<< @@ -122080,35 +122317,35 @@ 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, 406, __pyx_L1_error) + __PYX_ERR(0, 410, __pyx_L1_error) } __pyx_t_1 = PyTuple_GET_ITEM(__pyx_v_inj_args, __pyx_v_index); __Pyx_INCREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_injection, ((struct __pyx_obj_19dependency_injector_9providers_PositionalInjection *)__pyx_t_1)); __pyx_t_1 = 0; - /* "dependency_injector/providers.pxd":407 + /* "dependency_injector/providers.pxd":411 * for index in range(inj_args_len): * injection = inj_args[index] * value = __get_value(injection) # <<<<<<<<<<<<<< * positional_args.append(value) * */ - __pyx_t_1 = __pyx_f_19dependency_injector_9providers___get_value(((struct __pyx_obj_19dependency_injector_9providers_Injection *)__pyx_v_injection)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 407, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers___get_value(((struct __pyx_obj_19dependency_injector_9providers_Injection *)__pyx_v_injection)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 411, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pxd":408 + /* "dependency_injector/providers.pxd":412 * injection = inj_args[index] * value = __get_value(injection) * positional_args.append(value) # <<<<<<<<<<<<<< * * if async_mode != ASYNC_MODE_DISABLED and __is_future_or_coroutine(value): */ - __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_positional_args, __pyx_v_value); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 408, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_positional_args, __pyx_v_value); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 412, __pyx_L1_error) - /* "dependency_injector/providers.pxd":410 + /* "dependency_injector/providers.pxd":414 * positional_args.append(value) * * if async_mode != ASYNC_MODE_DISABLED and __is_future_or_coroutine(value): # <<<<<<<<<<<<<< @@ -122126,16 +122363,16 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid __pyx_L7_bool_binop_done:; if (__pyx_t_2) { - /* "dependency_injector/providers.pxd":411 + /* "dependency_injector/providers.pxd":415 * * if async_mode != ASYNC_MODE_DISABLED and __is_future_or_coroutine(value): * future_args.append((index, value)) # <<<<<<<<<<<<<< * * positional_args.extend(args) */ - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 411, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 415, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 411, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 415, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1); @@ -122143,10 +122380,10 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid __Pyx_GIVEREF(__pyx_v_value); PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_value); __pyx_t_1 = 0; - __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_future_args, __pyx_t_8); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 411, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_future_args, __pyx_t_8); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 415, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "dependency_injector/providers.pxd":410 + /* "dependency_injector/providers.pxd":414 * positional_args.append(value) * * if async_mode != ASYNC_MODE_DISABLED and __is_future_or_coroutine(value): # <<<<<<<<<<<<<< @@ -122156,16 +122393,16 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid } } - /* "dependency_injector/providers.pxd":413 + /* "dependency_injector/providers.pxd":417 * future_args.append((index, value)) * * positional_args.extend(args) # <<<<<<<<<<<<<< * * if future_args: */ - __pyx_t_6 = __Pyx_PyList_Extend(__pyx_v_positional_args, __pyx_v_args); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 413, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyList_Extend(__pyx_v_positional_args, __pyx_v_args); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 417, __pyx_L1_error) - /* "dependency_injector/providers.pxd":415 + /* "dependency_injector/providers.pxd":419 * positional_args.extend(args) * * if future_args: # <<<<<<<<<<<<<< @@ -122175,7 +122412,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid __pyx_t_2 = (PyList_GET_SIZE(__pyx_v_future_args) != 0); if (__pyx_t_2) { - /* "dependency_injector/providers.pxd":416 + /* "dependency_injector/providers.pxd":420 * * if future_args: * return __combine_future_injections(positional_args, future_args) # <<<<<<<<<<<<<< @@ -122183,13 +122420,13 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid * return positional_args */ __Pyx_XDECREF(__pyx_r); - __pyx_t_8 = __pyx_f_19dependency_injector_9providers___combine_future_injections(__pyx_v_positional_args, __pyx_v_future_args); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 416, __pyx_L1_error) + __pyx_t_8 = __pyx_f_19dependency_injector_9providers___combine_future_injections(__pyx_v_positional_args, __pyx_v_future_args); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 420, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_r = __pyx_t_8; __pyx_t_8 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pxd":415 + /* "dependency_injector/providers.pxd":419 * positional_args.extend(args) * * if future_args: # <<<<<<<<<<<<<< @@ -122198,7 +122435,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid */ } - /* "dependency_injector/providers.pxd":418 + /* "dependency_injector/providers.pxd":422 * return __combine_future_injections(positional_args, future_args) * * return positional_args # <<<<<<<<<<<<<< @@ -122210,7 +122447,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid __pyx_r = __pyx_v_positional_args; goto __pyx_L0; - /* "dependency_injector/providers.pxd":390 + /* "dependency_injector/providers.pxd":394 * @cython.boundscheck(False) * @cython.wraparound(False) * cdef inline object __provide_positional_args( # <<<<<<<<<<<<<< @@ -122234,7 +122471,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid return __pyx_r; } -/* "dependency_injector/providers.pxd":423 +/* "dependency_injector/providers.pxd":427 * @cython.boundscheck(False) * @cython.wraparound(False) * cdef inline object __provide_keyword_args( # <<<<<<<<<<<<<< @@ -122267,31 +122504,31 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid __Pyx_RefNannySetupContext("__provide_keyword_args", 0); __Pyx_INCREF(__pyx_v_kwargs); - /* "dependency_injector/providers.pxd":432 + /* "dependency_injector/providers.pxd":436 * cdef object name * cdef object value * cdef dict prefixed = {} # <<<<<<<<<<<<<< * cdef list future_kwargs = [] * cdef NamedInjection kw_injection */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 432, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 436, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_prefixed = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pxd":433 + /* "dependency_injector/providers.pxd":437 * cdef object value * cdef dict prefixed = {} * cdef list future_kwargs = [] # <<<<<<<<<<<<<< * cdef NamedInjection kw_injection * */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 433, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 437, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_future_kwargs = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pxd":436 + /* "dependency_injector/providers.pxd":440 * cdef NamedInjection kw_injection * * if len(kwargs) == 0: # <<<<<<<<<<<<<< @@ -122300,13 +122537,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, 436, __pyx_L1_error) + __PYX_ERR(0, 440, __pyx_L1_error) } - __pyx_t_2 = PyDict_Size(__pyx_v_kwargs); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 436, __pyx_L1_error) + __pyx_t_2 = PyDict_Size(__pyx_v_kwargs); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 440, __pyx_L1_error) __pyx_t_3 = ((__pyx_t_2 == 0) != 0); if (__pyx_t_3) { - /* "dependency_injector/providers.pxd":437 + /* "dependency_injector/providers.pxd":441 * * if len(kwargs) == 0: * for index in range(inj_kwargs_len): # <<<<<<<<<<<<<< @@ -122318,7 +122555,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { __pyx_v_index = __pyx_t_6; - /* "dependency_injector/providers.pxd":438 + /* "dependency_injector/providers.pxd":442 * if len(kwargs) == 0: * for index in range(inj_kwargs_len): * kw_injection = inj_kwargs[index] # <<<<<<<<<<<<<< @@ -122327,38 +122564,38 @@ 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, 438, __pyx_L1_error) + __PYX_ERR(0, 442, __pyx_L1_error) } __pyx_t_1 = PyTuple_GET_ITEM(__pyx_v_inj_kwargs, __pyx_v_index); __Pyx_INCREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_kw_injection, ((struct __pyx_obj_19dependency_injector_9providers_NamedInjection *)__pyx_t_1)); __pyx_t_1 = 0; - /* "dependency_injector/providers.pxd":439 + /* "dependency_injector/providers.pxd":443 * for index in range(inj_kwargs_len): * kw_injection = inj_kwargs[index] * name = __get_name(kw_injection) # <<<<<<<<<<<<<< * value = __get_value(kw_injection) * kwargs[name] = value */ - __pyx_t_1 = __pyx_f_19dependency_injector_9providers___get_name(__pyx_v_kw_injection); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 439, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers___get_name(__pyx_v_kw_injection); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 443, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pxd":440 + /* "dependency_injector/providers.pxd":444 * kw_injection = inj_kwargs[index] * name = __get_name(kw_injection) * value = __get_value(kw_injection) # <<<<<<<<<<<<<< * kwargs[name] = value * if async_mode != ASYNC_MODE_DISABLED and __is_future_or_coroutine(value): */ - __pyx_t_1 = __pyx_f_19dependency_injector_9providers___get_value(((struct __pyx_obj_19dependency_injector_9providers_Injection *)__pyx_v_kw_injection)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 440, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers___get_value(((struct __pyx_obj_19dependency_injector_9providers_Injection *)__pyx_v_kw_injection)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 444, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pxd":441 + /* "dependency_injector/providers.pxd":445 * name = __get_name(kw_injection) * value = __get_value(kw_injection) * kwargs[name] = value # <<<<<<<<<<<<<< @@ -122367,11 +122604,11 @@ 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 subscriptable"); - __PYX_ERR(0, 441, __pyx_L1_error) + __PYX_ERR(0, 445, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__pyx_v_kwargs, __pyx_v_name, __pyx_v_value) < 0)) __PYX_ERR(0, 441, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_kwargs, __pyx_v_name, __pyx_v_value) < 0)) __PYX_ERR(0, 445, __pyx_L1_error) - /* "dependency_injector/providers.pxd":442 + /* "dependency_injector/providers.pxd":446 * value = __get_value(kw_injection) * kwargs[name] = value * if async_mode != ASYNC_MODE_DISABLED and __is_future_or_coroutine(value): # <<<<<<<<<<<<<< @@ -122389,14 +122626,14 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid __pyx_L7_bool_binop_done:; if (__pyx_t_3) { - /* "dependency_injector/providers.pxd":443 + /* "dependency_injector/providers.pxd":447 * kwargs[name] = value * if async_mode != ASYNC_MODE_DISABLED and __is_future_or_coroutine(value): * future_kwargs.append((name, value)) # <<<<<<<<<<<<<< * else: * kwargs, prefixed = __separate_prefixed_kwargs(kwargs) */ - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 443, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 447, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); @@ -122404,10 +122641,10 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_value); - __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_future_kwargs, __pyx_t_1); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 443, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_future_kwargs, __pyx_t_1); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 447, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pxd":442 + /* "dependency_injector/providers.pxd":446 * value = __get_value(kw_injection) * kwargs[name] = value * if async_mode != ASYNC_MODE_DISABLED and __is_future_or_coroutine(value): # <<<<<<<<<<<<<< @@ -122417,7 +122654,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid } } - /* "dependency_injector/providers.pxd":436 + /* "dependency_injector/providers.pxd":440 * cdef NamedInjection kw_injection * * if len(kwargs) == 0: # <<<<<<<<<<<<<< @@ -122427,7 +122664,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid goto __pyx_L3; } - /* "dependency_injector/providers.pxd":445 + /* "dependency_injector/providers.pxd":449 * future_kwargs.append((name, value)) * else: * kwargs, prefixed = __separate_prefixed_kwargs(kwargs) # <<<<<<<<<<<<<< @@ -122435,7 +122672,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid * */ /*else*/ { - __pyx_t_1 = __pyx_f_19dependency_injector_9providers___separate_prefixed_kwargs(__pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 445, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers___separate_prefixed_kwargs(__pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 449, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (likely(__pyx_t_1 != Py_None)) { PyObject* sequence = __pyx_t_1; @@ -122443,7 +122680,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 445, __pyx_L1_error) + __PYX_ERR(0, 449, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_9 = PyTuple_GET_ITEM(sequence, 0); @@ -122451,23 +122688,23 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(__pyx_t_10); #else - __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 445, __pyx_L1_error) + __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 449, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 445, __pyx_L1_error) + __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 449, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { - __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 445, __pyx_L1_error) + __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 449, __pyx_L1_error) } - if (!(likely(PyDict_CheckExact(__pyx_t_9))||((__pyx_t_9) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_9)->tp_name), 0))) __PYX_ERR(0, 445, __pyx_L1_error) - if (!(likely(PyDict_CheckExact(__pyx_t_10))||((__pyx_t_10) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_10)->tp_name), 0))) __PYX_ERR(0, 445, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_t_9))||((__pyx_t_9) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_9)->tp_name), 0))) __PYX_ERR(0, 449, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_t_10))||((__pyx_t_10) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_10)->tp_name), 0))) __PYX_ERR(0, 449, __pyx_L1_error) __Pyx_DECREF_SET(__pyx_v_kwargs, ((PyObject*)__pyx_t_9)); __pyx_t_9 = 0; __Pyx_DECREF_SET(__pyx_v_prefixed, ((PyObject*)__pyx_t_10)); __pyx_t_10 = 0; - /* "dependency_injector/providers.pxd":448 + /* "dependency_injector/providers.pxd":452 * * * for index in range(inj_kwargs_len): # <<<<<<<<<<<<<< @@ -122479,7 +122716,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { __pyx_v_index = __pyx_t_6; - /* "dependency_injector/providers.pxd":449 + /* "dependency_injector/providers.pxd":453 * * for index in range(inj_kwargs_len): * kw_injection = inj_kwargs[index] # <<<<<<<<<<<<<< @@ -122488,26 +122725,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, 449, __pyx_L1_error) + __PYX_ERR(0, 453, __pyx_L1_error) } __pyx_t_1 = PyTuple_GET_ITEM(__pyx_v_inj_kwargs, __pyx_v_index); __Pyx_INCREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_kw_injection, ((struct __pyx_obj_19dependency_injector_9providers_NamedInjection *)__pyx_t_1)); __pyx_t_1 = 0; - /* "dependency_injector/providers.pxd":450 + /* "dependency_injector/providers.pxd":454 * for index in range(inj_kwargs_len): * kw_injection = inj_kwargs[index] * name = __get_name(kw_injection) # <<<<<<<<<<<<<< * * if name in kwargs: */ - __pyx_t_1 = __pyx_f_19dependency_injector_9providers___get_name(__pyx_v_kw_injection); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 450, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers___get_name(__pyx_v_kw_injection); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 454, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pxd":452 + /* "dependency_injector/providers.pxd":456 * name = __get_name(kw_injection) * * if name in kwargs: # <<<<<<<<<<<<<< @@ -122516,13 +122753,13 @@ 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, 452, __pyx_L1_error) + __PYX_ERR(0, 456, __pyx_L1_error) } - __pyx_t_3 = (__Pyx_PyDict_ContainsTF(__pyx_v_name, __pyx_v_kwargs, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 452, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PyDict_ContainsTF(__pyx_v_name, __pyx_v_kwargs, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 456, __pyx_L1_error) __pyx_t_7 = (__pyx_t_3 != 0); if (__pyx_t_7) { - /* "dependency_injector/providers.pxd":453 + /* "dependency_injector/providers.pxd":457 * * if name in kwargs: * continue # <<<<<<<<<<<<<< @@ -122531,7 +122768,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid */ goto __pyx_L9_continue; - /* "dependency_injector/providers.pxd":452 + /* "dependency_injector/providers.pxd":456 * name = __get_name(kw_injection) * * if name in kwargs: # <<<<<<<<<<<<<< @@ -122540,7 +122777,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid */ } - /* "dependency_injector/providers.pxd":455 + /* "dependency_injector/providers.pxd":459 * continue * * if name in prefixed: # <<<<<<<<<<<<<< @@ -122549,13 +122786,13 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid */ if (unlikely(__pyx_v_prefixed == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 455, __pyx_L1_error) + __PYX_ERR(0, 459, __pyx_L1_error) } - __pyx_t_7 = (__Pyx_PyDict_ContainsTF(__pyx_v_name, __pyx_v_prefixed, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 455, __pyx_L1_error) + __pyx_t_7 = (__Pyx_PyDict_ContainsTF(__pyx_v_name, __pyx_v_prefixed, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 459, __pyx_L1_error) __pyx_t_3 = (__pyx_t_7 != 0); if (__pyx_t_3) { - /* "dependency_injector/providers.pxd":456 + /* "dependency_injector/providers.pxd":460 * * if name in prefixed: * value = __get_value_kwargs(kw_injection, prefixed[name]) # <<<<<<<<<<<<<< @@ -122564,18 +122801,18 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid */ if (unlikely(__pyx_v_prefixed == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 456, __pyx_L1_error) + __PYX_ERR(0, 460, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_prefixed, __pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 456, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_prefixed, __pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 460, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 456, __pyx_L1_error) - __pyx_t_10 = __pyx_f_19dependency_injector_9providers___get_value_kwargs(((struct __pyx_obj_19dependency_injector_9providers_Injection *)__pyx_v_kw_injection), ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 456, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 460, __pyx_L1_error) + __pyx_t_10 = __pyx_f_19dependency_injector_9providers___get_value_kwargs(((struct __pyx_obj_19dependency_injector_9providers_Injection *)__pyx_v_kw_injection), ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 460, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_10); __pyx_t_10 = 0; - /* "dependency_injector/providers.pxd":455 + /* "dependency_injector/providers.pxd":459 * continue * * if name in prefixed: # <<<<<<<<<<<<<< @@ -122585,7 +122822,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid goto __pyx_L12; } - /* "dependency_injector/providers.pxd":458 + /* "dependency_injector/providers.pxd":462 * value = __get_value_kwargs(kw_injection, prefixed[name]) * else: * value = __get_value(kw_injection) # <<<<<<<<<<<<<< @@ -122593,14 +122830,14 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid * kwargs[name] = value */ /*else*/ { - __pyx_t_10 = __pyx_f_19dependency_injector_9providers___get_value(((struct __pyx_obj_19dependency_injector_9providers_Injection *)__pyx_v_kw_injection)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 458, __pyx_L1_error) + __pyx_t_10 = __pyx_f_19dependency_injector_9providers___get_value(((struct __pyx_obj_19dependency_injector_9providers_Injection *)__pyx_v_kw_injection)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 462, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_10); __pyx_t_10 = 0; } __pyx_L12:; - /* "dependency_injector/providers.pxd":460 + /* "dependency_injector/providers.pxd":464 * value = __get_value(kw_injection) * * kwargs[name] = value # <<<<<<<<<<<<<< @@ -122609,11 +122846,11 @@ 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 subscriptable"); - __PYX_ERR(0, 460, __pyx_L1_error) + __PYX_ERR(0, 464, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__pyx_v_kwargs, __pyx_v_name, __pyx_v_value) < 0)) __PYX_ERR(0, 460, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_kwargs, __pyx_v_name, __pyx_v_value) < 0)) __PYX_ERR(0, 464, __pyx_L1_error) - /* "dependency_injector/providers.pxd":461 + /* "dependency_injector/providers.pxd":465 * * kwargs[name] = value * if async_mode != ASYNC_MODE_DISABLED and __is_future_or_coroutine(value): # <<<<<<<<<<<<<< @@ -122631,14 +122868,14 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid __pyx_L14_bool_binop_done:; if (__pyx_t_3) { - /* "dependency_injector/providers.pxd":462 + /* "dependency_injector/providers.pxd":466 * kwargs[name] = value * if async_mode != ASYNC_MODE_DISABLED and __is_future_or_coroutine(value): * future_kwargs.append((name, value)) # <<<<<<<<<<<<<< * * if future_kwargs: */ - __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 462, __pyx_L1_error) + __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 466, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_INCREF(__pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); @@ -122646,10 +122883,10 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_v_value); - __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_future_kwargs, __pyx_t_10); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 462, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_future_kwargs, __pyx_t_10); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 466, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - /* "dependency_injector/providers.pxd":461 + /* "dependency_injector/providers.pxd":465 * * kwargs[name] = value * if async_mode != ASYNC_MODE_DISABLED and __is_future_or_coroutine(value): # <<<<<<<<<<<<<< @@ -122662,7 +122899,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid } __pyx_L3:; - /* "dependency_injector/providers.pxd":464 + /* "dependency_injector/providers.pxd":468 * future_kwargs.append((name, value)) * * if future_kwargs: # <<<<<<<<<<<<<< @@ -122672,7 +122909,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid __pyx_t_3 = (PyList_GET_SIZE(__pyx_v_future_kwargs) != 0); if (__pyx_t_3) { - /* "dependency_injector/providers.pxd":465 + /* "dependency_injector/providers.pxd":469 * * if future_kwargs: * return __combine_future_injections(kwargs, future_kwargs) # <<<<<<<<<<<<<< @@ -122680,13 +122917,13 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid * return kwargs */ __Pyx_XDECREF(__pyx_r); - __pyx_t_10 = __pyx_f_19dependency_injector_9providers___combine_future_injections(__pyx_v_kwargs, __pyx_v_future_kwargs); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 465, __pyx_L1_error) + __pyx_t_10 = __pyx_f_19dependency_injector_9providers___combine_future_injections(__pyx_v_kwargs, __pyx_v_future_kwargs); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 469, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_r = __pyx_t_10; __pyx_t_10 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pxd":464 + /* "dependency_injector/providers.pxd":468 * future_kwargs.append((name, value)) * * if future_kwargs: # <<<<<<<<<<<<<< @@ -122695,7 +122932,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid */ } - /* "dependency_injector/providers.pxd":467 + /* "dependency_injector/providers.pxd":471 * return __combine_future_injections(kwargs, future_kwargs) * * return kwargs # <<<<<<<<<<<<<< @@ -122707,7 +122944,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid __pyx_r = __pyx_v_kwargs; goto __pyx_L0; - /* "dependency_injector/providers.pxd":423 + /* "dependency_injector/providers.pxd":427 * @cython.boundscheck(False) * @cython.wraparound(False) * cdef inline object __provide_keyword_args( # <<<<<<<<<<<<<< @@ -122734,7 +122971,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid return __pyx_r; } -/* "dependency_injector/providers.pxd":470 +/* "dependency_injector/providers.pxd":474 * * * cdef inline object __combine_future_injections(object injections, list future_injections): # <<<<<<<<<<<<<< @@ -122764,16 +123001,16 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___combin int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__combine_future_injections", 0); - /* "dependency_injector/providers.pxd":471 + /* "dependency_injector/providers.pxd":475 * * cdef inline object __combine_future_injections(object injections, list future_injections): * future_result = asyncio.Future() # <<<<<<<<<<<<<< * * injections_ready = asyncio.gather(*[value for _, value in future_injections]) */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 471, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 475, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Future); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 471, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Future); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 475, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -122788,37 +123025,37 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___combin } __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 471, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 475, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_future_result = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/providers.pxd":473 + /* "dependency_injector/providers.pxd":477 * future_result = asyncio.Future() * * injections_ready = asyncio.gather(*[value for _, value in future_injections]) # <<<<<<<<<<<<<< * injections_ready.add_done_callback( * functools.partial( */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 473, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 477, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_gather); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 473, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_gather); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 477, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 473, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 477, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(__pyx_v_future_injections == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 473, __pyx_L1_error) + __PYX_ERR(0, 477, __pyx_L1_error) } __pyx_t_2 = __pyx_v_future_injections; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; for (;;) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_5); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 473, __pyx_L1_error) + __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_5); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 477, __pyx_L1_error) #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 473, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 477, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) { @@ -122827,7 +123064,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___combin if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 473, __pyx_L1_error) + __PYX_ERR(0, 477, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -122840,15 +123077,15 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___combin __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); #else - __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 473, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 477, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 473, __pyx_L1_error) + __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 477, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #endif __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { Py_ssize_t index = -1; - __pyx_t_8 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 473, __pyx_L1_error) + __pyx_t_8 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 477, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext; @@ -122856,7 +123093,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___combin __Pyx_GOTREF(__pyx_t_6); index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_7); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 473, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 477, __pyx_L1_error) __pyx_t_9 = NULL; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L6_unpacking_done; @@ -122864,60 +123101,60 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___combin __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_9 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 473, __pyx_L1_error) + __PYX_ERR(0, 477, __pyx_L1_error) __pyx_L6_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v__, __pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_7); __pyx_t_7 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_v_value))) __PYX_ERR(0, 473, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_v_value))) __PYX_ERR(0, 477, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PySequence_Tuple(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 473, __pyx_L1_error) + __pyx_t_2 = PySequence_Tuple(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 477, __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_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 473, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 477, __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_v_injections_ready = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/providers.pxd":474 + /* "dependency_injector/providers.pxd":478 * * injections_ready = asyncio.gather(*[value for _, value in future_injections]) * injections_ready.add_done_callback( # <<<<<<<<<<<<<< * functools.partial( * __async_prepare_args_kwargs_callback, */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_injections_ready, __pyx_n_s_add_done_callback); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 474, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_injections_ready, __pyx_n_s_add_done_callback); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 478, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - /* "dependency_injector/providers.pxd":475 + /* "dependency_injector/providers.pxd":479 * injections_ready = asyncio.gather(*[value for _, value in future_injections]) * injections_ready.add_done_callback( * functools.partial( # <<<<<<<<<<<<<< * __async_prepare_args_kwargs_callback, * future_result, */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_functools); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 475, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_functools); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 479, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_partial); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 475, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_partial); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 479, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "dependency_injector/providers.pxd":476 + /* "dependency_injector/providers.pxd":480 * injections_ready.add_done_callback( * functools.partial( * __async_prepare_args_kwargs_callback, # <<<<<<<<<<<<<< * future_result, * injections, */ - __pyx_t_5 = __Pyx_CFunc_void____object____object____object____object___to_py(__pyx_f_19dependency_injector_9providers___async_prepare_args_kwargs_callback); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 476, __pyx_L1_error) + __pyx_t_5 = __Pyx_CFunc_void____object____object____object____object___to_py(__pyx_f_19dependency_injector_9providers___async_prepare_args_kwargs_callback); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 480, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - /* "dependency_injector/providers.pxd":479 + /* "dependency_injector/providers.pxd":483 * future_result, * injections, * future_injections, # <<<<<<<<<<<<<< @@ -122939,7 +123176,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___combin #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[5] = {__pyx_t_6, __pyx_t_5, __pyx_v_future_result, __pyx_v_injections, __pyx_v_future_injections}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_10, 4+__pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 475, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_10, 4+__pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 479, __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; @@ -122948,14 +123185,14 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___combin #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[5] = {__pyx_t_6, __pyx_t_5, __pyx_v_future_result, __pyx_v_injections, __pyx_v_future_injections}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_10, 4+__pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 475, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_10, 4+__pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 479, __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(4+__pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 475, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(4+__pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 479, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; @@ -122972,7 +123209,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___combin __Pyx_GIVEREF(__pyx_v_future_injections); PyTuple_SET_ITEM(__pyx_t_8, 3+__pyx_t_10, __pyx_v_future_injections); __pyx_t_5 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 475, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 479, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } @@ -122990,21 +123227,21 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___combin __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_7, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 474, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 478, __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":482 + /* "dependency_injector/providers.pxd":486 * ), * ) * asyncio.ensure_future(injections_ready) # <<<<<<<<<<<<<< * * return future_result */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 482, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 486, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ensure_future); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 482, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ensure_future); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 486, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -123019,12 +123256,12 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___combin } __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_injections_ready) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_injections_ready); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 482, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 486, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pxd":484 + /* "dependency_injector/providers.pxd":488 * asyncio.ensure_future(injections_ready) * * return future_result # <<<<<<<<<<<<<< @@ -123036,7 +123273,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___combin __pyx_r = __pyx_v_future_result; goto __pyx_L0; - /* "dependency_injector/providers.pxd":470 + /* "dependency_injector/providers.pxd":474 * * * cdef inline object __combine_future_injections(object injections, list future_injections): # <<<<<<<<<<<<<< @@ -123065,7 +123302,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___combin return __pyx_r; } -/* "dependency_injector/providers.pxd":487 +/* "dependency_injector/providers.pxd":491 * * * cdef inline void __async_prepare_args_kwargs_callback( # <<<<<<<<<<<<<< @@ -123099,7 +123336,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_prepa int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__async_prepare_args_kwargs_callback", 0); - /* "dependency_injector/providers.pxd":493 + /* "dependency_injector/providers.pxd":497 * object future, * ): * try: # <<<<<<<<<<<<<< @@ -123115,14 +123352,14 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_prepa __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "dependency_injector/providers.pxd":494 + /* "dependency_injector/providers.pxd":498 * ): * try: * result = future.result() # <<<<<<<<<<<<<< * for value, (key, _) in zip(result, future_args_kwargs): * args[key] = value */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_future, __pyx_n_s_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 494, __pyx_L3_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_future, __pyx_n_s_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 498, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -123136,20 +123373,20 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_prepa } __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 494, __pyx_L3_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 498, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_result = __pyx_t_4; __pyx_t_4 = 0; - /* "dependency_injector/providers.pxd":495 + /* "dependency_injector/providers.pxd":499 * try: * result = future.result() * for value, (key, _) in zip(result, future_args_kwargs): # <<<<<<<<<<<<<< * args[key] = value * except Exception as exception: */ - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 495, __pyx_L3_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 499, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_result); __Pyx_GIVEREF(__pyx_v_result); @@ -123157,16 +123394,16 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_prepa __Pyx_INCREF(__pyx_v_future_args_kwargs); __Pyx_GIVEREF(__pyx_v_future_args_kwargs); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_future_args_kwargs); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 495, __pyx_L3_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 499, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) { __pyx_t_4 = __pyx_t_5; __Pyx_INCREF(__pyx_t_4); __pyx_t_7 = 0; __pyx_t_8 = NULL; } else { - __pyx_t_7 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 495, __pyx_L3_error) + __pyx_t_7 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 499, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_8 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 495, __pyx_L3_error) + __pyx_t_8 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 499, __pyx_L3_error) } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; for (;;) { @@ -123174,17 +123411,17 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_prepa if (likely(PyList_CheckExact(__pyx_t_4))) { if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_5 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_7); __Pyx_INCREF(__pyx_t_5); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 495, __pyx_L3_error) + __pyx_t_5 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_7); __Pyx_INCREF(__pyx_t_5); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 499, __pyx_L3_error) #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 495, __pyx_L3_error) + __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 499, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); #endif } else { if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_7); __Pyx_INCREF(__pyx_t_5); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 495, __pyx_L3_error) + __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_7); __Pyx_INCREF(__pyx_t_5); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 499, __pyx_L3_error) #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 495, __pyx_L3_error) + __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 499, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); #endif } @@ -123194,7 +123431,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_prepa PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 495, __pyx_L3_error) + else __PYX_ERR(0, 499, __pyx_L3_error) } break; } @@ -123206,7 +123443,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_prepa if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 495, __pyx_L3_error) + __PYX_ERR(0, 499, __pyx_L3_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -123219,15 +123456,15 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_prepa __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_9); #else - __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 495, __pyx_L3_error) + __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 499, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 495, __pyx_L3_error) + __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 499, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_9); #endif __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { Py_ssize_t index = -1; - __pyx_t_10 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 495, __pyx_L3_error) + __pyx_t_10 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 499, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_11 = Py_TYPE(__pyx_t_10)->tp_iternext; @@ -123235,7 +123472,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_prepa __Pyx_GOTREF(__pyx_t_6); index = 1; __pyx_t_9 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_9)) goto __pyx_L11_unpacking_failed; __Pyx_GOTREF(__pyx_t_9); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 2) < 0) __PYX_ERR(0, 495, __pyx_L3_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 2) < 0) __PYX_ERR(0, 499, __pyx_L3_error) __pyx_t_11 = NULL; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L12_unpacking_done; @@ -123243,7 +123480,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_prepa __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_11 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 495, __pyx_L3_error) + __PYX_ERR(0, 499, __pyx_L3_error) __pyx_L12_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_6); @@ -123254,7 +123491,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_prepa if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 495, __pyx_L3_error) + __PYX_ERR(0, 499, __pyx_L3_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -123267,15 +123504,15 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_prepa __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(__pyx_t_12); #else - __pyx_t_10 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 495, __pyx_L3_error) + __pyx_t_10 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 499, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_12 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 495, __pyx_L3_error) + __pyx_t_12 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 499, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_12); #endif __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } else { Py_ssize_t index = -1; - __pyx_t_13 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 495, __pyx_L3_error) + __pyx_t_13 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 499, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_11 = Py_TYPE(__pyx_t_13)->tp_iternext; @@ -123283,7 +123520,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_prepa __Pyx_GOTREF(__pyx_t_10); index = 1; __pyx_t_12 = __pyx_t_11(__pyx_t_13); if (unlikely(!__pyx_t_12)) goto __pyx_L13_unpacking_failed; __Pyx_GOTREF(__pyx_t_12); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_13), 2) < 0) __PYX_ERR(0, 495, __pyx_L3_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_13), 2) < 0) __PYX_ERR(0, 499, __pyx_L3_error) __pyx_t_11 = NULL; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L14_unpacking_done; @@ -123291,7 +123528,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_prepa __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_11 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 495, __pyx_L3_error) + __PYX_ERR(0, 499, __pyx_L3_error) __pyx_L14_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_10); @@ -123299,16 +123536,16 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_prepa __Pyx_XDECREF_SET(__pyx_v__, __pyx_t_12); __pyx_t_12 = 0; - /* "dependency_injector/providers.pxd":496 + /* "dependency_injector/providers.pxd":500 * result = future.result() * for value, (key, _) in zip(result, future_args_kwargs): * args[key] = value # <<<<<<<<<<<<<< * except Exception as exception: * future_result.set_exception(exception) */ - if (unlikely(PyObject_SetItem(__pyx_v_args, __pyx_v_key, __pyx_v_value) < 0)) __PYX_ERR(0, 496, __pyx_L3_error) + if (unlikely(PyObject_SetItem(__pyx_v_args, __pyx_v_key, __pyx_v_value) < 0)) __PYX_ERR(0, 500, __pyx_L3_error) - /* "dependency_injector/providers.pxd":495 + /* "dependency_injector/providers.pxd":499 * try: * result = future.result() * for value, (key, _) in zip(result, future_args_kwargs): # <<<<<<<<<<<<<< @@ -123318,7 +123555,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_prepa } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "dependency_injector/providers.pxd":493 + /* "dependency_injector/providers.pxd":497 * object future, * ): * try: # <<<<<<<<<<<<<< @@ -123327,7 +123564,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_prepa */ } - /* "dependency_injector/providers.pxd":500 + /* "dependency_injector/providers.pxd":504 * future_result.set_exception(exception) * else: * future_result.set_result(args) # <<<<<<<<<<<<<< @@ -123335,7 +123572,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_prepa * */ /*else:*/ { - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_future_result, __pyx_n_s_set_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 500, __pyx_L5_except_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_future_result, __pyx_n_s_set_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 504, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -123349,7 +123586,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_prepa } __pyx_t_4 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_9, __pyx_v_args) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_args); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 500, __pyx_L5_except_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 504, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -123367,7 +123604,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_prepa __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "dependency_injector/providers.pxd":497 + /* "dependency_injector/providers.pxd":501 * for value, (key, _) in zip(result, future_args_kwargs): * args[key] = value * except Exception as exception: # <<<<<<<<<<<<<< @@ -123377,21 +123614,21 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_prepa __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); if (__pyx_t_14) { __Pyx_AddTraceback("dependency_injector.providers.__async_prepare_args_kwargs_callback", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_9) < 0) __PYX_ERR(0, 497, __pyx_L5_except_error) + if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_9) < 0) __PYX_ERR(0, 501, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(__pyx_t_5); __pyx_v_exception = __pyx_t_5; - /* "dependency_injector/providers.pxd":498 + /* "dependency_injector/providers.pxd":502 * args[key] = value * except Exception as exception: * future_result.set_exception(exception) # <<<<<<<<<<<<<< * else: * future_result.set_result(args) */ - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_future_result, __pyx_n_s_set_exception); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 498, __pyx_L5_except_error) + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_future_result, __pyx_n_s_set_exception); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 502, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) { @@ -123405,7 +123642,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_prepa } __pyx_t_6 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_12, __pyx_t_10, __pyx_v_exception) : __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_v_exception); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 498, __pyx_L5_except_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 502, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -123417,7 +123654,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_prepa goto __pyx_L5_except_error; __pyx_L5_except_error:; - /* "dependency_injector/providers.pxd":493 + /* "dependency_injector/providers.pxd":497 * object future, * ): * try: # <<<<<<<<<<<<<< @@ -123437,7 +123674,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_prepa __pyx_L8_try_end:; } - /* "dependency_injector/providers.pxd":487 + /* "dependency_injector/providers.pxd":491 * * * cdef inline void __async_prepare_args_kwargs_callback( # <<<<<<<<<<<<<< @@ -123465,7 +123702,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_prepa __Pyx_RefNannyFinishContext(); } -/* "dependency_injector/providers.pxd":505 +/* "dependency_injector/providers.pxd":509 * @cython.boundscheck(False) * @cython.wraparound(False) * cdef inline object __provide_attributes(tuple attributes, int attributes_len): # <<<<<<<<<<<<<< @@ -123493,31 +123730,31 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__provide_attributes", 0); - /* "dependency_injector/providers.pxd":507 + /* "dependency_injector/providers.pxd":511 * cdef inline object __provide_attributes(tuple attributes, int attributes_len): * cdef NamedInjection attr_injection * cdef dict attribute_injections = {} # <<<<<<<<<<<<<< * cdef list future_attributes = [] * */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 507, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 511, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_attribute_injections = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pxd":508 + /* "dependency_injector/providers.pxd":512 * cdef NamedInjection attr_injection * cdef dict attribute_injections = {} * cdef list future_attributes = [] # <<<<<<<<<<<<<< * * for index in range(attributes_len): */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 508, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 512, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_future_attributes = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pxd":510 + /* "dependency_injector/providers.pxd":514 * cdef list future_attributes = [] * * for index in range(attributes_len): # <<<<<<<<<<<<<< @@ -123529,7 +123766,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":511 + /* "dependency_injector/providers.pxd":515 * * for index in range(attributes_len): * attr_injection = attributes[index] # <<<<<<<<<<<<<< @@ -123538,47 +123775,47 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid */ if (unlikely(__pyx_v_attributes == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 511, __pyx_L1_error) + __PYX_ERR(0, 515, __pyx_L1_error) } __pyx_t_1 = PyTuple_GET_ITEM(__pyx_v_attributes, __pyx_v_index); __Pyx_INCREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_attr_injection, ((struct __pyx_obj_19dependency_injector_9providers_NamedInjection *)__pyx_t_1)); __pyx_t_1 = 0; - /* "dependency_injector/providers.pxd":512 + /* "dependency_injector/providers.pxd":516 * for index in range(attributes_len): * attr_injection = attributes[index] * name = __get_name(attr_injection) # <<<<<<<<<<<<<< * value = __get_value(attr_injection) * attribute_injections[name] = value */ - __pyx_t_1 = __pyx_f_19dependency_injector_9providers___get_name(__pyx_v_attr_injection); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 512, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers___get_name(__pyx_v_attr_injection); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 516, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pxd":513 + /* "dependency_injector/providers.pxd":517 * attr_injection = attributes[index] * name = __get_name(attr_injection) * value = __get_value(attr_injection) # <<<<<<<<<<<<<< * attribute_injections[name] = value * if __is_future_or_coroutine(value): */ - __pyx_t_1 = __pyx_f_19dependency_injector_9providers___get_value(((struct __pyx_obj_19dependency_injector_9providers_Injection *)__pyx_v_attr_injection)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 513, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers___get_value(((struct __pyx_obj_19dependency_injector_9providers_Injection *)__pyx_v_attr_injection)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 517, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pxd":514 + /* "dependency_injector/providers.pxd":518 * name = __get_name(attr_injection) * value = __get_value(attr_injection) * attribute_injections[name] = value # <<<<<<<<<<<<<< * if __is_future_or_coroutine(value): * future_attributes.append((name, value)) */ - if (unlikely(PyDict_SetItem(__pyx_v_attribute_injections, __pyx_v_name, __pyx_v_value) < 0)) __PYX_ERR(0, 514, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_attribute_injections, __pyx_v_name, __pyx_v_value) < 0)) __PYX_ERR(0, 518, __pyx_L1_error) - /* "dependency_injector/providers.pxd":515 + /* "dependency_injector/providers.pxd":519 * value = __get_value(attr_injection) * attribute_injections[name] = value * if __is_future_or_coroutine(value): # <<<<<<<<<<<<<< @@ -123588,14 +123825,14 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid __pyx_t_5 = (__pyx_f_19dependency_injector_9providers___is_future_or_coroutine(__pyx_v_value) != 0); if (__pyx_t_5) { - /* "dependency_injector/providers.pxd":516 + /* "dependency_injector/providers.pxd":520 * attribute_injections[name] = value * if __is_future_or_coroutine(value): * future_attributes.append((name, value)) # <<<<<<<<<<<<<< * * if future_attributes: */ - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 516, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 520, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); @@ -123603,10 +123840,10 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_value); - __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_future_attributes, __pyx_t_1); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 516, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_future_attributes, __pyx_t_1); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 520, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pxd":515 + /* "dependency_injector/providers.pxd":519 * value = __get_value(attr_injection) * attribute_injections[name] = value * if __is_future_or_coroutine(value): # <<<<<<<<<<<<<< @@ -123616,7 +123853,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid } } - /* "dependency_injector/providers.pxd":518 + /* "dependency_injector/providers.pxd":522 * future_attributes.append((name, value)) * * if future_attributes: # <<<<<<<<<<<<<< @@ -123626,7 +123863,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid __pyx_t_5 = (PyList_GET_SIZE(__pyx_v_future_attributes) != 0); if (__pyx_t_5) { - /* "dependency_injector/providers.pxd":519 + /* "dependency_injector/providers.pxd":523 * * if future_attributes: * return __combine_future_injections(attribute_injections, future_attributes) # <<<<<<<<<<<<<< @@ -123634,13 +123871,13 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid * return attribute_injections */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_19dependency_injector_9providers___combine_future_injections(__pyx_v_attribute_injections, __pyx_v_future_attributes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 519, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers___combine_future_injections(__pyx_v_attribute_injections, __pyx_v_future_attributes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 523, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pxd":518 + /* "dependency_injector/providers.pxd":522 * future_attributes.append((name, value)) * * if future_attributes: # <<<<<<<<<<<<<< @@ -123649,7 +123886,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid */ } - /* "dependency_injector/providers.pxd":521 + /* "dependency_injector/providers.pxd":525 * return __combine_future_injections(attribute_injections, future_attributes) * * return attribute_injections # <<<<<<<<<<<<<< @@ -123661,7 +123898,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid __pyx_r = __pyx_v_attribute_injections; goto __pyx_L0; - /* "dependency_injector/providers.pxd":505 + /* "dependency_injector/providers.pxd":509 * @cython.boundscheck(False) * @cython.wraparound(False) * cdef inline object __provide_attributes(tuple attributes, int attributes_len): # <<<<<<<<<<<<<< @@ -123685,7 +123922,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid return __pyx_r; } -/* "dependency_injector/providers.pxd":524 +/* "dependency_injector/providers.pxd":528 * * * cdef inline object __async_inject_attributes(future_instance, future_attributes): # <<<<<<<<<<<<<< @@ -123711,16 +123948,16 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___async_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__async_inject_attributes", 0); - /* "dependency_injector/providers.pxd":525 + /* "dependency_injector/providers.pxd":529 * * cdef inline object __async_inject_attributes(future_instance, future_attributes): * future_result = asyncio.Future() # <<<<<<<<<<<<<< * * attributes_ready = asyncio.gather(future_instance, future_attributes) */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 525, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 529, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Future); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 525, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Future); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 529, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -123735,22 +123972,22 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___async_ } __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 525, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 529, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_future_result = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/providers.pxd":527 + /* "dependency_injector/providers.pxd":531 * future_result = asyncio.Future() * * attributes_ready = asyncio.gather(future_instance, future_attributes) # <<<<<<<<<<<<<< * attributes_ready.add_done_callback( * functools.partial( */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 527, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 531, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_gather); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 527, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_gather); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 531, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -123768,7 +124005,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___async_ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_future_instance, __pyx_v_future_attributes}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 527, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 531, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -123776,13 +124013,13 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___async_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_future_instance, __pyx_v_future_attributes}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 527, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 531, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 527, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 531, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; @@ -123793,7 +124030,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___async_ __Pyx_INCREF(__pyx_v_future_attributes); __Pyx_GIVEREF(__pyx_v_future_attributes); PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_future_attributes); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 527, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 531, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } @@ -123801,40 +124038,40 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___async_ __pyx_v_attributes_ready = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/providers.pxd":528 + /* "dependency_injector/providers.pxd":532 * * attributes_ready = asyncio.gather(future_instance, future_attributes) * attributes_ready.add_done_callback( # <<<<<<<<<<<<<< * functools.partial( * __async_inject_attributes_callback, */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_attributes_ready, __pyx_n_s_add_done_callback); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 528, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_attributes_ready, __pyx_n_s_add_done_callback); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - /* "dependency_injector/providers.pxd":529 + /* "dependency_injector/providers.pxd":533 * attributes_ready = asyncio.gather(future_instance, future_attributes) * attributes_ready.add_done_callback( * functools.partial( # <<<<<<<<<<<<<< * __async_inject_attributes_callback, * future_result, */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_functools); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 529, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_functools); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 533, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_partial); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 529, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_partial); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 533, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "dependency_injector/providers.pxd":530 + /* "dependency_injector/providers.pxd":534 * attributes_ready.add_done_callback( * functools.partial( * __async_inject_attributes_callback, # <<<<<<<<<<<<<< * future_result, * ), */ - __pyx_t_3 = __Pyx_CFunc_void____object____object___to_py(__pyx_f_19dependency_injector_9providers___async_inject_attributes_callback); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 530, __pyx_L1_error) + __pyx_t_3 = __Pyx_CFunc_void____object____object___to_py(__pyx_f_19dependency_injector_9providers___async_inject_attributes_callback); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 534, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - /* "dependency_injector/providers.pxd":531 + /* "dependency_injector/providers.pxd":535 * functools.partial( * __async_inject_attributes_callback, * future_result, # <<<<<<<<<<<<<< @@ -123856,7 +124093,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___async_ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_3, __pyx_v_future_result}; - __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 529, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 533, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -123865,14 +124102,14 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___async_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_3, __pyx_v_future_result}; - __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 529, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 533, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { - __pyx_t_8 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 529, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 533, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL; @@ -123883,7 +124120,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___async_ __Pyx_GIVEREF(__pyx_v_future_result); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_4, __pyx_v_future_result); __pyx_t_3 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 529, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 533, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } @@ -123901,21 +124138,21 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___async_ __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 528, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 532, __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":534 + /* "dependency_injector/providers.pxd":538 * ), * ) * asyncio.ensure_future(attributes_ready) # <<<<<<<<<<<<<< * * return future_result */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 534, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 538, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ensure_future); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 534, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ensure_future); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 538, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -123930,12 +124167,12 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___async_ } __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_2, __pyx_v_attributes_ready) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_attributes_ready); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 534, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 538, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pxd":536 + /* "dependency_injector/providers.pxd":540 * asyncio.ensure_future(attributes_ready) * * return future_result # <<<<<<<<<<<<<< @@ -123947,7 +124184,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___async_ __pyx_r = __pyx_v_future_result; goto __pyx_L0; - /* "dependency_injector/providers.pxd":524 + /* "dependency_injector/providers.pxd":528 * * * cdef inline object __async_inject_attributes(future_instance, future_attributes): # <<<<<<<<<<<<<< @@ -123974,7 +124211,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___async_ return __pyx_r; } -/* "dependency_injector/providers.pxd":539 +/* "dependency_injector/providers.pxd":543 * * * cdef inline void __async_inject_attributes_callback(object future_result, object future): # <<<<<<<<<<<<<< @@ -124008,7 +124245,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_injec int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__async_inject_attributes_callback", 0); - /* "dependency_injector/providers.pxd":540 + /* "dependency_injector/providers.pxd":544 * * cdef inline void __async_inject_attributes_callback(object future_result, object future): * try: # <<<<<<<<<<<<<< @@ -124024,14 +124261,14 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_injec __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "dependency_injector/providers.pxd":541 + /* "dependency_injector/providers.pxd":545 * cdef inline void __async_inject_attributes_callback(object future_result, object future): * try: * instance, attributes = future.result() # <<<<<<<<<<<<<< * * for name, value in attributes.items(): */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_future, __pyx_n_s_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 541, __pyx_L3_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_future, __pyx_n_s_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 545, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -124045,7 +124282,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_injec } __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 541, __pyx_L3_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 545, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) { @@ -124054,7 +124291,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_injec if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 541, __pyx_L3_error) + __PYX_ERR(0, 545, __pyx_L3_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -124067,15 +124304,15 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_injec __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(0, 541, __pyx_L3_error) + __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 545, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 541, __pyx_L3_error) + __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 545, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { Py_ssize_t index = -1; - __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 541, __pyx_L3_error) + __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 545, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext; @@ -124083,7 +124320,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_injec __Pyx_GOTREF(__pyx_t_5); index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L9_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 541, __pyx_L3_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 545, __pyx_L3_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L10_unpacking_done; @@ -124091,7 +124328,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_injec __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 541, __pyx_L3_error) + __PYX_ERR(0, 545, __pyx_L3_error) __pyx_L10_unpacking_done:; } __pyx_v_instance = __pyx_t_5; @@ -124099,14 +124336,14 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_injec __pyx_v_attributes = __pyx_t_6; __pyx_t_6 = 0; - /* "dependency_injector/providers.pxd":543 + /* "dependency_injector/providers.pxd":547 * instance, attributes = future.result() * * for name, value in attributes.items(): # <<<<<<<<<<<<<< * setattr(instance, name, value) * except Exception as exception: */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_attributes, __pyx_n_s_items); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 543, __pyx_L3_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_attributes, __pyx_n_s_items); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 547, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { @@ -124120,16 +124357,16 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_injec } __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 543, __pyx_L3_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 547, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { __pyx_t_6 = __pyx_t_4; __Pyx_INCREF(__pyx_t_6); __pyx_t_9 = 0; __pyx_t_10 = NULL; } else { - __pyx_t_9 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 543, __pyx_L3_error) + __pyx_t_9 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 547, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_10 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 543, __pyx_L3_error) + __pyx_t_10 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 547, __pyx_L3_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { @@ -124137,17 +124374,17 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_injec if (likely(PyList_CheckExact(__pyx_t_6))) { if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_6)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 543, __pyx_L3_error) + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 547, __pyx_L3_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 543, __pyx_L3_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 547, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_6)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 543, __pyx_L3_error) + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 547, __pyx_L3_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 543, __pyx_L3_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 547, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); #endif } @@ -124157,7 +124394,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_injec PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 543, __pyx_L3_error) + else __PYX_ERR(0, 547, __pyx_L3_error) } break; } @@ -124169,7 +124406,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_injec if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 543, __pyx_L3_error) + __PYX_ERR(0, 547, __pyx_L3_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -124182,15 +124419,15 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_injec __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_7); #else - __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 543, __pyx_L3_error) + __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 547, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 543, __pyx_L3_error) + __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 547, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_7); #endif __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { Py_ssize_t index = -1; - __pyx_t_11 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 543, __pyx_L3_error) + __pyx_t_11 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 547, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_8 = Py_TYPE(__pyx_t_11)->tp_iternext; @@ -124198,7 +124435,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_injec __Pyx_GOTREF(__pyx_t_5); index = 1; __pyx_t_7 = __pyx_t_8(__pyx_t_11); if (unlikely(!__pyx_t_7)) goto __pyx_L13_unpacking_failed; __Pyx_GOTREF(__pyx_t_7); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_11), 2) < 0) __PYX_ERR(0, 543, __pyx_L3_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_11), 2) < 0) __PYX_ERR(0, 547, __pyx_L3_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L14_unpacking_done; @@ -124206,7 +124443,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_injec __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 543, __pyx_L3_error) + __PYX_ERR(0, 547, __pyx_L3_error) __pyx_L14_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_5); @@ -124214,16 +124451,16 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_injec __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_7); __pyx_t_7 = 0; - /* "dependency_injector/providers.pxd":544 + /* "dependency_injector/providers.pxd":548 * * for name, value in attributes.items(): * setattr(instance, name, value) # <<<<<<<<<<<<<< * except Exception as exception: * future_result.set_exception(exception) */ - __pyx_t_12 = PyObject_SetAttr(__pyx_v_instance, __pyx_v_name, __pyx_v_value); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 544, __pyx_L3_error) + __pyx_t_12 = PyObject_SetAttr(__pyx_v_instance, __pyx_v_name, __pyx_v_value); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 548, __pyx_L3_error) - /* "dependency_injector/providers.pxd":543 + /* "dependency_injector/providers.pxd":547 * instance, attributes = future.result() * * for name, value in attributes.items(): # <<<<<<<<<<<<<< @@ -124233,7 +124470,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_injec } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "dependency_injector/providers.pxd":540 + /* "dependency_injector/providers.pxd":544 * * cdef inline void __async_inject_attributes_callback(object future_result, object future): * try: # <<<<<<<<<<<<<< @@ -124242,7 +124479,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_injec */ } - /* "dependency_injector/providers.pxd":548 + /* "dependency_injector/providers.pxd":552 * future_result.set_exception(exception) * else: * future_result.set_result(instance) # <<<<<<<<<<<<<< @@ -124250,7 +124487,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_injec * */ /*else:*/ { - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_future_result, __pyx_n_s_set_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 548, __pyx_L5_except_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_future_result, __pyx_n_s_set_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 552, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -124264,7 +124501,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_injec } __pyx_t_6 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, __pyx_v_instance) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_instance); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 548, __pyx_L5_except_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 552, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -124280,7 +124517,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_injec __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "dependency_injector/providers.pxd":545 + /* "dependency_injector/providers.pxd":549 * for name, value in attributes.items(): * setattr(instance, name, value) * except Exception as exception: # <<<<<<<<<<<<<< @@ -124290,21 +124527,21 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_injec __pyx_t_13 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); if (__pyx_t_13) { __Pyx_AddTraceback("dependency_injector.providers.__async_inject_attributes_callback", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_4, &__pyx_t_7) < 0) __PYX_ERR(0, 545, __pyx_L5_except_error) + if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_4, &__pyx_t_7) < 0) __PYX_ERR(0, 549, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_v_exception = __pyx_t_4; - /* "dependency_injector/providers.pxd":546 + /* "dependency_injector/providers.pxd":550 * setattr(instance, name, value) * except Exception as exception: * future_result.set_exception(exception) # <<<<<<<<<<<<<< * else: * future_result.set_result(instance) */ - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_future_result, __pyx_n_s_set_exception); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 546, __pyx_L5_except_error) + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_future_result, __pyx_n_s_set_exception); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 550, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_14 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) { @@ -124318,7 +124555,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_injec } __pyx_t_5 = (__pyx_t_14) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_14, __pyx_v_exception) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_v_exception); __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 546, __pyx_L5_except_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 550, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -124330,7 +124567,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_injec goto __pyx_L5_except_error; __pyx_L5_except_error:; - /* "dependency_injector/providers.pxd":540 + /* "dependency_injector/providers.pxd":544 * * cdef inline void __async_inject_attributes_callback(object future_result, object future): * try: # <<<<<<<<<<<<<< @@ -124350,7 +124587,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_injec __pyx_L8_try_end:; } - /* "dependency_injector/providers.pxd":539 + /* "dependency_injector/providers.pxd":543 * * * cdef inline void __async_inject_attributes_callback(object future_result, object future): # <<<<<<<<<<<<<< @@ -124377,7 +124614,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_injec __Pyx_RefNannyFinishContext(); } -/* "dependency_injector/providers.pxd":551 +/* "dependency_injector/providers.pxd":555 * * * cdef inline void __inject_attributes(object instance, dict attributes): # <<<<<<<<<<<<<< @@ -124403,7 +124640,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___inject_attr int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__inject_attributes", 0); - /* "dependency_injector/providers.pxd":552 + /* "dependency_injector/providers.pxd":556 * * cdef inline void __inject_attributes(object instance, dict attributes): * for name, value in attributes.items(): # <<<<<<<<<<<<<< @@ -124412,17 +124649,17 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___inject_attr */ if (unlikely(__pyx_v_attributes == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); - __PYX_ERR(0, 552, __pyx_L1_error) + __PYX_ERR(0, 556, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_Items(__pyx_v_attributes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 552, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_Items(__pyx_v_attributes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 556, __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(0, 552, __pyx_L1_error) + __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 556, __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(0, 552, __pyx_L1_error) + __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 556, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -124430,17 +124667,17 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___inject_attr 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(0, 552, __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(0, 556, __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(0, 552, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 556, __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(0, 552, __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(0, 556, __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(0, 552, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 556, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -124450,7 +124687,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___inject_attr PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 552, __pyx_L1_error) + else __PYX_ERR(0, 556, __pyx_L1_error) } break; } @@ -124462,7 +124699,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___inject_attr if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 552, __pyx_L1_error) + __PYX_ERR(0, 556, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -124475,15 +124712,15 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___inject_attr __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(0, 552, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 556, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 552, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 556, __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(0, 552, __pyx_L1_error) + __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 556, __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; @@ -124491,7 +124728,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___inject_attr __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(0, 552, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 556, __pyx_L1_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L6_unpacking_done; @@ -124499,7 +124736,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___inject_attr __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 552, __pyx_L1_error) + __PYX_ERR(0, 556, __pyx_L1_error) __pyx_L6_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_5); @@ -124507,16 +124744,16 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___inject_attr __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_6); __pyx_t_6 = 0; - /* "dependency_injector/providers.pxd":553 + /* "dependency_injector/providers.pxd":557 * cdef inline void __inject_attributes(object instance, dict attributes): * for name, value in attributes.items(): * setattr(instance, name, value) # <<<<<<<<<<<<<< * * */ - __pyx_t_9 = PyObject_SetAttr(__pyx_v_instance, __pyx_v_name, __pyx_v_value); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 553, __pyx_L1_error) + __pyx_t_9 = PyObject_SetAttr(__pyx_v_instance, __pyx_v_name, __pyx_v_value); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 557, __pyx_L1_error) - /* "dependency_injector/providers.pxd":552 + /* "dependency_injector/providers.pxd":556 * * cdef inline void __inject_attributes(object instance, dict attributes): * for name, value in attributes.items(): # <<<<<<<<<<<<<< @@ -124526,7 +124763,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___inject_attr } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/providers.pxd":551 + /* "dependency_injector/providers.pxd":555 * * * cdef inline void __inject_attributes(object instance, dict attributes): # <<<<<<<<<<<<<< @@ -124549,7 +124786,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___inject_attr __Pyx_RefNannyFinishContext(); } -/* "dependency_injector/providers.pxd":556 +/* "dependency_injector/providers.pxd":560 * * * cdef inline object __call( # <<<<<<<<<<<<<< @@ -124583,31 +124820,31 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___call(P int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__call", 0); - /* "dependency_injector/providers.pxd":566 + /* "dependency_injector/providers.pxd":570 * int async_mode, * ): * cdef object args = __provide_positional_args( # <<<<<<<<<<<<<< * context_args, * injection_args, */ - __pyx_t_1 = __pyx_f_19dependency_injector_9providers___provide_positional_args(__pyx_v_context_args, __pyx_v_injection_args, __pyx_v_injection_args_len, __pyx_v_async_mode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 566, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers___provide_positional_args(__pyx_v_context_args, __pyx_v_injection_args, __pyx_v_injection_args_len, __pyx_v_async_mode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 570, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_args = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/providers.pxd":572 + /* "dependency_injector/providers.pxd":576 * async_mode, * ) * cdef object kwargs = __provide_keyword_args( # <<<<<<<<<<<<<< * context_kwargs, * injection_kwargs, */ - __pyx_t_1 = __pyx_f_19dependency_injector_9providers___provide_keyword_args(__pyx_v_context_kwargs, __pyx_v_injection_kwargs, __pyx_v_injection_kwargs_len, __pyx_v_async_mode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 572, __pyx_L1_error) + __pyx_t_1 = __pyx_f_19dependency_injector_9providers___provide_keyword_args(__pyx_v_context_kwargs, __pyx_v_injection_kwargs, __pyx_v_injection_kwargs_len, __pyx_v_async_mode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 576, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_kwargs = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/providers.pxd":579 + /* "dependency_injector/providers.pxd":583 * ) * * if async_mode == ASYNC_MODE_DISABLED: # <<<<<<<<<<<<<< @@ -124617,7 +124854,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___call(P __pyx_t_2 = ((__pyx_v_async_mode == __pyx_v_19dependency_injector_9providers_ASYNC_MODE_DISABLED) != 0); if (__pyx_t_2) { - /* "dependency_injector/providers.pxd":580 + /* "dependency_injector/providers.pxd":584 * * if async_mode == ASYNC_MODE_DISABLED: * return call(*args, **kwargs) # <<<<<<<<<<<<<< @@ -124625,20 +124862,20 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___call(P * cdef bint is_future_args = __is_future_or_coroutine(args) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PySequence_Tuple(__pyx_v_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 580, __pyx_L1_error) + __pyx_t_1 = __Pyx_PySequence_Tuple(__pyx_v_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 584, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(__pyx_v_kwargs == Py_None)) { PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); - __PYX_ERR(0, 580, __pyx_L1_error) + __PYX_ERR(0, 584, __pyx_L1_error) } if (likely(PyDict_CheckExact(__pyx_v_kwargs))) { - __pyx_t_3 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 580, __pyx_L1_error) + __pyx_t_3 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 584, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } else { - __pyx_t_3 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_v_kwargs, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 580, __pyx_L1_error) + __pyx_t_3 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_v_kwargs, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 584, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_v_call, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 580, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_v_call, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 584, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -124646,7 +124883,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___call(P __pyx_t_4 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pxd":579 + /* "dependency_injector/providers.pxd":583 * ) * * if async_mode == ASYNC_MODE_DISABLED: # <<<<<<<<<<<<<< @@ -124655,7 +124892,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___call(P */ } - /* "dependency_injector/providers.pxd":582 + /* "dependency_injector/providers.pxd":586 * return call(*args, **kwargs) * * cdef bint is_future_args = __is_future_or_coroutine(args) # <<<<<<<<<<<<<< @@ -124664,7 +124901,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___call(P */ __pyx_v_is_future_args = __pyx_f_19dependency_injector_9providers___is_future_or_coroutine(__pyx_v_args); - /* "dependency_injector/providers.pxd":583 + /* "dependency_injector/providers.pxd":587 * * cdef bint is_future_args = __is_future_or_coroutine(args) * cdef bint is_future_kwargs = __is_future_or_coroutine(kwargs) # <<<<<<<<<<<<<< @@ -124673,7 +124910,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___call(P */ __pyx_v_is_future_kwargs = __pyx_f_19dependency_injector_9providers___is_future_or_coroutine(__pyx_v_kwargs); - /* "dependency_injector/providers.pxd":585 + /* "dependency_injector/providers.pxd":589 * cdef bint is_future_kwargs = __is_future_or_coroutine(kwargs) * * if is_future_args or is_future_kwargs: # <<<<<<<<<<<<<< @@ -124691,7 +124928,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___call(P __pyx_L5_bool_binop_done:; if (__pyx_t_2) { - /* "dependency_injector/providers.pxd":586 + /* "dependency_injector/providers.pxd":590 * * if is_future_args or is_future_kwargs: * future_args = args if is_future_args else __future_result(args) # <<<<<<<<<<<<<< @@ -124702,7 +124939,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___call(P __Pyx_INCREF(__pyx_v_args); __pyx_t_4 = __pyx_v_args; } else { - __pyx_t_3 = __pyx_f_19dependency_injector_9providers___future_result(__pyx_v_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 586, __pyx_L1_error) + __pyx_t_3 = __pyx_f_19dependency_injector_9providers___future_result(__pyx_v_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 590, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __pyx_t_3; __pyx_t_3 = 0; @@ -124710,7 +124947,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___call(P __pyx_v_future_args = __pyx_t_4; __pyx_t_4 = 0; - /* "dependency_injector/providers.pxd":587 + /* "dependency_injector/providers.pxd":591 * if is_future_args or is_future_kwargs: * future_args = args if is_future_args else __future_result(args) * future_kwargs = kwargs if is_future_kwargs else __future_result(kwargs) # <<<<<<<<<<<<<< @@ -124721,7 +124958,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___call(P __Pyx_INCREF(__pyx_v_kwargs); __pyx_t_4 = __pyx_v_kwargs; } else { - __pyx_t_3 = __pyx_f_19dependency_injector_9providers___future_result(__pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 587, __pyx_L1_error) + __pyx_t_3 = __pyx_f_19dependency_injector_9providers___future_result(__pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 591, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __pyx_t_3; __pyx_t_3 = 0; @@ -124729,16 +124966,16 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___call(P __pyx_v_future_kwargs = __pyx_t_4; __pyx_t_4 = 0; - /* "dependency_injector/providers.pxd":589 + /* "dependency_injector/providers.pxd":593 * future_kwargs = kwargs if is_future_kwargs else __future_result(kwargs) * * future_result = asyncio.Future() # <<<<<<<<<<<<<< * * args_kwargs_ready = asyncio.gather(future_args, future_kwargs) */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 589, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 593, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_Future); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 589, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_Future); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 593, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -124753,22 +124990,22 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___call(P } __pyx_t_4 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 589, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 593, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_future_result = __pyx_t_4; __pyx_t_4 = 0; - /* "dependency_injector/providers.pxd":591 + /* "dependency_injector/providers.pxd":595 * future_result = asyncio.Future() * * args_kwargs_ready = asyncio.gather(future_args, future_kwargs) # <<<<<<<<<<<<<< * args_kwargs_ready.add_done_callback( * functools.partial( */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 591, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 595, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_gather); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 591, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_gather); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 595, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = NULL; @@ -124786,7 +125023,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___call(P #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_future_args, __pyx_v_future_kwargs}; - __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 591, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 595, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_4); } else @@ -124794,13 +125031,13 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___call(P #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_future_args, __pyx_v_future_kwargs}; - __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 591, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 595, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_4); } else #endif { - __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 591, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 595, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_1) { __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1); __pyx_t_1 = NULL; @@ -124811,7 +125048,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___call(P __Pyx_INCREF(__pyx_v_future_kwargs); __Pyx_GIVEREF(__pyx_v_future_kwargs); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_future_kwargs); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 591, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 595, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } @@ -124819,40 +125056,40 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___call(P __pyx_v_args_kwargs_ready = __pyx_t_4; __pyx_t_4 = 0; - /* "dependency_injector/providers.pxd":592 + /* "dependency_injector/providers.pxd":596 * * args_kwargs_ready = asyncio.gather(future_args, future_kwargs) * args_kwargs_ready.add_done_callback( # <<<<<<<<<<<<<< * functools.partial( * __async_call_callback, */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_args_kwargs_ready, __pyx_n_s_add_done_callback); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 592, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_args_kwargs_ready, __pyx_n_s_add_done_callback); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 596, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - /* "dependency_injector/providers.pxd":593 + /* "dependency_injector/providers.pxd":597 * args_kwargs_ready = asyncio.gather(future_args, future_kwargs) * args_kwargs_ready.add_done_callback( * functools.partial( # <<<<<<<<<<<<<< * __async_call_callback, * future_result, */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_functools); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 593, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_functools); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 597, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_partial); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 593, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_partial); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 597, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pxd":594 + /* "dependency_injector/providers.pxd":598 * args_kwargs_ready.add_done_callback( * functools.partial( * __async_call_callback, # <<<<<<<<<<<<<< * future_result, * call, */ - __pyx_t_1 = __Pyx_CFunc_void____object____object____object___to_py(__pyx_f_19dependency_injector_9providers___async_call_callback); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 594, __pyx_L1_error) + __pyx_t_1 = __Pyx_CFunc_void____object____object____object___to_py(__pyx_f_19dependency_injector_9providers___async_call_callback); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 598, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - /* "dependency_injector/providers.pxd":596 + /* "dependency_injector/providers.pxd":600 * __async_call_callback, * future_result, * call, # <<<<<<<<<<<<<< @@ -124874,7 +125111,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___call(P #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[4] = {__pyx_t_9, __pyx_t_1, __pyx_v_future_result, __pyx_v_call}; - __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 593, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 597, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -124883,14 +125120,14 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___call(P #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[4] = {__pyx_t_9, __pyx_t_1, __pyx_v_future_result, __pyx_v_call}; - __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 593, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 597, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else #endif { - __pyx_t_10 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 593, __pyx_L1_error) + __pyx_t_10 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 597, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); if (__pyx_t_9) { __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __pyx_t_9 = NULL; @@ -124904,7 +125141,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___call(P __Pyx_GIVEREF(__pyx_v_call); PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_6, __pyx_v_call); __pyx_t_1 = 0; - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_10, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 593, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_10, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 597, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } @@ -124922,21 +125159,21 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___call(P __pyx_t_4 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 592, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 596, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "dependency_injector/providers.pxd":599 + /* "dependency_injector/providers.pxd":603 * ), * ) * asyncio.ensure_future(args_kwargs_ready) # <<<<<<<<<<<<<< * * return future_result */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 599, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 603, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_ensure_future); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 599, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_ensure_future); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 603, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -124951,12 +125188,12 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___call(P } __pyx_t_4 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_3, __pyx_v_args_kwargs_ready) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_args_kwargs_ready); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 599, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 603, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "dependency_injector/providers.pxd":601 + /* "dependency_injector/providers.pxd":605 * asyncio.ensure_future(args_kwargs_ready) * * return future_result # <<<<<<<<<<<<<< @@ -124968,7 +125205,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___call(P __pyx_r = __pyx_v_future_result; goto __pyx_L0; - /* "dependency_injector/providers.pxd":585 + /* "dependency_injector/providers.pxd":589 * cdef bint is_future_kwargs = __is_future_or_coroutine(kwargs) * * if is_future_args or is_future_kwargs: # <<<<<<<<<<<<<< @@ -124977,7 +125214,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___call(P */ } - /* "dependency_injector/providers.pxd":603 + /* "dependency_injector/providers.pxd":607 * return future_result * * return call(*args, **kwargs) # <<<<<<<<<<<<<< @@ -124985,20 +125222,20 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___call(P * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_v_args); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 603, __pyx_L1_error) + __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_v_args); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 607, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (unlikely(__pyx_v_kwargs == Py_None)) { PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); - __PYX_ERR(0, 603, __pyx_L1_error) + __PYX_ERR(0, 607, __pyx_L1_error) } if (likely(PyDict_CheckExact(__pyx_v_kwargs))) { - __pyx_t_7 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 603, __pyx_L1_error) + __pyx_t_7 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 607, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } else { - __pyx_t_7 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_v_kwargs, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 603, __pyx_L1_error) + __pyx_t_7 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_v_kwargs, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 607, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_v_call, __pyx_t_4, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 603, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_v_call, __pyx_t_4, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 607, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -125006,7 +125243,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___call(P __pyx_t_3 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pxd":556 + /* "dependency_injector/providers.pxd":560 * * * cdef inline object __call( # <<<<<<<<<<<<<< @@ -125037,7 +125274,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___call(P return __pyx_r; } -/* "dependency_injector/providers.pxd":606 +/* "dependency_injector/providers.pxd":610 * * * cdef inline void __async_call_callback(object future_result, object call, object future): # <<<<<<<<<<<<<< @@ -125069,7 +125306,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_call_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__async_call_callback", 0); - /* "dependency_injector/providers.pxd":607 + /* "dependency_injector/providers.pxd":611 * * cdef inline void __async_call_callback(object future_result, object call, object future): * try: # <<<<<<<<<<<<<< @@ -125085,14 +125322,14 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_call_ __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "dependency_injector/providers.pxd":608 + /* "dependency_injector/providers.pxd":612 * cdef inline void __async_call_callback(object future_result, object call, object future): * try: * args, kwargs = future.result() # <<<<<<<<<<<<<< * result = call(*args, **kwargs) * except Exception as exception: */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_future, __pyx_n_s_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 608, __pyx_L3_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_future, __pyx_n_s_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 612, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -125106,7 +125343,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_call_ } __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 608, __pyx_L3_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 612, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) { @@ -125115,7 +125352,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_call_ if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 608, __pyx_L3_error) + __PYX_ERR(0, 612, __pyx_L3_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -125128,15 +125365,15 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_call_ __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(0, 608, __pyx_L3_error) + __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 612, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 608, __pyx_L3_error) + __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 612, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { Py_ssize_t index = -1; - __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 608, __pyx_L3_error) + __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 612, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext; @@ -125144,7 +125381,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_call_ __Pyx_GOTREF(__pyx_t_5); index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L9_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 608, __pyx_L3_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 612, __pyx_L3_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L10_unpacking_done; @@ -125152,7 +125389,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_call_ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 608, __pyx_L3_error) + __PYX_ERR(0, 612, __pyx_L3_error) __pyx_L10_unpacking_done:; } __pyx_v_args = __pyx_t_5; @@ -125160,34 +125397,34 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_call_ __pyx_v_kwargs = __pyx_t_6; __pyx_t_6 = 0; - /* "dependency_injector/providers.pxd":609 + /* "dependency_injector/providers.pxd":613 * try: * args, kwargs = future.result() * result = call(*args, **kwargs) # <<<<<<<<<<<<<< * except Exception as exception: * future_result.set_exception(exception) */ - __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_v_args); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 609, __pyx_L3_error) + __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_v_args); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 613, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); if (unlikely(__pyx_v_kwargs == Py_None)) { PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); - __PYX_ERR(0, 609, __pyx_L3_error) + __PYX_ERR(0, 613, __pyx_L3_error) } if (likely(PyDict_CheckExact(__pyx_v_kwargs))) { - __pyx_t_6 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 609, __pyx_L3_error) + __pyx_t_6 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 613, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_6); } else { - __pyx_t_6 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_v_kwargs, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 609, __pyx_L3_error) + __pyx_t_6 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_v_kwargs, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 613, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_6); } - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_v_call, __pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 609, __pyx_L3_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_v_call, __pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 613, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_result = __pyx_t_5; __pyx_t_5 = 0; - /* "dependency_injector/providers.pxd":607 + /* "dependency_injector/providers.pxd":611 * * cdef inline void __async_call_callback(object future_result, object call, object future): * try: # <<<<<<<<<<<<<< @@ -125196,7 +125433,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_call_ */ } - /* "dependency_injector/providers.pxd":613 + /* "dependency_injector/providers.pxd":617 * future_result.set_exception(exception) * else: * if __is_future_or_coroutine(result): # <<<<<<<<<<<<<< @@ -125207,16 +125444,16 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_call_ __pyx_t_9 = (__pyx_f_19dependency_injector_9providers___is_future_or_coroutine(__pyx_v_result) != 0); if (__pyx_t_9) { - /* "dependency_injector/providers.pxd":614 + /* "dependency_injector/providers.pxd":618 * else: * if __is_future_or_coroutine(result): * result = asyncio.ensure_future(result) # <<<<<<<<<<<<<< * result.add_done_callback(functools.partial(__async_result_callback, future_result)) * return */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 614, __pyx_L5_except_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 618, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_ensure_future); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 614, __pyx_L5_except_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_ensure_future); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 618, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; @@ -125231,27 +125468,27 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_call_ } __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_v_result) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_result); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 614, __pyx_L5_except_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 618, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_5); __pyx_t_5 = 0; - /* "dependency_injector/providers.pxd":615 + /* "dependency_injector/providers.pxd":619 * if __is_future_or_coroutine(result): * result = asyncio.ensure_future(result) * result.add_done_callback(functools.partial(__async_result_callback, future_result)) # <<<<<<<<<<<<<< * return * future_result.set_result(result) */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s_add_done_callback); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 615, __pyx_L5_except_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s_add_done_callback); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 619, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_functools); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 615, __pyx_L5_except_error) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_functools); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 619, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_partial); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 615, __pyx_L5_except_error) + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_partial); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 619, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_CFunc_object____object____object___to_py(__pyx_f_19dependency_injector_9providers___async_result_callback); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 615, __pyx_L5_except_error) + __pyx_t_7 = __Pyx_CFunc_object____object____object___to_py(__pyx_f_19dependency_injector_9providers___async_result_callback); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 619, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_11 = NULL; __pyx_t_12 = 0; @@ -125268,7 +125505,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_call_ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_10)) { PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_t_7, __pyx_v_future_result}; - __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 615, __pyx_L5_except_error) + __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 619, __pyx_L5_except_error) __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -125277,14 +125514,14 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_call_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) { PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_t_7, __pyx_v_future_result}; - __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 615, __pyx_L5_except_error) + __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 619, __pyx_L5_except_error) __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif { - __pyx_t_13 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 615, __pyx_L5_except_error) + __pyx_t_13 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 619, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_13); if (__pyx_t_11) { __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_11); __pyx_t_11 = NULL; @@ -125295,7 +125532,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_call_ __Pyx_GIVEREF(__pyx_v_future_result); PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_12, __pyx_v_future_result); __pyx_t_7 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_13, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 615, __pyx_L5_except_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_13, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 619, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } @@ -125313,12 +125550,12 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_call_ __pyx_t_5 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_10, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 615, __pyx_L5_except_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 619, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "dependency_injector/providers.pxd":616 + /* "dependency_injector/providers.pxd":620 * result = asyncio.ensure_future(result) * result.add_done_callback(functools.partial(__async_result_callback, future_result)) * return # <<<<<<<<<<<<<< @@ -125327,7 +125564,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_call_ */ goto __pyx_L6_except_return; - /* "dependency_injector/providers.pxd":613 + /* "dependency_injector/providers.pxd":617 * future_result.set_exception(exception) * else: * if __is_future_or_coroutine(result): # <<<<<<<<<<<<<< @@ -125336,14 +125573,14 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_call_ */ } - /* "dependency_injector/providers.pxd":617 + /* "dependency_injector/providers.pxd":621 * result.add_done_callback(functools.partial(__async_result_callback, future_result)) * return * future_result.set_result(result) # <<<<<<<<<<<<<< * * */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_future_result, __pyx_n_s_set_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 617, __pyx_L5_except_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_future_result, __pyx_n_s_set_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 621, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -125357,7 +125594,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_call_ } __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_v_result) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_result); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 617, __pyx_L5_except_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 621, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -125372,7 +125609,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_call_ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "dependency_injector/providers.pxd":610 + /* "dependency_injector/providers.pxd":614 * args, kwargs = future.result() * result = call(*args, **kwargs) * except Exception as exception: # <<<<<<<<<<<<<< @@ -125382,21 +125619,21 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_call_ __pyx_t_12 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); if (__pyx_t_12) { __Pyx_AddTraceback("dependency_injector.providers.__async_call_callback", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_6) < 0) __PYX_ERR(0, 610, __pyx_L5_except_error) + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_6) < 0) __PYX_ERR(0, 614, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_v_exception = __pyx_t_4; - /* "dependency_injector/providers.pxd":611 + /* "dependency_injector/providers.pxd":615 * result = call(*args, **kwargs) * except Exception as exception: * future_result.set_exception(exception) # <<<<<<<<<<<<<< * else: * if __is_future_or_coroutine(result): */ - __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_future_result, __pyx_n_s_set_exception); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 611, __pyx_L5_except_error) + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_future_result, __pyx_n_s_set_exception); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 615, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_13))) { @@ -125410,7 +125647,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_call_ } __pyx_t_10 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_13, __pyx_t_7, __pyx_v_exception) : __Pyx_PyObject_CallOneArg(__pyx_t_13, __pyx_v_exception); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 611, __pyx_L5_except_error) + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 615, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; @@ -125422,7 +125659,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_call_ goto __pyx_L5_except_error; __pyx_L5_except_error:; - /* "dependency_injector/providers.pxd":607 + /* "dependency_injector/providers.pxd":611 * * cdef inline void __async_call_callback(object future_result, object call, object future): * try: # <<<<<<<<<<<<<< @@ -125448,7 +125685,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_call_ __pyx_L8_try_end:; } - /* "dependency_injector/providers.pxd":606 + /* "dependency_injector/providers.pxd":610 * * * cdef inline void __async_call_callback(object future_result, object call, object future): # <<<<<<<<<<<<<< @@ -125475,7 +125712,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_call_ __Pyx_RefNannyFinishContext(); } -/* "dependency_injector/providers.pxd":620 +/* "dependency_injector/providers.pxd":624 * * * cdef inline object __async_result_callback(object future_result, object future): # <<<<<<<<<<<<<< @@ -125503,7 +125740,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___async_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__async_result_callback", 0); - /* "dependency_injector/providers.pxd":621 + /* "dependency_injector/providers.pxd":625 * * cdef inline object __async_result_callback(object future_result, object future): * try: # <<<<<<<<<<<<<< @@ -125519,14 +125756,14 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___async_ __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "dependency_injector/providers.pxd":622 + /* "dependency_injector/providers.pxd":626 * cdef inline object __async_result_callback(object future_result, object future): * try: * result = future.result() # <<<<<<<<<<<<<< * except Exception as exception: * future_result.set_exception(exception) */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_future, __pyx_n_s_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 622, __pyx_L3_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_future, __pyx_n_s_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 626, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -125540,13 +125777,13 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___async_ } __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 622, __pyx_L3_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 626, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_result = __pyx_t_4; __pyx_t_4 = 0; - /* "dependency_injector/providers.pxd":621 + /* "dependency_injector/providers.pxd":625 * * cdef inline object __async_result_callback(object future_result, object future): * try: # <<<<<<<<<<<<<< @@ -125555,7 +125792,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___async_ */ } - /* "dependency_injector/providers.pxd":626 + /* "dependency_injector/providers.pxd":630 * future_result.set_exception(exception) * else: * future_result.set_result(result) # <<<<<<<<<<<<<< @@ -125563,7 +125800,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___async_ * */ /*else:*/ { - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_future_result, __pyx_n_s_set_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 626, __pyx_L5_except_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_future_result, __pyx_n_s_set_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 630, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -125577,7 +125814,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___async_ } __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_v_result) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_result); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 626, __pyx_L5_except_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 630, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -125591,7 +125828,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___async_ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "dependency_injector/providers.pxd":623 + /* "dependency_injector/providers.pxd":627 * try: * result = future.result() * except Exception as exception: # <<<<<<<<<<<<<< @@ -125601,21 +125838,21 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___async_ __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); if (__pyx_t_7) { __Pyx_AddTraceback("dependency_injector.providers.__async_result_callback", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6) < 0) __PYX_ERR(0, 623, __pyx_L5_except_error) + if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6) < 0) __PYX_ERR(0, 627, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_v_exception = __pyx_t_5; - /* "dependency_injector/providers.pxd":624 + /* "dependency_injector/providers.pxd":628 * result = future.result() * except Exception as exception: * future_result.set_exception(exception) # <<<<<<<<<<<<<< * else: * future_result.set_result(result) */ - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_future_result, __pyx_n_s_set_exception); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 624, __pyx_L5_except_error) + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_future_result, __pyx_n_s_set_exception); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 628, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { @@ -125629,7 +125866,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___async_ } __pyx_t_8 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_10, __pyx_v_exception) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_exception); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 624, __pyx_L5_except_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 628, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -125641,7 +125878,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___async_ goto __pyx_L5_except_error; __pyx_L5_except_error:; - /* "dependency_injector/providers.pxd":621 + /* "dependency_injector/providers.pxd":625 * * cdef inline object __async_result_callback(object future_result, object future): * try: # <<<<<<<<<<<<<< @@ -125661,7 +125898,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___async_ __pyx_L8_try_end:; } - /* "dependency_injector/providers.pxd":620 + /* "dependency_injector/providers.pxd":624 * * * cdef inline object __async_result_callback(object future_result, object future): # <<<<<<<<<<<<<< @@ -125689,7 +125926,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___async_ return __pyx_r; } -/* "dependency_injector/providers.pxd":629 +/* "dependency_injector/providers.pxd":633 * * * cdef inline object __callable_call(Callable self, tuple args, dict kwargs, ): # <<<<<<<<<<<<<< @@ -125709,7 +125946,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___callab int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__callable_call", 0); - /* "dependency_injector/providers.pxd":630 + /* "dependency_injector/providers.pxd":634 * * cdef inline object __callable_call(Callable self, tuple args, dict kwargs, ): * return __call( # <<<<<<<<<<<<<< @@ -125718,7 +125955,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___callab */ __Pyx_XDECREF(__pyx_r); - /* "dependency_injector/providers.pxd":631 + /* "dependency_injector/providers.pxd":635 * cdef inline object __callable_call(Callable self, tuple args, dict kwargs, ): * return __call( * self.__provides, # <<<<<<<<<<<<<< @@ -125728,7 +125965,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___callab __pyx_t_1 = __pyx_v_self->__pyx___provides; __Pyx_INCREF(__pyx_t_1); - /* "dependency_injector/providers.pxd":633 + /* "dependency_injector/providers.pxd":637 * self.__provides, * args, * self.__args, # <<<<<<<<<<<<<< @@ -125738,7 +125975,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___callab __pyx_t_2 = __pyx_v_self->__pyx___args; __Pyx_INCREF(__pyx_t_2); - /* "dependency_injector/providers.pxd":636 + /* "dependency_injector/providers.pxd":640 * self.__args_len, * kwargs, * self.__kwargs, # <<<<<<<<<<<<<< @@ -125748,14 +125985,14 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___callab __pyx_t_3 = __pyx_v_self->__pyx___kwargs; __Pyx_INCREF(__pyx_t_3); - /* "dependency_injector/providers.pxd":630 + /* "dependency_injector/providers.pxd":634 * * cdef inline object __callable_call(Callable self, tuple args, dict kwargs, ): * return __call( # <<<<<<<<<<<<<< * self.__provides, * args, */ - __pyx_t_4 = __pyx_f_19dependency_injector_9providers___call(__pyx_t_1, __pyx_v_args, ((PyObject*)__pyx_t_2), __pyx_v_self->__pyx___args_len, __pyx_v_kwargs, ((PyObject*)__pyx_t_3), __pyx_v_self->__pyx___kwargs_len, __pyx_v_self->__pyx_base.__pyx___async_mode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 630, __pyx_L1_error) + __pyx_t_4 = __pyx_f_19dependency_injector_9providers___call(__pyx_t_1, __pyx_v_args, ((PyObject*)__pyx_t_2), __pyx_v_self->__pyx___args_len, __pyx_v_kwargs, ((PyObject*)__pyx_t_3), __pyx_v_self->__pyx___kwargs_len, __pyx_v_self->__pyx_base.__pyx___async_mode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 634, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -125764,7 +126001,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___callab __pyx_t_4 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pxd":629 + /* "dependency_injector/providers.pxd":633 * * * cdef inline object __callable_call(Callable self, tuple args, dict kwargs, ): # <<<<<<<<<<<<<< @@ -125786,7 +126023,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___callab return __pyx_r; } -/* "dependency_injector/providers.pxd":642 +/* "dependency_injector/providers.pxd":646 * * * cdef inline object __factory_call(Factory self, tuple args, dict kwargs): # <<<<<<<<<<<<<< @@ -125814,7 +126051,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___factor int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__factory_call", 0); - /* "dependency_injector/providers.pxd":646 + /* "dependency_injector/providers.pxd":650 * * instance = __call( * self.__instantiator.__provides, # <<<<<<<<<<<<<< @@ -125824,7 +126061,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___factor __pyx_t_1 = __pyx_v_self->__pyx___instantiator->__pyx___provides; __Pyx_INCREF(__pyx_t_1); - /* "dependency_injector/providers.pxd":648 + /* "dependency_injector/providers.pxd":652 * self.__instantiator.__provides, * args, * self.__instantiator.__args, # <<<<<<<<<<<<<< @@ -125834,7 +126071,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___factor __pyx_t_2 = __pyx_v_self->__pyx___instantiator->__pyx___args; __Pyx_INCREF(__pyx_t_2); - /* "dependency_injector/providers.pxd":651 + /* "dependency_injector/providers.pxd":655 * self.__instantiator.__args_len, * kwargs, * self.__instantiator.__kwargs, # <<<<<<<<<<<<<< @@ -125844,14 +126081,14 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___factor __pyx_t_3 = __pyx_v_self->__pyx___instantiator->__pyx___kwargs; __Pyx_INCREF(__pyx_t_3); - /* "dependency_injector/providers.pxd":645 + /* "dependency_injector/providers.pxd":649 * cdef object instance * * instance = __call( # <<<<<<<<<<<<<< * self.__instantiator.__provides, * args, */ - __pyx_t_4 = __pyx_f_19dependency_injector_9providers___call(__pyx_t_1, __pyx_v_args, ((PyObject*)__pyx_t_2), __pyx_v_self->__pyx___instantiator->__pyx___args_len, __pyx_v_kwargs, ((PyObject*)__pyx_t_3), __pyx_v_self->__pyx___instantiator->__pyx___kwargs_len, __pyx_v_self->__pyx_base.__pyx___async_mode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 645, __pyx_L1_error) + __pyx_t_4 = __pyx_f_19dependency_injector_9providers___call(__pyx_t_1, __pyx_v_args, ((PyObject*)__pyx_t_2), __pyx_v_self->__pyx___instantiator->__pyx___args_len, __pyx_v_kwargs, ((PyObject*)__pyx_t_3), __pyx_v_self->__pyx___instantiator->__pyx___kwargs_len, __pyx_v_self->__pyx_base.__pyx___async_mode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 649, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -125859,7 +126096,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___factor __pyx_v_instance = __pyx_t_4; __pyx_t_4 = 0; - /* "dependency_injector/providers.pxd":656 + /* "dependency_injector/providers.pxd":660 * ) * * if self.__attributes_len > 0: # <<<<<<<<<<<<<< @@ -125869,7 +126106,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___factor __pyx_t_5 = ((__pyx_v_self->__pyx___attributes_len > 0) != 0); if (__pyx_t_5) { - /* "dependency_injector/providers.pxd":657 + /* "dependency_injector/providers.pxd":661 * * if self.__attributes_len > 0: * attributes = __provide_attributes(self.__attributes, self.__attributes_len) # <<<<<<<<<<<<<< @@ -125878,13 +126115,13 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___factor */ __pyx_t_4 = __pyx_v_self->__pyx___attributes; __Pyx_INCREF(__pyx_t_4); - __pyx_t_3 = __pyx_f_19dependency_injector_9providers___provide_attributes(((PyObject*)__pyx_t_4), __pyx_v_self->__pyx___attributes_len); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 657, __pyx_L1_error) + __pyx_t_3 = __pyx_f_19dependency_injector_9providers___provide_attributes(((PyObject*)__pyx_t_4), __pyx_v_self->__pyx___attributes_len); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 661, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_attributes = __pyx_t_3; __pyx_t_3 = 0; - /* "dependency_injector/providers.pxd":659 + /* "dependency_injector/providers.pxd":663 * attributes = __provide_attributes(self.__attributes, self.__attributes_len) * * is_future_instance = __is_future_or_coroutine(instance) # <<<<<<<<<<<<<< @@ -125893,7 +126130,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___factor */ __pyx_v_is_future_instance = __pyx_f_19dependency_injector_9providers___is_future_or_coroutine(__pyx_v_instance); - /* "dependency_injector/providers.pxd":660 + /* "dependency_injector/providers.pxd":664 * * is_future_instance = __is_future_or_coroutine(instance) * is_future_attributes = __is_future_or_coroutine(attributes) # <<<<<<<<<<<<<< @@ -125902,7 +126139,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___factor */ __pyx_v_is_future_attributes = __pyx_f_19dependency_injector_9providers___is_future_or_coroutine(__pyx_v_attributes); - /* "dependency_injector/providers.pxd":662 + /* "dependency_injector/providers.pxd":666 * is_future_attributes = __is_future_or_coroutine(attributes) * * if is_future_instance or is_future_attributes: # <<<<<<<<<<<<<< @@ -125920,7 +126157,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___factor __pyx_L5_bool_binop_done:; if (__pyx_t_5) { - /* "dependency_injector/providers.pxd":663 + /* "dependency_injector/providers.pxd":667 * * if is_future_instance or is_future_attributes: * future_instance = instance if is_future_instance else __future_result(instance) # <<<<<<<<<<<<<< @@ -125931,7 +126168,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___factor __Pyx_INCREF(__pyx_v_instance); __pyx_t_3 = __pyx_v_instance; } else { - __pyx_t_4 = __pyx_f_19dependency_injector_9providers___future_result(__pyx_v_instance); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 663, __pyx_L1_error) + __pyx_t_4 = __pyx_f_19dependency_injector_9providers___future_result(__pyx_v_instance); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 667, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __pyx_t_4; __pyx_t_4 = 0; @@ -125939,7 +126176,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___factor __pyx_v_future_instance = __pyx_t_3; __pyx_t_3 = 0; - /* "dependency_injector/providers.pxd":664 + /* "dependency_injector/providers.pxd":668 * if is_future_instance or is_future_attributes: * future_instance = instance if is_future_instance else __future_result(instance) * future_attributes = attributes if is_future_attributes else __future_result(attributes) # <<<<<<<<<<<<<< @@ -125950,7 +126187,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___factor __Pyx_INCREF(__pyx_v_attributes); __pyx_t_3 = __pyx_v_attributes; } else { - __pyx_t_4 = __pyx_f_19dependency_injector_9providers___future_result(__pyx_v_attributes); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 664, __pyx_L1_error) + __pyx_t_4 = __pyx_f_19dependency_injector_9providers___future_result(__pyx_v_attributes); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 668, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __pyx_t_4; __pyx_t_4 = 0; @@ -125958,7 +126195,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___factor __pyx_v_future_attributes = __pyx_t_3; __pyx_t_3 = 0; - /* "dependency_injector/providers.pxd":665 + /* "dependency_injector/providers.pxd":669 * future_instance = instance if is_future_instance else __future_result(instance) * future_attributes = attributes if is_future_attributes else __future_result(attributes) * return __async_inject_attributes(future_instance, future_attributes) # <<<<<<<<<<<<<< @@ -125966,13 +126203,13 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___factor * __inject_attributes(instance, attributes) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __pyx_f_19dependency_injector_9providers___async_inject_attributes(__pyx_v_future_instance, __pyx_v_future_attributes); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 665, __pyx_L1_error) + __pyx_t_3 = __pyx_f_19dependency_injector_9providers___async_inject_attributes(__pyx_v_future_instance, __pyx_v_future_attributes); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 669, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "dependency_injector/providers.pxd":662 + /* "dependency_injector/providers.pxd":666 * is_future_attributes = __is_future_or_coroutine(attributes) * * if is_future_instance or is_future_attributes: # <<<<<<<<<<<<<< @@ -125981,17 +126218,17 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___factor */ } - /* "dependency_injector/providers.pxd":667 + /* "dependency_injector/providers.pxd":671 * return __async_inject_attributes(future_instance, future_attributes) * * __inject_attributes(instance, attributes) # <<<<<<<<<<<<<< * * return instance */ - if (!(likely(PyDict_CheckExact(__pyx_v_attributes))||((__pyx_v_attributes) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_attributes)->tp_name), 0))) __PYX_ERR(0, 667, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_v_attributes))||((__pyx_v_attributes) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_attributes)->tp_name), 0))) __PYX_ERR(0, 671, __pyx_L1_error) __pyx_f_19dependency_injector_9providers___inject_attributes(__pyx_v_instance, ((PyObject*)__pyx_v_attributes)); - /* "dependency_injector/providers.pxd":656 + /* "dependency_injector/providers.pxd":660 * ) * * if self.__attributes_len > 0: # <<<<<<<<<<<<<< @@ -126000,7 +126237,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___factor */ } - /* "dependency_injector/providers.pxd":669 + /* "dependency_injector/providers.pxd":673 * __inject_attributes(instance, attributes) * * return instance # <<<<<<<<<<<<<< @@ -126012,7 +126249,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___factor __pyx_r = __pyx_v_instance; goto __pyx_L0; - /* "dependency_injector/providers.pxd":642 + /* "dependency_injector/providers.pxd":646 * * * cdef inline object __factory_call(Factory self, tuple args, dict kwargs): # <<<<<<<<<<<<<< @@ -126038,7 +126275,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___factor return __pyx_r; } -/* "dependency_injector/providers.pxd":672 +/* "dependency_injector/providers.pxd":676 * * * cdef inline bint __is_future_or_coroutine(object instance): # <<<<<<<<<<<<<< @@ -126053,7 +126290,7 @@ static CYTHON_INLINE int __pyx_f_19dependency_injector_9providers___is_future_or int __pyx_t_2; __Pyx_RefNannySetupContext("__is_future_or_coroutine", 0); - /* "dependency_injector/providers.pxd":673 + /* "dependency_injector/providers.pxd":677 * * cdef inline bint __is_future_or_coroutine(object instance): * return __isfuture(instance) or __iscoroutine(instance) # <<<<<<<<<<<<<< @@ -126072,7 +126309,7 @@ static CYTHON_INLINE int __pyx_f_19dependency_injector_9providers___is_future_or __pyx_r = __pyx_t_1; goto __pyx_L0; - /* "dependency_injector/providers.pxd":672 + /* "dependency_injector/providers.pxd":676 * * * cdef inline bint __is_future_or_coroutine(object instance): # <<<<<<<<<<<<<< @@ -126086,7 +126323,7 @@ static CYTHON_INLINE int __pyx_f_19dependency_injector_9providers___is_future_or return __pyx_r; } -/* "dependency_injector/providers.pxd":676 +/* "dependency_injector/providers.pxd":680 * * * cdef inline bint __isfuture(object obj): # <<<<<<<<<<<<<< @@ -126106,16 +126343,16 @@ static CYTHON_INLINE int __pyx_f_19dependency_injector_9providers___isfuture(PyO int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__isfuture", 0); - /* "dependency_injector/providers.pxd":677 + /* "dependency_injector/providers.pxd":681 * * cdef inline bint __isfuture(object obj): * return hasattr(obj.__class__, "_asyncio_future_blocking") and obj._asyncio_future_blocking is not None # <<<<<<<<<<<<<< * * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 677, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 681, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_HasAttr(__pyx_t_2, __pyx_n_s_asyncio_future_blocking); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 677, __pyx_L1_error) + __pyx_t_3 = __Pyx_HasAttr(__pyx_t_2, __pyx_n_s_asyncio_future_blocking); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 681, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = (__pyx_t_3 != 0); if (__pyx_t_4) { @@ -126123,7 +126360,7 @@ static CYTHON_INLINE int __pyx_f_19dependency_injector_9providers___isfuture(PyO __pyx_t_1 = __pyx_t_4; goto __pyx_L3_bool_binop_done; } - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_asyncio_future_blocking); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 677, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_asyncio_future_blocking); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 681, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = (__pyx_t_2 != Py_None); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -126133,7 +126370,7 @@ static CYTHON_INLINE int __pyx_f_19dependency_injector_9providers___isfuture(PyO __pyx_r = __pyx_t_1; goto __pyx_L0; - /* "dependency_injector/providers.pxd":676 + /* "dependency_injector/providers.pxd":680 * * * cdef inline bint __isfuture(object obj): # <<<<<<<<<<<<<< @@ -126151,7 +126388,7 @@ static CYTHON_INLINE int __pyx_f_19dependency_injector_9providers___isfuture(PyO return __pyx_r; } -/* "dependency_injector/providers.pxd":680 +/* "dependency_injector/providers.pxd":684 * * * cdef inline bint __iscoroutine(object obj): # <<<<<<<<<<<<<< @@ -126172,7 +126409,7 @@ static CYTHON_INLINE int __pyx_f_19dependency_injector_9providers___iscoroutine( int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__iscoroutine", 0); - /* "dependency_injector/providers.pxd":681 + /* "dependency_injector/providers.pxd":685 * * cdef inline bint __iscoroutine(object obj): * if type(obj) in __iscoroutine_typecache: # <<<<<<<<<<<<<< @@ -126181,13 +126418,13 @@ static CYTHON_INLINE int __pyx_f_19dependency_injector_9providers___iscoroutine( */ if (unlikely(__pyx_v_19dependency_injector_9providers___iscoroutine_typecache == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 681, __pyx_L1_error) + __PYX_ERR(0, 685, __pyx_L1_error) } - __pyx_t_1 = (__Pyx_PySet_ContainsTF(((PyObject *)Py_TYPE(__pyx_v_obj)), __pyx_v_19dependency_injector_9providers___iscoroutine_typecache, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 681, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PySet_ContainsTF(((PyObject *)Py_TYPE(__pyx_v_obj)), __pyx_v_19dependency_injector_9providers___iscoroutine_typecache, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 685, __pyx_L1_error) __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "dependency_injector/providers.pxd":682 + /* "dependency_injector/providers.pxd":686 * cdef inline bint __iscoroutine(object obj): * if type(obj) in __iscoroutine_typecache: * return True # <<<<<<<<<<<<<< @@ -126197,7 +126434,7 @@ static CYTHON_INLINE int __pyx_f_19dependency_injector_9providers___iscoroutine( __pyx_r = 1; goto __pyx_L0; - /* "dependency_injector/providers.pxd":681 + /* "dependency_injector/providers.pxd":685 * * cdef inline bint __iscoroutine(object obj): * if type(obj) in __iscoroutine_typecache: # <<<<<<<<<<<<<< @@ -126206,7 +126443,7 @@ static CYTHON_INLINE int __pyx_f_19dependency_injector_9providers___iscoroutine( */ } - /* "dependency_injector/providers.pxd":684 + /* "dependency_injector/providers.pxd":688 * return True * * if isinstance(obj, __COROUTINE_TYPES): # <<<<<<<<<<<<<< @@ -126215,12 +126452,12 @@ static CYTHON_INLINE int __pyx_f_19dependency_injector_9providers___iscoroutine( */ __pyx_t_3 = __pyx_v_19dependency_injector_9providers___COROUTINE_TYPES; __Pyx_INCREF(__pyx_t_3); - __pyx_t_2 = PyObject_IsInstance(__pyx_v_obj, __pyx_t_3); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 684, __pyx_L1_error) + __pyx_t_2 = PyObject_IsInstance(__pyx_v_obj, __pyx_t_3); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 688, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "dependency_injector/providers.pxd":688 + /* "dependency_injector/providers.pxd":692 * # positive types. That shouldn't ever happen, unless * # someone stressing the system on purpose. * if len(__iscoroutine_typecache) < 100: # <<<<<<<<<<<<<< @@ -126231,14 +126468,14 @@ static CYTHON_INLINE int __pyx_f_19dependency_injector_9providers___iscoroutine( __Pyx_INCREF(__pyx_t_3); if (unlikely(__pyx_t_3 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 688, __pyx_L1_error) + __PYX_ERR(0, 692, __pyx_L1_error) } - __pyx_t_4 = PySet_GET_SIZE(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 688, __pyx_L1_error) + __pyx_t_4 = PySet_GET_SIZE(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 692, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = ((__pyx_t_4 < 0x64) != 0); if (__pyx_t_1) { - /* "dependency_injector/providers.pxd":689 + /* "dependency_injector/providers.pxd":693 * # someone stressing the system on purpose. * if len(__iscoroutine_typecache) < 100: * __iscoroutine_typecache.add(type(obj)) # <<<<<<<<<<<<<< @@ -126247,11 +126484,11 @@ static CYTHON_INLINE int __pyx_f_19dependency_injector_9providers___iscoroutine( */ if (unlikely(__pyx_v_19dependency_injector_9providers___iscoroutine_typecache == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "add"); - __PYX_ERR(0, 689, __pyx_L1_error) + __PYX_ERR(0, 693, __pyx_L1_error) } - __pyx_t_5 = PySet_Add(__pyx_v_19dependency_injector_9providers___iscoroutine_typecache, ((PyObject *)Py_TYPE(__pyx_v_obj))); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 689, __pyx_L1_error) + __pyx_t_5 = PySet_Add(__pyx_v_19dependency_injector_9providers___iscoroutine_typecache, ((PyObject *)Py_TYPE(__pyx_v_obj))); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 693, __pyx_L1_error) - /* "dependency_injector/providers.pxd":688 + /* "dependency_injector/providers.pxd":692 * # positive types. That shouldn't ever happen, unless * # someone stressing the system on purpose. * if len(__iscoroutine_typecache) < 100: # <<<<<<<<<<<<<< @@ -126260,7 +126497,7 @@ static CYTHON_INLINE int __pyx_f_19dependency_injector_9providers___iscoroutine( */ } - /* "dependency_injector/providers.pxd":690 + /* "dependency_injector/providers.pxd":694 * if len(__iscoroutine_typecache) < 100: * __iscoroutine_typecache.add(type(obj)) * return True # <<<<<<<<<<<<<< @@ -126270,7 +126507,7 @@ static CYTHON_INLINE int __pyx_f_19dependency_injector_9providers___iscoroutine( __pyx_r = 1; goto __pyx_L0; - /* "dependency_injector/providers.pxd":684 + /* "dependency_injector/providers.pxd":688 * return True * * if isinstance(obj, __COROUTINE_TYPES): # <<<<<<<<<<<<<< @@ -126279,7 +126516,7 @@ static CYTHON_INLINE int __pyx_f_19dependency_injector_9providers___iscoroutine( */ } - /* "dependency_injector/providers.pxd":692 + /* "dependency_injector/providers.pxd":696 * return True * else: * return False # <<<<<<<<<<<<<< @@ -126291,7 +126528,7 @@ static CYTHON_INLINE int __pyx_f_19dependency_injector_9providers___iscoroutine( goto __pyx_L0; } - /* "dependency_injector/providers.pxd":680 + /* "dependency_injector/providers.pxd":684 * * * cdef inline bint __iscoroutine(object obj): # <<<<<<<<<<<<<< @@ -126309,7 +126546,7 @@ static CYTHON_INLINE int __pyx_f_19dependency_injector_9providers___iscoroutine( return __pyx_r; } -/* "dependency_injector/providers.pxd":695 +/* "dependency_injector/providers.pxd":699 * * * cdef inline object __future_result(object instance): # <<<<<<<<<<<<<< @@ -126329,16 +126566,16 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___future int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__future_result", 0); - /* "dependency_injector/providers.pxd":696 + /* "dependency_injector/providers.pxd":700 * * cdef inline object __future_result(object instance): * future_result = asyncio.Future() # <<<<<<<<<<<<<< * future_result.set_result(instance) * return future_result */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 696, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 700, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Future); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 696, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Future); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 700, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -126353,19 +126590,19 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___future } __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 696, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 700, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_future_result = __pyx_t_1; __pyx_t_1 = 0; - /* "dependency_injector/providers.pxd":697 + /* "dependency_injector/providers.pxd":701 * cdef inline object __future_result(object instance): * future_result = asyncio.Future() * future_result.set_result(instance) # <<<<<<<<<<<<<< * return future_result */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_future_result, __pyx_n_s_set_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 697, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_future_result, __pyx_n_s_set_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 701, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -126379,12 +126616,12 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___future } __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_instance) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_instance); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 697, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 701, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/providers.pxd":698 + /* "dependency_injector/providers.pxd":702 * future_result = asyncio.Future() * future_result.set_result(instance) * return future_result # <<<<<<<<<<<<<< @@ -126394,7 +126631,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___future __pyx_r = __pyx_v_future_result; goto __pyx_L0; - /* "dependency_injector/providers.pxd":695 + /* "dependency_injector/providers.pxd":699 * * * cdef inline object __future_result(object instance): # <<<<<<<<<<<<<< @@ -137464,6 +137701,9 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_instance_of, __pyx_k_instance_of, sizeof(__pyx_k_instance_of), 0, 0, 1, 1}, {&__pyx_kp_s_instance_of_has_incorrect_type, __pyx_k_instance_of_has_incorrect_type, sizeof(__pyx_k_instance_of_has_incorrect_type), 0, 0, 1, 0}, {&__pyx_kp_u_instead, __pyx_k_instead, sizeof(__pyx_k_instead), 0, 1, 0, 0}, + {&__pyx_n_s_is_async_mode_disabled, __pyx_k_is_async_mode_disabled, sizeof(__pyx_k_is_async_mode_disabled), 0, 0, 1, 1}, + {&__pyx_n_s_is_async_mode_enabled, __pyx_k_is_async_mode_enabled, sizeof(__pyx_k_is_async_mode_enabled), 0, 0, 1, 1}, + {&__pyx_n_s_is_async_mode_undefined, __pyx_k_is_async_mode_undefined, sizeof(__pyx_k_is_async_mode_undefined), 0, 0, 1, 1}, {&__pyx_n_s_is_async_resource_subclass, __pyx_k_is_async_resource_subclass, sizeof(__pyx_k_is_async_resource_subclass), 0, 0, 1, 1}, {&__pyx_n_s_is_coroutine, __pyx_k_is_coroutine, sizeof(__pyx_k_is_coroutine), 0, 0, 1, 1}, {&__pyx_n_s_is_coroutine_marker, __pyx_k_is_coroutine_marker, sizeof(__pyx_k_is_coroutine_marker), 0, 0, 1, 1}, @@ -137690,8 +137930,8 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { }; static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(0, 5, __pyx_L1_error) - __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 405, __pyx_L1_error) - __pyx_builtin_zip = __Pyx_GetBuiltinName(__pyx_n_s_zip); if (!__pyx_builtin_zip) __PYX_ERR(0, 495, __pyx_L1_error) + __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 409, __pyx_L1_error) + __pyx_builtin_zip = __Pyx_GetBuiltinName(__pyx_n_s_zip); if (!__pyx_builtin_zip) __PYX_ERR(0, 499, __pyx_L1_error) __pyx_builtin_DeprecationWarning = __Pyx_GetBuiltinName(__pyx_n_s_DeprecationWarning); if (!__pyx_builtin_DeprecationWarning) __PYX_ERR(1, 78, __pyx_L1_error) __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) __PYX_ERR(1, 142, __pyx_L1_error) __pyx_builtin_staticmethod = __Pyx_GetBuiltinName(__pyx_n_s_staticmethod); if (!__pyx_builtin_staticmethod) __PYX_ERR(1, 3873, __pyx_L1_error) @@ -138386,6 +138626,9 @@ static int __Pyx_modinit_type_init_code(void) { __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); /*--- Type init code ---*/ __pyx_vtabptr_19dependency_injector_9providers_Provider = &__pyx_vtable_19dependency_injector_9providers_Provider; + __pyx_vtable_19dependency_injector_9providers_Provider.is_async_mode_enabled = (int (*)(struct __pyx_obj_19dependency_injector_9providers_Provider *, int __pyx_skip_dispatch))__pyx_f_19dependency_injector_9providers_8Provider_is_async_mode_enabled; + __pyx_vtable_19dependency_injector_9providers_Provider.is_async_mode_disabled = (int (*)(struct __pyx_obj_19dependency_injector_9providers_Provider *, int __pyx_skip_dispatch))__pyx_f_19dependency_injector_9providers_8Provider_is_async_mode_disabled; + __pyx_vtable_19dependency_injector_9providers_Provider.is_async_mode_undefined = (int (*)(struct __pyx_obj_19dependency_injector_9providers_Provider *, int __pyx_skip_dispatch))__pyx_f_19dependency_injector_9providers_8Provider_is_async_mode_undefined; __pyx_vtable_19dependency_injector_9providers_Provider._provide = (PyObject *(*)(struct __pyx_obj_19dependency_injector_9providers_Provider *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_19dependency_injector_9providers_8Provider__provide; __pyx_vtable_19dependency_injector_9providers_Provider._copy_overridings = (void (*)(struct __pyx_obj_19dependency_injector_9providers_Provider *, struct __pyx_obj_19dependency_injector_9providers_Provider *, PyObject *, int __pyx_skip_dispatch))__pyx_f_19dependency_injector_9providers_8Provider__copy_overridings; if (PyType_Ready(&__pyx_type_19dependency_injector_9providers_Provider) < 0) __PYX_ERR(1, 152, __pyx_L1_error) @@ -143903,6 +144146,48 @@ static CYTHON_INLINE int __Pyx_PySet_Remove(PyObject *set, PyObject *key) { return 0; } +/* WriteUnraisableException */ +static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno, + CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename, + int full_traceback, CYTHON_UNUSED int nogil) { + PyObject *old_exc, *old_val, *old_tb; + PyObject *ctx; + __Pyx_PyThreadState_declare +#ifdef WITH_THREAD + PyGILState_STATE state; + if (nogil) + state = PyGILState_Ensure(); +#ifdef _MSC_VER + else state = (PyGILState_STATE)-1; +#endif +#endif + __Pyx_PyThreadState_assign + __Pyx_ErrFetch(&old_exc, &old_val, &old_tb); + if (full_traceback) { + Py_XINCREF(old_exc); + Py_XINCREF(old_val); + Py_XINCREF(old_tb); + __Pyx_ErrRestore(old_exc, old_val, old_tb); + PyErr_PrintEx(1); + } + #if PY_MAJOR_VERSION < 3 + ctx = PyString_FromString(name); + #else + ctx = PyUnicode_FromString(name); + #endif + __Pyx_ErrRestore(old_exc, old_val, old_tb); + if (!ctx) { + PyErr_WriteUnraisable(Py_None); + } else { + PyErr_WriteUnraisable(ctx); + Py_DECREF(ctx); + } +#ifdef WITH_THREAD + if (nogil) + PyGILState_Release(state); +#endif +} + /* FetchCommonType */ static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) { PyObject* fake_module; @@ -145180,48 +145465,6 @@ static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *nam return 0; } -/* WriteUnraisableException */ -static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno, - CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename, - int full_traceback, CYTHON_UNUSED int nogil) { - PyObject *old_exc, *old_val, *old_tb; - PyObject *ctx; - __Pyx_PyThreadState_declare -#ifdef WITH_THREAD - PyGILState_STATE state; - if (nogil) - state = PyGILState_Ensure(); -#ifdef _MSC_VER - else state = (PyGILState_STATE)-1; -#endif -#endif - __Pyx_PyThreadState_assign - __Pyx_ErrFetch(&old_exc, &old_val, &old_tb); - if (full_traceback) { - Py_XINCREF(old_exc); - Py_XINCREF(old_val); - Py_XINCREF(old_tb); - __Pyx_ErrRestore(old_exc, old_val, old_tb); - PyErr_PrintEx(1); - } - #if PY_MAJOR_VERSION < 3 - ctx = PyString_FromString(name); - #else - ctx = PyUnicode_FromString(name); - #endif - __Pyx_ErrRestore(old_exc, old_val, old_tb); - if (!ctx) { - PyErr_WriteUnraisable(Py_None); - } else { - PyErr_WriteUnraisable(ctx); - Py_DECREF(ctx); - } -#ifdef WITH_THREAD - if (nogil) - PyGILState_Release(state); -#endif -} - /* GetAttr */ static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) { #if CYTHON_USE_TYPE_SLOTS diff --git a/src/dependency_injector/providers.pxd b/src/dependency_injector/providers.pxd index 79be6354..2c0abe2b 100644 --- a/src/dependency_injector/providers.pxd +++ b/src/dependency_injector/providers.pxd @@ -25,6 +25,10 @@ cdef class Provider(object): cdef tuple __overrides cdef int __async_mode + cpdef bint is_async_mode_enabled(self) + cpdef bint is_async_mode_disabled(self) + cpdef bint is_async_mode_undefined(self) + cpdef object _provide(self, tuple args, dict kwargs) cpdef void _copy_overridings(self, Provider copied, dict memo) diff --git a/src/dependency_injector/providers.pyx b/src/dependency_injector/providers.pyx index 52e8e8b5..1335494f 100644 --- a/src/dependency_injector/providers.pyx +++ b/src/dependency_injector/providers.pyx @@ -406,15 +406,15 @@ cdef class Provider(object): """ self.__async_mode = ASYNC_MODE_UNDEFINED - def is_async_mode_enabled(self): + cpdef bint is_async_mode_enabled(self): """Check if async mode is enabled.""" return self.__async_mode == ASYNC_MODE_ENABLED - def is_async_mode_disabled(self): + cpdef bint is_async_mode_disabled(self): """Check if async mode is disabled.""" return self.__async_mode == ASYNC_MODE_DISABLED - def is_async_mode_undefined(self): + cpdef bint is_async_mode_undefined(self): """Check if async mode is undefined.""" return self.__async_mode == ASYNC_MODE_UNDEFINED diff --git a/src/dependency_injector/wiring.py b/src/dependency_injector/wiring.py index 500e0b1e..1417ae4f 100644 --- a/src/dependency_injector/wiring.py +++ b/src/dependency_injector/wiring.py @@ -1,5 +1,5 @@ """Wiring module.""" - +import functools import inspect import importlib import importlib.machinery @@ -895,4 +895,19 @@ _loader = AutoLoader() # Optimizations from ._cwiring import _get_sync_patched # noqa -from ._cwiring import _get_async_patched # noqa +from ._cwiring import _async_inject # noqa + + +# Wiring uses the following Python wrapper because there is +# no possibility to compile a first-type citizen coroutine in Cython. +def _get_async_patched(fn): + @functools.wraps(fn) + async def _patched(*args, **kwargs): + return await _async_inject( + fn, + args, + kwargs, + _patched.__injections__, + _patched.__closing__, + ) + return _patched diff --git a/tests/unit/wiring/test_introspection_py36.py b/tests/unit/wiring/test_introspection_py36.py new file mode 100644 index 00000000..c7149602 --- /dev/null +++ b/tests/unit/wiring/test_introspection_py36.py @@ -0,0 +1,22 @@ +"""Tests for compatibility of @inject-patched functions with asyncio and inspect module checks.""" + +import asyncio +import inspect + +from dependency_injector.wiring import inject + + +def test_asyncio_iscoroutinefunction(): + @inject + async def foo(): + ... + + assert asyncio.iscoroutinefunction(foo) + + +def test_inspect_iscoroutinefunction(): + @inject + async def foo(): + ... + + assert inspect.iscoroutinefunction(foo)