diff --git a/src/dependency_injector/_cwiring.c b/src/dependency_injector/_cwiring.c index b6bd2238..d02a750e 100644 --- a/src/dependency_injector/_cwiring.c +++ b/src/dependency_injector/_cwiring.c @@ -1,4 +1,4 @@ -/* Generated by Cython 0.29.32 */ +/* Generated by Cython 0.29.33 */ #ifndef PY_SSIZE_T_CLEAN #define PY_SSIZE_T_CLEAN @@ -9,8 +9,8 @@ #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) #error Cython requires Python 2.6+ or Python 3.3+. #else -#define CYTHON_ABI "0_29_32" -#define CYTHON_HEX_VERSION 0x001D20F0 +#define CYTHON_ABI "0_29_33" +#define CYTHON_HEX_VERSION 0x001D21F0 #define CYTHON_FUTURE_DIVISION 0 #include #ifndef offsetof @@ -87,7 +87,7 @@ #undef CYTHON_USE_EXC_INFO_STACK #define CYTHON_USE_EXC_INFO_STACK 0 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC - #define CYTHON_UPDATE_DESCRIPTOR_DOC (PYPY_VERSION_HEX >= 0x07030900) + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 #endif #elif defined(PYSTON_VERSION) #define CYTHON_COMPILING_IN_PYPY 0 @@ -552,11 +552,11 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { #endif #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) #define CYTHON_PEP393_ENABLED 1 - #if defined(PyUnicode_IS_READY) - #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ - 0 : _PyUnicode_Ready((PyObject *)(op))) + #if PY_VERSION_HEX >= 0x030C0000 + #define __Pyx_PyUnicode_READY(op) (0) #else - #define __Pyx_PyUnicode_READY(op) (0) + #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ + 0 : _PyUnicode_Ready((PyObject *)(op))) #endif #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) @@ -565,14 +565,14 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch) - #if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE) - #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 - #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) + #if PY_VERSION_HEX >= 0x030C0000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) #else - #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) - #endif - #else - #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) + #else + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) + #endif #endif #else #define CYTHON_PEP393_ENABLED 0 @@ -950,8 +950,8 @@ static const char *__pyx_filename; static const char *__pyx_f[] = { - "src/dependency_injector/_cwiring.pyx", - "src/dependency_injector/providers.pxd", + "_cwiring.pyx", + "providers.pxd", "stringsource", }; @@ -1006,16 +1006,15 @@ 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__async_inject; -struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_2_genexpr; +struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct___async_inject; +struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_1_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; -/* "providers.pxd":354 +/* "providers.pxd":349 * * * cpdef object deepcopy(object instance, dict memo=*) # <<<<<<<<<<<<<< @@ -1044,7 +1043,7 @@ struct __pyx_obj_19dependency_injector_9providers_Provider { }; -/* "providers.pxd":36 +/* "providers.pxd":32 * * * cdef class Object(Provider): # <<<<<<<<<<<<<< @@ -1057,7 +1056,7 @@ struct __pyx_obj_19dependency_injector_9providers_Object { }; -/* "providers.pxd":42 +/* "providers.pxd":38 * * * cdef class Self(Provider): # <<<<<<<<<<<<<< @@ -1071,7 +1070,7 @@ struct __pyx_obj_19dependency_injector_9providers_Self { }; -/* "providers.pxd":47 +/* "providers.pxd":43 * * * cdef class Delegate(Provider): # <<<<<<<<<<<<<< @@ -1084,7 +1083,7 @@ struct __pyx_obj_19dependency_injector_9providers_Delegate { }; -/* "providers.pxd":53 +/* "providers.pxd":49 * * * cdef class Aggregate(Provider): # <<<<<<<<<<<<<< @@ -1097,7 +1096,7 @@ struct __pyx_obj_19dependency_injector_9providers_Aggregate { }; -/* "providers.pxd":59 +/* "providers.pxd":55 * * * cdef class Dependency(Provider): # <<<<<<<<<<<<<< @@ -1112,7 +1111,7 @@ struct __pyx_obj_19dependency_injector_9providers_Dependency { }; -/* "providers.pxd":65 +/* "providers.pxd":61 * * * cdef class ExternalDependency(Dependency): # <<<<<<<<<<<<<< @@ -1124,7 +1123,7 @@ struct __pyx_obj_19dependency_injector_9providers_ExternalDependency { }; -/* "providers.pxd":69 +/* "providers.pxd":65 * * * cdef class DependenciesContainer(Object): # <<<<<<<<<<<<<< @@ -1138,7 +1137,7 @@ struct __pyx_obj_19dependency_injector_9providers_DependenciesContainer { }; -/* "providers.pxd":77 +/* "providers.pxd":73 * * # Callable providers * cdef class Callable(Provider): # <<<<<<<<<<<<<< @@ -1155,7 +1154,7 @@ struct __pyx_obj_19dependency_injector_9providers_Callable { }; -/* "providers.pxd":89 +/* "providers.pxd":85 * * * cdef class DelegatedCallable(Callable): # <<<<<<<<<<<<<< @@ -1167,7 +1166,7 @@ struct __pyx_obj_19dependency_injector_9providers_DelegatedCallable { }; -/* "providers.pxd":93 +/* "providers.pxd":89 * * * cdef class AbstractCallable(Callable): # <<<<<<<<<<<<<< @@ -1179,7 +1178,7 @@ struct __pyx_obj_19dependency_injector_9providers_AbstractCallable { }; -/* "providers.pxd":97 +/* "providers.pxd":93 * * * cdef class CallableDelegate(Delegate): # <<<<<<<<<<<<<< @@ -1191,7 +1190,7 @@ struct __pyx_obj_19dependency_injector_9providers_CallableDelegate { }; -/* "providers.pxd":102 +/* "providers.pxd":98 * * # Coroutine providers * cdef class Coroutine(Callable): # <<<<<<<<<<<<<< @@ -1203,7 +1202,7 @@ struct __pyx_obj_19dependency_injector_9providers_Coroutine { }; -/* "providers.pxd":106 +/* "providers.pxd":102 * * * cdef class DelegatedCoroutine(Coroutine): # <<<<<<<<<<<<<< @@ -1215,7 +1214,7 @@ struct __pyx_obj_19dependency_injector_9providers_DelegatedCoroutine { }; -/* "providers.pxd":110 +/* "providers.pxd":106 * * * cdef class AbstractCoroutine(Coroutine): # <<<<<<<<<<<<<< @@ -1227,7 +1226,7 @@ struct __pyx_obj_19dependency_injector_9providers_AbstractCoroutine { }; -/* "providers.pxd":114 +/* "providers.pxd":110 * * * cdef class CoroutineDelegate(Delegate): # <<<<<<<<<<<<<< @@ -1239,7 +1238,7 @@ struct __pyx_obj_19dependency_injector_9providers_CoroutineDelegate { }; -/* "providers.pxd":119 +/* "providers.pxd":115 * * # Configuration providers * cdef class ConfigurationOption(Provider): # <<<<<<<<<<<<<< @@ -1256,7 +1255,7 @@ struct __pyx_obj_19dependency_injector_9providers_ConfigurationOption { }; -/* "providers.pxd":127 +/* "providers.pxd":123 * * * cdef class TypedConfigurationOption(Callable): # <<<<<<<<<<<<<< @@ -1268,7 +1267,7 @@ struct __pyx_obj_19dependency_injector_9providers_TypedConfigurationOption { }; -/* "providers.pxd":131 +/* "providers.pxd":127 * * * cdef class Configuration(Object): # <<<<<<<<<<<<<< @@ -1280,15 +1279,14 @@ struct __pyx_obj_19dependency_injector_9providers_Configuration { PyObject *__pyx___name; int __pyx___strict; PyObject *__pyx___children; - PyObject *__pyx___ini_files; PyObject *__pyx___yaml_files; - PyObject *__pyx___json_files; + PyObject *__pyx___ini_files; PyObject *__pyx___pydantic_settings; PyObject *__weakref__; }; -/* "providers.pxd":143 +/* "providers.pxd":138 * * # Factory providers * cdef class Factory(Provider): # <<<<<<<<<<<<<< @@ -1303,7 +1301,7 @@ struct __pyx_obj_19dependency_injector_9providers_Factory { }; -/* "providers.pxd":152 +/* "providers.pxd":147 * * * cdef class DelegatedFactory(Factory): # <<<<<<<<<<<<<< @@ -1315,7 +1313,7 @@ struct __pyx_obj_19dependency_injector_9providers_DelegatedFactory { }; -/* "providers.pxd":156 +/* "providers.pxd":151 * * * cdef class AbstractFactory(Factory): # <<<<<<<<<<<<<< @@ -1327,7 +1325,7 @@ struct __pyx_obj_19dependency_injector_9providers_AbstractFactory { }; -/* "providers.pxd":160 +/* "providers.pxd":155 * * * cdef class FactoryDelegate(Delegate): # <<<<<<<<<<<<<< @@ -1339,7 +1337,7 @@ struct __pyx_obj_19dependency_injector_9providers_FactoryDelegate { }; -/* "providers.pxd":164 +/* "providers.pxd":159 * * * cdef class FactoryAggregate(Aggregate): # <<<<<<<<<<<<<< @@ -1351,7 +1349,7 @@ struct __pyx_obj_19dependency_injector_9providers_FactoryAggregate { }; -/* "providers.pxd":169 +/* "providers.pxd":164 * * # Singleton providers * cdef class BaseSingleton(Provider): # <<<<<<<<<<<<<< @@ -1365,7 +1363,7 @@ struct __pyx_obj_19dependency_injector_9providers_BaseSingleton { }; -/* "providers.pxd":174 +/* "providers.pxd":169 * * * cdef class Singleton(BaseSingleton): # <<<<<<<<<<<<<< @@ -1377,7 +1375,7 @@ struct __pyx_obj_19dependency_injector_9providers_Singleton { }; -/* "providers.pxd":179 +/* "providers.pxd":174 * * * cdef class DelegatedSingleton(Singleton): # <<<<<<<<<<<<<< @@ -1389,7 +1387,7 @@ struct __pyx_obj_19dependency_injector_9providers_DelegatedSingleton { }; -/* "providers.pxd":183 +/* "providers.pxd":178 * * * cdef class ThreadSafeSingleton(BaseSingleton): # <<<<<<<<<<<<<< @@ -1402,7 +1400,7 @@ struct __pyx_obj_19dependency_injector_9providers_ThreadSafeSingleton { }; -/* "providers.pxd":189 +/* "providers.pxd":184 * * * cdef class DelegatedThreadSafeSingleton(ThreadSafeSingleton): # <<<<<<<<<<<<<< @@ -1414,7 +1412,7 @@ struct __pyx_obj_19dependency_injector_9providers_DelegatedThreadSafeSingleton { }; -/* "providers.pxd":193 +/* "providers.pxd":188 * * * cdef class ThreadLocalSingleton(BaseSingleton): # <<<<<<<<<<<<<< @@ -1426,7 +1424,7 @@ struct __pyx_obj_19dependency_injector_9providers_ThreadLocalSingleton { }; -/* "providers.pxd":198 +/* "providers.pxd":193 * * * cdef class ContextLocalSingleton(BaseSingleton): # <<<<<<<<<<<<<< @@ -1438,7 +1436,7 @@ struct __pyx_obj_19dependency_injector_9providers_ContextLocalSingleton { }; -/* "providers.pxd":203 +/* "providers.pxd":198 * * * cdef class DelegatedThreadLocalSingleton(ThreadLocalSingleton): # <<<<<<<<<<<<<< @@ -1450,7 +1448,7 @@ struct __pyx_obj_19dependency_injector_9providers_DelegatedThreadLocalSingleton }; -/* "providers.pxd":207 +/* "providers.pxd":202 * * * cdef class AbstractSingleton(BaseSingleton): # <<<<<<<<<<<<<< @@ -1462,7 +1460,7 @@ struct __pyx_obj_19dependency_injector_9providers_AbstractSingleton { }; -/* "providers.pxd":211 +/* "providers.pxd":206 * * * cdef class SingletonDelegate(Delegate): # <<<<<<<<<<<<<< @@ -1474,7 +1472,7 @@ struct __pyx_obj_19dependency_injector_9providers_SingletonDelegate { }; -/* "providers.pxd":217 +/* "providers.pxd":212 * # Miscellaneous providers * * cdef class List(Provider): # <<<<<<<<<<<<<< @@ -1488,7 +1486,7 @@ struct __pyx_obj_19dependency_injector_9providers_List { }; -/* "providers.pxd":224 +/* "providers.pxd":219 * * * cdef class Dict(Provider): # <<<<<<<<<<<<<< @@ -1502,7 +1500,7 @@ struct __pyx_obj_19dependency_injector_9providers_Dict { }; -/* "providers.pxd":231 +/* "providers.pxd":226 * * * cdef class Resource(Provider): # <<<<<<<<<<<<<< @@ -1522,7 +1520,7 @@ struct __pyx_obj_19dependency_injector_9providers_Resource { }; -/* "providers.pxd":246 +/* "providers.pxd":241 * * * cdef class Container(Provider): # <<<<<<<<<<<<<< @@ -1538,7 +1536,7 @@ struct __pyx_obj_19dependency_injector_9providers_Container { }; -/* "providers.pxd":255 +/* "providers.pxd":250 * * * cdef class Selector(Provider): # <<<<<<<<<<<<<< @@ -1552,7 +1550,7 @@ struct __pyx_obj_19dependency_injector_9providers_Selector { }; -/* "providers.pxd":263 +/* "providers.pxd":258 * # Provided instance * * cdef class ProvidedInstance(Provider): # <<<<<<<<<<<<<< @@ -1565,7 +1563,7 @@ struct __pyx_obj_19dependency_injector_9providers_ProvidedInstance { }; -/* "providers.pxd":269 +/* "providers.pxd":264 * * * cdef class AttributeGetter(Provider): # <<<<<<<<<<<<<< @@ -1579,7 +1577,7 @@ struct __pyx_obj_19dependency_injector_9providers_AttributeGetter { }; -/* "providers.pxd":276 +/* "providers.pxd":271 * * * cdef class ItemGetter(Provider): # <<<<<<<<<<<<<< @@ -1593,7 +1591,7 @@ struct __pyx_obj_19dependency_injector_9providers_ItemGetter { }; -/* "providers.pxd":283 +/* "providers.pxd":278 * * * cdef class MethodCaller(Provider): # <<<<<<<<<<<<<< @@ -1610,7 +1608,7 @@ struct __pyx_obj_19dependency_injector_9providers_MethodCaller { }; -/* "providers.pxd":294 +/* "providers.pxd":289 * * # Injections * cdef class Injection(object): # <<<<<<<<<<<<<< @@ -1626,7 +1624,7 @@ struct __pyx_obj_19dependency_injector_9providers_Injection { }; -/* "providers.pxd":301 +/* "providers.pxd":296 * * * cdef class PositionalInjection(Injection): # <<<<<<<<<<<<<< @@ -1638,7 +1636,7 @@ struct __pyx_obj_19dependency_injector_9providers_PositionalInjection { }; -/* "providers.pxd":305 +/* "providers.pxd":300 * * * cdef class NamedInjection(Injection): # <<<<<<<<<<<<<< @@ -1651,7 +1649,7 @@ struct __pyx_obj_19dependency_injector_9providers_NamedInjection { }; -/* "providers.pxd":316 +/* "providers.pxd":311 * * # Utils * cdef class OverridingContext(object): # <<<<<<<<<<<<<< @@ -1665,7 +1663,7 @@ struct __pyx_obj_19dependency_injector_9providers_OverridingContext { }; -/* "providers.pxd":321 +/* "providers.pxd":316 * * * cdef class BaseSingletonResetContext(object): # <<<<<<<<<<<<<< @@ -1678,7 +1676,7 @@ struct __pyx_obj_19dependency_injector_9providers_BaseSingletonResetContext { }; -/* "providers.pxd":325 +/* "providers.pxd":320 * * * cdef class SingletonResetContext(BaseSingletonResetContext): # <<<<<<<<<<<<<< @@ -1690,7 +1688,7 @@ struct __pyx_obj_19dependency_injector_9providers_SingletonResetContext { }; -/* "providers.pxd":329 +/* "providers.pxd":324 * * * cdef class SingletonFullResetContext(BaseSingletonResetContext): # <<<<<<<<<<<<<< @@ -1702,28 +1700,14 @@ struct __pyx_obj_19dependency_injector_9providers_SingletonFullResetContext { }; -/* "dependency_injector/_cwiring.pyx":15 - * - * - * def _get_sync_patched(fn, patched: PatchedCallable): # <<<<<<<<<<<<<< - * @functools.wraps(fn) - * def _patched(*args, **kwargs): - */ -struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct___get_sync_patched { - PyObject_HEAD - PyObject *__pyx_v_fn; - PyObject *__pyx_v_patched; -}; - - -/* "dependency_injector/_cwiring.pyx":42 +/* "dependency_injector/_cwiring.pyx":39 * * * 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__async_inject { +struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct___async_inject { PyObject_HEAD PyObject *__pyx_v__; PyObject *__pyx_v_arg_key; @@ -1745,16 +1729,16 @@ struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_1__async_inj }; -/* "dependency_injector/_cwiring.pyx":62 +/* "dependency_injector/_cwiring.pyx":59 * * 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_2_genexpr { +struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_1_genexpr { PyObject_HEAD - struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_1__async_inject *__pyx_outer_scope; + struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct___async_inject *__pyx_outer_scope; PyObject *__pyx_v__; PyObject *__pyx_v_provide; PyObject *__pyx_t_0; @@ -1800,16 +1784,13 @@ 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":36 +/* "providers.pxd":32 * * * cdef class Object(Provider): # <<<<<<<<<<<<<< @@ -1823,7 +1804,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_Object { static struct __pyx_vtabstruct_19dependency_injector_9providers_Object *__pyx_vtabptr_19dependency_injector_9providers_Object; -/* "providers.pxd":42 +/* "providers.pxd":38 * * * cdef class Self(Provider): # <<<<<<<<<<<<<< @@ -1837,7 +1818,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_Self { static struct __pyx_vtabstruct_19dependency_injector_9providers_Self *__pyx_vtabptr_19dependency_injector_9providers_Self; -/* "providers.pxd":47 +/* "providers.pxd":43 * * * cdef class Delegate(Provider): # <<<<<<<<<<<<<< @@ -1851,7 +1832,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_Delegate { static struct __pyx_vtabstruct_19dependency_injector_9providers_Delegate *__pyx_vtabptr_19dependency_injector_9providers_Delegate; -/* "providers.pxd":53 +/* "providers.pxd":49 * * * cdef class Aggregate(Provider): # <<<<<<<<<<<<<< @@ -1866,7 +1847,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_Aggregate { static struct __pyx_vtabstruct_19dependency_injector_9providers_Aggregate *__pyx_vtabptr_19dependency_injector_9providers_Aggregate; -/* "providers.pxd":59 +/* "providers.pxd":55 * * * cdef class Dependency(Provider): # <<<<<<<<<<<<<< @@ -1880,7 +1861,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_Dependency { static struct __pyx_vtabstruct_19dependency_injector_9providers_Dependency *__pyx_vtabptr_19dependency_injector_9providers_Dependency; -/* "providers.pxd":65 +/* "providers.pxd":61 * * * cdef class ExternalDependency(Dependency): # <<<<<<<<<<<<<< @@ -1894,7 +1875,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_ExternalDependency { static struct __pyx_vtabstruct_19dependency_injector_9providers_ExternalDependency *__pyx_vtabptr_19dependency_injector_9providers_ExternalDependency; -/* "providers.pxd":69 +/* "providers.pxd":65 * * * cdef class DependenciesContainer(Object): # <<<<<<<<<<<<<< @@ -1909,7 +1890,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_DependenciesContainer { static struct __pyx_vtabstruct_19dependency_injector_9providers_DependenciesContainer *__pyx_vtabptr_19dependency_injector_9providers_DependenciesContainer; -/* "providers.pxd":77 +/* "providers.pxd":73 * * # Callable providers * cdef class Callable(Provider): # <<<<<<<<<<<<<< @@ -1923,7 +1904,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_Callable { static struct __pyx_vtabstruct_19dependency_injector_9providers_Callable *__pyx_vtabptr_19dependency_injector_9providers_Callable; -/* "providers.pxd":89 +/* "providers.pxd":85 * * * cdef class DelegatedCallable(Callable): # <<<<<<<<<<<<<< @@ -1937,7 +1918,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedCallable { static struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedCallable *__pyx_vtabptr_19dependency_injector_9providers_DelegatedCallable; -/* "providers.pxd":93 +/* "providers.pxd":89 * * * cdef class AbstractCallable(Callable): # <<<<<<<<<<<<<< @@ -1951,7 +1932,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_AbstractCallable { static struct __pyx_vtabstruct_19dependency_injector_9providers_AbstractCallable *__pyx_vtabptr_19dependency_injector_9providers_AbstractCallable; -/* "providers.pxd":97 +/* "providers.pxd":93 * * * cdef class CallableDelegate(Delegate): # <<<<<<<<<<<<<< @@ -1965,7 +1946,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_CallableDelegate { static struct __pyx_vtabstruct_19dependency_injector_9providers_CallableDelegate *__pyx_vtabptr_19dependency_injector_9providers_CallableDelegate; -/* "providers.pxd":102 +/* "providers.pxd":98 * * # Coroutine providers * cdef class Coroutine(Callable): # <<<<<<<<<<<<<< @@ -1979,7 +1960,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_Coroutine { static struct __pyx_vtabstruct_19dependency_injector_9providers_Coroutine *__pyx_vtabptr_19dependency_injector_9providers_Coroutine; -/* "providers.pxd":106 +/* "providers.pxd":102 * * * cdef class DelegatedCoroutine(Coroutine): # <<<<<<<<<<<<<< @@ -1993,7 +1974,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedCoroutine { static struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedCoroutine *__pyx_vtabptr_19dependency_injector_9providers_DelegatedCoroutine; -/* "providers.pxd":110 +/* "providers.pxd":106 * * * cdef class AbstractCoroutine(Coroutine): # <<<<<<<<<<<<<< @@ -2007,7 +1988,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_AbstractCoroutine { static struct __pyx_vtabstruct_19dependency_injector_9providers_AbstractCoroutine *__pyx_vtabptr_19dependency_injector_9providers_AbstractCoroutine; -/* "providers.pxd":114 +/* "providers.pxd":110 * * * cdef class CoroutineDelegate(Delegate): # <<<<<<<<<<<<<< @@ -2021,7 +2002,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_CoroutineDelegate { static struct __pyx_vtabstruct_19dependency_injector_9providers_CoroutineDelegate *__pyx_vtabptr_19dependency_injector_9providers_CoroutineDelegate; -/* "providers.pxd":119 +/* "providers.pxd":115 * * # Configuration providers * cdef class ConfigurationOption(Provider): # <<<<<<<<<<<<<< @@ -2035,7 +2016,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_ConfigurationOption { static struct __pyx_vtabstruct_19dependency_injector_9providers_ConfigurationOption *__pyx_vtabptr_19dependency_injector_9providers_ConfigurationOption; -/* "providers.pxd":127 +/* "providers.pxd":123 * * * cdef class TypedConfigurationOption(Callable): # <<<<<<<<<<<<<< @@ -2049,7 +2030,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_TypedConfigurationOptio static struct __pyx_vtabstruct_19dependency_injector_9providers_TypedConfigurationOption *__pyx_vtabptr_19dependency_injector_9providers_TypedConfigurationOption; -/* "providers.pxd":131 +/* "providers.pxd":127 * * * cdef class Configuration(Object): # <<<<<<<<<<<<<< @@ -2063,7 +2044,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_Configuration { static struct __pyx_vtabstruct_19dependency_injector_9providers_Configuration *__pyx_vtabptr_19dependency_injector_9providers_Configuration; -/* "providers.pxd":143 +/* "providers.pxd":138 * * # Factory providers * cdef class Factory(Provider): # <<<<<<<<<<<<<< @@ -2077,7 +2058,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_Factory { static struct __pyx_vtabstruct_19dependency_injector_9providers_Factory *__pyx_vtabptr_19dependency_injector_9providers_Factory; -/* "providers.pxd":152 +/* "providers.pxd":147 * * * cdef class DelegatedFactory(Factory): # <<<<<<<<<<<<<< @@ -2091,7 +2072,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedFactory { static struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedFactory *__pyx_vtabptr_19dependency_injector_9providers_DelegatedFactory; -/* "providers.pxd":156 +/* "providers.pxd":151 * * * cdef class AbstractFactory(Factory): # <<<<<<<<<<<<<< @@ -2105,7 +2086,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_AbstractFactory { static struct __pyx_vtabstruct_19dependency_injector_9providers_AbstractFactory *__pyx_vtabptr_19dependency_injector_9providers_AbstractFactory; -/* "providers.pxd":160 +/* "providers.pxd":155 * * * cdef class FactoryDelegate(Delegate): # <<<<<<<<<<<<<< @@ -2119,7 +2100,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_FactoryDelegate { static struct __pyx_vtabstruct_19dependency_injector_9providers_FactoryDelegate *__pyx_vtabptr_19dependency_injector_9providers_FactoryDelegate; -/* "providers.pxd":164 +/* "providers.pxd":159 * * * cdef class FactoryAggregate(Aggregate): # <<<<<<<<<<<<<< @@ -2133,7 +2114,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_FactoryAggregate { static struct __pyx_vtabstruct_19dependency_injector_9providers_FactoryAggregate *__pyx_vtabptr_19dependency_injector_9providers_FactoryAggregate; -/* "providers.pxd":169 +/* "providers.pxd":164 * * # Singleton providers * cdef class BaseSingleton(Provider): # <<<<<<<<<<<<<< @@ -2147,7 +2128,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_BaseSingleton { static struct __pyx_vtabstruct_19dependency_injector_9providers_BaseSingleton *__pyx_vtabptr_19dependency_injector_9providers_BaseSingleton; -/* "providers.pxd":174 +/* "providers.pxd":169 * * * cdef class Singleton(BaseSingleton): # <<<<<<<<<<<<<< @@ -2161,7 +2142,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_Singleton { static struct __pyx_vtabstruct_19dependency_injector_9providers_Singleton *__pyx_vtabptr_19dependency_injector_9providers_Singleton; -/* "providers.pxd":179 +/* "providers.pxd":174 * * * cdef class DelegatedSingleton(Singleton): # <<<<<<<<<<<<<< @@ -2175,7 +2156,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedSingleton { static struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedSingleton *__pyx_vtabptr_19dependency_injector_9providers_DelegatedSingleton; -/* "providers.pxd":183 +/* "providers.pxd":178 * * * cdef class ThreadSafeSingleton(BaseSingleton): # <<<<<<<<<<<<<< @@ -2189,7 +2170,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_ThreadSafeSingleton { static struct __pyx_vtabstruct_19dependency_injector_9providers_ThreadSafeSingleton *__pyx_vtabptr_19dependency_injector_9providers_ThreadSafeSingleton; -/* "providers.pxd":189 +/* "providers.pxd":184 * * * cdef class DelegatedThreadSafeSingleton(ThreadSafeSingleton): # <<<<<<<<<<<<<< @@ -2203,7 +2184,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedThreadSafeSing static struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedThreadSafeSingleton *__pyx_vtabptr_19dependency_injector_9providers_DelegatedThreadSafeSingleton; -/* "providers.pxd":193 +/* "providers.pxd":188 * * * cdef class ThreadLocalSingleton(BaseSingleton): # <<<<<<<<<<<<<< @@ -2217,7 +2198,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_ThreadLocalSingleton { static struct __pyx_vtabstruct_19dependency_injector_9providers_ThreadLocalSingleton *__pyx_vtabptr_19dependency_injector_9providers_ThreadLocalSingleton; -/* "providers.pxd":198 +/* "providers.pxd":193 * * * cdef class ContextLocalSingleton(BaseSingleton): # <<<<<<<<<<<<<< @@ -2231,7 +2212,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_ContextLocalSingleton { static struct __pyx_vtabstruct_19dependency_injector_9providers_ContextLocalSingleton *__pyx_vtabptr_19dependency_injector_9providers_ContextLocalSingleton; -/* "providers.pxd":203 +/* "providers.pxd":198 * * * cdef class DelegatedThreadLocalSingleton(ThreadLocalSingleton): # <<<<<<<<<<<<<< @@ -2245,7 +2226,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedThreadLocalSin static struct __pyx_vtabstruct_19dependency_injector_9providers_DelegatedThreadLocalSingleton *__pyx_vtabptr_19dependency_injector_9providers_DelegatedThreadLocalSingleton; -/* "providers.pxd":207 +/* "providers.pxd":202 * * * cdef class AbstractSingleton(BaseSingleton): # <<<<<<<<<<<<<< @@ -2259,7 +2240,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_AbstractSingleton { static struct __pyx_vtabstruct_19dependency_injector_9providers_AbstractSingleton *__pyx_vtabptr_19dependency_injector_9providers_AbstractSingleton; -/* "providers.pxd":211 +/* "providers.pxd":206 * * * cdef class SingletonDelegate(Delegate): # <<<<<<<<<<<<<< @@ -2273,7 +2254,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_SingletonDelegate { static struct __pyx_vtabstruct_19dependency_injector_9providers_SingletonDelegate *__pyx_vtabptr_19dependency_injector_9providers_SingletonDelegate; -/* "providers.pxd":217 +/* "providers.pxd":212 * # Miscellaneous providers * * cdef class List(Provider): # <<<<<<<<<<<<<< @@ -2287,7 +2268,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_List { static struct __pyx_vtabstruct_19dependency_injector_9providers_List *__pyx_vtabptr_19dependency_injector_9providers_List; -/* "providers.pxd":224 +/* "providers.pxd":219 * * * cdef class Dict(Provider): # <<<<<<<<<<<<<< @@ -2301,7 +2282,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_Dict { static struct __pyx_vtabstruct_19dependency_injector_9providers_Dict *__pyx_vtabptr_19dependency_injector_9providers_Dict; -/* "providers.pxd":231 +/* "providers.pxd":226 * * * cdef class Resource(Provider): # <<<<<<<<<<<<<< @@ -2315,7 +2296,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_Resource { static struct __pyx_vtabstruct_19dependency_injector_9providers_Resource *__pyx_vtabptr_19dependency_injector_9providers_Resource; -/* "providers.pxd":246 +/* "providers.pxd":241 * * * cdef class Container(Provider): # <<<<<<<<<<<<<< @@ -2329,7 +2310,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_Container { static struct __pyx_vtabstruct_19dependency_injector_9providers_Container *__pyx_vtabptr_19dependency_injector_9providers_Container; -/* "providers.pxd":255 +/* "providers.pxd":250 * * * cdef class Selector(Provider): # <<<<<<<<<<<<<< @@ -2343,7 +2324,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_Selector { static struct __pyx_vtabstruct_19dependency_injector_9providers_Selector *__pyx_vtabptr_19dependency_injector_9providers_Selector; -/* "providers.pxd":263 +/* "providers.pxd":258 * # Provided instance * * cdef class ProvidedInstance(Provider): # <<<<<<<<<<<<<< @@ -2357,7 +2338,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_ProvidedInstance { static struct __pyx_vtabstruct_19dependency_injector_9providers_ProvidedInstance *__pyx_vtabptr_19dependency_injector_9providers_ProvidedInstance; -/* "providers.pxd":269 +/* "providers.pxd":264 * * * cdef class AttributeGetter(Provider): # <<<<<<<<<<<<<< @@ -2371,7 +2352,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_AttributeGetter { static struct __pyx_vtabstruct_19dependency_injector_9providers_AttributeGetter *__pyx_vtabptr_19dependency_injector_9providers_AttributeGetter; -/* "providers.pxd":276 +/* "providers.pxd":271 * * * cdef class ItemGetter(Provider): # <<<<<<<<<<<<<< @@ -2385,7 +2366,7 @@ struct __pyx_vtabstruct_19dependency_injector_9providers_ItemGetter { static struct __pyx_vtabstruct_19dependency_injector_9providers_ItemGetter *__pyx_vtabptr_19dependency_injector_9providers_ItemGetter; -/* "providers.pxd":283 +/* "providers.pxd":278 * * * cdef class MethodCaller(Provider): # <<<<<<<<<<<<<< @@ -2484,42 +2465,14 @@ static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\ PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\ const char* function_name); -/* KeywordStringCheck.proto */ -static int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed); +/* 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); -/* None.proto */ -static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname); - -/* PyFunctionFastCall.proto */ -#if CYTHON_FAST_PYCALL -#define __Pyx_PyFunction_FastCall(func, args, nargs)\ - __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL) -#if 1 || PY_VERSION_HEX < 0x030600B1 -static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs); -#else -#define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs) -#endif -#define __Pyx_BUILD_ASSERT_EXPR(cond)\ - (sizeof(char [1 - 2*!(cond)]) - 1) -#ifndef Py_MEMBER_SIZE -#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) -#endif -#if CYTHON_FAST_PYCALL - static size_t __pyx_pyframe_localsplus_offset = 0; - #include "frameobject.h" -#if PY_VERSION_HEX >= 0x030b00a6 - #ifndef Py_BUILD_CORE - #define Py_BUILD_CORE 1 - #endif - #include "internal/pycore_frame.h" -#endif - #define __Pxy_PyFrame_Initialize_Offsets()\ - ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\ - (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) - #define __Pyx_PyFrame_GetLocalsplus(frame)\ - (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) -#endif // CYTHON_FAST_PYCALL -#endif +/* py_dict_items.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d); /* PyObjectCall.proto */ #if CYTHON_COMPILING_IN_CPYTHON @@ -2528,28 +2481,35 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) #endif -/* PyObjectCallMethO.proto */ +/* 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 -static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); -#endif - -/* PyObjectCallNoArg.proto */ -#if CYTHON_COMPILING_IN_CPYTHON -static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func); +#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_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL) +#define __Pyx_CallUnboundCMethod0(cfunc, self) __Pyx__CallUnboundCMethod0(cfunc, self) #endif -/* PyCFunctionFastCall.proto */ -#if CYTHON_FAST_PYCCALL -static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs); -#else -#define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL) -#endif - -/* PyObjectCallOneArg.proto */ -static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); - /* RaiseTooManyValuesToUnpack.proto */ static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); @@ -2610,18 +2570,18 @@ static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UIN /* GetModuleGlobalName.proto */ #if CYTHON_USE_DICT_VERSIONS -#define __Pyx_GetModuleGlobalName(var, name) {\ +#define __Pyx_GetModuleGlobalName(var, name) do {\ static PY_UINT64_T __pyx_dict_version = 0;\ static PyObject *__pyx_dict_cached_value = NULL;\ (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\ (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\ __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ -} -#define __Pyx_GetModuleGlobalNameUncached(var, name) {\ +} while(0) +#define __Pyx_GetModuleGlobalNameUncached(var, name) do {\ PY_UINT64_T __pyx_dict_version;\ PyObject *__pyx_dict_cached_value;\ (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ -} +} while(0) static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value); #else #define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name) @@ -2629,109 +2589,61 @@ static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_ve static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name); #endif -/* PyObjectCall2Args.proto */ -static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2); - -/* FetchCommonType.proto */ -static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type); - -/* CythonFunctionShared.proto */ -#define __Pyx_CyFunction_USED 1 -#define __Pyx_CYFUNCTION_STATICMETHOD 0x01 -#define __Pyx_CYFUNCTION_CLASSMETHOD 0x02 -#define __Pyx_CYFUNCTION_CCLASS 0x04 -#define __Pyx_CyFunction_GetClosure(f)\ - (((__pyx_CyFunctionObject *) (f))->func_closure) -#define __Pyx_CyFunction_GetClassObj(f)\ - (((__pyx_CyFunctionObject *) (f))->func_classobj) -#define __Pyx_CyFunction_Defaults(type, f)\ - ((type *)(((__pyx_CyFunctionObject *) (f))->defaults)) -#define __Pyx_CyFunction_SetDefaultsGetter(f, g)\ - ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g) -typedef struct { - PyCFunctionObject func; -#if PY_VERSION_HEX < 0x030500A0 - PyObject *func_weakreflist; -#endif - PyObject *func_dict; - PyObject *func_name; - PyObject *func_qualname; - PyObject *func_doc; - PyObject *func_globals; - PyObject *func_code; - PyObject *func_closure; - PyObject *func_classobj; - void *defaults; - int defaults_pyobjects; - size_t defaults_size; // used by FusedFunction for copying defaults - int flags; - PyObject *defaults_tuple; - PyObject *defaults_kwdict; - PyObject *(*defaults_getter)(PyObject *); - PyObject *func_annotations; -} __pyx_CyFunctionObject; -static PyTypeObject *__pyx_CyFunctionType = 0; -#define __Pyx_CyFunction_Check(obj) (__Pyx_TypeCheck(obj, __pyx_CyFunctionType)) -static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml, - int flags, PyObject* qualname, - PyObject *self, - PyObject *module, PyObject *globals, - PyObject* code); -static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m, - size_t size, - int pyobjects); -static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m, - PyObject *tuple); -static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m, - PyObject *dict); -static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m, - PyObject *dict); -static int __pyx_CyFunction_init(void); - -/* CythonFunction.proto */ -static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, - int flags, PyObject* qualname, - PyObject *closure, - PyObject *module, PyObject *globals, - PyObject* code); - -/* 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)) +/* PyFunctionFastCall.proto */ +#if CYTHON_FAST_PYCALL +#define __Pyx_PyFunction_FastCall(func, args, nargs)\ + __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL) +#if 1 || PY_VERSION_HEX < 0x030600B1 +static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs); #else -#define __Pyx_CallUnboundCMethod0(cfunc, self) __Pyx__CallUnboundCMethod0(cfunc, self) +#define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs) #endif +#define __Pyx_BUILD_ASSERT_EXPR(cond)\ + (sizeof(char [1 - 2*!(cond)]) - 1) +#ifndef Py_MEMBER_SIZE +#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) +#endif +#if CYTHON_FAST_PYCALL + static size_t __pyx_pyframe_localsplus_offset = 0; + #include "frameobject.h" +#if PY_VERSION_HEX >= 0x030b00a6 + #ifndef Py_BUILD_CORE + #define Py_BUILD_CORE 1 + #endif + #include "internal/pycore_frame.h" +#endif + #define __Pxy_PyFrame_Initialize_Offsets()\ + ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\ + (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) + #define __Pyx_PyFrame_GetLocalsplus(frame)\ + (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) +#endif // CYTHON_FAST_PYCALL +#endif + +/* PyObjectCallMethO.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); +#endif + +/* PyObjectCallNoArg.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func); +#else +#define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL) +#endif + +/* PyCFunctionFastCall.proto */ +#if CYTHON_FAST_PYCCALL +static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs); +#else +#define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL) +#endif + +/* PyObjectCallOneArg.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); + +/* None.proto */ +static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname); /* ListAppend.proto */ #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS @@ -2750,6 +2662,9 @@ static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) { #define __Pyx_PyList_Append(L,x) PyList_Append(L,x) #endif +/* FetchCommonType.proto */ +static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type); + /* PyThreadStateGet.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; @@ -2813,6 +2728,9 @@ static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject * static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb); #endif +/* PyObjectCall2Args.proto */ +static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2); + /* PyObjectGetMethod.proto */ static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method); @@ -3009,6 +2927,66 @@ static CYTHON_INLINE PyObject* __Pyx_PyFrozenSet_New(PyObject* it); /* PySetContains.proto */ static CYTHON_INLINE int __Pyx_PySet_ContainsTF(PyObject* key, PyObject* set, int eq); +/* CythonFunctionShared.proto */ +#define __Pyx_CyFunction_USED 1 +#define __Pyx_CYFUNCTION_STATICMETHOD 0x01 +#define __Pyx_CYFUNCTION_CLASSMETHOD 0x02 +#define __Pyx_CYFUNCTION_CCLASS 0x04 +#define __Pyx_CyFunction_GetClosure(f)\ + (((__pyx_CyFunctionObject *) (f))->func_closure) +#define __Pyx_CyFunction_GetClassObj(f)\ + (((__pyx_CyFunctionObject *) (f))->func_classobj) +#define __Pyx_CyFunction_Defaults(type, f)\ + ((type *)(((__pyx_CyFunctionObject *) (f))->defaults)) +#define __Pyx_CyFunction_SetDefaultsGetter(f, g)\ + ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g) +typedef struct { + PyCFunctionObject func; +#if PY_VERSION_HEX < 0x030500A0 + PyObject *func_weakreflist; +#endif + PyObject *func_dict; + PyObject *func_name; + PyObject *func_qualname; + PyObject *func_doc; + PyObject *func_globals; + PyObject *func_code; + PyObject *func_closure; + PyObject *func_classobj; + void *defaults; + int defaults_pyobjects; + size_t defaults_size; // used by FusedFunction for copying defaults + int flags; + PyObject *defaults_tuple; + PyObject *defaults_kwdict; + PyObject *(*defaults_getter)(PyObject *); + PyObject *func_annotations; +} __pyx_CyFunctionObject; +static PyTypeObject *__pyx_CyFunctionType = 0; +#define __Pyx_CyFunction_Check(obj) (__Pyx_TypeCheck(obj, __pyx_CyFunctionType)) +static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml, + int flags, PyObject* qualname, + PyObject *self, + PyObject *module, PyObject *globals, + PyObject* code); +static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m, + size_t size, + int pyobjects); +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m, + PyObject *tuple); +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m, + PyObject *dict); +static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m, + PyObject *dict); +static int __pyx_CyFunction_init(void); + +/* CythonFunction.proto */ +static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, + int flags, PyObject* qualname, + PyObject *closure, + PyObject *module, PyObject *globals, + PyObject* code); + /* IncludeStringH.proto */ #include @@ -3199,9 +3177,8 @@ static CYTHON_INLINE int __pyx_f_19dependency_injector_9providers___iscoroutine( 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__async_inject = 0; -static PyTypeObject *__pyx_ptype_19dependency_injector_8_cwiring___pyx_scope_struct_2_genexpr = 0; +static PyTypeObject *__pyx_ptype_19dependency_injector_8_cwiring___pyx_scope_struct___async_inject = 0; +static PyTypeObject *__pyx_ptype_19dependency_injector_8_cwiring___pyx_scope_struct_1_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; @@ -3219,10 +3196,10 @@ int __pyx_module_is_main_dependency_injector___cwiring = 0; static PyObject *__pyx_builtin_zip; static PyObject *__pyx_builtin_ImportError; static PyObject *__pyx_builtin_range; -static const char __pyx_k__4[] = "__"; +static const char __pyx_k__2[] = "__"; static const char __pyx_k_fn[] = "fn"; -static const char __pyx_k__13[] = ""; -static const char __pyx_k__16[] = "_"; +static const char __pyx_k__11[] = ""; +static const char __pyx_k__14[] = "_"; static const char __pyx_k_abc[] = "abc"; static const char __pyx_k_zip[] = "zip"; static const char __pyx_k_args[] = "args"; @@ -3240,7 +3217,6 @@ 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"; @@ -3251,12 +3227,10 @@ 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"; @@ -3266,7 +3240,6 @@ static const char __pyx_k_shutdown[] = "shutdown"; static const char __pyx_k_Awaitable[] = "Awaitable"; static const char __pyx_k_functools[] = "functools"; static const char __pyx_k_injection[] = "injection"; -static const char __pyx_k_patched_2[] = "_patched"; static const char __pyx_k_providers[] = "providers"; static const char __pyx_k_to_inject[] = "to_inject"; static const char __pyx_k_injections[] = "injections"; @@ -3275,6 +3248,8 @@ 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_cwiring_pyx[] = "_cwiring.pyx"; +static const char __pyx_k_sync_inject[] = "_sync_inject"; static const char __pyx_k_async_inject[] = "_async_inject"; static const char __pyx_k_stringsource[] = "stringsource"; static const char __pyx_k_CoroutineType[] = "CoroutineType"; @@ -3288,22 +3263,20 @@ static const char __pyx_k_PatchedCallable[] = "PatchedCallable"; 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_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_is_async_mode_enabled[] = "is_async_mode_enabled"; 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_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 PyObject *__pyx_n_s_Awaitable; static PyObject *__pyx_n_s_CO_ITERABLE_COROUTINE; static PyObject *__pyx_n_s_CoroutineType; @@ -3317,9 +3290,9 @@ 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__13; -static PyObject *__pyx_n_s__16; -static PyObject *__pyx_n_s__4; +static PyObject *__pyx_n_s__11; +static PyObject *__pyx_n_s__14; +static PyObject *__pyx_n_s__2; static PyObject *__pyx_n_s_abc; static PyObject *__pyx_n_s_add_done_callback; static PyObject *__pyx_n_s_arg_key; @@ -3337,11 +3310,11 @@ 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_kp_s_cwiring_pyx; static PyObject *__pyx_n_s_dependency_injector__cwiring; static PyObject *__pyx_n_s_ensure_future; static PyObject *__pyx_n_s_fn; @@ -3351,21 +3324,18 @@ 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_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_inspect; +static PyObject *__pyx_n_s_is_async_mode_enabled; 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_patched_2; static PyObject *__pyx_n_s_provide; static PyObject *__pyx_n_s_provider; static PyObject *__pyx_n_s_providers; @@ -3376,8 +3346,8 @@ 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_sync_inject; static PyObject *__pyx_n_s_test; static PyObject *__pyx_n_s_throw; static PyObject *__pyx_n_s_to_close_await; @@ -3386,68 +3356,72 @@ 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, PyObject *__pyx_v_patched); /* proto */ +static PyObject *__pyx_pf_19dependency_injector_8_cwiring__sync_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_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__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_19dependency_injector_8_cwiring___pyx_scope_struct___async_inject(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_19dependency_injector_8_cwiring___pyx_scope_struct_1_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_codeobj_; +static PyObject *__pyx_tuple__3; 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__3; +static PyObject *__pyx_tuple__12; +static PyObject *__pyx_tuple__15; +static PyObject *__pyx_codeobj__4; 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; +static PyObject *__pyx_codeobj__13; /* Late includes */ /* "dependency_injector/_cwiring.pyx":15 * * - * def _get_sync_patched(fn, patched: PatchedCallable): # <<<<<<<<<<<<<< - * @functools.wraps(fn) - * def _patched(*args, **kwargs): + * def _sync_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_1_get_sync_patched(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_19dependency_injector_8_cwiring_1_get_sync_patched = {"_get_sync_patched", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_8_cwiring_1_get_sync_patched, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_19dependency_injector_8_cwiring_1_get_sync_patched(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_19dependency_injector_8_cwiring_1_sync_inject(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_19dependency_injector_8_cwiring_1_sync_inject = {"_sync_inject", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_8_cwiring_1_sync_inject, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_19dependency_injector_8_cwiring_1_sync_inject(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_fn = 0; - PyObject *__pyx_v_patched = 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("_get_sync_patched (wrapper)", 0); + __Pyx_RefNannySetupContext("_sync_inject (wrapper)", 0); { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_fn,&__pyx_n_s_patched,0}; - PyObject* values[2] = {0,0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_fn,&__pyx_n_s_args,&__pyx_n_s_kwargs,&__pyx_n_s_injections,&__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); @@ -3462,72 +3436,71 @@ static PyObject *__pyx_pw_19dependency_injector_8_cwiring_1_get_sync_patched(PyO else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: - if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_patched)) != 0)) kw_args--; + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_args)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_get_sync_patched", 1, 2, 2, 1); __PYX_ERR(0, 15, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_sync_inject", 1, 5, 5, 1); __PYX_ERR(0, 15, __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("_sync_inject", 1, 5, 5, 2); __PYX_ERR(0, 15, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 3: + if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_injections)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("_sync_inject", 1, 5, 5, 3); __PYX_ERR(0, 15, __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("_sync_inject", 1, 5, 5, 4); __PYX_ERR(0, 15, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_get_sync_patched") < 0)) __PYX_ERR(0, 15, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_sync_inject") < 0)) __PYX_ERR(0, 15, __pyx_L3_error) } - } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + } 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_patched = values[1]; + __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("_get_sync_patched", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 15, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_sync_inject", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 15, __pyx_L3_error) __pyx_L3_error:; - __Pyx_AddTraceback("dependency_injector._cwiring._get_sync_patched", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("dependency_injector._cwiring._sync_inject", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_19dependency_injector_8_cwiring__get_sync_patched(__pyx_self, __pyx_v_fn, __pyx_v_patched); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(0, 15, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(0, 15, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_injections), (&PyDict_Type), 1, "injections", 1))) __PYX_ERR(0, 15, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_closings), (&PyDict_Type), 1, "closings", 1))) __PYX_ERR(0, 15, __pyx_L1_error) + __pyx_r = __pyx_pf_19dependency_injector_8_cwiring__sync_inject(__pyx_self, __pyx_v_fn, __pyx_v_args, __pyx_v_kwargs, __pyx_v_injections, __pyx_v_closings); /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "dependency_injector/_cwiring.pyx":17 - * def _get_sync_patched(fn, patched: PatchedCallable): - * @functools.wraps(fn) - * def _patched(*args, **kwargs): # <<<<<<<<<<<<<< - * cdef object result - * cdef dict to_inject - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_19dependency_injector_8_cwiring_17_get_sync_patched_1_patched(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_19dependency_injector_8_cwiring_17_get_sync_patched_1_patched = {"_patched", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_19dependency_injector_8_cwiring_17_get_sync_patched_1_patched, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_19dependency_injector_8_cwiring_17_get_sync_patched_1_patched(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - PyObject *__pyx_v_args = 0; - PyObject *__pyx_v_kwargs = 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_17_get_sync_patched__patched(__pyx_self, __pyx_v_args, __pyx_v_kwargs); - - /* function exit code */ - __Pyx_XDECREF(__pyx_v_args); - __Pyx_XDECREF(__pyx_v_kwargs); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_19dependency_injector_8_cwiring_17_get_sync_patched__patched(PyObject *__pyx_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { - struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct___get_sync_patched *__pyx_cur_scope; - struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct___get_sync_patched *__pyx_outer_scope; +static PyObject *__pyx_pf_19dependency_injector_8_cwiring__sync_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) { PyObject *__pyx_v_result = 0; PyObject *__pyx_v_to_inject = 0; PyObject *__pyx_v_arg_key = 0; @@ -3536,9 +3509,9 @@ static PyObject *__pyx_pf_19dependency_injector_8_cwiring_17_get_sync_patched__p __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)(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 *); @@ -3548,85 +3521,72 @@ static PyObject *__pyx_pf_19dependency_injector_8_cwiring_17_get_sync_patched__p int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("_patched", 0); - __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; + __Pyx_RefNannySetupContext("_sync_inject", 0); - /* "dependency_injector/_cwiring.pyx":23 - * cdef Provider provider + /* "dependency_injector/_cwiring.pyx":21 + * cdef Provider provider * - * to_inject = kwargs.copy() # <<<<<<<<<<<<<< - * for arg_key, provider in patched.injections.items(): - * if arg_key not in kwargs or isinstance(kwargs[arg_key], _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_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23, __pyx_L1_error) + if (unlikely(__pyx_v_kwargs == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "copy"); + __PYX_ERR(0, 21, __pyx_L1_error) + } + __pyx_t_1 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 21, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_to_inject = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/_cwiring.pyx":24 + /* "dependency_injector/_cwiring.pyx":22 * - * to_inject = kwargs.copy() - * 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() + * to_inject = kwargs.copy() + * for arg_key, provider in 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, 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, 24, __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_v_injections == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); + __PYX_ERR(0, 22, __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, 24, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_Items(__pyx_v_injections); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 22, __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, 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, 24, __pyx_L1_error) + __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 22, __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, 22, __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, 24, __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, 22, __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, 24, __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, 22, __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, 24, __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, 22, __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, 24, __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, 22, __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, 24, __pyx_L1_error) + else __PYX_ERR(0, 22, __pyx_L1_error) } break; } @@ -3638,36 +3598,36 @@ 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, 24, __pyx_L1_error) + __PYX_ERR(0, 22, __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, 24, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 24, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 22, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 22, __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, 24, __pyx_L1_error) + __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 22, __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_L5_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_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(0, 24, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 22, __pyx_L1_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L6_unpacking_done; @@ -3675,34 +3635,42 @@ 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, 24, __pyx_L1_error) + __PYX_ERR(0, 22, __pyx_L1_error) __pyx_L6_unpacking_done:; } - 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; + if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(0, 22, __pyx_L1_error) + __Pyx_XDECREF_SET(__pyx_v_arg_key, __pyx_t_5); + __pyx_t_5 = 0; __Pyx_XDECREF_SET(__pyx_v_provider, ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_t_6)); __pyx_t_6 = 0; - /* "dependency_injector/_cwiring.pyx":25 - * to_inject = kwargs.copy() - * 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":23 + * to_inject = kwargs.copy() + * for arg_key, provider in 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_arg_key, __pyx_v_kwargs, Py_NE)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 25, __pyx_L1_error) + if (unlikely(__pyx_v_kwargs == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); + __PYX_ERR(0, 23, __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, 23, __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_arg_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 25, __pyx_L1_error) + if (unlikely(__pyx_v_kwargs == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 23, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_v_arg_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23, __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, 25, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_Marker); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 23, __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, 25, __pyx_L1_error) + __pyx_t_11 = PyObject_IsInstance(__pyx_t_1, __pyx_t_6); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 23, __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); @@ -3710,152 +3678,136 @@ 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":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() # <<<<<<<<<<<<<< + /* "dependency_injector/_cwiring.pyx":24 + * for arg_key, provider in injections.items(): + * if arg_key not in kwargs or isinstance(kwargs[arg_key], _Marker): + * to_inject[arg_key] = provider() # <<<<<<<<<<<<<< * - * result = fn(*args, **to_inject) + * result = fn(*args, **to_inject) */ __Pyx_INCREF(((PyObject *)__pyx_v_provider)); - __pyx_t_1 = ((PyObject *)__pyx_v_provider); __pyx_t_2 = NULL; + __pyx_t_1 = ((PyObject *)__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, 26, __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, 24, __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, 26, __pyx_L1_error) + __PYX_ERR(0, 24, __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) + if (unlikely(PyDict_SetItem(__pyx_v_to_inject, __pyx_v_arg_key, __pyx_t_6) < 0)) __PYX_ERR(0, 24, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "dependency_injector/_cwiring.pyx":25 - * to_inject = kwargs.copy() - * 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":23 + * to_inject = kwargs.copy() + * for arg_key, provider in injections.items(): + * if arg_key not in kwargs or isinstance(kwargs[arg_key], _Marker): # <<<<<<<<<<<<<< + * to_inject[arg_key] = provider() * */ } - /* "dependency_injector/_cwiring.pyx":24 + /* "dependency_injector/_cwiring.pyx":22 * - * to_inject = kwargs.copy() - * 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() + * to_inject = kwargs.copy() + * for arg_key, provider in 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; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/_cwiring.pyx":28 - * to_inject[arg_key] = provider() + /* "dependency_injector/_cwiring.pyx":26 + * to_inject[arg_key] = provider() * - * result = fn(*args, **to_inject) # <<<<<<<<<<<<<< + * result = fn(*args, **to_inject) # <<<<<<<<<<<<<< * - * if patched.closing: + * if closings: */ - if (unlikely(!__pyx_cur_scope->__pyx_v_fn)) { __Pyx_RaiseClosureNameError("fn"); __PYX_ERR(0, 28, __pyx_L1_error) } + if (unlikely(__pyx_v_args == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); + __PYX_ERR(0, 26, __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, 28, __pyx_L1_error) + __PYX_ERR(0, 26, __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, 28, __pyx_L1_error) + __pyx_t_2 = PyDict_Copy(__pyx_v_to_inject); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 26, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_v_fn, __pyx_v_args, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 26, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_result = __pyx_t_6; __pyx_t_6 = 0; - /* "dependency_injector/_cwiring.pyx":30 - * result = fn(*args, **to_inject) + /* "dependency_injector/_cwiring.pyx":28 + * result = fn(*args, **to_inject) * - * if patched.closing: # <<<<<<<<<<<<<< - * for arg_key, provider in patched.closing.items(): - * if arg_key in kwargs and not isinstance(kwargs[arg_key], _Marker): + * if closings: # <<<<<<<<<<<<<< + * for arg_key, provider in closings.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, 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, 30, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_closings); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 28, __pyx_L1_error) if (__pyx_t_9) { - /* "dependency_injector/_cwiring.pyx":31 + /* "dependency_injector/_cwiring.pyx":29 * - * if patched.closing: - * for arg_key, provider in patched.closing.items(): # <<<<<<<<<<<<<< - * if arg_key in kwargs and not isinstance(kwargs[arg_key], _Marker): - * continue + * if closings: + * for arg_key, provider in closings.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, 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, 31, __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 && likely(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); - } + if (unlikely(__pyx_v_closings == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); + __PYX_ERR(0, 29, __pyx_L1_error) } - __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, 31, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_Items(__pyx_v_closings); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 29, __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; + __pyx_t_2 = __pyx_t_6; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; + __pyx_t_4 = NULL; } else { - __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, 31, __pyx_L1_error) + __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 29, __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, 29, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; for (;;) { - if (likely(!__pyx_t_5)) { - if (likely(PyList_CheckExact(__pyx_t_1))) { - if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) 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_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) + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_6); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 29, __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, 31, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 29, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif } else { - if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break; + if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) 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, 31, __pyx_L1_error) + __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_6); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 29, __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, 31, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 29, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif } } else { - __pyx_t_6 = __pyx_t_5(__pyx_t_1); + __pyx_t_6 = __pyx_t_4(__pyx_t_2); if (unlikely(!__pyx_t_6)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 31, __pyx_L1_error) + else __PYX_ERR(0, 29, __pyx_L1_error) } break; } @@ -3867,36 +3819,36 @@ 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, 31, __pyx_L1_error) + __PYX_ERR(0, 29, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { - __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); - __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); + __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); } else { - __pyx_t_3 = PyList_GET_ITEM(sequence, 0); - __pyx_t_2 = PyList_GET_ITEM(sequence, 1); + __pyx_t_1 = PyList_GET_ITEM(sequence, 0); + __pyx_t_5 = PyList_GET_ITEM(sequence, 1); } - __Pyx_INCREF(__pyx_t_3); - __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(__pyx_t_5); #else - __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, 31, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 29, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); #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, 31, __pyx_L1_error) + __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 29, __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; - index = 0; __pyx_t_3 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_3)) goto __pyx_L13_unpacking_failed; - __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, 31, __pyx_L1_error) + index = 0; __pyx_t_1 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_1)) goto __pyx_L13_unpacking_failed; + __Pyx_GOTREF(__pyx_t_1); + index = 1; __pyx_t_5 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_5)) goto __pyx_L13_unpacking_failed; + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 29, __pyx_L1_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L14_unpacking_done; @@ -3904,145 +3856,153 @@ 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, 31, __pyx_L1_error) + __PYX_ERR(0, 29, __pyx_L1_error) __pyx_L14_unpacking_done:; } - 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, ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_t_2)); - __pyx_t_2 = 0; + if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(0, 29, __pyx_L1_error) + __Pyx_XDECREF_SET(__pyx_v_arg_key, __pyx_t_1); + __pyx_t_1 = 0; + __Pyx_XDECREF_SET(__pyx_v_provider, ((struct __pyx_obj_19dependency_injector_9providers_Provider *)__pyx_t_5)); + __pyx_t_5 = 0; - /* "dependency_injector/_cwiring.pyx":32 - * if patched.closing: - * 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 closings: + * for arg_key, provider in closings.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_arg_key, __pyx_v_kwargs, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 32, __pyx_L1_error) + if (unlikely(__pyx_v_kwargs == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); + __PYX_ERR(0, 30, __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, 30, __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_arg_key); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 32, __pyx_L1_error) + if (unlikely(__pyx_v_kwargs == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 30, __pyx_L1_error) + } + __pyx_t_6 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_v_arg_key); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 30, __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, 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, 32, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_Marker); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 30, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_11 = PyObject_IsInstance(__pyx_t_6, __pyx_t_5); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 30, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_10 = ((!(__pyx_t_11 != 0)) != 0); __pyx_t_9 = __pyx_t_10; __pyx_L16_bool_binop_done:; if (__pyx_t_9) { - /* "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 + /* "dependency_injector/_cwiring.pyx":31 + * for arg_key, provider in closings.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":32 - * if patched.closing: - * 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 closings: + * for arg_key, provider in closings.items(): + * if arg_key in kwargs and not isinstance(kwargs[arg_key], _Marker): # <<<<<<<<<<<<<< + * continue + * if not isinstance(provider, providers.Resource): */ } - /* "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() + /* "dependency_injector/_cwiring.pyx":32 + * 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, 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, 34, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_providers); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 32, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_Resource); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 32, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __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_5); __pyx_t_5 = 0; + __pyx_t_9 = PyObject_IsInstance(((PyObject *)__pyx_v_provider), __pyx_t_6); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 32, __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":35 - * continue - * if not isinstance(provider, providers.Resource): - * continue # <<<<<<<<<<<<<< - * provider.shutdown() + /* "dependency_injector/_cwiring.pyx":33 + * continue + * if not isinstance(provider, providers.Resource): + * continue # <<<<<<<<<<<<<< + * provider.shutdown() * */ goto __pyx_L11_continue; - /* "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() + /* "dependency_injector/_cwiring.pyx":32 + * if arg_key in kwargs and not isinstance(kwargs[arg_key], _Marker): + * continue + * if not isinstance(provider, providers.Resource): # <<<<<<<<<<<<<< + * continue + * provider.shutdown() */ } - /* "dependency_injector/_cwiring.pyx":36 - * if not isinstance(provider, providers.Resource): - * continue - * provider.shutdown() # <<<<<<<<<<<<<< + /* "dependency_injector/_cwiring.pyx":34 + * if not isinstance(provider, providers.Resource): + * continue + * provider.shutdown() # <<<<<<<<<<<<<< * - * return result + * return result */ - __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))) { - __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_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_provider), __pyx_n_s_shutdown); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 34, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_1)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_2, function); + __Pyx_DECREF_SET(__pyx_t_5, function); } } - __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, 36, __pyx_L1_error) + __pyx_t_6 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + 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_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "dependency_injector/_cwiring.pyx":31 + /* "dependency_injector/_cwiring.pyx":29 * - * if patched.closing: - * for arg_key, provider in patched.closing.items(): # <<<<<<<<<<<<<< - * if arg_key in kwargs and not isinstance(kwargs[arg_key], _Marker): - * continue + * if closings: + * for arg_key, provider in closings.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; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/_cwiring.pyx":30 - * result = fn(*args, **to_inject) + /* "dependency_injector/_cwiring.pyx":28 + * result = fn(*args, **to_inject) * - * if patched.closing: # <<<<<<<<<<<<<< - * for arg_key, provider in patched.closing.items(): - * if arg_key in kwargs and not isinstance(kwargs[arg_key], _Marker): + * if closings: # <<<<<<<<<<<<<< + * for arg_key, provider in closings.items(): + * if arg_key in kwargs and not isinstance(kwargs[arg_key], _Marker): */ } - /* "dependency_injector/_cwiring.pyx":38 - * provider.shutdown() + /* "dependency_injector/_cwiring.pyx":36 + * provider.shutdown() + * + * return result # <<<<<<<<<<<<<< * - * return result # <<<<<<<<<<<<<< - * return _patched * */ __Pyx_XDECREF(__pyx_r); @@ -4050,22 +4010,22 @@ 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":17 - * def _get_sync_patched(fn, patched: PatchedCallable): - * @functools.wraps(fn) - * def _patched(*args, **kwargs): # <<<<<<<<<<<<<< - * cdef object result - * cdef dict to_inject + /* "dependency_injector/_cwiring.pyx":15 + * + * + * def _sync_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_AddTraceback("dependency_injector._cwiring._get_sync_patched._patched", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("dependency_injector._cwiring._sync_inject", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_result); @@ -4076,137 +4036,9 @@ static PyObject *__pyx_pf_19dependency_injector_8_cwiring_17_get_sync_patched__p __Pyx_RefNannyFinishContext(); return __pyx_r; } - -/* "dependency_injector/_cwiring.pyx":15 - * - * - * def _get_sync_patched(fn, patched: PatchedCallable): # <<<<<<<<<<<<<< - * @functools.wraps(fn) - * def _patched(*args, **kwargs): - */ - -static PyObject *__pyx_pf_19dependency_injector_8_cwiring__get_sync_patched(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_fn, PyObject *__pyx_v_patched) { - struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct___get_sync_patched *__pyx_cur_scope; - PyObject *__pyx_v__patched = 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_sync_patched", 0); - __pyx_cur_scope = (struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct___get_sync_patched *)__pyx_tp_new_19dependency_injector_8_cwiring___pyx_scope_struct___get_sync_patched(__pyx_ptype_19dependency_injector_8_cwiring___pyx_scope_struct___get_sync_patched, __pyx_empty_tuple, NULL); - 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, 15, __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); - __pyx_cur_scope->__pyx_v_patched = __pyx_v_patched; - __Pyx_INCREF(__pyx_cur_scope->__pyx_v_patched); - __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_patched); - - /* "dependency_injector/_cwiring.pyx":16 - * - * def _get_sync_patched(fn, patched: PatchedCallable): - * @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, 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, 16, __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, 16, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - - /* "dependency_injector/_cwiring.pyx":17 - * def _get_sync_patched(fn, patched: PatchedCallable): - * @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, 17, __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, 16, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_v__patched = __pyx_t_1; - __pyx_t_1 = 0; - - /* "dependency_injector/_cwiring.pyx":39 - * - * return result - * return _patched # <<<<<<<<<<<<<< - * - * - */ - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_v__patched); - __pyx_r = __pyx_v__patched; - goto __pyx_L0; - - /* "dependency_injector/_cwiring.pyx":15 - * - * - * def _get_sync_patched(fn, patched: PatchedCallable): # <<<<<<<<<<<<<< - * @functools.wraps(fn) - * 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_sync_patched", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XDECREF(__pyx_v__patched); - __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); - __Pyx_XGIVEREF(__pyx_r); - __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":42 +/* "dependency_injector/_cwiring.pyx":39 * * * async def _async_inject(object fn, tuple args, dict kwargs, dict injections, dict closings): # <<<<<<<<<<<<<< @@ -4258,29 +4090,29 @@ static PyObject *__pyx_pw_19dependency_injector_8_cwiring_3_async_inject(PyObjec 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) + __Pyx_RaiseArgtupleInvalid("_async_inject", 1, 5, 5, 1); __PYX_ERR(0, 39, __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) + __Pyx_RaiseArgtupleInvalid("_async_inject", 1, 5, 5, 2); __PYX_ERR(0, 39, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_injections)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_async_inject", 1, 5, 5, 3); __PYX_ERR(0, 42, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_async_inject", 1, 5, 5, 3); __PYX_ERR(0, 39, __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) + __Pyx_RaiseArgtupleInvalid("_async_inject", 1, 5, 5, 4); __PYX_ERR(0, 39, __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) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_async_inject") < 0)) __PYX_ERR(0, 39, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 5) { goto __pyx_L5_argtuple_error; @@ -4299,16 +4131,16 @@ static PyObject *__pyx_pw_19dependency_injector_8_cwiring_3_async_inject(PyObjec } 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_RaiseArgtupleInvalid("_async_inject", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 39, __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) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) __PYX_ERR(0, 39, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kwargs), (&PyDict_Type), 1, "kwargs", 1))) __PYX_ERR(0, 39, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_injections), (&PyDict_Type), 1, "injections", 1))) __PYX_ERR(0, 39, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_closings), (&PyDict_Type), 1, "closings", 1))) __PYX_ERR(0, 39, __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 */ @@ -4321,7 +4153,7 @@ static PyObject *__pyx_pw_19dependency_injector_8_cwiring_3_async_inject(PyObjec } 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":62 +/* "dependency_injector/_cwiring.pyx":59 * * if to_inject_await: * async_to_inject = await asyncio.gather(*(provide for _, provide in to_inject_await)) # <<<<<<<<<<<<<< @@ -4330,26 +4162,26 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_13_async_inject_2gener */ 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; + struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_1_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_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); + __pyx_cur_scope = (struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_1_genexpr *)__pyx_tp_new_19dependency_injector_8_cwiring___pyx_scope_struct_1_genexpr(__pyx_ptype_19dependency_injector_8_cwiring___pyx_scope_struct_1_genexpr, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { - __pyx_cur_scope = ((struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_2_genexpr *)Py_None); + __pyx_cur_scope = ((struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_1_genexpr *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 62, __pyx_L1_error) + __PYX_ERR(0, 59, __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__async_inject *) __pyx_self; + __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct___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_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_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, 59, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -4367,7 +4199,7 @@ static PyObject *__pyx_pf_19dependency_injector_8_cwiring_13_async_inject_genexp 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_2_genexpr *__pyx_cur_scope = ((struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_2_genexpr *)__pyx_generator->closure); + struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_1_genexpr *__pyx_cur_scope = ((struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_1_genexpr *)__pyx_generator->closure); PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; @@ -4389,19 +4221,19 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_13_async_inject_2gener return NULL; } __pyx_L3_first_run:; - 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_sent_value)) __PYX_ERR(0, 59, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_to_inject_await)) { __Pyx_RaiseClosureNameError("to_inject_await"); __PYX_ERR(0, 59, __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, 62, __pyx_L1_error) + __PYX_ERR(0, 59, __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, 62, __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, 59, __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, 62, __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, 59, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) { @@ -4410,7 +4242,7 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_13_async_inject_2gener if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 62, __pyx_L1_error) + __PYX_ERR(0, 59, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -4423,15 +4255,15 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_13_async_inject_2gener __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, 62, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 59, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 62, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 59, __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, 62, __pyx_L1_error) + __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 59, __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; @@ -4439,7 +4271,7 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_13_async_inject_2gener __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, 62, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(0, 59, __pyx_L1_error) __pyx_t_7 = NULL; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L7_unpacking_done; @@ -4447,7 +4279,7 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_13_async_inject_2gener __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 62, __pyx_L1_error) + __PYX_ERR(0, 59, __pyx_L1_error) __pyx_L7_unpacking_done:; } __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v__); @@ -4474,7 +4306,7 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_13_async_inject_2gener __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, 62, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 59, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); @@ -4500,7 +4332,7 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_13_async_inject_2gener return __pyx_r; } -/* "dependency_injector/_cwiring.pyx":42 +/* "dependency_injector/_cwiring.pyx":39 * * * async def _async_inject(object fn, tuple args, dict kwargs, dict injections, dict closings): # <<<<<<<<<<<<<< @@ -4509,7 +4341,7 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_13_async_inject_2gener */ 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; + struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct___async_inject *__pyx_cur_scope; PyObject *__pyx_gb_19dependency_injector_8_cwiring_13_async_inject_2generator1 = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -4517,11 +4349,11 @@ static PyObject *__pyx_pf_19dependency_injector_8_cwiring_2_async_inject(CYTHON_ const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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); + __pyx_cur_scope = (struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct___async_inject *)__pyx_tp_new_19dependency_injector_8_cwiring___pyx_scope_struct___async_inject(__pyx_ptype_19dependency_injector_8_cwiring___pyx_scope_struct___async_inject, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { - __pyx_cur_scope = ((struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_1__async_inject *)Py_None); + __pyx_cur_scope = ((struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct___async_inject *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 42, __pyx_L1_error) + __PYX_ERR(0, 39, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } @@ -4541,7 +4373,7 @@ static PyObject *__pyx_pf_19dependency_injector_8_cwiring_2_async_inject(CYTHON_ __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_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_CoroutineObject *gen = __Pyx_Coroutine_New((__pyx_coroutine_body_t) __pyx_gb_19dependency_injector_8_cwiring_4generator, __pyx_codeobj_, (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, 39, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -4560,7 +4392,7 @@ static PyObject *__pyx_pf_19dependency_injector_8_cwiring_2_async_inject(CYTHON_ 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_1__async_inject *__pyx_cur_scope = ((struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_1__async_inject *)__pyx_generator->closure); + struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct___async_inject *__pyx_cur_scope = ((struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct___async_inject *)__pyx_generator->closure); PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -4591,35 +4423,35 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_4generator(__pyx_Corou return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 42, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 39, __pyx_L1_error) - /* "dependency_injector/_cwiring.pyx":45 + /* "dependency_injector/_cwiring.pyx":42 * 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, 45, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 42, __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":46 + /* "dependency_injector/_cwiring.pyx":43 * 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, 46, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 43, __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":50 + /* "dependency_injector/_cwiring.pyx":47 * cdef Provider provider * * to_inject = kwargs.copy() # <<<<<<<<<<<<<< @@ -4628,15 +4460,15 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_4generator(__pyx_Corou */ 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_ERR(0, 47, __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_t_1 = PyDict_Copy(__pyx_cur_scope->__pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 47, __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":51 + /* "dependency_injector/_cwiring.pyx":48 * * to_inject = kwargs.copy() * for arg_key, provider in injections.items(): # <<<<<<<<<<<<<< @@ -4645,17 +4477,17 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_4generator(__pyx_Corou */ 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_ERR(0, 48, __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_t_1 = __Pyx_PyDict_Items(__pyx_cur_scope->__pyx_v_injections); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 48, __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, 51, __pyx_L1_error) + __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 48, __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_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 48, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -4663,17 +4495,17 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_4generator(__pyx_Corou 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, 51, __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, 48, __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, 51, __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, 48, __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, 51, __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, 48, __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, 51, __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, 48, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -4683,7 +4515,7 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_4generator(__pyx_Corou PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 51, __pyx_L1_error) + else __PYX_ERR(0, 48, __pyx_L1_error) } break; } @@ -4695,7 +4527,7 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_4generator(__pyx_Corou if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 51, __pyx_L1_error) + __PYX_ERR(0, 48, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -4708,15 +4540,15 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_4generator(__pyx_Corou __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, 51, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 48, __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_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 48, __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, 51, __pyx_L1_error) + __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 48, __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; @@ -4724,7 +4556,7 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_4generator(__pyx_Corou __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, 51, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 48, __pyx_L1_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L7_unpacking_done; @@ -4732,10 +4564,10 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_4generator(__pyx_Corou __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 51, __pyx_L1_error) + __PYX_ERR(0, 48, __pyx_L1_error) __pyx_L7_unpacking_done:; } - 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) + if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(0, 48, __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); @@ -4745,7 +4577,7 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_4generator(__pyx_Corou __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; - /* "dependency_injector/_cwiring.pyx":52 + /* "dependency_injector/_cwiring.pyx":49 * to_inject = kwargs.copy() * for arg_key, provider in injections.items(): * if arg_key not in kwargs or isinstance(kwargs[arg_key], _Marker): # <<<<<<<<<<<<<< @@ -4754,9 +4586,9 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_4generator(__pyx_Corou */ 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_ERR(0, 49, __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_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, 49, __pyx_L1_error) __pyx_t_11 = (__pyx_t_10 != 0); if (!__pyx_t_11) { } else { @@ -4765,13 +4597,13 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_4generator(__pyx_Corou } 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_ERR(0, 49, __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_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, 49, __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, 52, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_Marker); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 49, __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, 52, __pyx_L1_error) + __pyx_t_11 = PyObject_IsInstance(__pyx_t_1, __pyx_t_6); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 49, __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); @@ -4779,7 +4611,7 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_4generator(__pyx_Corou __pyx_L9_bool_binop_done:; if (__pyx_t_9) { - /* "dependency_injector/_cwiring.pyx":53 + /* "dependency_injector/_cwiring.pyx":50 * for arg_key, provider in injections.items(): * if arg_key not in kwargs or isinstance(kwargs[arg_key], _Marker): * provide = provider() # <<<<<<<<<<<<<< @@ -4799,7 +4631,7 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_4generator(__pyx_Corou } __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) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 50, __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); @@ -4807,24 +4639,42 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_4generator(__pyx_Corou __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; - /* "dependency_injector/_cwiring.pyx":54 + /* "dependency_injector/_cwiring.pyx":51 * 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 = (((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); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_provider), __pyx_n_s_is_async_mode_enabled); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 51, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { + __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_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_1, function); + } + } + __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, 51, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 51, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_9) { - /* "dependency_injector/_cwiring.pyx":55 + /* "dependency_injector/_cwiring.pyx":52 * 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, 55, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 52, __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); @@ -4832,10 +4682,10 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_4generator(__pyx_Corou __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, 55, __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, 52, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "dependency_injector/_cwiring.pyx":54 + /* "dependency_injector/_cwiring.pyx":51 * if arg_key not in kwargs or isinstance(kwargs[arg_key], _Marker): * provide = provider() * if provider.is_async_mode_enabled(): # <<<<<<<<<<<<<< @@ -4845,7 +4695,7 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_4generator(__pyx_Corou goto __pyx_L11; } - /* "dependency_injector/_cwiring.pyx":56 + /* "dependency_injector/_cwiring.pyx":53 * if provider.is_async_mode_enabled(): * to_inject_await.append((arg_key, provide)) * elif _isawaitable(provide): # <<<<<<<<<<<<<< @@ -4855,14 +4705,14 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_4generator(__pyx_Corou __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 + /* "dependency_injector/_cwiring.pyx":54 * 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_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 54, __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); @@ -4870,10 +4720,10 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_4generator(__pyx_Corou __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_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, 54, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "dependency_injector/_cwiring.pyx":56 + /* "dependency_injector/_cwiring.pyx":53 * if provider.is_async_mode_enabled(): * to_inject_await.append((arg_key, provide)) * elif _isawaitable(provide): # <<<<<<<<<<<<<< @@ -4883,7 +4733,7 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_4generator(__pyx_Corou goto __pyx_L11; } - /* "dependency_injector/_cwiring.pyx":59 + /* "dependency_injector/_cwiring.pyx":56 * to_inject_await.append((arg_key, provide)) * else: * to_inject[arg_key] = provide # <<<<<<<<<<<<<< @@ -4893,13 +4743,13 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_4generator(__pyx_Corou /*else*/ { if (unlikely(__pyx_cur_scope->__pyx_v_to_inject == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 59, __pyx_L1_error) + __PYX_ERR(0, 56, __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) + 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, 56, __pyx_L1_error) } __pyx_L11:; - /* "dependency_injector/_cwiring.pyx":52 + /* "dependency_injector/_cwiring.pyx":49 * to_inject = kwargs.copy() * for arg_key, provider in injections.items(): * if arg_key not in kwargs or isinstance(kwargs[arg_key], _Marker): # <<<<<<<<<<<<<< @@ -4908,7 +4758,7 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_4generator(__pyx_Corou */ } - /* "dependency_injector/_cwiring.pyx":51 + /* "dependency_injector/_cwiring.pyx":48 * * to_inject = kwargs.copy() * for arg_key, provider in injections.items(): # <<<<<<<<<<<<<< @@ -4918,7 +4768,7 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_4generator(__pyx_Corou } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/_cwiring.pyx":61 + /* "dependency_injector/_cwiring.pyx":58 * to_inject[arg_key] = provide * * if to_inject_await: # <<<<<<<<<<<<<< @@ -4928,24 +4778,24 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_4generator(__pyx_Corou __pyx_t_9 = (PyList_GET_SIZE(__pyx_cur_scope->__pyx_v_to_inject_await) != 0); if (__pyx_t_9) { - /* "dependency_injector/_cwiring.pyx":62 + /* "dependency_injector/_cwiring.pyx":59 * * 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_2, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 62, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 59, __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_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_gather); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 59, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __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_t_2 = __pyx_pf_19dependency_injector_8_cwiring_13_async_inject_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 59, __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_t_1 = __Pyx_PySequence_Tuple(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 59, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __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_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 59, __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; @@ -4960,25 +4810,25 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_4generator(__pyx_Corou __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L13_resume_from_await:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 62, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 59, __pyx_L1_error) __pyx_t_2 = __pyx_sent_value; __Pyx_INCREF(__pyx_t_2); } else { __pyx_t_2 = NULL; - if (__Pyx_PyGen_FetchStopIterationValue(&__pyx_t_2) < 0) __PYX_ERR(0, 62, __pyx_L1_error) + if (__Pyx_PyGen_FetchStopIterationValue(&__pyx_t_2) < 0) __PYX_ERR(0, 59, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __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 + /* "dependency_injector/_cwiring.pyx":60 * 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_2 = PyTuple_New(2); 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, 60, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_async_to_inject); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_async_to_inject); @@ -4986,16 +4836,16 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_4generator(__pyx_Corou __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_t_1 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 60, __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_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, 63, __pyx_L1_error) + __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 60, __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, 63, __pyx_L1_error) + __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 60, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -5003,17 +4853,17 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_4generator(__pyx_Corou 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, 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, 60, __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, 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, 60, __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, 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, 60, __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, 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, 60, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -5023,7 +4873,7 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_4generator(__pyx_Corou PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 63, __pyx_L1_error) + else __PYX_ERR(0, 60, __pyx_L1_error) } break; } @@ -5035,7 +4885,7 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_4generator(__pyx_Corou if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 63, __pyx_L1_error) + __PYX_ERR(0, 60, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -5048,15 +4898,15 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_4generator(__pyx_Corou __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_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 60, __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_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 60, __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_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 60, __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; @@ -5064,7 +4914,7 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_4generator(__pyx_Corou __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) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 60, __pyx_L1_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L17_unpacking_done; @@ -5072,7 +4922,7 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_4generator(__pyx_Corou __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_ERR(0, 60, __pyx_L1_error) __pyx_L17_unpacking_done:; } __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_provide); @@ -5085,7 +4935,7 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_4generator(__pyx_Corou if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 63, __pyx_L1_error) + __PYX_ERR(0, 60, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -5098,15 +4948,15 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_4generator(__pyx_Corou __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_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 60, __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_t_13 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 60, __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_t_14 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 60, __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; @@ -5114,7 +4964,7 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_4generator(__pyx_Corou __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) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_14), 2) < 0) __PYX_ERR(0, 60, __pyx_L1_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; goto __pyx_L19_unpacking_done; @@ -5122,7 +4972,7 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_4generator(__pyx_Corou __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_ERR(0, 60, __pyx_L1_error) __pyx_L19_unpacking_done:; } __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_injection); @@ -5134,7 +4984,7 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_4generator(__pyx_Corou __Pyx_GIVEREF(__pyx_t_13); __pyx_t_13 = 0; - /* "dependency_injector/_cwiring.pyx":64 + /* "dependency_injector/_cwiring.pyx":61 * 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 # <<<<<<<<<<<<<< @@ -5143,11 +4993,11 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_4generator(__pyx_Corou */ 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) + __PYX_ERR(0, 61, __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) + 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, 61, __pyx_L1_error) - /* "dependency_injector/_cwiring.pyx":63 + /* "dependency_injector/_cwiring.pyx":60 * 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): # <<<<<<<<<<<<<< @@ -5157,7 +5007,7 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_4generator(__pyx_Corou } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/_cwiring.pyx":61 + /* "dependency_injector/_cwiring.pyx":58 * to_inject[arg_key] = provide * * if to_inject_await: # <<<<<<<<<<<<<< @@ -5166,7 +5016,7 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_4generator(__pyx_Corou */ } - /* "dependency_injector/_cwiring.pyx":66 + /* "dependency_injector/_cwiring.pyx":63 * to_inject[injection] = provide * * result = await fn(*args, **to_inject) # <<<<<<<<<<<<<< @@ -5175,15 +5025,15 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_4generator(__pyx_Corou */ 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) + __PYX_ERR(0, 63, __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_ERR(0, 63, __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_t_2 = PyDict_Copy(__pyx_cur_scope->__pyx_v_to_inject); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 63, __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_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, 63, __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); @@ -5197,28 +5047,28 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_4generator(__pyx_Corou __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) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 63, __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) + if (__Pyx_PyGen_FetchStopIterationValue(&__pyx_t_1) < 0) __PYX_ERR(0, 63, __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 + /* "dependency_injector/_cwiring.pyx":65 * 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) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_closings); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 65, __pyx_L1_error) if (__pyx_t_9) { - /* "dependency_injector/_cwiring.pyx":69 + /* "dependency_injector/_cwiring.pyx":66 * * if closings: * for arg_key, provider in closings.items(): # <<<<<<<<<<<<<< @@ -5227,17 +5077,17 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_4generator(__pyx_Corou */ 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_ERR(0, 66, __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_t_1 = __Pyx_PyDict_Items(__pyx_cur_scope->__pyx_v_closings); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 66, __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_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 66, __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_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 66, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -5245,17 +5095,17 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_4generator(__pyx_Corou 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) + __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, 66, __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_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 66, __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) + __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, 66, __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_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 66, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -5265,7 +5115,7 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_4generator(__pyx_Corou 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) + else __PYX_ERR(0, 66, __pyx_L1_error) } break; } @@ -5277,7 +5127,7 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_4generator(__pyx_Corou if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 69, __pyx_L1_error) + __PYX_ERR(0, 66, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -5290,15 +5140,15 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_4generator(__pyx_Corou __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, 69, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 66, __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_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 66, __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, 69, __pyx_L1_error) + __pyx_t_13 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 66, __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; @@ -5306,7 +5156,7 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_4generator(__pyx_Corou __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, 69, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_13), 2) < 0) __PYX_ERR(0, 66, __pyx_L1_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L25_unpacking_done; @@ -5314,10 +5164,10 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_4generator(__pyx_Corou __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 69, __pyx_L1_error) + __PYX_ERR(0, 66, __pyx_L1_error) __pyx_L25_unpacking_done:; } - 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) + if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_19dependency_injector_9providers_Provider))))) __PYX_ERR(0, 66, __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); @@ -5327,7 +5177,7 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_4generator(__pyx_Corou __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; - /* "dependency_injector/_cwiring.pyx":70 + /* "dependency_injector/_cwiring.pyx":67 * if closings: * for arg_key, provider in closings.items(): * if arg_key in kwargs and isinstance(kwargs[arg_key], _Marker): # <<<<<<<<<<<<<< @@ -5336,9 +5186,9 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_4generator(__pyx_Corou */ 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_ERR(0, 67, __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_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, 67, __pyx_L1_error) __pyx_t_11 = (__pyx_t_10 != 0); if (__pyx_t_11) { } else { @@ -5347,13 +5197,13 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_4generator(__pyx_Corou } 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_ERR(0, 67, __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_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, 67, __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, 70, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_Marker); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 67, __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, 70, __pyx_L1_error) + __pyx_t_11 = PyObject_IsInstance(__pyx_t_1, __pyx_t_6); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 67, __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); @@ -5361,7 +5211,7 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_4generator(__pyx_Corou __pyx_L27_bool_binop_done:; if (__pyx_t_9) { - /* "dependency_injector/_cwiring.pyx":71 + /* "dependency_injector/_cwiring.pyx":68 * for arg_key, provider in closings.items(): * if arg_key in kwargs and isinstance(kwargs[arg_key], _Marker): * continue # <<<<<<<<<<<<<< @@ -5370,7 +5220,7 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_4generator(__pyx_Corou */ goto __pyx_L22_continue; - /* "dependency_injector/_cwiring.pyx":70 + /* "dependency_injector/_cwiring.pyx":67 * if closings: * for arg_key, provider in closings.items(): * if arg_key in kwargs and isinstance(kwargs[arg_key], _Marker): # <<<<<<<<<<<<<< @@ -5379,24 +5229,24 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_4generator(__pyx_Corou */ } - /* "dependency_injector/_cwiring.pyx":72 + /* "dependency_injector/_cwiring.pyx":69 * 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, 72, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_providers); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 69, __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, 72, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_Resource); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 69, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __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_t_9 = PyObject_IsInstance(((PyObject *)__pyx_cur_scope->__pyx_v_provider), __pyx_t_1); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 69, __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":73 + /* "dependency_injector/_cwiring.pyx":70 * continue * if not isinstance(provider, providers.Resource): * continue # <<<<<<<<<<<<<< @@ -5405,7 +5255,7 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_4generator(__pyx_Corou */ goto __pyx_L22_continue; - /* "dependency_injector/_cwiring.pyx":72 + /* "dependency_injector/_cwiring.pyx":69 * if arg_key in kwargs and isinstance(kwargs[arg_key], _Marker): * continue * if not isinstance(provider, providers.Resource): # <<<<<<<<<<<<<< @@ -5414,14 +5264,14 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_4generator(__pyx_Corou */ } - /* "dependency_injector/_cwiring.pyx":74 + /* "dependency_injector/_cwiring.pyx":71 * if not isinstance(provider, providers.Resource): * continue * shutdown = provider.shutdown() # <<<<<<<<<<<<<< * if _isawaitable(shutdown): * to_close_await.append(shutdown) */ - __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_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_provider), __pyx_n_s_shutdown); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 71, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { @@ -5435,7 +5285,7 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_4generator(__pyx_Corou } __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) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 71, __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); @@ -5443,7 +5293,7 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_4generator(__pyx_Corou __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/_cwiring.pyx":75 + /* "dependency_injector/_cwiring.pyx":72 * continue * shutdown = provider.shutdown() * if _isawaitable(shutdown): # <<<<<<<<<<<<<< @@ -5453,16 +5303,16 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_4generator(__pyx_Corou __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":76 + /* "dependency_injector/_cwiring.pyx":73 * shutdown = provider.shutdown() * if _isawaitable(shutdown): * to_close_await.append(shutdown) # <<<<<<<<<<<<<< * * 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, 76, __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, 73, __pyx_L1_error) - /* "dependency_injector/_cwiring.pyx":75 + /* "dependency_injector/_cwiring.pyx":72 * continue * shutdown = provider.shutdown() * if _isawaitable(shutdown): # <<<<<<<<<<<<<< @@ -5471,7 +5321,7 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_4generator(__pyx_Corou */ } - /* "dependency_injector/_cwiring.pyx":69 + /* "dependency_injector/_cwiring.pyx":66 * * if closings: * for arg_key, provider in closings.items(): # <<<<<<<<<<<<<< @@ -5482,21 +5332,21 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_4generator(__pyx_Corou } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dependency_injector/_cwiring.pyx":78 + /* "dependency_injector/_cwiring.pyx":75 * to_close_await.append(shutdown) * * await asyncio.gather(*to_close_await) # <<<<<<<<<<<<<< * * return result */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 78, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 75, __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, 78, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_gather); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 75, __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, 78, __pyx_L1_error) + __pyx_t_2 = PySequence_Tuple(__pyx_cur_scope->__pyx_v_to_close_await); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 75, __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, 78, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 75, __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; @@ -5511,16 +5361,16 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_4generator(__pyx_Corou __pyx_generator->resume_label = 3; return __pyx_r; __pyx_L31_resume_from_await:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 78, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 75, __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, 78, __pyx_L1_error) + else __PYX_ERR(0, 75, __pyx_L1_error) } } - /* "dependency_injector/_cwiring.pyx":68 + /* "dependency_injector/_cwiring.pyx":65 * result = await fn(*args, **to_inject) * * if closings: # <<<<<<<<<<<<<< @@ -5529,7 +5379,7 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_4generator(__pyx_Corou */ } - /* "dependency_injector/_cwiring.pyx":80 + /* "dependency_injector/_cwiring.pyx":77 * await asyncio.gather(*to_close_await) * * return result # <<<<<<<<<<<<<< @@ -5541,7 +5391,7 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_4generator(__pyx_Corou goto __pyx_L0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - /* "dependency_injector/_cwiring.pyx":42 + /* "dependency_injector/_cwiring.pyx":39 * * * async def _async_inject(object fn, tuple args, dict kwargs, dict injections, dict closings): # <<<<<<<<<<<<<< @@ -5570,7 +5420,7 @@ static PyObject *__pyx_gb_19dependency_injector_8_cwiring_4generator(__pyx_Corou return __pyx_r; } -/* "dependency_injector/_cwiring.pyx":83 +/* "dependency_injector/_cwiring.pyx":80 * * * cdef bint _isawaitable(object instance): # <<<<<<<<<<<<<< @@ -5592,19 +5442,19 @@ static int __pyx_f_19dependency_injector_8_cwiring__isawaitable(PyObject *__pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_isawaitable", 0); - /* "dependency_injector/_cwiring.pyx":85 + /* "dependency_injector/_cwiring.pyx":82 * cdef bint _isawaitable(object instance): * """Return true if object can be passed to an ``await`` expression.""" * return (isinstance(instance, types.CoroutineType) or # <<<<<<<<<<<<<< * isinstance(instance, types.GeneratorType) and * bool(instance.gi_code.co_flags & inspect.CO_ITERABLE_COROUTINE) or */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_types); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 85, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_types); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 82, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_CoroutineType); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 85, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_CoroutineType); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 82, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = PyObject_IsInstance(__pyx_v_instance, __pyx_t_3); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 85, __pyx_L1_error) + __pyx_t_4 = PyObject_IsInstance(__pyx_v_instance, __pyx_t_3); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 82, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = (__pyx_t_4 != 0); if (!__pyx_t_5) { @@ -5613,19 +5463,19 @@ static int __pyx_f_19dependency_injector_8_cwiring__isawaitable(PyObject *__pyx_ goto __pyx_L3_bool_binop_done; } - /* "dependency_injector/_cwiring.pyx":86 + /* "dependency_injector/_cwiring.pyx":83 * """Return true if object can be passed to an ``await`` expression.""" * return (isinstance(instance, types.CoroutineType) or * isinstance(instance, types.GeneratorType) and # <<<<<<<<<<<<<< * bool(instance.gi_code.co_flags & inspect.CO_ITERABLE_COROUTINE) or * isinstance(instance, collections.abc.Awaitable)) */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_types); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 86, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_types); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 83, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GeneratorType); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 86, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GeneratorType); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 83, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = PyObject_IsInstance(__pyx_v_instance, __pyx_t_2); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 86, __pyx_L1_error) + __pyx_t_5 = PyObject_IsInstance(__pyx_v_instance, __pyx_t_2); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 83, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = (__pyx_t_5 != 0); if (!__pyx_t_4) { @@ -5633,27 +5483,27 @@ static int __pyx_f_19dependency_injector_8_cwiring__isawaitable(PyObject *__pyx_ } else { } - /* "dependency_injector/_cwiring.pyx":87 + /* "dependency_injector/_cwiring.pyx":84 * return (isinstance(instance, types.CoroutineType) or * isinstance(instance, types.GeneratorType) and * bool(instance.gi_code.co_flags & inspect.CO_ITERABLE_COROUTINE) or # <<<<<<<<<<<<<< * isinstance(instance, collections.abc.Awaitable)) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_instance, __pyx_n_s_gi_code); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 87, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_instance, __pyx_n_s_gi_code); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 84, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_co_flags); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 87, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_co_flags); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 84, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_inspect); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 87, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_inspect); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 84, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_CO_ITERABLE_COROUTINE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 87, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_CO_ITERABLE_COROUTINE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 84, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyNumber_And(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 87, __pyx_L1_error) + __pyx_t_2 = PyNumber_And(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 84, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 87, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 84, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!((!(!__pyx_t_4)) != 0)) { } else { @@ -5662,20 +5512,20 @@ static int __pyx_f_19dependency_injector_8_cwiring__isawaitable(PyObject *__pyx_ } __pyx_L5_next_or:; - /* "dependency_injector/_cwiring.pyx":88 + /* "dependency_injector/_cwiring.pyx":85 * isinstance(instance, types.GeneratorType) and * bool(instance.gi_code.co_flags & inspect.CO_ITERABLE_COROUTINE) or * isinstance(instance, collections.abc.Awaitable)) # <<<<<<<<<<<<<< */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_collections); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 88, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_collections); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 85, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_abc); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 88, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_abc); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 85, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_Awaitable); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 88, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_Awaitable); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 85, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_4 = PyObject_IsInstance(__pyx_v_instance, __pyx_t_2); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 88, __pyx_L1_error) + __pyx_t_4 = PyObject_IsInstance(__pyx_v_instance, __pyx_t_2); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 85, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = (__pyx_t_4 != 0); __pyx_t_1 = __pyx_t_5; @@ -5683,7 +5533,7 @@ static int __pyx_f_19dependency_injector_8_cwiring__isawaitable(PyObject *__pyx_ __pyx_r = __pyx_t_1; goto __pyx_L0; - /* "dependency_injector/_cwiring.pyx":83 + /* "dependency_injector/_cwiring.pyx":80 * * * cdef bint _isawaitable(object instance): # <<<<<<<<<<<<<< @@ -5703,7 +5553,7 @@ static int __pyx_f_19dependency_injector_8_cwiring__isawaitable(PyObject *__pyx_ return __pyx_r; } -/* "providers.pxd":358 +/* "providers.pxd":353 * * # Inline helper functions * cdef inline object __get_name(NamedInjection self): # <<<<<<<<<<<<<< @@ -5716,7 +5566,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___get_na __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get_name", 0); - /* "providers.pxd":359 + /* "providers.pxd":354 * # Inline helper functions * cdef inline object __get_name(NamedInjection self): * return self.__name # <<<<<<<<<<<<<< @@ -5728,7 +5578,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___get_na __pyx_r = __pyx_v_self->__pyx___name; goto __pyx_L0; - /* "providers.pxd":358 + /* "providers.pxd":353 * * # Inline helper functions * cdef inline object __get_name(NamedInjection self): # <<<<<<<<<<<<<< @@ -5743,7 +5593,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___get_na return __pyx_r; } -/* "providers.pxd":362 +/* "providers.pxd":357 * * * cdef inline object __get_value(Injection self): # <<<<<<<<<<<<<< @@ -5763,7 +5613,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___get_va int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get_value", 0); - /* "providers.pxd":363 + /* "providers.pxd":358 * * cdef inline object __get_value(Injection self): * if self.__call == 0: # <<<<<<<<<<<<<< @@ -5773,7 +5623,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":364 + /* "providers.pxd":359 * cdef inline object __get_value(Injection self): * if self.__call == 0: * return self.__value # <<<<<<<<<<<<<< @@ -5785,7 +5635,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___get_va __pyx_r = __pyx_v_self->__pyx___value; goto __pyx_L0; - /* "providers.pxd":363 + /* "providers.pxd":358 * * cdef inline object __get_value(Injection self): * if self.__call == 0: # <<<<<<<<<<<<<< @@ -5794,7 +5644,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___get_va */ } - /* "providers.pxd":365 + /* "providers.pxd":360 * if self.__call == 0: * return self.__value * return self.__value() # <<<<<<<<<<<<<< @@ -5815,14 +5665,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, 365, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 360, __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":362 + /* "providers.pxd":357 * * * cdef inline object __get_value(Injection self): # <<<<<<<<<<<<<< @@ -5843,7 +5693,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___get_va return __pyx_r; } -/* "providers.pxd":368 +/* "providers.pxd":363 * * * cdef inline object __get_value_kwargs(Injection self, dict kwargs): # <<<<<<<<<<<<<< @@ -5862,7 +5712,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___get_va int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get_value_kwargs", 0); - /* "providers.pxd":369 + /* "providers.pxd":364 * * cdef inline object __get_value_kwargs(Injection self, dict kwargs): * if self.__call == 0: # <<<<<<<<<<<<<< @@ -5872,7 +5722,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":370 + /* "providers.pxd":365 * cdef inline object __get_value_kwargs(Injection self, dict kwargs): * if self.__call == 0: * return self.__value # <<<<<<<<<<<<<< @@ -5884,7 +5734,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___get_va __pyx_r = __pyx_v_self->__pyx___value; goto __pyx_L0; - /* "providers.pxd":369 + /* "providers.pxd":364 * * cdef inline object __get_value_kwargs(Injection self, dict kwargs): * if self.__call == 0: # <<<<<<<<<<<<<< @@ -5893,7 +5743,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___get_va */ } - /* "providers.pxd":371 + /* "providers.pxd":366 * if self.__call == 0: * return self.__value * return self.__value(**kwargs) # <<<<<<<<<<<<<< @@ -5903,18 +5753,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, 371, __pyx_L1_error) + __PYX_ERR(1, 366, __pyx_L1_error) } - __pyx_t_2 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 371, __pyx_L1_error) + __pyx_t_2 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 366, __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, 371, __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, 366, __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":368 + /* "providers.pxd":363 * * * cdef inline object __get_value_kwargs(Injection self, dict kwargs): # <<<<<<<<<<<<<< @@ -5934,7 +5784,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___get_va return __pyx_r; } -/* "providers.pxd":374 +/* "providers.pxd":369 * * * cdef inline tuple __separate_prefixed_kwargs(dict kwargs): # <<<<<<<<<<<<<< @@ -5967,31 +5817,31 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___separa int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__separate_prefixed_kwargs", 0); - /* "providers.pxd":375 + /* "providers.pxd":370 * * 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, 375, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 370, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_plain_kwargs = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "providers.pxd":376 + /* "providers.pxd":371 * 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, 376, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_prefixed_kwargs = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "providers.pxd":378 + /* "providers.pxd":373 * cdef dict prefixed_kwargs = {} * * for key, value in kwargs.items(): # <<<<<<<<<<<<<< @@ -6000,17 +5850,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, 378, __pyx_L1_error) + __PYX_ERR(1, 373, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_Items(__pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 378, __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_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, 378, __pyx_L1_error) + __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_GOTREF(__pyx_t_2); - __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 378, __pyx_L1_error) + __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 373, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -6018,17 +5868,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, 378, __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, 373, __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, 378, __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, 373, __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, 378, __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, 373, __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, 378, __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, 373, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -6038,7 +5888,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, 378, __pyx_L1_error) + else __PYX_ERR(1, 373, __pyx_L1_error) } break; } @@ -6050,7 +5900,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, 378, __pyx_L1_error) + __PYX_ERR(1, 373, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -6063,15 +5913,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, 378, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 373, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 378, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 373, __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, 378, __pyx_L1_error) + __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 373, __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; @@ -6079,7 +5929,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, 378, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(1, 373, __pyx_L1_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L6_unpacking_done; @@ -6087,7 +5937,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, 378, __pyx_L1_error) + __PYX_ERR(1, 373, __pyx_L1_error) __pyx_L6_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_5); @@ -6095,27 +5945,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":379 + /* "providers.pxd":374 * * 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, 379, __pyx_L1_error) + __pyx_t_9 = (__Pyx_PySequence_ContainsTF(__pyx_n_s__2, __pyx_v_key, Py_NE)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(1, 374, __pyx_L1_error) __pyx_t_10 = (__pyx_t_9 != 0); if (__pyx_t_10) { - /* "providers.pxd":380 + /* "providers.pxd":375 * 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, 380, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_plain_kwargs, __pyx_v_key, __pyx_v_value) < 0)) __PYX_ERR(1, 375, __pyx_L1_error) - /* "providers.pxd":381 + /* "providers.pxd":376 * if "__" not in key: * plain_kwargs[key] = value * continue # <<<<<<<<<<<<<< @@ -6124,7 +5974,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___separa */ goto __pyx_L3_continue; - /* "providers.pxd":379 + /* "providers.pxd":374 * * for key, value in kwargs.items(): * if "__" not in key: # <<<<<<<<<<<<<< @@ -6133,14 +5983,14 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___separa */ } - /* "providers.pxd":383 + /* "providers.pxd":378 * 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, 383, __pyx_L1_error) + __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_GOTREF(__pyx_t_6); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { @@ -6152,26 +6002,26 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___separa __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_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_5, __pyx_n_s__2) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_n_s__2); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 383, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 378, __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":384 + /* "providers.pxd":379 * * 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, 384, __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, 379, __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, 384, __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, 379, __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, 384, __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, 379, __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); @@ -6179,30 +6029,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":386 + /* "providers.pxd":381 * 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, 386, __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, 381, __pyx_L1_error) __pyx_t_9 = (__pyx_t_10 != 0); if (__pyx_t_9) { - /* "providers.pxd":387 + /* "providers.pxd":382 * * 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, 387, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 382, __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, 387, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_prefixed_kwargs, __pyx_v_prefix, __pyx_t_5) < 0)) __PYX_ERR(1, 382, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "providers.pxd":386 + /* "providers.pxd":381 * prefix, name = key[:index], key[index+2:] * * if prefix not in prefixed_kwargs: # <<<<<<<<<<<<<< @@ -6211,19 +6061,19 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___separa */ } - /* "providers.pxd":388 + /* "providers.pxd":383 * 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, 388, __pyx_L1_error) + __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_GOTREF(__pyx_t_5); - if (unlikely(PyObject_SetItem(__pyx_t_5, __pyx_v_name, __pyx_v_value) < 0)) __PYX_ERR(1, 388, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_t_5, __pyx_v_name, __pyx_v_value) < 0)) __PYX_ERR(1, 383, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "providers.pxd":378 + /* "providers.pxd":373 * cdef dict prefixed_kwargs = {} * * for key, value in kwargs.items(): # <<<<<<<<<<<<<< @@ -6234,7 +6084,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___separa } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "providers.pxd":390 + /* "providers.pxd":385 * prefixed_kwargs[prefix][name] = value * * return plain_kwargs, prefixed_kwargs # <<<<<<<<<<<<<< @@ -6242,7 +6092,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, 390, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 385, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_plain_kwargs); __Pyx_GIVEREF(__pyx_v_plain_kwargs); @@ -6254,7 +6104,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___separa __pyx_t_2 = 0; goto __pyx_L0; - /* "providers.pxd":374 + /* "providers.pxd":369 * * * cdef inline tuple __separate_prefixed_kwargs(dict kwargs): # <<<<<<<<<<<<<< @@ -6284,7 +6134,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___separa return __pyx_r; } -/* "providers.pxd":395 +/* "providers.pxd":390 * @cython.boundscheck(False) * @cython.wraparound(False) * cdef inline object __provide_positional_args( # <<<<<<<<<<<<<< @@ -6313,31 +6163,31 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__provide_positional_args", 0); - /* "providers.pxd":402 + /* "providers.pxd":397 * ): * 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, 402, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 397, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_positional_args = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "providers.pxd":403 + /* "providers.pxd":398 * 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, 403, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 398, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_future_args = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "providers.pxd":407 + /* "providers.pxd":402 * cdef object value * * if inj_args_len == 0: # <<<<<<<<<<<<<< @@ -6347,7 +6197,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":408 + /* "providers.pxd":403 * * if inj_args_len == 0: * return args # <<<<<<<<<<<<<< @@ -6359,7 +6209,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid __pyx_r = __pyx_v_args; goto __pyx_L0; - /* "providers.pxd":407 + /* "providers.pxd":402 * cdef object value * * if inj_args_len == 0: # <<<<<<<<<<<<<< @@ -6368,7 +6218,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid */ } - /* "providers.pxd":410 + /* "providers.pxd":405 * return args * * for index in range(inj_args_len): # <<<<<<<<<<<<<< @@ -6380,7 +6230,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":411 + /* "providers.pxd":406 * * for index in range(inj_args_len): * injection = inj_args[index] # <<<<<<<<<<<<<< @@ -6389,35 +6239,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, 411, __pyx_L1_error) + __PYX_ERR(1, 406, __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":412 + /* "providers.pxd":407 * 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, 412, __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, 407, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_1); __pyx_t_1 = 0; - /* "providers.pxd":413 + /* "providers.pxd":408 * 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, 413, __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, 408, __pyx_L1_error) - /* "providers.pxd":415 + /* "providers.pxd":410 * positional_args.append(value) * * if async_mode != ASYNC_MODE_DISABLED and __is_future_or_coroutine(value): # <<<<<<<<<<<<<< @@ -6435,16 +6285,16 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid __pyx_L7_bool_binop_done:; if (__pyx_t_2) { - /* "providers.pxd":416 + /* "providers.pxd":411 * * 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, 416, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 411, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 416, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 411, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1); @@ -6452,10 +6302,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, 416, __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, 411, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "providers.pxd":415 + /* "providers.pxd":410 * positional_args.append(value) * * if async_mode != ASYNC_MODE_DISABLED and __is_future_or_coroutine(value): # <<<<<<<<<<<<<< @@ -6465,16 +6315,16 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid } } - /* "providers.pxd":418 + /* "providers.pxd":413 * 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, 418, __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, 413, __pyx_L1_error) - /* "providers.pxd":420 + /* "providers.pxd":415 * positional_args.extend(args) * * if future_args: # <<<<<<<<<<<<<< @@ -6484,7 +6334,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":421 + /* "providers.pxd":416 * * if future_args: * return __combine_future_injections(positional_args, future_args) # <<<<<<<<<<<<<< @@ -6492,13 +6342,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, 421, __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, 416, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_r = __pyx_t_8; __pyx_t_8 = 0; goto __pyx_L0; - /* "providers.pxd":420 + /* "providers.pxd":415 * positional_args.extend(args) * * if future_args: # <<<<<<<<<<<<<< @@ -6507,7 +6357,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid */ } - /* "providers.pxd":423 + /* "providers.pxd":418 * return __combine_future_injections(positional_args, future_args) * * return positional_args # <<<<<<<<<<<<<< @@ -6519,7 +6369,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid __pyx_r = __pyx_v_positional_args; goto __pyx_L0; - /* "providers.pxd":395 + /* "providers.pxd":390 * @cython.boundscheck(False) * @cython.wraparound(False) * cdef inline object __provide_positional_args( # <<<<<<<<<<<<<< @@ -6543,7 +6393,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid return __pyx_r; } -/* "providers.pxd":428 +/* "providers.pxd":423 * @cython.boundscheck(False) * @cython.wraparound(False) * cdef inline object __provide_keyword_args( # <<<<<<<<<<<<<< @@ -6576,31 +6426,31 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid __Pyx_RefNannySetupContext("__provide_keyword_args", 0); __Pyx_INCREF(__pyx_v_kwargs); - /* "providers.pxd":437 + /* "providers.pxd":432 * 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, 437, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 432, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_prefixed = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "providers.pxd":438 + /* "providers.pxd":433 * 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, 438, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 433, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_future_kwargs = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "providers.pxd":441 + /* "providers.pxd":436 * cdef NamedInjection kw_injection * * if len(kwargs) == 0: # <<<<<<<<<<<<<< @@ -6609,13 +6459,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, 441, __pyx_L1_error) + __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, 441, __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_3 = ((__pyx_t_2 == 0) != 0); if (__pyx_t_3) { - /* "providers.pxd":442 + /* "providers.pxd":437 * * if len(kwargs) == 0: * for index in range(inj_kwargs_len): # <<<<<<<<<<<<<< @@ -6627,7 +6477,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":443 + /* "providers.pxd":438 * if len(kwargs) == 0: * for index in range(inj_kwargs_len): * kw_injection = inj_kwargs[index] # <<<<<<<<<<<<<< @@ -6636,38 +6486,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, 443, __pyx_L1_error) + __PYX_ERR(1, 438, __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":444 + /* "providers.pxd":439 * 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, 444, __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, 439, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_1); __pyx_t_1 = 0; - /* "providers.pxd":445 + /* "providers.pxd":440 * 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, 445, __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, 440, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_1); __pyx_t_1 = 0; - /* "providers.pxd":446 + /* "providers.pxd":441 * name = __get_name(kw_injection) * value = __get_value(kw_injection) * kwargs[name] = value # <<<<<<<<<<<<<< @@ -6676,11 +6526,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, 446, __pyx_L1_error) + __PYX_ERR(1, 441, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__pyx_v_kwargs, __pyx_v_name, __pyx_v_value) < 0)) __PYX_ERR(1, 446, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_kwargs, __pyx_v_name, __pyx_v_value) < 0)) __PYX_ERR(1, 441, __pyx_L1_error) - /* "providers.pxd":447 + /* "providers.pxd":442 * value = __get_value(kw_injection) * kwargs[name] = value * if async_mode != ASYNC_MODE_DISABLED and __is_future_or_coroutine(value): # <<<<<<<<<<<<<< @@ -6698,14 +6548,14 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid __pyx_L7_bool_binop_done:; if (__pyx_t_3) { - /* "providers.pxd":448 + /* "providers.pxd":443 * 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, 448, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 443, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); @@ -6713,10 +6563,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, 448, __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, 443, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "providers.pxd":447 + /* "providers.pxd":442 * value = __get_value(kw_injection) * kwargs[name] = value * if async_mode != ASYNC_MODE_DISABLED and __is_future_or_coroutine(value): # <<<<<<<<<<<<<< @@ -6726,7 +6576,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid } } - /* "providers.pxd":441 + /* "providers.pxd":436 * cdef NamedInjection kw_injection * * if len(kwargs) == 0: # <<<<<<<<<<<<<< @@ -6736,7 +6586,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid goto __pyx_L3; } - /* "providers.pxd":450 + /* "providers.pxd":445 * future_kwargs.append((name, value)) * else: * kwargs, prefixed = __separate_prefixed_kwargs(kwargs) # <<<<<<<<<<<<<< @@ -6744,7 +6594,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, 450, __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, 445, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (likely(__pyx_t_1 != Py_None)) { PyObject* sequence = __pyx_t_1; @@ -6752,7 +6602,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, 450, __pyx_L1_error) + __PYX_ERR(1, 445, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_9 = PyTuple_GET_ITEM(sequence, 0); @@ -6760,23 +6610,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, 450, __pyx_L1_error) + __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 445, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 450, __pyx_L1_error) + __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 445, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { - __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(1, 450, __pyx_L1_error) + __Pyx_RaiseNoneNotIterableError(); __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, 450, __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, 450, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_t_9))||((__pyx_t_9) == Py_None)||((void)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)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_10)->tp_name), 0))) __PYX_ERR(1, 445, __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":453 + /* "providers.pxd":448 * * * for index in range(inj_kwargs_len): # <<<<<<<<<<<<<< @@ -6788,7 +6638,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":454 + /* "providers.pxd":449 * * for index in range(inj_kwargs_len): * kw_injection = inj_kwargs[index] # <<<<<<<<<<<<<< @@ -6797,26 +6647,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, 454, __pyx_L1_error) + __PYX_ERR(1, 449, __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":455 + /* "providers.pxd":450 * 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, 455, __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, 450, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_1); __pyx_t_1 = 0; - /* "providers.pxd":457 + /* "providers.pxd":452 * name = __get_name(kw_injection) * * if name in kwargs: # <<<<<<<<<<<<<< @@ -6825,13 +6675,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, 457, __pyx_L1_error) + __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, 457, __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_7 = (__pyx_t_3 != 0); if (__pyx_t_7) { - /* "providers.pxd":458 + /* "providers.pxd":453 * * if name in kwargs: * continue # <<<<<<<<<<<<<< @@ -6840,7 +6690,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid */ goto __pyx_L9_continue; - /* "providers.pxd":457 + /* "providers.pxd":452 * name = __get_name(kw_injection) * * if name in kwargs: # <<<<<<<<<<<<<< @@ -6849,7 +6699,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid */ } - /* "providers.pxd":460 + /* "providers.pxd":455 * continue * * if name in prefixed: # <<<<<<<<<<<<<< @@ -6858,13 +6708,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, 460, __pyx_L1_error) + __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, 460, __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_3 = (__pyx_t_7 != 0); if (__pyx_t_3) { - /* "providers.pxd":461 + /* "providers.pxd":456 * * if name in prefixed: * value = __get_value_kwargs(kw_injection, prefixed[name]) # <<<<<<<<<<<<<< @@ -6873,18 +6723,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, 461, __pyx_L1_error) + __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, 461, __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_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, 461, __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, 461, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||((void)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) __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":460 + /* "providers.pxd":455 * continue * * if name in prefixed: # <<<<<<<<<<<<<< @@ -6894,7 +6744,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid goto __pyx_L12; } - /* "providers.pxd":463 + /* "providers.pxd":458 * value = __get_value_kwargs(kw_injection, prefixed[name]) * else: * value = __get_value(kw_injection) # <<<<<<<<<<<<<< @@ -6902,14 +6752,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, 463, __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, 458, __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":465 + /* "providers.pxd":460 * value = __get_value(kw_injection) * * kwargs[name] = value # <<<<<<<<<<<<<< @@ -6918,11 +6768,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, 465, __pyx_L1_error) + __PYX_ERR(1, 460, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__pyx_v_kwargs, __pyx_v_name, __pyx_v_value) < 0)) __PYX_ERR(1, 465, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_kwargs, __pyx_v_name, __pyx_v_value) < 0)) __PYX_ERR(1, 460, __pyx_L1_error) - /* "providers.pxd":466 + /* "providers.pxd":461 * * kwargs[name] = value * if async_mode != ASYNC_MODE_DISABLED and __is_future_or_coroutine(value): # <<<<<<<<<<<<<< @@ -6940,14 +6790,14 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid __pyx_L14_bool_binop_done:; if (__pyx_t_3) { - /* "providers.pxd":467 + /* "providers.pxd":462 * 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, 467, __pyx_L1_error) + __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 462, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_INCREF(__pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); @@ -6955,10 +6805,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, 467, __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, 462, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - /* "providers.pxd":466 + /* "providers.pxd":461 * * kwargs[name] = value * if async_mode != ASYNC_MODE_DISABLED and __is_future_or_coroutine(value): # <<<<<<<<<<<<<< @@ -6971,7 +6821,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid } __pyx_L3:; - /* "providers.pxd":469 + /* "providers.pxd":464 * future_kwargs.append((name, value)) * * if future_kwargs: # <<<<<<<<<<<<<< @@ -6981,7 +6831,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":470 + /* "providers.pxd":465 * * if future_kwargs: * return __combine_future_injections(kwargs, future_kwargs) # <<<<<<<<<<<<<< @@ -6989,13 +6839,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, 470, __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, 465, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_r = __pyx_t_10; __pyx_t_10 = 0; goto __pyx_L0; - /* "providers.pxd":469 + /* "providers.pxd":464 * future_kwargs.append((name, value)) * * if future_kwargs: # <<<<<<<<<<<<<< @@ -7004,7 +6854,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid */ } - /* "providers.pxd":472 + /* "providers.pxd":467 * return __combine_future_injections(kwargs, future_kwargs) * * return kwargs # <<<<<<<<<<<<<< @@ -7016,7 +6866,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid __pyx_r = __pyx_v_kwargs; goto __pyx_L0; - /* "providers.pxd":428 + /* "providers.pxd":423 * @cython.boundscheck(False) * @cython.wraparound(False) * cdef inline object __provide_keyword_args( # <<<<<<<<<<<<<< @@ -7043,7 +6893,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid return __pyx_r; } -/* "providers.pxd":475 +/* "providers.pxd":470 * * * cdef inline object __combine_future_injections(object injections, list future_injections): # <<<<<<<<<<<<<< @@ -7073,16 +6923,16 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___combin int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__combine_future_injections", 0); - /* "providers.pxd":476 + /* "providers.pxd":471 * * 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, 476, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 471, __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, 476, __pyx_L1_error) + __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_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -7097,37 +6947,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, 476, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 471, __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":478 + /* "providers.pxd":473 * 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, 478, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 473, __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, 478, __pyx_L1_error) + __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_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, 478, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 473, __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, 478, __pyx_L1_error) + __PYX_ERR(1, 473, __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, 478, __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, 473, __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, 478, __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, 473, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) { @@ -7136,7 +6986,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, 478, __pyx_L1_error) + __PYX_ERR(1, 473, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -7149,15 +6999,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, 478, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 473, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 478, __pyx_L1_error) + __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 473, __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, 478, __pyx_L1_error) + __pyx_t_8 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 473, __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; @@ -7165,7 +7015,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, 478, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(1, 473, __pyx_L1_error) __pyx_t_9 = NULL; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L6_unpacking_done; @@ -7173,60 +7023,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, 478, __pyx_L1_error) + __PYX_ERR(1, 473, __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, 478, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_v_value))) __PYX_ERR(1, 473, __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, 478, __pyx_L1_error) + __pyx_t_2 = PySequence_Tuple(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 473, __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, 478, __pyx_L1_error) + __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_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":479 + /* "providers.pxd":474 * * 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, 479, __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, 474, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - /* "providers.pxd":480 + /* "providers.pxd":475 * 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, 480, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_functools); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 475, __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, 480, __pyx_L1_error) + __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_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "providers.pxd":481 + /* "providers.pxd":476 * 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, 481, __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, 476, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - /* "providers.pxd":484 + /* "providers.pxd":479 * future_result, * injections, * future_injections, # <<<<<<<<<<<<<< @@ -7248,7 +7098,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, 480, __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, 475, __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; @@ -7257,14 +7107,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, 480, __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, 475, __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, 480, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(4+__pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 475, __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; @@ -7281,7 +7131,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, 480, __pyx_L1_error) + __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_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } @@ -7299,21 +7149,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, 479, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 474, __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":487 + /* "providers.pxd":482 * ), * ) * 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, 487, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 482, __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, 487, __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, 482, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -7328,12 +7178,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, 487, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 482, __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":489 + /* "providers.pxd":484 * asyncio.ensure_future(injections_ready) * * return future_result # <<<<<<<<<<<<<< @@ -7345,7 +7195,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___combin __pyx_r = __pyx_v_future_result; goto __pyx_L0; - /* "providers.pxd":475 + /* "providers.pxd":470 * * * cdef inline object __combine_future_injections(object injections, list future_injections): # <<<<<<<<<<<<<< @@ -7374,7 +7224,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___combin return __pyx_r; } -/* "providers.pxd":492 +/* "providers.pxd":487 * * * cdef inline void __async_prepare_args_kwargs_callback( # <<<<<<<<<<<<<< @@ -7408,7 +7258,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":498 + /* "providers.pxd":493 * object future, * ): * try: # <<<<<<<<<<<<<< @@ -7424,14 +7274,14 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_prepa __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "providers.pxd":499 + /* "providers.pxd":494 * ): * 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, 499, __pyx_L3_error) + __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_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -7445,20 +7295,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, 499, __pyx_L3_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 494, __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":500 + /* "providers.pxd":495 * 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, 500, __pyx_L3_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 495, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_result); __Pyx_GIVEREF(__pyx_v_result); @@ -7466,16 +7316,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, 500, __pyx_L3_error) + __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_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, 500, __pyx_L3_error) + __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_GOTREF(__pyx_t_4); - __pyx_t_8 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 500, __pyx_L3_error) + __pyx_t_8 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 495, __pyx_L3_error) } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; for (;;) { @@ -7483,17 +7333,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, 500, __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, 495, __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, 500, __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, 495, __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, 500, __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, 495, __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, 500, __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, 495, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); #endif } @@ -7503,7 +7353,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, 500, __pyx_L3_error) + else __PYX_ERR(1, 495, __pyx_L3_error) } break; } @@ -7515,7 +7365,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, 500, __pyx_L3_error) + __PYX_ERR(1, 495, __pyx_L3_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -7528,15 +7378,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, 500, __pyx_L3_error) + __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 495, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 500, __pyx_L3_error) + __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 495, __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, 500, __pyx_L3_error) + __pyx_t_10 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 495, __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; @@ -7544,7 +7394,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, 500, __pyx_L3_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 2) < 0) __PYX_ERR(1, 495, __pyx_L3_error) __pyx_t_11 = NULL; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L12_unpacking_done; @@ -7552,7 +7402,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, 500, __pyx_L3_error) + __PYX_ERR(1, 495, __pyx_L3_error) __pyx_L12_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_6); @@ -7563,7 +7413,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, 500, __pyx_L3_error) + __PYX_ERR(1, 495, __pyx_L3_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -7576,15 +7426,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, 500, __pyx_L3_error) + __pyx_t_10 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 495, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_12 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 500, __pyx_L3_error) + __pyx_t_12 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 495, __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, 500, __pyx_L3_error) + __pyx_t_13 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 495, __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; @@ -7592,7 +7442,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, 500, __pyx_L3_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_13), 2) < 0) __PYX_ERR(1, 495, __pyx_L3_error) __pyx_t_11 = NULL; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L14_unpacking_done; @@ -7600,7 +7450,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, 500, __pyx_L3_error) + __PYX_ERR(1, 495, __pyx_L3_error) __pyx_L14_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_10); @@ -7608,16 +7458,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":501 + /* "providers.pxd":496 * 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, 501, __pyx_L3_error) + if (unlikely(PyObject_SetItem(__pyx_v_args, __pyx_v_key, __pyx_v_value) < 0)) __PYX_ERR(1, 496, __pyx_L3_error) - /* "providers.pxd":500 + /* "providers.pxd":495 * try: * result = future.result() * for value, (key, _) in zip(result, future_args_kwargs): # <<<<<<<<<<<<<< @@ -7627,7 +7477,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_prepa } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "providers.pxd":498 + /* "providers.pxd":493 * object future, * ): * try: # <<<<<<<<<<<<<< @@ -7636,7 +7486,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_prepa */ } - /* "providers.pxd":505 + /* "providers.pxd":500 * future_result.set_exception(exception) * else: * future_result.set_result(args) # <<<<<<<<<<<<<< @@ -7644,7 +7494,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, 505, __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, 500, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -7658,7 +7508,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, 505, __pyx_L5_except_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 500, __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; @@ -7676,7 +7526,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":502 + /* "providers.pxd":497 * for value, (key, _) in zip(result, future_args_kwargs): * args[key] = value * except Exception as exception: # <<<<<<<<<<<<<< @@ -7686,21 +7536,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, 502, __pyx_L5_except_error) + if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_9) < 0) __PYX_ERR(1, 497, __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":503 + /* "providers.pxd":498 * 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, 503, __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, 498, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) { @@ -7714,7 +7564,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, 503, __pyx_L5_except_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 498, __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; @@ -7726,7 +7576,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_prepa goto __pyx_L5_except_error; __pyx_L5_except_error:; - /* "providers.pxd":498 + /* "providers.pxd":493 * object future, * ): * try: # <<<<<<<<<<<<<< @@ -7746,7 +7596,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_prepa __pyx_L8_try_end:; } - /* "providers.pxd":492 + /* "providers.pxd":487 * * * cdef inline void __async_prepare_args_kwargs_callback( # <<<<<<<<<<<<<< @@ -7774,7 +7624,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_prepa __Pyx_RefNannyFinishContext(); } -/* "providers.pxd":510 +/* "providers.pxd":505 * @cython.boundscheck(False) * @cython.wraparound(False) * cdef inline object __provide_attributes(tuple attributes, int attributes_len): # <<<<<<<<<<<<<< @@ -7802,31 +7652,31 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__provide_attributes", 0); - /* "providers.pxd":512 + /* "providers.pxd":507 * 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, 512, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 507, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_attribute_injections = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "providers.pxd":513 + /* "providers.pxd":508 * 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, 513, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 508, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_future_attributes = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "providers.pxd":515 + /* "providers.pxd":510 * cdef list future_attributes = [] * * for index in range(attributes_len): # <<<<<<<<<<<<<< @@ -7838,7 +7688,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":516 + /* "providers.pxd":511 * * for index in range(attributes_len): * attr_injection = attributes[index] # <<<<<<<<<<<<<< @@ -7847,47 +7697,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, 516, __pyx_L1_error) + __PYX_ERR(1, 511, __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":517 + /* "providers.pxd":512 * 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, 517, __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, 512, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_1); __pyx_t_1 = 0; - /* "providers.pxd":518 + /* "providers.pxd":513 * 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, 518, __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, 513, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_1); __pyx_t_1 = 0; - /* "providers.pxd":519 + /* "providers.pxd":514 * 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, 519, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_attribute_injections, __pyx_v_name, __pyx_v_value) < 0)) __PYX_ERR(1, 514, __pyx_L1_error) - /* "providers.pxd":520 + /* "providers.pxd":515 * value = __get_value(attr_injection) * attribute_injections[name] = value * if __is_future_or_coroutine(value): # <<<<<<<<<<<<<< @@ -7897,14 +7747,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":521 + /* "providers.pxd":516 * 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, 521, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 516, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); @@ -7912,10 +7762,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, 521, __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, 516, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "providers.pxd":520 + /* "providers.pxd":515 * value = __get_value(attr_injection) * attribute_injections[name] = value * if __is_future_or_coroutine(value): # <<<<<<<<<<<<<< @@ -7925,7 +7775,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid } } - /* "providers.pxd":523 + /* "providers.pxd":518 * future_attributes.append((name, value)) * * if future_attributes: # <<<<<<<<<<<<<< @@ -7935,7 +7785,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":524 + /* "providers.pxd":519 * * if future_attributes: * return __combine_future_injections(attribute_injections, future_attributes) # <<<<<<<<<<<<<< @@ -7943,13 +7793,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, 524, __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, 519, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "providers.pxd":523 + /* "providers.pxd":518 * future_attributes.append((name, value)) * * if future_attributes: # <<<<<<<<<<<<<< @@ -7958,7 +7808,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid */ } - /* "providers.pxd":526 + /* "providers.pxd":521 * return __combine_future_injections(attribute_injections, future_attributes) * * return attribute_injections # <<<<<<<<<<<<<< @@ -7970,7 +7820,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid __pyx_r = __pyx_v_attribute_injections; goto __pyx_L0; - /* "providers.pxd":510 + /* "providers.pxd":505 * @cython.boundscheck(False) * @cython.wraparound(False) * cdef inline object __provide_attributes(tuple attributes, int attributes_len): # <<<<<<<<<<<<<< @@ -7994,7 +7844,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___provid return __pyx_r; } -/* "providers.pxd":529 +/* "providers.pxd":524 * * * cdef inline object __async_inject_attributes(future_instance, future_attributes): # <<<<<<<<<<<<<< @@ -8020,16 +7870,16 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___async_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__async_inject_attributes", 0); - /* "providers.pxd":530 + /* "providers.pxd":525 * * 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, 530, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 525, __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, 530, __pyx_L1_error) + __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_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -8044,22 +7894,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, 530, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 525, __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":532 + /* "providers.pxd":527 * 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, 532, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 527, __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, 532, __pyx_L1_error) + __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_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -8077,7 +7927,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, 532, __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, 527, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -8085,13 +7935,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, 532, __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, 527, __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, 532, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 527, __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; @@ -8102,7 +7952,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, 532, __pyx_L1_error) + __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_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } @@ -8110,40 +7960,40 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___async_ __pyx_v_attributes_ready = __pyx_t_1; __pyx_t_1 = 0; - /* "providers.pxd":533 + /* "providers.pxd":528 * * 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, 533, __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, 528, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - /* "providers.pxd":534 + /* "providers.pxd":529 * 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, 534, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_functools); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 529, __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, 534, __pyx_L1_error) + __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_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "providers.pxd":535 + /* "providers.pxd":530 * 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, 535, __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, 530, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - /* "providers.pxd":536 + /* "providers.pxd":531 * functools.partial( * __async_inject_attributes_callback, * future_result, # <<<<<<<<<<<<<< @@ -8165,7 +8015,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, 534, __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, 529, __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; @@ -8174,14 +8024,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, 534, __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, 529, __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, 534, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 529, __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; @@ -8192,7 +8042,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, 534, __pyx_L1_error) + __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_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } @@ -8210,21 +8060,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, 533, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 528, __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":539 + /* "providers.pxd":534 * ), * ) * 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, 539, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 534, __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, 539, __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, 534, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -8239,12 +8089,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, 539, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 534, __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":541 + /* "providers.pxd":536 * asyncio.ensure_future(attributes_ready) * * return future_result # <<<<<<<<<<<<<< @@ -8256,7 +8106,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___async_ __pyx_r = __pyx_v_future_result; goto __pyx_L0; - /* "providers.pxd":529 + /* "providers.pxd":524 * * * cdef inline object __async_inject_attributes(future_instance, future_attributes): # <<<<<<<<<<<<<< @@ -8283,7 +8133,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___async_ return __pyx_r; } -/* "providers.pxd":544 +/* "providers.pxd":539 * * * cdef inline void __async_inject_attributes_callback(object future_result, object future): # <<<<<<<<<<<<<< @@ -8317,7 +8167,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":545 + /* "providers.pxd":540 * * cdef inline void __async_inject_attributes_callback(object future_result, object future): * try: # <<<<<<<<<<<<<< @@ -8333,14 +8183,14 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_injec __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "providers.pxd":546 + /* "providers.pxd":541 * 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, 546, __pyx_L3_error) + __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_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -8354,7 +8204,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, 546, __pyx_L3_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 541, __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))) { @@ -8363,7 +8213,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, 546, __pyx_L3_error) + __PYX_ERR(1, 541, __pyx_L3_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -8376,15 +8226,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, 546, __pyx_L3_error) + __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 541, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 546, __pyx_L3_error) + __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 541, __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, 546, __pyx_L3_error) + __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 541, __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; @@ -8392,7 +8242,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, 546, __pyx_L3_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(1, 541, __pyx_L3_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L10_unpacking_done; @@ -8400,7 +8250,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, 546, __pyx_L3_error) + __PYX_ERR(1, 541, __pyx_L3_error) __pyx_L10_unpacking_done:; } __pyx_v_instance = __pyx_t_5; @@ -8408,14 +8258,14 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_injec __pyx_v_attributes = __pyx_t_6; __pyx_t_6 = 0; - /* "providers.pxd":548 + /* "providers.pxd":543 * 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, 548, __pyx_L3_error) + __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_GOTREF(__pyx_t_6); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { @@ -8429,16 +8279,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, 548, __pyx_L3_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 543, __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, 548, __pyx_L3_error) + __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_GOTREF(__pyx_t_6); - __pyx_t_10 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 548, __pyx_L3_error) + __pyx_t_10 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 543, __pyx_L3_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { @@ -8446,17 +8296,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, 548, __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, 543, __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, 548, __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, 543, __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, 548, __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, 543, __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, 548, __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, 543, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); #endif } @@ -8466,7 +8316,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, 548, __pyx_L3_error) + else __PYX_ERR(1, 543, __pyx_L3_error) } break; } @@ -8478,7 +8328,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, 548, __pyx_L3_error) + __PYX_ERR(1, 543, __pyx_L3_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -8491,15 +8341,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, 548, __pyx_L3_error) + __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 543, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 548, __pyx_L3_error) + __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 543, __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, 548, __pyx_L3_error) + __pyx_t_11 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 543, __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; @@ -8507,7 +8357,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, 548, __pyx_L3_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_11), 2) < 0) __PYX_ERR(1, 543, __pyx_L3_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L14_unpacking_done; @@ -8515,7 +8365,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, 548, __pyx_L3_error) + __PYX_ERR(1, 543, __pyx_L3_error) __pyx_L14_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_5); @@ -8523,16 +8373,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":549 + /* "providers.pxd":544 * * 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, 549, __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, 544, __pyx_L3_error) - /* "providers.pxd":548 + /* "providers.pxd":543 * instance, attributes = future.result() * * for name, value in attributes.items(): # <<<<<<<<<<<<<< @@ -8542,7 +8392,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_injec } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "providers.pxd":545 + /* "providers.pxd":540 * * cdef inline void __async_inject_attributes_callback(object future_result, object future): * try: # <<<<<<<<<<<<<< @@ -8551,7 +8401,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_injec */ } - /* "providers.pxd":553 + /* "providers.pxd":548 * future_result.set_exception(exception) * else: * future_result.set_result(instance) # <<<<<<<<<<<<<< @@ -8559,7 +8409,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, 553, __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, 548, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -8573,7 +8423,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, 553, __pyx_L5_except_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 548, __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; @@ -8589,7 +8439,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":550 + /* "providers.pxd":545 * for name, value in attributes.items(): * setattr(instance, name, value) * except Exception as exception: # <<<<<<<<<<<<<< @@ -8599,21 +8449,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, 550, __pyx_L5_except_error) + if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_4, &__pyx_t_7) < 0) __PYX_ERR(1, 545, __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":551 + /* "providers.pxd":546 * 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, 551, __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, 546, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_14 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) { @@ -8627,7 +8477,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, 551, __pyx_L5_except_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 546, __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; @@ -8639,7 +8489,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_injec goto __pyx_L5_except_error; __pyx_L5_except_error:; - /* "providers.pxd":545 + /* "providers.pxd":540 * * cdef inline void __async_inject_attributes_callback(object future_result, object future): * try: # <<<<<<<<<<<<<< @@ -8659,7 +8509,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_injec __pyx_L8_try_end:; } - /* "providers.pxd":544 + /* "providers.pxd":539 * * * cdef inline void __async_inject_attributes_callback(object future_result, object future): # <<<<<<<<<<<<<< @@ -8686,7 +8536,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_injec __Pyx_RefNannyFinishContext(); } -/* "providers.pxd":556 +/* "providers.pxd":551 * * * cdef inline void __inject_attributes(object instance, dict attributes): # <<<<<<<<<<<<<< @@ -8712,7 +8562,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___inject_attr int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__inject_attributes", 0); - /* "providers.pxd":557 + /* "providers.pxd":552 * * cdef inline void __inject_attributes(object instance, dict attributes): * for name, value in attributes.items(): # <<<<<<<<<<<<<< @@ -8721,17 +8571,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, 557, __pyx_L1_error) + __PYX_ERR(1, 552, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_Items(__pyx_v_attributes); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 557, __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_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, 557, __pyx_L1_error) + __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_GOTREF(__pyx_t_2); - __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 557, __pyx_L1_error) + __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 552, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -8739,17 +8589,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, 557, __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, 552, __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, 557, __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, 552, __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, 557, __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, 552, __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, 557, __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, 552, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -8759,7 +8609,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, 557, __pyx_L1_error) + else __PYX_ERR(1, 552, __pyx_L1_error) } break; } @@ -8771,7 +8621,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, 557, __pyx_L1_error) + __PYX_ERR(1, 552, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -8784,15 +8634,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, 557, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 552, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 557, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 552, __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, 557, __pyx_L1_error) + __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 552, __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; @@ -8800,7 +8650,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, 557, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(1, 552, __pyx_L1_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L6_unpacking_done; @@ -8808,7 +8658,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, 557, __pyx_L1_error) + __PYX_ERR(1, 552, __pyx_L1_error) __pyx_L6_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_5); @@ -8816,16 +8666,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":558 + /* "providers.pxd":553 * 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, 558, __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, 553, __pyx_L1_error) - /* "providers.pxd":557 + /* "providers.pxd":552 * * cdef inline void __inject_attributes(object instance, dict attributes): * for name, value in attributes.items(): # <<<<<<<<<<<<<< @@ -8835,7 +8685,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___inject_attr } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "providers.pxd":556 + /* "providers.pxd":551 * * * cdef inline void __inject_attributes(object instance, dict attributes): # <<<<<<<<<<<<<< @@ -8858,7 +8708,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___inject_attr __Pyx_RefNannyFinishContext(); } -/* "providers.pxd":561 +/* "providers.pxd":556 * * * cdef inline object __call( # <<<<<<<<<<<<<< @@ -8892,31 +8742,31 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___call(P int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__call", 0); - /* "providers.pxd":571 + /* "providers.pxd":566 * 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, 571, __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, 566, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_args = __pyx_t_1; __pyx_t_1 = 0; - /* "providers.pxd":577 + /* "providers.pxd":572 * 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, 577, __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, 572, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_kwargs = __pyx_t_1; __pyx_t_1 = 0; - /* "providers.pxd":584 + /* "providers.pxd":579 * ) * * if async_mode == ASYNC_MODE_DISABLED: # <<<<<<<<<<<<<< @@ -8926,7 +8776,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":585 + /* "providers.pxd":580 * * if async_mode == ASYNC_MODE_DISABLED: * return call(*args, **kwargs) # <<<<<<<<<<<<<< @@ -8934,20 +8784,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, 585, __pyx_L1_error) + __pyx_t_1 = __Pyx_PySequence_Tuple(__pyx_v_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 580, __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, 585, __pyx_L1_error) + __PYX_ERR(1, 580, __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, 585, __pyx_L1_error) + __pyx_t_3 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 580, __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, 585, __pyx_L1_error) + __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_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, 585, __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, 580, __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; @@ -8955,7 +8805,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___call(P __pyx_t_4 = 0; goto __pyx_L0; - /* "providers.pxd":584 + /* "providers.pxd":579 * ) * * if async_mode == ASYNC_MODE_DISABLED: # <<<<<<<<<<<<<< @@ -8964,7 +8814,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___call(P */ } - /* "providers.pxd":587 + /* "providers.pxd":582 * return call(*args, **kwargs) * * cdef bint is_future_args = __is_future_or_coroutine(args) # <<<<<<<<<<<<<< @@ -8973,7 +8823,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":588 + /* "providers.pxd":583 * * cdef bint is_future_args = __is_future_or_coroutine(args) * cdef bint is_future_kwargs = __is_future_or_coroutine(kwargs) # <<<<<<<<<<<<<< @@ -8982,7 +8832,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":590 + /* "providers.pxd":585 * cdef bint is_future_kwargs = __is_future_or_coroutine(kwargs) * * if is_future_args or is_future_kwargs: # <<<<<<<<<<<<<< @@ -9000,7 +8850,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___call(P __pyx_L5_bool_binop_done:; if (__pyx_t_2) { - /* "providers.pxd":591 + /* "providers.pxd":586 * * if is_future_args or is_future_kwargs: * future_args = args if is_future_args else __future_result(args) # <<<<<<<<<<<<<< @@ -9011,7 +8861,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, 591, __pyx_L1_error) + __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_GOTREF(__pyx_t_3); __pyx_t_4 = __pyx_t_3; __pyx_t_3 = 0; @@ -9019,7 +8869,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":592 + /* "providers.pxd":587 * 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) # <<<<<<<<<<<<<< @@ -9030,7 +8880,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, 592, __pyx_L1_error) + __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_GOTREF(__pyx_t_3); __pyx_t_4 = __pyx_t_3; __pyx_t_3 = 0; @@ -9038,16 +8888,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":594 + /* "providers.pxd":589 * 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, 594, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 589, __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, 594, __pyx_L1_error) + __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_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -9062,22 +8912,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, 594, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 589, __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":596 + /* "providers.pxd":591 * 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, 596, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 591, __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, 596, __pyx_L1_error) + __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_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = NULL; @@ -9095,7 +8945,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, 596, __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, 591, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_4); } else @@ -9103,13 +8953,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, 596, __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, 591, __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, 596, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 591, __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; @@ -9120,7 +8970,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, 596, __pyx_L1_error) + __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_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } @@ -9128,40 +8978,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":597 + /* "providers.pxd":592 * * 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, 597, __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, 592, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - /* "providers.pxd":598 + /* "providers.pxd":593 * 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, 598, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_functools); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 593, __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, 598, __pyx_L1_error) + __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_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "providers.pxd":599 + /* "providers.pxd":594 * 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, 599, __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, 594, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - /* "providers.pxd":601 + /* "providers.pxd":596 * __async_call_callback, * future_result, * call, # <<<<<<<<<<<<<< @@ -9183,7 +9033,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, 598, __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, 593, __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; @@ -9192,14 +9042,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, 598, __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, 593, __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, 598, __pyx_L1_error) + __pyx_t_10 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 593, __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; @@ -9213,7 +9063,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, 598, __pyx_L1_error) + __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_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } @@ -9231,21 +9081,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, 597, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 592, __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":604 + /* "providers.pxd":599 * ), * ) * 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, 604, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 599, __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, 604, __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, 599, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -9260,12 +9110,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, 604, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 599, __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":606 + /* "providers.pxd":601 * asyncio.ensure_future(args_kwargs_ready) * * return future_result # <<<<<<<<<<<<<< @@ -9277,7 +9127,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___call(P __pyx_r = __pyx_v_future_result; goto __pyx_L0; - /* "providers.pxd":590 + /* "providers.pxd":585 * cdef bint is_future_kwargs = __is_future_or_coroutine(kwargs) * * if is_future_args or is_future_kwargs: # <<<<<<<<<<<<<< @@ -9286,7 +9136,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___call(P */ } - /* "providers.pxd":608 + /* "providers.pxd":603 * return future_result * * return call(*args, **kwargs) # <<<<<<<<<<<<<< @@ -9294,20 +9144,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, 608, __pyx_L1_error) + __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_v_args); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 603, __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, 608, __pyx_L1_error) + __PYX_ERR(1, 603, __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, 608, __pyx_L1_error) + __pyx_t_7 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 603, __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, 608, __pyx_L1_error) + __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_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, 608, __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, 603, __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; @@ -9315,7 +9165,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___call(P __pyx_t_3 = 0; goto __pyx_L0; - /* "providers.pxd":561 + /* "providers.pxd":556 * * * cdef inline object __call( # <<<<<<<<<<<<<< @@ -9346,7 +9196,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___call(P return __pyx_r; } -/* "providers.pxd":611 +/* "providers.pxd":606 * * * cdef inline void __async_call_callback(object future_result, object call, object future): # <<<<<<<<<<<<<< @@ -9378,7 +9228,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_call_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__async_call_callback", 0); - /* "providers.pxd":612 + /* "providers.pxd":607 * * cdef inline void __async_call_callback(object future_result, object call, object future): * try: # <<<<<<<<<<<<<< @@ -9394,14 +9244,14 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_call_ __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "providers.pxd":613 + /* "providers.pxd":608 * 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, 613, __pyx_L3_error) + __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_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -9415,7 +9265,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, 613, __pyx_L3_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 608, __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))) { @@ -9424,7 +9274,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, 613, __pyx_L3_error) + __PYX_ERR(1, 608, __pyx_L3_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -9437,15 +9287,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, 613, __pyx_L3_error) + __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 608, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 613, __pyx_L3_error) + __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 608, __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, 613, __pyx_L3_error) + __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 608, __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; @@ -9453,7 +9303,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, 613, __pyx_L3_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(1, 608, __pyx_L3_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L10_unpacking_done; @@ -9461,7 +9311,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, 613, __pyx_L3_error) + __PYX_ERR(1, 608, __pyx_L3_error) __pyx_L10_unpacking_done:; } __pyx_v_args = __pyx_t_5; @@ -9469,34 +9319,34 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_call_ __pyx_v_kwargs = __pyx_t_6; __pyx_t_6 = 0; - /* "providers.pxd":614 + /* "providers.pxd":609 * 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, 614, __pyx_L3_error) + __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_v_args); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 609, __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, 614, __pyx_L3_error) + __PYX_ERR(1, 609, __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, 614, __pyx_L3_error) + __pyx_t_6 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 609, __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, 614, __pyx_L3_error) + __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_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, 614, __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, 609, __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":612 + /* "providers.pxd":607 * * cdef inline void __async_call_callback(object future_result, object call, object future): * try: # <<<<<<<<<<<<<< @@ -9505,7 +9355,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_call_ */ } - /* "providers.pxd":618 + /* "providers.pxd":613 * future_result.set_exception(exception) * else: * if __is_future_or_coroutine(result): # <<<<<<<<<<<<<< @@ -9516,16 +9366,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":619 + /* "providers.pxd":614 * 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, 619, __pyx_L5_except_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 614, __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, 619, __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, 614, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; @@ -9540,27 +9390,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, 619, __pyx_L5_except_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 614, __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":620 + /* "providers.pxd":615 * 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, 620, __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, 615, __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, 620, __pyx_L5_except_error) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_functools); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 615, __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, 620, __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, 615, __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, 620, __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, 615, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_11 = NULL; __pyx_t_12 = 0; @@ -9577,7 +9427,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, 620, __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, 615, __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; @@ -9586,14 +9436,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, 620, __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, 615, __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, 620, __pyx_L5_except_error) + __pyx_t_13 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 615, __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; @@ -9604,7 +9454,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, 620, __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, 615, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } @@ -9622,12 +9472,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, 620, __pyx_L5_except_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 615, __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":621 + /* "providers.pxd":616 * result = asyncio.ensure_future(result) * result.add_done_callback(functools.partial(__async_result_callback, future_result)) * return # <<<<<<<<<<<<<< @@ -9636,7 +9486,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_call_ */ goto __pyx_L6_except_return; - /* "providers.pxd":618 + /* "providers.pxd":613 * future_result.set_exception(exception) * else: * if __is_future_or_coroutine(result): # <<<<<<<<<<<<<< @@ -9645,14 +9495,14 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_call_ */ } - /* "providers.pxd":622 + /* "providers.pxd":617 * 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, 622, __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, 617, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -9666,7 +9516,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, 622, __pyx_L5_except_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 617, __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; @@ -9681,7 +9531,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":615 + /* "providers.pxd":610 * args, kwargs = future.result() * result = call(*args, **kwargs) * except Exception as exception: # <<<<<<<<<<<<<< @@ -9691,21 +9541,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, 615, __pyx_L5_except_error) + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_6) < 0) __PYX_ERR(1, 610, __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":616 + /* "providers.pxd":611 * 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, 616, __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, 611, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_13))) { @@ -9719,7 +9569,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, 616, __pyx_L5_except_error) + if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 611, __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; @@ -9731,7 +9581,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_call_ goto __pyx_L5_except_error; __pyx_L5_except_error:; - /* "providers.pxd":612 + /* "providers.pxd":607 * * cdef inline void __async_call_callback(object future_result, object call, object future): * try: # <<<<<<<<<<<<<< @@ -9757,7 +9607,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_call_ __pyx_L8_try_end:; } - /* "providers.pxd":611 + /* "providers.pxd":606 * * * cdef inline void __async_call_callback(object future_result, object call, object future): # <<<<<<<<<<<<<< @@ -9784,7 +9634,7 @@ static CYTHON_INLINE void __pyx_f_19dependency_injector_9providers___async_call_ __Pyx_RefNannyFinishContext(); } -/* "providers.pxd":625 +/* "providers.pxd":620 * * * cdef inline object __async_result_callback(object future_result, object future): # <<<<<<<<<<<<<< @@ -9812,7 +9662,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___async_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__async_result_callback", 0); - /* "providers.pxd":626 + /* "providers.pxd":621 * * cdef inline object __async_result_callback(object future_result, object future): * try: # <<<<<<<<<<<<<< @@ -9828,14 +9678,14 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___async_ __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "providers.pxd":627 + /* "providers.pxd":622 * 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, 627, __pyx_L3_error) + __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_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -9849,13 +9699,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, 627, __pyx_L3_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 622, __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":626 + /* "providers.pxd":621 * * cdef inline object __async_result_callback(object future_result, object future): * try: # <<<<<<<<<<<<<< @@ -9864,7 +9714,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___async_ */ } - /* "providers.pxd":631 + /* "providers.pxd":626 * future_result.set_exception(exception) * else: * future_result.set_result(result) # <<<<<<<<<<<<<< @@ -9872,7 +9722,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, 631, __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, 626, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -9886,7 +9736,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, 631, __pyx_L5_except_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 626, __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; @@ -9900,7 +9750,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":628 + /* "providers.pxd":623 * try: * result = future.result() * except Exception as exception: # <<<<<<<<<<<<<< @@ -9910,21 +9760,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, 628, __pyx_L5_except_error) + if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6) < 0) __PYX_ERR(1, 623, __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":629 + /* "providers.pxd":624 * 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, 629, __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, 624, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { @@ -9938,7 +9788,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, 629, __pyx_L5_except_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 624, __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; @@ -9950,7 +9800,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___async_ goto __pyx_L5_except_error; __pyx_L5_except_error:; - /* "providers.pxd":626 + /* "providers.pxd":621 * * cdef inline object __async_result_callback(object future_result, object future): * try: # <<<<<<<<<<<<<< @@ -9970,7 +9820,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___async_ __pyx_L8_try_end:; } - /* "providers.pxd":625 + /* "providers.pxd":620 * * * cdef inline object __async_result_callback(object future_result, object future): # <<<<<<<<<<<<<< @@ -9998,7 +9848,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___async_ return __pyx_r; } -/* "providers.pxd":634 +/* "providers.pxd":629 * * * cdef inline object __callable_call(Callable self, tuple args, dict kwargs, ): # <<<<<<<<<<<<<< @@ -10018,7 +9868,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___callab int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__callable_call", 0); - /* "providers.pxd":635 + /* "providers.pxd":630 * * cdef inline object __callable_call(Callable self, tuple args, dict kwargs, ): * return __call( # <<<<<<<<<<<<<< @@ -10027,7 +9877,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___callab */ __Pyx_XDECREF(__pyx_r); - /* "providers.pxd":636 + /* "providers.pxd":631 * cdef inline object __callable_call(Callable self, tuple args, dict kwargs, ): * return __call( * self.__provides, # <<<<<<<<<<<<<< @@ -10037,7 +9887,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":638 + /* "providers.pxd":633 * self.__provides, * args, * self.__args, # <<<<<<<<<<<<<< @@ -10047,7 +9897,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":641 + /* "providers.pxd":636 * self.__args_len, * kwargs, * self.__kwargs, # <<<<<<<<<<<<<< @@ -10057,14 +9907,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":635 + /* "providers.pxd":630 * * 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, 635, __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, 630, __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; @@ -10073,7 +9923,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___callab __pyx_t_4 = 0; goto __pyx_L0; - /* "providers.pxd":634 + /* "providers.pxd":629 * * * cdef inline object __callable_call(Callable self, tuple args, dict kwargs, ): # <<<<<<<<<<<<<< @@ -10095,7 +9945,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___callab return __pyx_r; } -/* "providers.pxd":647 +/* "providers.pxd":642 * * * cdef inline object __factory_call(Factory self, tuple args, dict kwargs): # <<<<<<<<<<<<<< @@ -10123,7 +9973,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___factor int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__factory_call", 0); - /* "providers.pxd":651 + /* "providers.pxd":646 * * instance = __call( * self.__instantiator.__provides, # <<<<<<<<<<<<<< @@ -10133,7 +9983,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":653 + /* "providers.pxd":648 * self.__instantiator.__provides, * args, * self.__instantiator.__args, # <<<<<<<<<<<<<< @@ -10143,7 +9993,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":656 + /* "providers.pxd":651 * self.__instantiator.__args_len, * kwargs, * self.__instantiator.__kwargs, # <<<<<<<<<<<<<< @@ -10153,14 +10003,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":650 + /* "providers.pxd":645 * 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, 650, __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, 645, __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; @@ -10168,7 +10018,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___factor __pyx_v_instance = __pyx_t_4; __pyx_t_4 = 0; - /* "providers.pxd":661 + /* "providers.pxd":656 * ) * * if self.__attributes_len > 0: # <<<<<<<<<<<<<< @@ -10178,7 +10028,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":662 + /* "providers.pxd":657 * * if self.__attributes_len > 0: * attributes = __provide_attributes(self.__attributes, self.__attributes_len) # <<<<<<<<<<<<<< @@ -10187,13 +10037,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, 662, __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, 657, __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":664 + /* "providers.pxd":659 * attributes = __provide_attributes(self.__attributes, self.__attributes_len) * * is_future_instance = __is_future_or_coroutine(instance) # <<<<<<<<<<<<<< @@ -10202,7 +10052,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":665 + /* "providers.pxd":660 * * is_future_instance = __is_future_or_coroutine(instance) * is_future_attributes = __is_future_or_coroutine(attributes) # <<<<<<<<<<<<<< @@ -10211,7 +10061,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":667 + /* "providers.pxd":662 * is_future_attributes = __is_future_or_coroutine(attributes) * * if is_future_instance or is_future_attributes: # <<<<<<<<<<<<<< @@ -10229,7 +10079,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___factor __pyx_L5_bool_binop_done:; if (__pyx_t_5) { - /* "providers.pxd":668 + /* "providers.pxd":663 * * if is_future_instance or is_future_attributes: * future_instance = instance if is_future_instance else __future_result(instance) # <<<<<<<<<<<<<< @@ -10240,7 +10090,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, 668, __pyx_L1_error) + __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_GOTREF(__pyx_t_4); __pyx_t_3 = __pyx_t_4; __pyx_t_4 = 0; @@ -10248,7 +10098,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___factor __pyx_v_future_instance = __pyx_t_3; __pyx_t_3 = 0; - /* "providers.pxd":669 + /* "providers.pxd":664 * 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) # <<<<<<<<<<<<<< @@ -10259,7 +10109,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, 669, __pyx_L1_error) + __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_GOTREF(__pyx_t_4); __pyx_t_3 = __pyx_t_4; __pyx_t_4 = 0; @@ -10267,7 +10117,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___factor __pyx_v_future_attributes = __pyx_t_3; __pyx_t_3 = 0; - /* "providers.pxd":670 + /* "providers.pxd":665 * 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) # <<<<<<<<<<<<<< @@ -10275,13 +10125,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, 670, __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, 665, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "providers.pxd":667 + /* "providers.pxd":662 * is_future_attributes = __is_future_or_coroutine(attributes) * * if is_future_instance or is_future_attributes: # <<<<<<<<<<<<<< @@ -10290,17 +10140,17 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___factor */ } - /* "providers.pxd":672 + /* "providers.pxd":667 * 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, 672, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_v_attributes))||((__pyx_v_attributes) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_attributes)->tp_name), 0))) __PYX_ERR(1, 667, __pyx_L1_error) __pyx_f_19dependency_injector_9providers___inject_attributes(__pyx_v_instance, ((PyObject*)__pyx_v_attributes)); - /* "providers.pxd":661 + /* "providers.pxd":656 * ) * * if self.__attributes_len > 0: # <<<<<<<<<<<<<< @@ -10309,7 +10159,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___factor */ } - /* "providers.pxd":674 + /* "providers.pxd":669 * __inject_attributes(instance, attributes) * * return instance # <<<<<<<<<<<<<< @@ -10321,7 +10171,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___factor __pyx_r = __pyx_v_instance; goto __pyx_L0; - /* "providers.pxd":647 + /* "providers.pxd":642 * * * cdef inline object __factory_call(Factory self, tuple args, dict kwargs): # <<<<<<<<<<<<<< @@ -10347,7 +10197,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___factor return __pyx_r; } -/* "providers.pxd":677 +/* "providers.pxd":672 * * * cdef inline bint __is_future_or_coroutine(object instance): # <<<<<<<<<<<<<< @@ -10362,7 +10212,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":678 + /* "providers.pxd":673 * * cdef inline bint __is_future_or_coroutine(object instance): * return __isfuture(instance) or __iscoroutine(instance) # <<<<<<<<<<<<<< @@ -10381,7 +10231,7 @@ static CYTHON_INLINE int __pyx_f_19dependency_injector_9providers___is_future_or __pyx_r = __pyx_t_1; goto __pyx_L0; - /* "providers.pxd":677 + /* "providers.pxd":672 * * * cdef inline bint __is_future_or_coroutine(object instance): # <<<<<<<<<<<<<< @@ -10395,7 +10245,7 @@ static CYTHON_INLINE int __pyx_f_19dependency_injector_9providers___is_future_or return __pyx_r; } -/* "providers.pxd":681 +/* "providers.pxd":676 * * * cdef inline bint __isfuture(object obj): # <<<<<<<<<<<<<< @@ -10415,16 +10265,16 @@ static CYTHON_INLINE int __pyx_f_19dependency_injector_9providers___isfuture(PyO int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__isfuture", 0); - /* "providers.pxd":682 + /* "providers.pxd":677 * * 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, 682, __pyx_L1_error) + __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_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, 682, __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, 677, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = (__pyx_t_3 != 0); if (__pyx_t_4) { @@ -10432,7 +10282,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, 682, __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, 677, __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; @@ -10442,7 +10292,7 @@ static CYTHON_INLINE int __pyx_f_19dependency_injector_9providers___isfuture(PyO __pyx_r = __pyx_t_1; goto __pyx_L0; - /* "providers.pxd":681 + /* "providers.pxd":676 * * * cdef inline bint __isfuture(object obj): # <<<<<<<<<<<<<< @@ -10460,7 +10310,7 @@ static CYTHON_INLINE int __pyx_f_19dependency_injector_9providers___isfuture(PyO return __pyx_r; } -/* "providers.pxd":685 +/* "providers.pxd":680 * * * cdef inline bint __iscoroutine(object obj): # <<<<<<<<<<<<<< @@ -10481,7 +10331,7 @@ static CYTHON_INLINE int __pyx_f_19dependency_injector_9providers___iscoroutine( int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__iscoroutine", 0); - /* "providers.pxd":686 + /* "providers.pxd":681 * * cdef inline bint __iscoroutine(object obj): * if type(obj) in __iscoroutine_typecache: # <<<<<<<<<<<<<< @@ -10490,13 +10340,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, 686, __pyx_L1_error) + __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, 686, __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_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "providers.pxd":687 + /* "providers.pxd":682 * cdef inline bint __iscoroutine(object obj): * if type(obj) in __iscoroutine_typecache: * return True # <<<<<<<<<<<<<< @@ -10506,7 +10356,7 @@ static CYTHON_INLINE int __pyx_f_19dependency_injector_9providers___iscoroutine( __pyx_r = 1; goto __pyx_L0; - /* "providers.pxd":686 + /* "providers.pxd":681 * * cdef inline bint __iscoroutine(object obj): * if type(obj) in __iscoroutine_typecache: # <<<<<<<<<<<<<< @@ -10515,7 +10365,7 @@ static CYTHON_INLINE int __pyx_f_19dependency_injector_9providers___iscoroutine( */ } - /* "providers.pxd":689 + /* "providers.pxd":684 * return True * * if isinstance(obj, __COROUTINE_TYPES): # <<<<<<<<<<<<<< @@ -10524,12 +10374,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, 689, __pyx_L1_error) + __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_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "providers.pxd":693 + /* "providers.pxd":688 * # positive types. That shouldn't ever happen, unless * # someone stressing the system on purpose. * if len(__iscoroutine_typecache) < 100: # <<<<<<<<<<<<<< @@ -10540,14 +10390,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, 693, __pyx_L1_error) + __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, 693, __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_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = ((__pyx_t_4 < 0x64) != 0); if (__pyx_t_1) { - /* "providers.pxd":694 + /* "providers.pxd":689 * # someone stressing the system on purpose. * if len(__iscoroutine_typecache) < 100: * __iscoroutine_typecache.add(type(obj)) # <<<<<<<<<<<<<< @@ -10556,11 +10406,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, 694, __pyx_L1_error) + __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, 694, __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) - /* "providers.pxd":693 + /* "providers.pxd":688 * # positive types. That shouldn't ever happen, unless * # someone stressing the system on purpose. * if len(__iscoroutine_typecache) < 100: # <<<<<<<<<<<<<< @@ -10569,7 +10419,7 @@ static CYTHON_INLINE int __pyx_f_19dependency_injector_9providers___iscoroutine( */ } - /* "providers.pxd":695 + /* "providers.pxd":690 * if len(__iscoroutine_typecache) < 100: * __iscoroutine_typecache.add(type(obj)) * return True # <<<<<<<<<<<<<< @@ -10579,7 +10429,7 @@ static CYTHON_INLINE int __pyx_f_19dependency_injector_9providers___iscoroutine( __pyx_r = 1; goto __pyx_L0; - /* "providers.pxd":689 + /* "providers.pxd":684 * return True * * if isinstance(obj, __COROUTINE_TYPES): # <<<<<<<<<<<<<< @@ -10588,7 +10438,7 @@ static CYTHON_INLINE int __pyx_f_19dependency_injector_9providers___iscoroutine( */ } - /* "providers.pxd":697 + /* "providers.pxd":692 * return True * else: * return False # <<<<<<<<<<<<<< @@ -10600,7 +10450,7 @@ static CYTHON_INLINE int __pyx_f_19dependency_injector_9providers___iscoroutine( goto __pyx_L0; } - /* "providers.pxd":685 + /* "providers.pxd":680 * * * cdef inline bint __iscoroutine(object obj): # <<<<<<<<<<<<<< @@ -10618,7 +10468,7 @@ static CYTHON_INLINE int __pyx_f_19dependency_injector_9providers___iscoroutine( return __pyx_r; } -/* "providers.pxd":700 +/* "providers.pxd":695 * * * cdef inline object __future_result(object instance): # <<<<<<<<<<<<<< @@ -10638,16 +10488,16 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___future int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__future_result", 0); - /* "providers.pxd":701 + /* "providers.pxd":696 * * 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, 701, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 696, __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, 701, __pyx_L1_error) + __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_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -10662,19 +10512,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, 701, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 696, __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":702 + /* "providers.pxd":697 * 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, 702, __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, 697, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -10688,12 +10538,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, 702, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 697, __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":703 + /* "providers.pxd":698 * future_result = asyncio.Future() * future_result.set_result(instance) * return future_result # <<<<<<<<<<<<<< @@ -10703,7 +10553,7 @@ static CYTHON_INLINE PyObject *__pyx_f_19dependency_injector_9providers___future __pyx_r = __pyx_v_future_result; goto __pyx_L0; - /* "providers.pxd":700 + /* "providers.pxd":695 * * * cdef inline object __future_result(object instance): # <<<<<<<<<<<<<< @@ -10897,7 +10747,7 @@ static PyObject *__Pyx_CFunc_void____object____object____object____object___to_p * """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_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__4)); 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; @@ -11085,7 +10935,7 @@ static PyObject *__Pyx_CFunc_void____object____object___to_py(void (*__pyx_v_f)( * """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_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__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; @@ -11284,7 +11134,7 @@ static PyObject *__Pyx_CFunc_void____object____object____object___to_py(void (*_ * """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_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__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; @@ -11477,7 +11327,7 @@ static PyObject *__Pyx_CFunc_object____object____object___to_py(PyObject *(*__py * """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_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__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; @@ -11515,14 +11365,14 @@ static PyObject *__Pyx_CFunc_object____object____object___to_py(PyObject *(*__py 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; +static struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct___async_inject *__pyx_freelist_19dependency_injector_8_cwiring___pyx_scope_struct___async_inject[8]; +static int __pyx_freecount_19dependency_injector_8_cwiring___pyx_scope_struct___async_inject = 0; -static PyObject *__pyx_tp_new_19dependency_injector_8_cwiring___pyx_scope_struct___get_sync_patched(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { +static PyObject *__pyx_tp_new_19dependency_injector_8_cwiring___pyx_scope_struct___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___get_sync_patched > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct___get_sync_patched)))) { - o = (PyObject*)__pyx_freelist_19dependency_injector_8_cwiring___pyx_scope_struct___get_sync_patched[--__pyx_freecount_19dependency_injector_8_cwiring___pyx_scope_struct___get_sync_patched]; - memset(o, 0, sizeof(struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct___get_sync_patched)); + if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_19dependency_injector_8_cwiring___pyx_scope_struct___async_inject > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct___async_inject)))) { + o = (PyObject*)__pyx_freelist_19dependency_injector_8_cwiring___pyx_scope_struct___async_inject[--__pyx_freecount_19dependency_injector_8_cwiring___pyx_scope_struct___async_inject]; + memset(o, 0, sizeof(struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct___async_inject)); (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else { @@ -11532,133 +11382,8 @@ 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___get_sync_patched(PyObject *o) { - struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct___get_sync_patched *p = (struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct___get_sync_patched *)o; - PyObject_GC_UnTrack(o); - Py_CLEAR(p->__pyx_v_fn); - Py_CLEAR(p->__pyx_v_patched); - if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_19dependency_injector_8_cwiring___pyx_scope_struct___get_sync_patched < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(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[__pyx_freecount_19dependency_injector_8_cwiring___pyx_scope_struct___get_sync_patched++] = ((struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct___get_sync_patched *)o); - } else { - (*Py_TYPE(o)->tp_free)(o); - } -} - -static int __pyx_tp_traverse_19dependency_injector_8_cwiring___pyx_scope_struct___get_sync_patched(PyObject *o, visitproc v, void *a) { - int e; - struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct___get_sync_patched *p = (struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct___get_sync_patched *)o; - if (p->__pyx_v_fn) { - e = (*v)(p->__pyx_v_fn, a); if (e) return e; - } - if (p->__pyx_v_patched) { - e = (*v)(p->__pyx_v_patched, a); if (e) return e; - } - return 0; -} - -static int __pyx_tp_clear_19dependency_injector_8_cwiring___pyx_scope_struct___get_sync_patched(PyObject *o) { - PyObject* tmp; - struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct___get_sync_patched *p = (struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct___get_sync_patched *)o; - tmp = ((PyObject*)p->__pyx_v_fn); - p->__pyx_v_fn = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->__pyx_v_patched); - p->__pyx_v_patched = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - return 0; -} - -static PyTypeObject __pyx_type_19dependency_injector_8_cwiring___pyx_scope_struct___get_sync_patched = { - PyVarObject_HEAD_INIT(0, 0) - "dependency_injector._cwiring.__pyx_scope_struct___get_sync_patched", /*tp_name*/ - sizeof(struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct___get_sync_patched), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - __pyx_tp_dealloc_19dependency_injector_8_cwiring___pyx_scope_struct___get_sync_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___get_sync_patched, /*tp_traverse*/ - __pyx_tp_clear_19dependency_injector_8_cwiring___pyx_scope_struct___get_sync_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___get_sync_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 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) - 0, /*tp_vectorcall*/ - #endif - #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 - 0, /*tp_print*/ - #endif - #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 - 0, /*tp_pypy_flags*/ - #endif -}; - -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__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__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 { - 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_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; +static void __pyx_tp_dealloc_19dependency_injector_8_cwiring___pyx_scope_struct___async_inject(PyObject *o) { + struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct___async_inject *p = (struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct___async_inject *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v__); Py_CLEAR(p->__pyx_v_arg_key); @@ -11677,16 +11402,16 @@ 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_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); + if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_19dependency_injector_8_cwiring___pyx_scope_struct___async_inject < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct___async_inject)))) { + __pyx_freelist_19dependency_injector_8_cwiring___pyx_scope_struct___async_inject[__pyx_freecount_19dependency_injector_8_cwiring___pyx_scope_struct___async_inject++] = ((struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct___async_inject *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } -static int __pyx_tp_traverse_19dependency_injector_8_cwiring___pyx_scope_struct_1__async_inject(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_19dependency_injector_8_cwiring___pyx_scope_struct___async_inject(PyObject *o, visitproc v, void *a) { int 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; + struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct___async_inject *p = (struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct___async_inject *)o; if (p->__pyx_v__) { e = (*v)(p->__pyx_v__, a); if (e) return e; } @@ -11741,12 +11466,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_1__async_inject = { +static PyTypeObject __pyx_type_19dependency_injector_8_cwiring___pyx_scope_struct___async_inject = { PyVarObject_HEAD_INIT(0, 0) - "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*/ + "dependency_injector._cwiring.__pyx_scope_struct___async_inject", /*tp_name*/ + sizeof(struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct___async_inject), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_19dependency_injector_8_cwiring___pyx_scope_struct_1__async_inject, /*tp_dealloc*/ + __pyx_tp_dealloc_19dependency_injector_8_cwiring___pyx_scope_struct___async_inject, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif @@ -11773,7 +11498,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_1__async_inject, /*tp_traverse*/ + __pyx_tp_traverse_19dependency_injector_8_cwiring___pyx_scope_struct___async_inject, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ @@ -11789,7 +11514,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_1__async_inject, /*tp_new*/ + __pyx_tp_new_19dependency_injector_8_cwiring___pyx_scope_struct___async_inject, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -11813,14 +11538,14 @@ static PyTypeObject __pyx_type_19dependency_injector_8_cwiring___pyx_scope_struc #endif }; -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 struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_1_genexpr *__pyx_freelist_19dependency_injector_8_cwiring___pyx_scope_struct_1_genexpr[8]; +static int __pyx_freecount_19dependency_injector_8_cwiring___pyx_scope_struct_1_genexpr = 0; -static PyObject *__pyx_tp_new_19dependency_injector_8_cwiring___pyx_scope_struct_2_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { +static PyObject *__pyx_tp_new_19dependency_injector_8_cwiring___pyx_scope_struct_1_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_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)); + if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_19dependency_injector_8_cwiring___pyx_scope_struct_1_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_1_genexpr)))) { + o = (PyObject*)__pyx_freelist_19dependency_injector_8_cwiring___pyx_scope_struct_1_genexpr[--__pyx_freecount_19dependency_injector_8_cwiring___pyx_scope_struct_1_genexpr]; + memset(o, 0, sizeof(struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_1_genexpr)); (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else { @@ -11830,23 +11555,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_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; +static void __pyx_tp_dealloc_19dependency_injector_8_cwiring___pyx_scope_struct_1_genexpr(PyObject *o) { + struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_1_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_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); + if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_19dependency_injector_8_cwiring___pyx_scope_struct_1_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_1_genexpr)))) { + __pyx_freelist_19dependency_injector_8_cwiring___pyx_scope_struct_1_genexpr[__pyx_freecount_19dependency_injector_8_cwiring___pyx_scope_struct_1_genexpr++] = ((struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_1_genexpr *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } -static int __pyx_tp_traverse_19dependency_injector_8_cwiring___pyx_scope_struct_2_genexpr(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_19dependency_injector_8_cwiring___pyx_scope_struct_1_genexpr(PyObject *o, visitproc v, void *a) { int e; - 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; + struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_1_genexpr *)o; if (p->__pyx_outer_scope) { e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e; } @@ -11862,12 +11587,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_genexpr = { +static PyTypeObject __pyx_type_19dependency_injector_8_cwiring___pyx_scope_struct_1_genexpr = { PyVarObject_HEAD_INIT(0, 0) - "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*/ + "dependency_injector._cwiring.__pyx_scope_struct_1_genexpr", /*tp_name*/ + sizeof(struct __pyx_obj_19dependency_injector_8_cwiring___pyx_scope_struct_1_genexpr), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_19dependency_injector_8_cwiring___pyx_scope_struct_2_genexpr, /*tp_dealloc*/ + __pyx_tp_dealloc_19dependency_injector_8_cwiring___pyx_scope_struct_1_genexpr, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif @@ -11894,7 +11619,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_genexpr, /*tp_traverse*/ + __pyx_tp_traverse_19dependency_injector_8_cwiring___pyx_scope_struct_1_genexpr, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ @@ -11910,7 +11635,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_genexpr, /*tp_new*/ + __pyx_tp_new_19dependency_injector_8_cwiring___pyx_scope_struct_1_genexpr, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -12377,9 +12102,9 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__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__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__11, __pyx_k__11, sizeof(__pyx_k__11), 0, 0, 1, 1}, + {&__pyx_n_s__14, __pyx_k__14, sizeof(__pyx_k__14), 0, 0, 1, 1}, + {&__pyx_n_s__2, __pyx_k__2, sizeof(__pyx_k__2), 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}, @@ -12397,11 +12122,11 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__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_kp_s_cwiring_pyx, __pyx_k_cwiring_pyx, sizeof(__pyx_k_cwiring_pyx), 0, 0, 1, 0}, {&__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}, @@ -12411,21 +12136,18 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__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_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_inspect, __pyx_k_inspect, sizeof(__pyx_k_inspect), 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_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_patched_2, __pyx_k_patched_2, sizeof(__pyx_k_patched_2), 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}, @@ -12436,8 +12158,8 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__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_sync_inject, __pyx_k_sync_inject, sizeof(__pyx_k_sync_inject), 0, 0, 1, 1}, {&__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}, @@ -12446,14 +12168,13 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__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, 63, __pyx_L1_error) + __pyx_builtin_zip = __Pyx_GetBuiltinName(__pyx_n_s_zip); if (!__pyx_builtin_zip) __PYX_ERR(0, 60, __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, 410, __pyx_L1_error) + __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(1, 405, __pyx_L1_error) return 0; __pyx_L1_error:; return -1; @@ -12463,18 +12184,6 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); - /* "dependency_injector/_cwiring.pyx":17 - * def _get_sync_patched(fn, patched: PatchedCallable): - * @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_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_2, 17, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__2)) __PYX_ERR(0, 17, __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 *): @@ -12482,46 +12191,46 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * """wrap(future_result, args, future_args_kwargs, future) -> 'void'""" * f(future_result, args, future_args_kwargs, future) */ - __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_tuple__3 = 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__3)) __PYX_ERR(2, 65, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__3); + __Pyx_GIVEREF(__pyx_tuple__3); + __pyx_codeobj__4 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__3, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_wrap, 65, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__4)) __PYX_ERR(2, 65, __pyx_L1_error) + __pyx_tuple__5 = PyTuple_Pack(2, __pyx_n_s_future_result, __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_codeobj__6 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 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(3, __pyx_n_s_future_result, __pyx_n_s_call, __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_codeobj__8 = (PyObject*)__Pyx_PyCode_New(3, 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_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(2, __pyx_n_s_future_result, __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) + __pyx_codeobj__10 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 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) /* "dependency_injector/_cwiring.pyx":15 * * - * def _get_sync_patched(fn, patched: PatchedCallable): # <<<<<<<<<<<<<< - * @functools.wraps(fn) - * def _patched(*args, **kwargs): + * def _sync_inject(object fn, tuple args, dict kwargs, dict injections, dict closings): # <<<<<<<<<<<<<< + * cdef object result + * cdef dict to_inject */ - __pyx_tuple__14 = PyTuple_Pack(4, __pyx_n_s_fn, __pyx_n_s_patched, __pyx_n_s_patched_2, __pyx_n_s_patched_2); 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(2, 0, 4, 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) + __pyx_tuple__12 = PyTuple_Pack(9, __pyx_n_s_fn, __pyx_n_s_args, __pyx_n_s_kwargs, __pyx_n_s_injections, __pyx_n_s_closings, __pyx_n_s_result, __pyx_n_s_to_inject, __pyx_n_s_arg_key, __pyx_n_s_provider); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(0, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__12); + __Pyx_GIVEREF(__pyx_tuple__12); + __pyx_codeobj__13 = (PyObject*)__Pyx_PyCode_New(5, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__12, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cwiring_pyx, __pyx_n_s_sync_inject, 15, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__13)) __PYX_ERR(0, 15, __pyx_L1_error) - /* "dependency_injector/_cwiring.pyx":42 + /* "dependency_injector/_cwiring.pyx":39 * * * async def _async_inject(object fn, tuple args, dict kwargs, dict injections, dict closings): # <<<<<<<<<<<<<< * cdef object result * cdef dict to_inject */ - __pyx_tuple__17 = PyTuple_Pack(18, __pyx_n_s_fn, __pyx_n_s_args, __pyx_n_s_kwargs, __pyx_n_s_injections, __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_tuple__15 = PyTuple_Pack(18, __pyx_n_s_fn, __pyx_n_s_args, __pyx_n_s_kwargs, __pyx_n_s_injections, __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__14, __pyx_n_s_shutdown, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 39, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__15); + __Pyx_GIVEREF(__pyx_tuple__15); + __pyx_codeobj_ = (PyObject*)__Pyx_PyCode_New(5, 0, 18, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__15, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cwiring_pyx, __pyx_n_s_async_inject, 39, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj_)) __PYX_ERR(0, 39, __pyx_L1_error) __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; @@ -12531,7 +12240,7 @@ 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); + 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:; @@ -12577,30 +12286,22 @@ 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, 15, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_19dependency_injector_8_cwiring___pyx_scope_struct___async_inject) < 0) __PYX_ERR(0, 39, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 - __pyx_type_19dependency_injector_8_cwiring___pyx_scope_struct___get_sync_patched.tp_print = 0; + __pyx_type_19dependency_injector_8_cwiring___pyx_scope_struct___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___get_sync_patched.tp_dictoffset && __pyx_type_19dependency_injector_8_cwiring___pyx_scope_struct___get_sync_patched.tp_getattro == PyObject_GenericGetAttr)) { - __pyx_type_19dependency_injector_8_cwiring___pyx_scope_struct___get_sync_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___async_inject.tp_dictoffset && __pyx_type_19dependency_injector_8_cwiring___pyx_scope_struct___async_inject.tp_getattro == PyObject_GenericGetAttr)) { + __pyx_type_19dependency_injector_8_cwiring___pyx_scope_struct___async_inject.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__async_inject) < 0) __PYX_ERR(0, 42, __pyx_L1_error) + __pyx_ptype_19dependency_injector_8_cwiring___pyx_scope_struct___async_inject = &__pyx_type_19dependency_injector_8_cwiring___pyx_scope_struct___async_inject; + if (PyType_Ready(&__pyx_type_19dependency_injector_8_cwiring___pyx_scope_struct_1_genexpr) < 0) __PYX_ERR(0, 59, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 - __pyx_type_19dependency_injector_8_cwiring___pyx_scope_struct_1__async_inject.tp_print = 0; + __pyx_type_19dependency_injector_8_cwiring___pyx_scope_struct_1_genexpr.tp_print = 0; #endif - 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; + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_19dependency_injector_8_cwiring___pyx_scope_struct_1_genexpr.tp_dictoffset && __pyx_type_19dependency_injector_8_cwiring___pyx_scope_struct_1_genexpr.tp_getattro == PyObject_GenericGetAttr)) { + __pyx_type_19dependency_injector_8_cwiring___pyx_scope_struct_1_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } - __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_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_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_genexpr = &__pyx_type_19dependency_injector_8_cwiring___pyx_scope_struct_2_genexpr; + __pyx_ptype_19dependency_injector_8_cwiring___pyx_scope_struct_1_genexpr = &__pyx_type_19dependency_injector_8_cwiring___pyx_scope_struct_1_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_scope_struct____Pyx_CFunc_void____object____object____object____object___to_py.tp_print = 0; @@ -12654,145 +12355,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, 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) + 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) __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) + 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) __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) + 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) __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) + 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) __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) + 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) __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) + 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) __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) + 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) __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) + 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) __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) + 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) __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) + 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) __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) + 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) __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) + 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) __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) + 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) __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) + 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) __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) + 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) __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) + 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) __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) + 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) __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) + 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) __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, 143, __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, 143, __pyx_L1_error) + 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) __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, 152, __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, 152, __pyx_L1_error) + 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) __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, 156, __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, 156, __pyx_L1_error) + 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) __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, 160, __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, 160, __pyx_L1_error) + 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) __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, 164, __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, 164, __pyx_L1_error) + 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) __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, 169, __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, 169, __pyx_L1_error) + 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) __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, 174, __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, 174, __pyx_L1_error) + 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) __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, 179, __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, 179, __pyx_L1_error) + 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) __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, 183, __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, 183, __pyx_L1_error) + 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) __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, 189, __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, 189, __pyx_L1_error) + 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) __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, 193, __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, 193, __pyx_L1_error) + 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) __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, 198, __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, 198, __pyx_L1_error) + 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) __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, 203, __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, 203, __pyx_L1_error) + 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) __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, 207, __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, 207, __pyx_L1_error) + 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) __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, 211, __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, 211, __pyx_L1_error) + 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) __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, 217, __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, 217, __pyx_L1_error) + 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) __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, 224, __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, 224, __pyx_L1_error) + 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) __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, 231, __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, 231, __pyx_L1_error) + 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) __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, 246, __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, 246, __pyx_L1_error) + 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) __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, 255, __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, 255, __pyx_L1_error) + 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) __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, 263, __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, 263, __pyx_L1_error) + 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) __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, 269, __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, 269, __pyx_L1_error) + 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) __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, 276, __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, 276, __pyx_L1_error) + 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) __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, 283, __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, 283, __pyx_L1_error) + 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) __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, 294, __pyx_L1_error) + if (!__pyx_ptype_19dependency_injector_9providers_Injection) __PYX_ERR(1, 289, __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, 301, __pyx_L1_error) + if (!__pyx_ptype_19dependency_injector_9providers_PositionalInjection) __PYX_ERR(1, 296, __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, 305, __pyx_L1_error) + if (!__pyx_ptype_19dependency_injector_9providers_NamedInjection) __PYX_ERR(1, 300, __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, 316, __pyx_L1_error) + if (!__pyx_ptype_19dependency_injector_9providers_OverridingContext) __PYX_ERR(1, 311, __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, 321, __pyx_L1_error) + if (!__pyx_ptype_19dependency_injector_9providers_BaseSingletonResetContext) __PYX_ERR(1, 316, __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, 325, __pyx_L1_error) + if (!__pyx_ptype_19dependency_injector_9providers_SingletonResetContext) __PYX_ERR(1, 320, __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, 329, __pyx_L1_error) + if (!__pyx_ptype_19dependency_injector_9providers_SingletonFullResetContext) __PYX_ERR(1, 324, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_RefNannyFinishContext(); return 0; @@ -13002,7 +12703,7 @@ if (!__Pyx_RefNanny) { Py_INCREF(__pyx_b); __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error) Py_INCREF(__pyx_cython_runtime); - if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error); + if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error) /*--- Initialize various global constants etc. ---*/ if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error) #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT) @@ -13108,7 +12809,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__13, __pyx_t_1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9, __pyx_L1_error) + __pyx_t_2 = __Pyx_Import(__pyx_n_s__11, __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) @@ -13148,25 +12849,25 @@ if (!__Pyx_RefNanny) { /* "dependency_injector/_cwiring.pyx":15 * * - * def _get_sync_patched(fn, patched: PatchedCallable): # <<<<<<<<<<<<<< - * @functools.wraps(fn) - * def _patched(*args, **kwargs): + * def _sync_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_1_get_sync_patched, NULL, __pyx_n_s_dependency_injector__cwiring); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15, __pyx_L1_error) + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_19dependency_injector_8_cwiring_1_sync_inject, 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, 15, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_sync_inject, __pyx_t_1) < 0) __PYX_ERR(0, 15, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dependency_injector/_cwiring.pyx":42 + /* "dependency_injector/_cwiring.pyx":39 * * * 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_async_inject, NULL, __pyx_n_s_dependency_injector__cwiring); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 42, __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, 39, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_async_inject, __pyx_t_1) < 0) __PYX_ERR(0, 42, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_async_inject, __pyx_t_1) < 0) __PYX_ERR(0, 39, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "dependency_injector/_cwiring.pyx":1 @@ -13400,49 +13101,248 @@ bad: return -1; } -/* KeywordStringCheck */ -static int __Pyx_CheckKeywordStrings( - PyObject *kwdict, - const char* function_name, - int kw_allowed) +/* ArgTypeTest */ +static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact) { - PyObject* key = 0; - Py_ssize_t pos = 0; -#if CYTHON_COMPILING_IN_PYPY - if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0)) - goto invalid_keyword; - return 1; -#else - while (PyDict_Next(kwdict, &pos, &key, 0)) { - #if PY_MAJOR_VERSION < 3 - if (unlikely(!PyString_Check(key))) - #endif - if (unlikely(!PyUnicode_Check(key))) - goto invalid_keyword_type; + 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; } - if ((!kw_allowed) && unlikely(key)) - goto invalid_keyword; - return 1; -invalid_keyword_type: PyErr_Format(PyExc_TypeError, - "%.200s() keywords must be strings", function_name); - return 0; -#endif -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 + "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)", + name, type->tp_name, Py_TYPE(obj)->tp_name); return 0; } -/* None */ -static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) { - PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname); +/* PyObjectCall */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { + PyObject *result; + ternaryfunc call = Py_TYPE(func)->tp_call; + if (unlikely(!call)) + return PyObject_Call(func, arg, kw); + if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) + return NULL; + result = (*call)(func, arg, kw); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* 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); +} + +/* RaiseTooManyValuesToUnpack */ +static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { + PyErr_Format(PyExc_ValueError, + "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected); +} + +/* RaiseNeedMoreValuesToUnpack */ +static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { + PyErr_Format(PyExc_ValueError, + "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack", + index, (index == 1) ? "" : "s"); +} + +/* IterFinish */ +static CYTHON_INLINE int __Pyx_IterFinish(void) { +#if CYTHON_FAST_THREAD_STATE + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject* exc_type = tstate->curexc_type; + if (unlikely(exc_type)) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) { + PyObject *exc_value, *exc_tb; + exc_value = tstate->curexc_value; + exc_tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; + Py_DECREF(exc_type); + Py_XDECREF(exc_value); + Py_XDECREF(exc_tb); + return 0; + } else { + return -1; + } + } + return 0; +#else + if (unlikely(PyErr_Occurred())) { + if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) { + PyErr_Clear(); + return 0; + } else { + return -1; + } + } + return 0; +#endif +} + +/* UnpackItemEndCheck */ +static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) { + if (unlikely(retval)) { + Py_DECREF(retval); + __Pyx_RaiseTooManyValuesError(expected); + return -1; + } + return __Pyx_IterFinish(); +} + +/* 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) { + PyObject *value; + value = PyDict_GetItemWithError(d, key); + if (unlikely(!value)) { + if (!PyErr_Occurred()) { + if (unlikely(PyTuple_Check(key))) { + PyObject* args = PyTuple_Pack(1, key); + if (likely(args)) { + PyErr_SetObject(PyExc_KeyError, args); + Py_DECREF(args); + } + } else { + PyErr_SetObject(PyExc_KeyError, key); + } + } + return NULL; + } + Py_INCREF(value); + return value; +} +#endif + +/* PyDictVersioning */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) { + PyObject **dictptr = NULL; + Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset; + if (offset) { +#if CYTHON_COMPILING_IN_CPYTHON + dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); +#else + dictptr = _PyObject_GetDictPtr(obj); +#endif + } + return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; +} +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) + return 0; + return obj_dict_version == __Pyx_get_object_dict_version(obj); +} +#endif + +/* GetModuleGlobalName */ +#if CYTHON_USE_DICT_VERSIONS +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value) +#else +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name) +#endif +{ + PyObject *result; +#if !CYTHON_AVOID_BORROWED_REFS +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 + result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash); + __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return __Pyx_NewRef(result); + } else if (unlikely(PyErr_Occurred())) { + return NULL; + } +#else + result = PyDict_GetItem(__pyx_d, name); + __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return __Pyx_NewRef(result); + } +#endif +#else + result = PyObject_GetItem(__pyx_d, name); + __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return __Pyx_NewRef(result); + } + PyErr_Clear(); +#endif + return __Pyx_GetBuiltinName(name); } /* PyFunctionFastCall */ @@ -13564,26 +13464,6 @@ done: #endif #endif -/* PyObjectCall */ -#if CYTHON_COMPILING_IN_CPYTHON -static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { - PyObject *result; - ternaryfunc call = Py_TYPE(func)->tp_call; - if (unlikely(!call)) - return PyObject_Call(func, arg, kw); - if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) - return NULL; - result = (*call)(func, arg, kw); - Py_LeaveRecursiveCall(); - if (unlikely(!result) && unlikely(!PyErr_Occurred())) { - PyErr_SetString( - PyExc_SystemError, - "NULL result without error in PyObject_Call"); - } - return result; -} -#endif - /* PyObjectCallMethO */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { @@ -13612,7 +13492,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { return __Pyx_PyFunction_FastCall(func, NULL, 0); } #endif -#ifdef __Pyx_CyFunction_USED +#if defined(__Pyx_CyFunction_USED) && defined(NDEBUG) if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func))) #else if (likely(PyCFunction_Check(func))) @@ -13689,191 +13569,9 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObjec } #endif -/* RaiseTooManyValuesToUnpack */ -static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { - PyErr_Format(PyExc_ValueError, - "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected); -} - -/* RaiseNeedMoreValuesToUnpack */ -static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { - PyErr_Format(PyExc_ValueError, - "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack", - index, (index == 1) ? "" : "s"); -} - -/* IterFinish */ -static CYTHON_INLINE int __Pyx_IterFinish(void) { -#if CYTHON_FAST_THREAD_STATE - PyThreadState *tstate = __Pyx_PyThreadState_Current; - PyObject* exc_type = tstate->curexc_type; - if (unlikely(exc_type)) { - if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) { - PyObject *exc_value, *exc_tb; - exc_value = tstate->curexc_value; - exc_tb = tstate->curexc_traceback; - tstate->curexc_type = 0; - tstate->curexc_value = 0; - tstate->curexc_traceback = 0; - Py_DECREF(exc_type); - Py_XDECREF(exc_value); - Py_XDECREF(exc_tb); - return 0; - } else { - return -1; - } - } - return 0; -#else - if (unlikely(PyErr_Occurred())) { - if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) { - PyErr_Clear(); - return 0; - } else { - return -1; - } - } - return 0; -#endif -} - -/* UnpackItemEndCheck */ -static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) { - if (unlikely(retval)) { - Py_DECREF(retval); - __Pyx_RaiseTooManyValuesError(expected); - return -1; - } else { - return __Pyx_IterFinish(); - } - 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) { - PyObject *value; - value = PyDict_GetItemWithError(d, key); - if (unlikely(!value)) { - if (!PyErr_Occurred()) { - if (unlikely(PyTuple_Check(key))) { - PyObject* args = PyTuple_Pack(1, key); - if (likely(args)) { - PyErr_SetObject(PyExc_KeyError, args); - Py_DECREF(args); - } - } else { - PyErr_SetObject(PyExc_KeyError, key); - } - } - return NULL; - } - Py_INCREF(value); - return value; -} -#endif - -/* PyDictVersioning */ -#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS -static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) { - PyObject *dict = Py_TYPE(obj)->tp_dict; - return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; -} -static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) { - PyObject **dictptr = NULL; - Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset; - if (offset) { -#if CYTHON_COMPILING_IN_CPYTHON - dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); -#else - dictptr = _PyObject_GetDictPtr(obj); -#endif - } - return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; -} -static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) { - PyObject *dict = Py_TYPE(obj)->tp_dict; - if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) - return 0; - return obj_dict_version == __Pyx_get_object_dict_version(obj); -} -#endif - -/* GetModuleGlobalName */ -#if CYTHON_USE_DICT_VERSIONS -static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value) -#else -static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name) -#endif -{ - PyObject *result; -#if !CYTHON_AVOID_BORROWED_REFS -#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 - result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash); - __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) - if (likely(result)) { - return __Pyx_NewRef(result); - } else if (unlikely(PyErr_Occurred())) { - return NULL; - } -#else - result = PyDict_GetItem(__pyx_d, name); - __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) - if (likely(result)) { - return __Pyx_NewRef(result); - } -#endif -#else - result = PyObject_GetItem(__pyx_d, name); - __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) - if (likely(result)) { - return __Pyx_NewRef(result); - } - PyErr_Clear(); -#endif - return __Pyx_GetBuiltinName(name); -} - -/* PyObjectCall2Args */ -static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) { - PyObject *args, *result = NULL; - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(function)) { - PyObject *args[2] = {arg1, arg2}; - return __Pyx_PyFunction_FastCall(function, args, 2); - } - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(function)) { - PyObject *args[2] = {arg1, arg2}; - return __Pyx_PyCFunction_FastCall(function, args, 2); - } - #endif - args = PyTuple_New(2); - if (unlikely(!args)) goto done; - Py_INCREF(arg1); - PyTuple_SET_ITEM(args, 0, arg1); - Py_INCREF(arg2); - PyTuple_SET_ITEM(args, 1, arg2); - Py_INCREF(function); - result = __Pyx_PyObject_Call(function, args, NULL); - Py_DECREF(args); - Py_DECREF(function); -done: - return result; +/* None */ +static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) { + PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname); } /* FetchCommonType */ @@ -13915,698 +13613,6 @@ bad: goto done; } -/* CythonFunctionShared */ -#include -static PyObject * -__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure) -{ - if (unlikely(op->func_doc == NULL)) { - if (op->func.m_ml->ml_doc) { -#if PY_MAJOR_VERSION >= 3 - op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc); -#else - op->func_doc = PyString_FromString(op->func.m_ml->ml_doc); -#endif - if (unlikely(op->func_doc == NULL)) - return NULL; - } else { - Py_INCREF(Py_None); - return Py_None; - } - } - Py_INCREF(op->func_doc); - return op->func_doc; -} -static int -__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context) -{ - PyObject *tmp = op->func_doc; - if (value == NULL) { - value = Py_None; - } - Py_INCREF(value); - op->func_doc = value; - Py_XDECREF(tmp); - return 0; -} -static PyObject * -__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) -{ - if (unlikely(op->func_name == NULL)) { -#if PY_MAJOR_VERSION >= 3 - op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name); -#else - op->func_name = PyString_InternFromString(op->func.m_ml->ml_name); -#endif - if (unlikely(op->func_name == NULL)) - return NULL; - } - Py_INCREF(op->func_name); - return op->func_name; -} -static int -__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context) -{ - PyObject *tmp; -#if PY_MAJOR_VERSION >= 3 - if (unlikely(value == NULL || !PyUnicode_Check(value))) -#else - if (unlikely(value == NULL || !PyString_Check(value))) -#endif - { - PyErr_SetString(PyExc_TypeError, - "__name__ must be set to a string object"); - return -1; - } - tmp = op->func_name; - Py_INCREF(value); - op->func_name = value; - Py_XDECREF(tmp); - return 0; -} -static PyObject * -__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) -{ - Py_INCREF(op->func_qualname); - return op->func_qualname; -} -static int -__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context) -{ - PyObject *tmp; -#if PY_MAJOR_VERSION >= 3 - if (unlikely(value == NULL || !PyUnicode_Check(value))) -#else - if (unlikely(value == NULL || !PyString_Check(value))) -#endif - { - PyErr_SetString(PyExc_TypeError, - "__qualname__ must be set to a string object"); - return -1; - } - tmp = op->func_qualname; - Py_INCREF(value); - op->func_qualname = value; - Py_XDECREF(tmp); - return 0; -} -static PyObject * -__Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure) -{ - PyObject *self; - self = m->func_closure; - if (self == NULL) - self = Py_None; - Py_INCREF(self); - return self; -} -static PyObject * -__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) -{ - if (unlikely(op->func_dict == NULL)) { - op->func_dict = PyDict_New(); - if (unlikely(op->func_dict == NULL)) - return NULL; - } - Py_INCREF(op->func_dict); - return op->func_dict; -} -static int -__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context) -{ - PyObject *tmp; - if (unlikely(value == NULL)) { - PyErr_SetString(PyExc_TypeError, - "function's dictionary may not be deleted"); - return -1; - } - if (unlikely(!PyDict_Check(value))) { - PyErr_SetString(PyExc_TypeError, - "setting function's dictionary to a non-dict"); - return -1; - } - tmp = op->func_dict; - Py_INCREF(value); - op->func_dict = value; - Py_XDECREF(tmp); - return 0; -} -static PyObject * -__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) -{ - Py_INCREF(op->func_globals); - return op->func_globals; -} -static PyObject * -__Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) -{ - Py_INCREF(Py_None); - return Py_None; -} -static PyObject * -__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) -{ - PyObject* result = (op->func_code) ? op->func_code : Py_None; - Py_INCREF(result); - return result; -} -static int -__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) { - int result = 0; - PyObject *res = op->defaults_getter((PyObject *) op); - if (unlikely(!res)) - return -1; - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - op->defaults_tuple = PyTuple_GET_ITEM(res, 0); - Py_INCREF(op->defaults_tuple); - op->defaults_kwdict = PyTuple_GET_ITEM(res, 1); - Py_INCREF(op->defaults_kwdict); - #else - op->defaults_tuple = PySequence_ITEM(res, 0); - if (unlikely(!op->defaults_tuple)) result = -1; - else { - op->defaults_kwdict = PySequence_ITEM(res, 1); - if (unlikely(!op->defaults_kwdict)) result = -1; - } - #endif - Py_DECREF(res); - return result; -} -static int -__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) { - PyObject* tmp; - if (!value) { - value = Py_None; - } else if (value != Py_None && !PyTuple_Check(value)) { - PyErr_SetString(PyExc_TypeError, - "__defaults__ must be set to a tuple object"); - return -1; - } - Py_INCREF(value); - tmp = op->defaults_tuple; - op->defaults_tuple = value; - Py_XDECREF(tmp); - return 0; -} -static PyObject * -__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { - PyObject* result = op->defaults_tuple; - if (unlikely(!result)) { - if (op->defaults_getter) { - if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL; - result = op->defaults_tuple; - } else { - result = Py_None; - } - } - Py_INCREF(result); - return result; -} -static int -__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) { - PyObject* tmp; - if (!value) { - value = Py_None; - } else if (value != Py_None && !PyDict_Check(value)) { - PyErr_SetString(PyExc_TypeError, - "__kwdefaults__ must be set to a dict object"); - return -1; - } - Py_INCREF(value); - tmp = op->defaults_kwdict; - op->defaults_kwdict = value; - Py_XDECREF(tmp); - return 0; -} -static PyObject * -__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { - PyObject* result = op->defaults_kwdict; - if (unlikely(!result)) { - if (op->defaults_getter) { - if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL; - result = op->defaults_kwdict; - } else { - result = Py_None; - } - } - Py_INCREF(result); - return result; -} -static int -__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) { - PyObject* tmp; - if (!value || value == Py_None) { - value = NULL; - } else if (!PyDict_Check(value)) { - PyErr_SetString(PyExc_TypeError, - "__annotations__ must be set to a dict object"); - return -1; - } - Py_XINCREF(value); - tmp = op->func_annotations; - op->func_annotations = value; - Py_XDECREF(tmp); - return 0; -} -static PyObject * -__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { - PyObject* result = op->func_annotations; - if (unlikely(!result)) { - result = PyDict_New(); - if (unlikely(!result)) return NULL; - op->func_annotations = result; - } - Py_INCREF(result); - return result; -} -static PyGetSetDef __pyx_CyFunction_getsets[] = { - {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, - {(char *) "__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, - {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, - {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, - {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0}, - {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0}, - {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, - {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, - {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, - {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, - {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, - {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, - {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, - {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, - {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, - {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, - {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0}, - {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0}, - {0, 0, 0, 0, 0} -}; -static PyMemberDef __pyx_CyFunction_members[] = { - {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), PY_WRITE_RESTRICTED, 0}, - {0, 0, 0, 0, 0} -}; -static PyObject * -__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args) -{ -#if PY_MAJOR_VERSION >= 3 - Py_INCREF(m->func_qualname); - return m->func_qualname; -#else - return PyString_FromString(m->func.m_ml->ml_name); -#endif -} -static PyMethodDef __pyx_CyFunction_methods[] = { - {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0}, - {0, 0, 0, 0} -}; -#if PY_VERSION_HEX < 0x030500A0 -#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist) -#else -#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func.m_weakreflist) -#endif -static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname, - PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { - if (unlikely(op == NULL)) - return NULL; - op->flags = flags; - __Pyx_CyFunction_weakreflist(op) = NULL; - op->func.m_ml = ml; - op->func.m_self = (PyObject *) op; - Py_XINCREF(closure); - op->func_closure = closure; - Py_XINCREF(module); - op->func.m_module = module; - op->func_dict = NULL; - op->func_name = NULL; - Py_INCREF(qualname); - op->func_qualname = qualname; - op->func_doc = NULL; - op->func_classobj = NULL; - op->func_globals = globals; - Py_INCREF(op->func_globals); - Py_XINCREF(code); - op->func_code = code; - op->defaults_pyobjects = 0; - op->defaults_size = 0; - op->defaults = NULL; - op->defaults_tuple = NULL; - op->defaults_kwdict = NULL; - op->defaults_getter = NULL; - op->func_annotations = NULL; - return (PyObject *) op; -} -static int -__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) -{ - Py_CLEAR(m->func_closure); - Py_CLEAR(m->func.m_module); - Py_CLEAR(m->func_dict); - Py_CLEAR(m->func_name); - Py_CLEAR(m->func_qualname); - Py_CLEAR(m->func_doc); - Py_CLEAR(m->func_globals); - Py_CLEAR(m->func_code); - Py_CLEAR(m->func_classobj); - Py_CLEAR(m->defaults_tuple); - Py_CLEAR(m->defaults_kwdict); - Py_CLEAR(m->func_annotations); - if (m->defaults) { - PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m); - int i; - for (i = 0; i < m->defaults_pyobjects; i++) - Py_XDECREF(pydefaults[i]); - PyObject_Free(m->defaults); - m->defaults = NULL; - } - return 0; -} -static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m) -{ - if (__Pyx_CyFunction_weakreflist(m) != NULL) - PyObject_ClearWeakRefs((PyObject *) m); - __Pyx_CyFunction_clear(m); - PyObject_GC_Del(m); -} -static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m) -{ - PyObject_GC_UnTrack(m); - __Pyx__CyFunction_dealloc(m); -} -static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg) -{ - Py_VISIT(m->func_closure); - Py_VISIT(m->func.m_module); - Py_VISIT(m->func_dict); - Py_VISIT(m->func_name); - Py_VISIT(m->func_qualname); - Py_VISIT(m->func_doc); - Py_VISIT(m->func_globals); - Py_VISIT(m->func_code); - Py_VISIT(m->func_classobj); - Py_VISIT(m->defaults_tuple); - Py_VISIT(m->defaults_kwdict); - if (m->defaults) { - PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m); - int i; - for (i = 0; i < m->defaults_pyobjects; i++) - Py_VISIT(pydefaults[i]); - } - return 0; -} -static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type) -{ -#if PY_MAJOR_VERSION < 3 - __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; - if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) { - Py_INCREF(func); - return func; - } - if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) { - if (type == NULL) - type = (PyObject *)(Py_TYPE(obj)); - return __Pyx_PyMethod_New(func, type, (PyObject *)(Py_TYPE(type))); - } - if (obj == Py_None) - obj = NULL; -#endif - return __Pyx_PyMethod_New(func, obj, type); -} -static PyObject* -__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op) -{ -#if PY_MAJOR_VERSION >= 3 - return PyUnicode_FromFormat("", - op->func_qualname, (void *)op); -#else - return PyString_FromFormat("", - PyString_AsString(op->func_qualname), (void *)op); -#endif -} -static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) { - PyCFunctionObject* f = (PyCFunctionObject*)func; - PyCFunction meth = f->m_ml->ml_meth; - Py_ssize_t size; - switch (f->m_ml->ml_flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) { - case METH_VARARGS: - if (likely(kw == NULL || PyDict_Size(kw) == 0)) - return (*meth)(self, arg); - break; - case METH_VARARGS | METH_KEYWORDS: - return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw); - case METH_NOARGS: - if (likely(kw == NULL || PyDict_Size(kw) == 0)) { - size = PyTuple_GET_SIZE(arg); - if (likely(size == 0)) - return (*meth)(self, NULL); - PyErr_Format(PyExc_TypeError, - "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)", - f->m_ml->ml_name, size); - return NULL; - } - break; - case METH_O: - if (likely(kw == NULL || PyDict_Size(kw) == 0)) { - size = PyTuple_GET_SIZE(arg); - if (likely(size == 1)) { - PyObject *result, *arg0; - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - arg0 = PyTuple_GET_ITEM(arg, 0); - #else - arg0 = PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL; - #endif - result = (*meth)(self, arg0); - #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) - Py_DECREF(arg0); - #endif - return result; - } - PyErr_Format(PyExc_TypeError, - "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)", - f->m_ml->ml_name, size); - return NULL; - } - break; - default: - PyErr_SetString(PyExc_SystemError, "Bad call flags in " - "__Pyx_CyFunction_Call. METH_OLDARGS is no " - "longer supported!"); - return NULL; - } - PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments", - f->m_ml->ml_name); - return NULL; -} -static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { - return __Pyx_CyFunction_CallMethod(func, ((PyCFunctionObject*)func)->m_self, arg, kw); -} -static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) { - PyObject *result; - __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func; - if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { - Py_ssize_t argc; - PyObject *new_args; - PyObject *self; - argc = PyTuple_GET_SIZE(args); - new_args = PyTuple_GetSlice(args, 1, argc); - if (unlikely(!new_args)) - return NULL; - self = PyTuple_GetItem(args, 0); - if (unlikely(!self)) { - Py_DECREF(new_args); - PyErr_Format(PyExc_TypeError, - "unbound method %.200S() needs an argument", - cyfunc->func_qualname); - return NULL; - } - result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw); - Py_DECREF(new_args); - } else { - result = __Pyx_CyFunction_Call(func, args, kw); - } - return result; -} -static PyTypeObject __pyx_CyFunctionType_type = { - PyVarObject_HEAD_INIT(0, 0) - "cython_function_or_method", - sizeof(__pyx_CyFunctionObject), - 0, - (destructor) __Pyx_CyFunction_dealloc, - 0, - 0, - 0, -#if PY_MAJOR_VERSION < 3 - 0, -#else - 0, -#endif - (reprfunc) __Pyx_CyFunction_repr, - 0, - 0, - 0, - 0, - __Pyx_CyFunction_CallAsMethod, - 0, - 0, - 0, - 0, - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, - 0, - (traverseproc) __Pyx_CyFunction_traverse, - (inquiry) __Pyx_CyFunction_clear, - 0, -#if PY_VERSION_HEX < 0x030500A0 - offsetof(__pyx_CyFunctionObject, func_weakreflist), -#else - offsetof(PyCFunctionObject, m_weakreflist), -#endif - 0, - 0, - __pyx_CyFunction_methods, - __pyx_CyFunction_members, - __pyx_CyFunction_getsets, - 0, - 0, - __Pyx_CyFunction_descr_get, - 0, - offsetof(__pyx_CyFunctionObject, func_dict), - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, -#if PY_VERSION_HEX >= 0x030400a1 - 0, -#endif -#if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) - 0, -#endif -#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 - 0, -#endif -#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 - 0, -#endif -}; -static int __pyx_CyFunction_init(void) { - __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type); - if (unlikely(__pyx_CyFunctionType == NULL)) { - return -1; - } - return 0; -} -static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) { - __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; - m->defaults = PyObject_Malloc(size); - if (unlikely(!m->defaults)) - return PyErr_NoMemory(); - memset(m->defaults, 0, size); - m->defaults_pyobjects = pyobjects; - m->defaults_size = size; - return m->defaults; -} -static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) { - __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; - m->defaults_tuple = tuple; - Py_INCREF(tuple); -} -static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) { - __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; - m->defaults_kwdict = dict; - Py_INCREF(dict); -} -static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) { - __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; - m->func_annotations = dict; - Py_INCREF(dict); -} - -/* CythonFunction */ -static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname, - PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { - PyObject *op = __Pyx_CyFunction_Init( - PyObject_GC_New(__pyx_CyFunctionObject, __pyx_CyFunctionType), - ml, flags, qualname, closure, module, globals, code - ); - if (likely(op)) { - PyObject_GC_Track(op); - } - return op; -} - -/* 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) { @@ -14881,6 +13887,35 @@ static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, } #endif +/* PyObjectCall2Args */ +static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) { + PyObject *args, *result = NULL; + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(function)) { + PyObject *args[2] = {arg1, arg2}; + return __Pyx_PyFunction_FastCall(function, args, 2); + } + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(function)) { + PyObject *args[2] = {arg1, arg2}; + return __Pyx_PyCFunction_FastCall(function, args, 2); + } + #endif + args = PyTuple_New(2); + if (unlikely(!args)) goto done; + Py_INCREF(arg1); + PyTuple_SET_ITEM(args, 0, arg1); + Py_INCREF(arg2); + PyTuple_SET_ITEM(args, 1, arg2); + Py_INCREF(function); + result = __Pyx_PyObject_Call(function, args, NULL); + Py_DECREF(args); + Py_DECREF(function); +done: + return result; +} + /* PyObjectGetMethod */ static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) { PyObject *attr; @@ -16408,9 +15443,7 @@ static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno, PyGILState_STATE state; if (nogil) state = PyGILState_Ensure(); -#ifdef _MSC_VER - else state = (PyGILState_STATE)-1; -#endif + else state = (PyGILState_STATE)0; #endif __Pyx_PyThreadState_assign __Pyx_ErrFetch(&old_exc, &old_val, &old_tb); @@ -16849,6 +15882,635 @@ static CYTHON_INLINE int __Pyx_PySet_ContainsTF(PyObject* key, PyObject* set, in return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); } +/* CythonFunctionShared */ +#include +static PyObject * +__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure) +{ + if (unlikely(op->func_doc == NULL)) { + if (op->func.m_ml->ml_doc) { +#if PY_MAJOR_VERSION >= 3 + op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc); +#else + op->func_doc = PyString_FromString(op->func.m_ml->ml_doc); +#endif + if (unlikely(op->func_doc == NULL)) + return NULL; + } else { + Py_INCREF(Py_None); + return Py_None; + } + } + Py_INCREF(op->func_doc); + return op->func_doc; +} +static int +__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context) +{ + PyObject *tmp = op->func_doc; + if (value == NULL) { + value = Py_None; + } + Py_INCREF(value); + op->func_doc = value; + Py_XDECREF(tmp); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) +{ + if (unlikely(op->func_name == NULL)) { +#if PY_MAJOR_VERSION >= 3 + op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name); +#else + op->func_name = PyString_InternFromString(op->func.m_ml->ml_name); +#endif + if (unlikely(op->func_name == NULL)) + return NULL; + } + Py_INCREF(op->func_name); + return op->func_name; +} +static int +__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context) +{ + PyObject *tmp; +#if PY_MAJOR_VERSION >= 3 + if (unlikely(value == NULL || !PyUnicode_Check(value))) +#else + if (unlikely(value == NULL || !PyString_Check(value))) +#endif + { + PyErr_SetString(PyExc_TypeError, + "__name__ must be set to a string object"); + return -1; + } + tmp = op->func_name; + Py_INCREF(value); + op->func_name = value; + Py_XDECREF(tmp); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) +{ + Py_INCREF(op->func_qualname); + return op->func_qualname; +} +static int +__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context) +{ + PyObject *tmp; +#if PY_MAJOR_VERSION >= 3 + if (unlikely(value == NULL || !PyUnicode_Check(value))) +#else + if (unlikely(value == NULL || !PyString_Check(value))) +#endif + { + PyErr_SetString(PyExc_TypeError, + "__qualname__ must be set to a string object"); + return -1; + } + tmp = op->func_qualname; + Py_INCREF(value); + op->func_qualname = value; + Py_XDECREF(tmp); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure) +{ + PyObject *self; + self = m->func_closure; + if (self == NULL) + self = Py_None; + Py_INCREF(self); + return self; +} +static PyObject * +__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) +{ + if (unlikely(op->func_dict == NULL)) { + op->func_dict = PyDict_New(); + if (unlikely(op->func_dict == NULL)) + return NULL; + } + Py_INCREF(op->func_dict); + return op->func_dict; +} +static int +__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context) +{ + PyObject *tmp; + if (unlikely(value == NULL)) { + PyErr_SetString(PyExc_TypeError, + "function's dictionary may not be deleted"); + return -1; + } + if (unlikely(!PyDict_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "setting function's dictionary to a non-dict"); + return -1; + } + tmp = op->func_dict; + Py_INCREF(value); + op->func_dict = value; + Py_XDECREF(tmp); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) +{ + Py_INCREF(op->func_globals); + return op->func_globals; +} +static PyObject * +__Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) +{ + Py_INCREF(Py_None); + return Py_None; +} +static PyObject * +__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) +{ + PyObject* result = (op->func_code) ? op->func_code : Py_None; + Py_INCREF(result); + return result; +} +static int +__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) { + int result = 0; + PyObject *res = op->defaults_getter((PyObject *) op); + if (unlikely(!res)) + return -1; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + op->defaults_tuple = PyTuple_GET_ITEM(res, 0); + Py_INCREF(op->defaults_tuple); + op->defaults_kwdict = PyTuple_GET_ITEM(res, 1); + Py_INCREF(op->defaults_kwdict); + #else + op->defaults_tuple = PySequence_ITEM(res, 0); + if (unlikely(!op->defaults_tuple)) result = -1; + else { + op->defaults_kwdict = PySequence_ITEM(res, 1); + if (unlikely(!op->defaults_kwdict)) result = -1; + } + #endif + Py_DECREF(res); + return result; +} +static int +__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) { + PyObject* tmp; + if (!value) { + value = Py_None; + } else if (value != Py_None && !PyTuple_Check(value)) { + PyErr_SetString(PyExc_TypeError, + "__defaults__ must be set to a tuple object"); + return -1; + } + Py_INCREF(value); + tmp = op->defaults_tuple; + op->defaults_tuple = value; + Py_XDECREF(tmp); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { + PyObject* result = op->defaults_tuple; + if (unlikely(!result)) { + if (op->defaults_getter) { + if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL; + result = op->defaults_tuple; + } else { + result = Py_None; + } + } + Py_INCREF(result); + return result; +} +static int +__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) { + PyObject* tmp; + if (!value) { + value = Py_None; + } else if (value != Py_None && !PyDict_Check(value)) { + PyErr_SetString(PyExc_TypeError, + "__kwdefaults__ must be set to a dict object"); + return -1; + } + Py_INCREF(value); + tmp = op->defaults_kwdict; + op->defaults_kwdict = value; + Py_XDECREF(tmp); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { + PyObject* result = op->defaults_kwdict; + if (unlikely(!result)) { + if (op->defaults_getter) { + if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL; + result = op->defaults_kwdict; + } else { + result = Py_None; + } + } + Py_INCREF(result); + return result; +} +static int +__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) { + PyObject* tmp; + if (!value || value == Py_None) { + value = NULL; + } else if (!PyDict_Check(value)) { + PyErr_SetString(PyExc_TypeError, + "__annotations__ must be set to a dict object"); + return -1; + } + Py_XINCREF(value); + tmp = op->func_annotations; + op->func_annotations = value; + Py_XDECREF(tmp); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { + PyObject* result = op->func_annotations; + if (unlikely(!result)) { + result = PyDict_New(); + if (unlikely(!result)) return NULL; + op->func_annotations = result; + } + Py_INCREF(result); + return result; +} +static PyGetSetDef __pyx_CyFunction_getsets[] = { + {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, + {(char *) "__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, + {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, + {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, + {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0}, + {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0}, + {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, + {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, + {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, + {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, + {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, + {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, + {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, + {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, + {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, + {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, + {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0}, + {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0}, + {0, 0, 0, 0, 0} +}; +static PyMemberDef __pyx_CyFunction_members[] = { + {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), PY_WRITE_RESTRICTED, 0}, + {0, 0, 0, 0, 0} +}; +static PyObject * +__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args) +{ +#if PY_MAJOR_VERSION >= 3 + Py_INCREF(m->func_qualname); + return m->func_qualname; +#else + return PyString_FromString(m->func.m_ml->ml_name); +#endif +} +static PyMethodDef __pyx_CyFunction_methods[] = { + {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0}, + {0, 0, 0, 0} +}; +#if PY_VERSION_HEX < 0x030500A0 +#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist) +#else +#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func.m_weakreflist) +#endif +static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname, + PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { + if (unlikely(op == NULL)) + return NULL; + op->flags = flags; + __Pyx_CyFunction_weakreflist(op) = NULL; + op->func.m_ml = ml; + op->func.m_self = (PyObject *) op; + Py_XINCREF(closure); + op->func_closure = closure; + Py_XINCREF(module); + op->func.m_module = module; + op->func_dict = NULL; + op->func_name = NULL; + Py_INCREF(qualname); + op->func_qualname = qualname; + op->func_doc = NULL; + op->func_classobj = NULL; + op->func_globals = globals; + Py_INCREF(op->func_globals); + Py_XINCREF(code); + op->func_code = code; + op->defaults_pyobjects = 0; + op->defaults_size = 0; + op->defaults = NULL; + op->defaults_tuple = NULL; + op->defaults_kwdict = NULL; + op->defaults_getter = NULL; + op->func_annotations = NULL; + return (PyObject *) op; +} +static int +__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) +{ + Py_CLEAR(m->func_closure); + Py_CLEAR(m->func.m_module); + Py_CLEAR(m->func_dict); + Py_CLEAR(m->func_name); + Py_CLEAR(m->func_qualname); + Py_CLEAR(m->func_doc); + Py_CLEAR(m->func_globals); + Py_CLEAR(m->func_code); + Py_CLEAR(m->func_classobj); + Py_CLEAR(m->defaults_tuple); + Py_CLEAR(m->defaults_kwdict); + Py_CLEAR(m->func_annotations); + if (m->defaults) { + PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m); + int i; + for (i = 0; i < m->defaults_pyobjects; i++) + Py_XDECREF(pydefaults[i]); + PyObject_Free(m->defaults); + m->defaults = NULL; + } + return 0; +} +static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m) +{ + if (__Pyx_CyFunction_weakreflist(m) != NULL) + PyObject_ClearWeakRefs((PyObject *) m); + __Pyx_CyFunction_clear(m); + PyObject_GC_Del(m); +} +static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m) +{ + PyObject_GC_UnTrack(m); + __Pyx__CyFunction_dealloc(m); +} +static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg) +{ + Py_VISIT(m->func_closure); + Py_VISIT(m->func.m_module); + Py_VISIT(m->func_dict); + Py_VISIT(m->func_name); + Py_VISIT(m->func_qualname); + Py_VISIT(m->func_doc); + Py_VISIT(m->func_globals); + Py_VISIT(m->func_code); + Py_VISIT(m->func_classobj); + Py_VISIT(m->defaults_tuple); + Py_VISIT(m->defaults_kwdict); + if (m->defaults) { + PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m); + int i; + for (i = 0; i < m->defaults_pyobjects; i++) + Py_VISIT(pydefaults[i]); + } + return 0; +} +static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type) +{ +#if PY_MAJOR_VERSION < 3 + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) { + Py_INCREF(func); + return func; + } + if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) { + if (type == NULL) + type = (PyObject *)(Py_TYPE(obj)); + return __Pyx_PyMethod_New(func, type, (PyObject *)(Py_TYPE(type))); + } + if (obj == Py_None) + obj = NULL; +#endif + return __Pyx_PyMethod_New(func, obj, type); +} +static PyObject* +__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op) +{ +#if PY_MAJOR_VERSION >= 3 + return PyUnicode_FromFormat("", + op->func_qualname, (void *)op); +#else + return PyString_FromFormat("", + PyString_AsString(op->func_qualname), (void *)op); +#endif +} +static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) { + PyCFunctionObject* f = (PyCFunctionObject*)func; + PyCFunction meth = f->m_ml->ml_meth; + Py_ssize_t size; + switch (f->m_ml->ml_flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) { + case METH_VARARGS: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) + return (*meth)(self, arg); + break; + case METH_VARARGS | METH_KEYWORDS: + return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw); + case METH_NOARGS: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) { + size = PyTuple_GET_SIZE(arg); + if (likely(size == 0)) + return (*meth)(self, NULL); + PyErr_Format(PyExc_TypeError, + "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)", + f->m_ml->ml_name, size); + return NULL; + } + break; + case METH_O: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) { + size = PyTuple_GET_SIZE(arg); + if (likely(size == 1)) { + PyObject *result, *arg0; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + arg0 = PyTuple_GET_ITEM(arg, 0); + #else + arg0 = PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL; + #endif + result = (*meth)(self, arg0); + #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) + Py_DECREF(arg0); + #endif + return result; + } + PyErr_Format(PyExc_TypeError, + "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)", + f->m_ml->ml_name, size); + return NULL; + } + break; + default: + PyErr_SetString(PyExc_SystemError, "Bad call flags in " + "__Pyx_CyFunction_Call. METH_OLDARGS is no " + "longer supported!"); + return NULL; + } + PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments", + f->m_ml->ml_name); + return NULL; +} +static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { + return __Pyx_CyFunction_CallMethod(func, ((PyCFunctionObject*)func)->m_self, arg, kw); +} +static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) { + PyObject *result; + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func; + if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { + Py_ssize_t argc; + PyObject *new_args; + PyObject *self; + argc = PyTuple_GET_SIZE(args); + new_args = PyTuple_GetSlice(args, 1, argc); + if (unlikely(!new_args)) + return NULL; + self = PyTuple_GetItem(args, 0); + if (unlikely(!self)) { + Py_DECREF(new_args); +#if PY_MAJOR_VERSION > 2 + PyErr_Format(PyExc_TypeError, + "unbound method %.200S() needs an argument", + cyfunc->func_qualname); +#else + PyErr_SetString(PyExc_TypeError, + "unbound method needs an argument"); +#endif + return NULL; + } + result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw); + Py_DECREF(new_args); + } else { + result = __Pyx_CyFunction_Call(func, args, kw); + } + return result; +} +static PyTypeObject __pyx_CyFunctionType_type = { + PyVarObject_HEAD_INIT(0, 0) + "cython_function_or_method", + sizeof(__pyx_CyFunctionObject), + 0, + (destructor) __Pyx_CyFunction_dealloc, + 0, + 0, + 0, +#if PY_MAJOR_VERSION < 3 + 0, +#else + 0, +#endif + (reprfunc) __Pyx_CyFunction_repr, + 0, + 0, + 0, + 0, + __Pyx_CyFunction_CallAsMethod, + 0, + 0, + 0, + 0, + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, + 0, + (traverseproc) __Pyx_CyFunction_traverse, + (inquiry) __Pyx_CyFunction_clear, + 0, +#if PY_VERSION_HEX < 0x030500A0 + offsetof(__pyx_CyFunctionObject, func_weakreflist), +#else + offsetof(PyCFunctionObject, m_weakreflist), +#endif + 0, + 0, + __pyx_CyFunction_methods, + __pyx_CyFunction_members, + __pyx_CyFunction_getsets, + 0, + 0, + __Pyx_CyFunction_descr_get, + 0, + offsetof(__pyx_CyFunctionObject, func_dict), + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, +#if PY_VERSION_HEX >= 0x030400a1 + 0, +#endif +#if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) + 0, +#endif +#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 + 0, +#endif +#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 + 0, +#endif +}; +static int __pyx_CyFunction_init(void) { + __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type); + if (unlikely(__pyx_CyFunctionType == NULL)) { + return -1; + } + return 0; +} +static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults = PyObject_Malloc(size); + if (unlikely(!m->defaults)) + return PyErr_NoMemory(); + memset(m->defaults, 0, size); + m->defaults_pyobjects = pyobjects; + m->defaults_size = size; + return m->defaults; +} +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults_tuple = tuple; + Py_INCREF(tuple); +} +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults_kwdict = dict; + Py_INCREF(dict); +} +static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->func_annotations = dict; + Py_INCREF(dict); +} + +/* CythonFunction */ +static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname, + PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { + PyObject *op = __Pyx_CyFunction_Init( + PyObject_GC_New(__pyx_CyFunctionObject, __pyx_CyFunctionType), + ml, flags, qualname, closure, module, globals, code + ); + if (likely(op)) { + PyObject_GC_Track(op); + } + return op; +} + /* TypeImport */ #ifndef __PYX_HAVE_RT_ImportType #define __PYX_HAVE_RT_ImportType @@ -17119,7 +16781,7 @@ static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) { /* CLineInTraceback */ #ifndef CYTHON_CLINE_IN_TRACEBACK -static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) { +static int __Pyx_CLineForTraceback(CYTHON_UNUSED PyThreadState *tstate, int c_line) { PyObject *use_cline; PyObject *ptype, *pvalue, *ptraceback; #if CYTHON_COMPILING_IN_CPYTHON diff --git a/src/dependency_injector/_cwiring.pyx b/src/dependency_injector/_cwiring.pyx index 88b6bc5a..1dc873c5 100644 --- a/src/dependency_injector/_cwiring.pyx +++ b/src/dependency_injector/_cwiring.pyx @@ -12,31 +12,28 @@ from .wiring import _Marker, PatchedCallable from .providers cimport Provider -def _get_sync_patched(fn, patched: PatchedCallable): - @functools.wraps(fn) - def _patched(*args, **kwargs): - cdef object result - cdef dict to_inject - cdef object arg_key - cdef Provider provider +def _sync_inject(object fn, tuple args, dict kwargs, dict injections, dict closings): + cdef object result + cdef dict to_inject + cdef object arg_key + cdef Provider provider - to_inject = kwargs.copy() - 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() + to_inject = kwargs.copy() + for arg_key, provider in injections.items(): + if arg_key not in kwargs or isinstance(kwargs[arg_key], _Marker): + to_inject[arg_key] = provider() - result = fn(*args, **to_inject) + result = fn(*args, **to_inject) - if patched.closing: - 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 - provider.shutdown() + if closings: + for arg_key, provider in closings.items(): + if arg_key in kwargs and not isinstance(kwargs[arg_key], _Marker): + continue + if not isinstance(provider, providers.Resource): + continue + provider.shutdown() - return result - return _patched + return result async def _async_inject(object fn, tuple args, dict kwargs, dict injections, dict closings): diff --git a/src/dependency_injector/wiring.py b/src/dependency_injector/wiring.py index b1f01622..ab01f672 100644 --- a/src/dependency_injector/wiring.py +++ b/src/dependency_injector/wiring.py @@ -982,7 +982,7 @@ _inspect_filter = InspectFilter() _loader = AutoLoader() # Optimizations -from ._cwiring import _get_sync_patched # noqa +from ._cwiring import _sync_inject # noqa from ._cwiring import _async_inject # noqa @@ -999,3 +999,15 @@ def _get_async_patched(fn: F, patched: PatchedCallable) -> F: patched.closing, ) return _patched + +def _get_sync_patched(fn: F, patched: PatchedCallable) -> F: + @functools.wraps(fn) + def _patched(*args, **kwargs): + return _sync_inject( + fn, + args, + kwargs, + patched.injections, + patched.closing, + ) + return _patched